html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 67
24.7k
| body
stringlengths 51
36.2k
| __index_level_0__
int64 1
1.17k
| comment_length
int64 16
1.45k
| text
stringlengths 190
38.3k
| embeddings
sequence |
---|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/5717 | Errror when saving to disk a dataset of images | You could follow [this](https://cloud.google.com/storage/docs/collaboration#browser) procedure or upload the dataset to Google Drive (50K images is not that much unless high-res) and send me an email with the link. | ### Describe the bug
Hello!
I have an issue when I try to save on disk my dataset of images. The error I get is:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_to_disk
for job_id, done, content in Dataset._save_to_disk_single(**kwargs):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1473, in _save_to_disk_single
writer.write_table(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_writer.py", line 570, in write_table
pa_table = embed_table_storage(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2268, in embed_table_storage
arrays = [
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2269, in <listcomp>
embed_array_storage(table[name], feature) if require_storage_embed(feature) else table[name]
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2142, in embed_array_storage
return feature.embed_storage(array)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/features/image.py", line 269, in embed_storage
storage = pa.StructArray.from_arrays([bytes_array, path_array], ["bytes", "path"], mask=bytes_array.is_null())
File "pyarrow/array.pxi", line 2766, in pyarrow.lib.StructArray.from_arrays
File "pyarrow/array.pxi", line 2961, in pyarrow.lib.c_mask_inverted_from_obj
TypeError: Mask must be a pyarrow.Array of type boolean
```
My dataset is around 50K images, is this error might be due to a bad image?
Thanks for the help.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset["train"].save_to_disk("./myds", num_shards=40)
```
### Expected behavior
Having my dataset properly saved to disk.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0 | 216 | 28 | Errror when saving to disk a dataset of images
### Describe the bug
Hello!
I have an issue when I try to save on disk my dataset of images. The error I get is:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_to_disk
for job_id, done, content in Dataset._save_to_disk_single(**kwargs):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1473, in _save_to_disk_single
writer.write_table(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_writer.py", line 570, in write_table
pa_table = embed_table_storage(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2268, in embed_table_storage
arrays = [
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2269, in <listcomp>
embed_array_storage(table[name], feature) if require_storage_embed(feature) else table[name]
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2142, in embed_array_storage
return feature.embed_storage(array)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/features/image.py", line 269, in embed_storage
storage = pa.StructArray.from_arrays([bytes_array, path_array], ["bytes", "path"], mask=bytes_array.is_null())
File "pyarrow/array.pxi", line 2766, in pyarrow.lib.StructArray.from_arrays
File "pyarrow/array.pxi", line 2961, in pyarrow.lib.c_mask_inverted_from_obj
TypeError: Mask must be a pyarrow.Array of type boolean
```
My dataset is around 50K images, is this error might be due to a bad image?
Thanks for the help.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset["train"].save_to_disk("./myds", num_shards=40)
```
### Expected behavior
Having my dataset properly saved to disk.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
You could follow [this](https://cloud.google.com/storage/docs/collaboration#browser) procedure or upload the dataset to Google Drive (50K images is not that much unless high-res) and send me an email with the link. | [
-1.1648489236831665,
-0.8666452765464783,
-0.726670503616333,
1.4068650007247925,
-0.13274896144866943,
-1.3223906755447388,
0.05514451488852501,
-1.0130778551101685,
1.4621919393539429,
-0.6920582056045532,
0.15534962713718414,
-1.6286884546279907,
-0.1294914335012436,
-0.48921069502830505,
-0.671086847782135,
-0.8929182887077332,
-0.43050244450569153,
-0.9058462381362915,
1.0278630256652832,
2.559143543243408,
1.316210389137268,
-1.2754184007644653,
2.7675819396972656,
0.6605849266052246,
-0.3096545934677124,
-1.0814120769500732,
0.5647587776184082,
-0.0231822170317173,
-1.175918698310852,
-0.5018548965454102,
-0.8761906623840332,
0.020644687116146088,
-0.6146664619445801,
-0.4397585690021515,
0.07452932000160217,
0.48210641741752625,
-0.3047879636287689,
-0.2051377296447754,
-0.6062652468681335,
-0.768559455871582,
0.5536798238754272,
-0.26646262407302856,
0.9763981699943542,
-0.31571006774902344,
1.7032334804534912,
-0.653519332408905,
0.36353960633277893,
0.7150498032569885,
1.3007136583328247,
0.1343584954738617,
0.07273878902196884,
0.2183218151330948,
0.32957929372787476,
-0.02749873325228691,
0.5836570262908936,
1.2404097318649292,
0.6193167567253113,
0.597957193851471,
0.7098543047904968,
-2.202921152114868,
1.3393442630767822,
-0.8993183970451355,
0.2618759572505951,
1.2938573360443115,
-0.7475183010101318,
0.37840744853019714,
-1.8025487661361694,
-0.11501790583133698,
0.642145574092865,
-2.277728319168091,
0.30838772654533386,
-1.25430166721344,
-0.5258139371871948,
0.8737382292747498,
0.3500981032848358,
-1.2394866943359375,
0.24024388194084167,
-0.5169377326965332,
1.124231219291687,
0.5010703802108765,
1.116618275642395,
-1.6375278234481812,
0.009053261019289494,
-0.09236738830804825,
0.07550012320280075,
-1.2714346647262573,
-1.6221998929977417,
0.5792320966720581,
0.47499486804008484,
0.7333913445472717,
0.004779065027832985,
0.9454966187477112,
-1.07680082321167,
0.8362745642662048,
-1.008996844291687,
-1.5232328176498413,
-1.4251097440719604,
-2.5134897232055664,
-2.3166563510894775,
0.7777966260910034,
-0.5430928468704224,
-0.5098268389701843,
2.040613889694214,
-1.022942066192627,
-1.7978646755218506,
1.0811200141906738,
0.3181513845920563,
0.13877341151237488,
2.38387393951416,
0.24713119864463806,
-0.7861667275428772,
0.48422184586524963,
-0.731056809425354,
0.8531503081321716,
-0.2882685363292694,
1.3190745115280151,
0.5093215703964233,
-1.0353435277938843,
1.6607271432876587,
-0.5144753456115723,
0.6215943694114685,
-0.6163166761398315,
-0.5256420373916626,
-0.8768863081932068,
0.2671049237251282,
1.8209515810012817,
-0.3382267951965332,
1.5647529363632202,
-0.316022127866745,
-1.5244553089141846,
-1.5425782203674316,
0.811782956123352,
0.47383788228034973,
-1.0129241943359375,
0.09579318761825562,
-0.46829935908317566,
0.1463732272386551,
0.09722808748483658,
1.2062633037567139,
1.224135398864746,
0.6645382046699524,
-0.3151278495788574,
-0.9211245775222778,
0.21193532645702362,
-0.20195922255516052,
-0.6967209577560425,
-1.8682665824890137,
-0.3843480944633484,
0.3141383230686188,
0.6098279356956482,
-1.2417395114898682,
1.813868522644043,
0.8816074728965759,
2.073442220687866,
0.9186283349990845,
-0.4303528964519501,
1.4145456552505493,
-0.024093803018331528,
1.8355207443237305,
-0.4815610349178314,
0.6182968020439148,
-0.3754221200942993,
-1.2091947793960571,
0.8915704488754272,
-0.4380096197128296,
-1.9929215908050537,
-0.8147410154342651,
-0.7524532079696655,
-0.23914402723312378,
-0.7172010540962219,
0.8721921443939209,
-0.3228539824485779,
-1.4160690307617188,
0.12786166369915009,
-0.6746993064880371,
0.18947537243366241,
-1.2841886281967163,
0.13622616231441498,
0.7341347932815552,
-0.8000323176383972,
-0.095627062022686,
-0.3275594711303711,
-1.3299710750579834,
-0.6175668239593506,
0.3201887309551239,
1.9063273668289185,
-0.6212798357009888,
1.0280791521072388,
0.9544944167137146,
-0.6580325365066528,
0.10524315387010574,
0.19697172939777374,
-0.3197929263114929,
0.7811007499694824,
-1.120481014251709,
-0.47854867577552795,
1.0882394313812256,
-0.2575506865978241,
-0.7667391300201416,
1.3132315874099731,
0.782572865486145,
-1.1209508180618286,
-0.26422572135925293,
-0.23591339588165283,
-0.9369580745697021,
0.04558441787958145,
-1.4753111600875854,
-0.1637755185365677,
0.41637587547302246,
-1.5045526027679443,
-0.27712371945381165,
-0.1199834868311882,
1.4313738346099854,
-0.22721998393535614,
1.4257510900497437,
-0.3921780288219452,
-0.2049773931503296,
-0.2910332679748535,
-0.49755391478538513,
0.25347280502319336,
-0.16463883221149445,
-0.5850849151611328,
0.20365573465824127,
-0.8574835062026978,
0.2446921169757843,
1.5272516012191772,
0.3916895389556885,
0.13989876210689545,
0.39572784304618835,
1.1706839799880981,
0.3778678774833679,
0.00030469056218862534,
-0.8571990728378296,
-1.532004475593567,
1.9965959787368774,
-1.4150195121765137,
1.9012088775634766,
0.849455714225769,
-0.09040703624486923,
-1.8068962097167969,
-1.8418339490890503,
1.2043100595474243,
1.1460641622543335,
2.416965961456299,
0.5721396207809448,
0.4574964642524719,
-0.751610279083252,
-0.7798073887825012,
0.2941788136959076,
-1.0091955661773682,
-0.6899026036262512,
0.1152709349989891,
2.3276615142822266,
1.798458218574524,
-0.5473475456237793,
-0.2743949592113495,
-0.8469626903533936,
1.2775810956954956,
-0.3027256727218628,
0.2815845310688019,
2.01167631149292,
-0.305685818195343,
-1.018141746520996,
1.3133342266082764,
-2.3969521522521973,
0.27943864464759827,
2.1046762466430664,
0.2658427953720093,
0.16448573768138885,
-1.4462521076202393,
-0.6939423680305481,
-0.24232186377048492,
-0.4396747648715973,
-1.2277189493179321,
0.5916035771369934,
-0.3086536228656769,
-0.9232281446456909,
-1.4220095872879028,
-0.01013264711946249,
-1.1415842771530151,
-1.7630672454833984,
0.379615843296051,
1.9588390588760376,
2.1772406101226807,
-0.7999750375747681,
1.3876327276229858,
-0.20271702110767365,
-0.013177618384361267,
1.2485685348510742,
1.4339045286178589,
3.0323309898376465,
1.8251469135284424,
-1.2447383403778076,
0.6452667713165283,
-0.18034902215003967,
-0.4876798689365387,
1.13424551486969,
-1.0914793014526367,
1.0453966856002808,
-0.17492787539958954,
-1.2071069478988647,
-1.2369328737258911,
1.0584759712219238,
0.4823703169822693,
-0.04108645021915436,
-0.4640708863735199,
1.3176054954528809,
0.09316014498472214,
1.2867953777313232,
0.6077395677566528,
-0.4267212450504303,
0.5114864706993103,
-0.3505750596523285,
-0.6173985600471497,
1.643455982208252,
0.18486449122428894,
-1.6388689279556274,
-2.368744373321533,
-0.22268222272396088,
-0.9525721073150635,
-0.07926037907600403,
-0.6074357628822327,
-1.0203142166137695,
1.5671526193618774,
0.3669487535953522,
-1.1640269756317139,
-0.2811754643917084,
-0.2828356921672821,
-0.530979335308075,
2.6872267723083496,
-1.2104846239089966,
-0.1260751187801361,
-0.8809130191802979,
-0.5158115029335022,
1.6463217735290527,
-1.1946866512298584,
-0.21182706952095032,
-1.0352122783660889,
-0.6813905239105225,
-1.3454951047897339,
-0.42186105251312256,
0.0032101906836032867,
-0.9179797172546387,
0.6755224466323853,
0.2027927041053772,
-1.0789719820022583,
-0.2903270721435547,
-0.9301177859306335,
1.0538487434387207,
-0.14452315866947174,
0.24567323923110962,
1.9068140983581543,
0.3177095353603363,
-0.4101402461528778,
0.7393250465393066,
1.22572922706604,
0.6092957854270935,
-0.6575761437416077,
-0.04020354524254799,
-0.6068052053451538,
0.3108195960521698,
-1.4863324165344238,
0.25805261731147766,
-3.0127501487731934,
0.790123462677002,
-0.22159750759601593,
-0.09298475086688995,
-0.12086056172847748,
-1.2949961423873901,
1.0823227167129517,
2.5506751537323,
-1.1565825939178467,
0.46299171447753906,
0.46384528279304504,
1.1185753345489502,
-1.6597777605056763,
0.32092946767807007,
-0.569240391254425,
2.157883644104004,
0.13152249157428741,
1.2098455429077148,
-0.5206570625305176,
-2.175384044647217,
0.6262061595916748,
-1.1814961433410645,
-0.9638696312904358,
0.7420331835746765,
-0.8808916807174683,
0.32417166233062744,
-1.4458919763565063,
-0.15011544525623322,
-0.9798980951309204,
-1.2671111822128296,
0.6974833607673645,
0.10932254046201706,
0.42227914929389954,
-0.4815588891506195,
0.33014702796936035,
-2.136911630630493,
-1.4261512756347656,
-0.2023097574710846,
-0.9732711911201477,
0.5537434816360474,
-0.38579002022743225,
0.6109161972999573,
-0.08458897471427917,
0.13004399836063385,
0.19123470783233643,
1.4946898221969604,
3.4164772033691406,
0.12902556359767914,
0.13628457486629486,
-0.11119114607572556,
-1.0057625770568848,
1.4055055379867554,
0.8585553169250488,
-0.10690032690763474,
-0.5907012224197388,
-0.9750921726226807,
1.381608247756958,
2.0372824668884277,
1.124954104423523,
0.17514465749263763,
-0.8658684492111206,
-0.7252429127693176,
0.03916561231017113,
0.20393864810466766,
0.5411895513534546,
0.8651162385940552,
0.018364425748586655,
0.04892377555370331,
1.3568990230560303,
1.2007955312728882,
-0.24993517994880676,
0.41270381212234497,
-0.9944468140602112,
-0.4005339741706848,
0.36162737011909485,
0.15095467865467072,
0.09739471226930618,
0.49939143657684326,
-1.0084075927734375,
-0.24255168437957764,
-0.20748154819011688,
-0.8839542865753174,
-0.7734634280204773,
-0.377109169960022,
-0.4516277611255646,
1.6015347242355347,
0.08317986875772476,
-0.4982176423072815,
0.08906400948762894,
-0.6169872283935547,
-0.1648194044828415,
-1.061453938484192,
0.10890273749828339,
-0.08693168312311172,
-0.09697209298610687,
-0.207871213555336,
1.6216530799865723,
-0.899067759513855,
-2.1589322090148926,
0.13267074525356293,
0.36678799986839294,
-0.3689768314361572,
0.10751161724328995,
1.7436524629592896,
0.45211872458457947,
1.443209171295166,
1.2667704820632935,
0.9431630373001099,
-0.6128139495849609,
-1.1505540609359741,
0.7354715466499329,
1.0121361017227173,
-1.3776757717132568,
0.9338900446891785,
-0.2594778537750244,
-0.47584956884384155,
0.7235598564147949,
1.3266005516052246,
0.40887197852134705,
-2.046037197113037,
1.002316951751709,
-0.9626981616020203,
0.7780489921569824,
0.766018271446228,
0.7596661448478699,
0.28621718287467957,
0.903342604637146,
-1.2307488918304443,
-1.161340355873108,
-0.6728076934814453,
-0.5714850425720215,
1.839701533317566,
-0.329758882522583,
0.5684859156608582,
-0.22916819155216217,
-1.1155904531478882,
-0.1363927572965622,
0.8383252620697021,
0.356375128030777,
-0.37046071887016296,
0.9505625367164612,
-0.626112699508667,
-0.9884004592895508,
-1.299373984336853,
-0.40420353412628174,
-0.9755929112434387,
-0.9290285110473633,
0.9632272124290466,
0.7265344858169556,
0.507684588432312,
1.9455311298370361,
0.5782585740089417,
0.29905855655670166,
-2.6504499912261963,
0.7949168086051941,
0.26053574681282043,
-0.0009922431781888008,
0.8795419335365295,
0.24225160479545593,
1.230183482170105,
-0.039585307240486145,
0.5881942510604858,
-2.381321668624878,
2.1590378284454346,
-0.18829794228076935,
0.5969952344894409,
0.061255570501089096,
-0.2526082992553711,
1.0955661535263062,
0.5975104570388794,
0.5913907885551453,
-1.1262398958206177,
0.7476886510848999,
-0.5761305093765259,
1.095478892326355,
0.9055481553077698,
-0.9315731525421143,
0.19587522745132446,
1.4629099369049072,
0.47666114568710327,
-0.42930302023887634,
-0.9425223469734192,
-0.7736543416976929,
0.9160996079444885,
1.7313261032104492,
-0.05117259919643402,
0.028313495218753815,
0.8219884634017944,
0.6050258874893188,
-1.1836811304092407,
0.08678853511810303,
-0.6469881534576416,
-0.6702746152877808,
1.6984807252883911,
2.020862340927124,
-0.12642228603363037,
-0.17345191538333893,
-0.6616523265838623,
-1.306772232055664,
0.8004316091537476,
-0.23175515234470367,
0.0634961873292923,
0.6972342729568481,
-0.728138267993927,
1.0580512285232544,
0.583700954914093,
1.0264482498168945,
0.027215860784053802,
0.2549824118614197,
0.3151819109916687,
-0.3760499954223633,
-1.1240534782409668,
-0.29501205682754517,
-1.1217916011810303,
-2.575634002685547,
0.316152960062027,
-0.2450849562883377,
-1.5431861877441406,
0.09174294769763947,
-1.0080057382583618,
0.8702695965766907,
-0.5377281904220581,
-1.1006783246994019,
-1.4623488187789917,
0.3491652011871338,
-0.13377782702445984,
0.9866631627082825,
-1.6842271089553833,
-0.23544560372829437,
1.2456169128417969,
0.8290442228317261,
-0.6651816368103027,
0.9285220503807068,
0.22110193967819214,
0.9556153416633606,
0.7667761445045471,
-0.3981821537017822,
0.5764229893684387,
0.005780684761703014,
-1.4079495668411255,
0.36347612738609314,
1.2458010911941528,
0.17066852748394012,
1.3481333255767822,
-0.4353547990322113,
0.13581125438213348,
0.43087583780288696,
-0.5875062346458435,
-0.5640342831611633,
-0.30299344658851624,
0.7140448093414307,
0.0142646050080657,
-0.9761781692504883,
-0.19187383353710175,
-0.12766528129577637,
-0.2941361963748932,
0.24275138974189758,
-1.4304587841033936,
-0.3284759223461151,
-0.40241357684135437,
-0.4360354542732239,
-1.3338475227355957,
0.020989958196878433,
1.2630088329315186,
-0.7466715574264526,
-0.2484266310930252,
0.5122973918914795,
0.44878068566322327,
0.5472802519798279,
0.536745011806488,
-0.7547312378883362,
-0.28609490394592285,
-0.3285922408103943,
-0.24976415932178497,
0.26397836208343506,
1.2036324739456177,
-0.004653444513678551,
-0.9110178351402283,
0.7034531235694885,
-0.31791722774505615,
0.11937689036130905,
2.0546605587005615,
-0.013379901647567749,
-0.7086962461471558,
0.3793415129184723,
-0.738143265247345,
1.7691136598587036,
1.6778273582458496,
1.2038224935531616,
-0.07397887110710144,
-0.7447232604026794,
0.5840339660644531,
-0.22034184634685516,
-0.2818690240383148,
0.946425199508667,
0.4663190245628357,
-0.19313187897205353,
-1.4856747388839722,
0.6538839340209961,
1.2789721488952637,
-0.7239977717399597,
-0.7037403583526611,
0.06902956962585449,
-0.9229954481124878,
1.2691513299942017,
0.5494415760040283,
0.344948410987854,
0.24010226130485535,
1.5375864505767822,
0.800542950630188,
-0.5080474615097046,
0.4273563027381897,
0.5885323882102966,
-0.14648471772670746,
-2.1106090545654297,
-1.0665215253829956,
0.21231316030025482,
-0.33322978019714355,
-1.573125958442688,
1.34230637550354,
-1.1318302154541016,
-1.0401372909545898,
0.582518994808197,
0.09694622457027435,
1.1696399450302124,
0.3572472035884857,
1.6980489492416382,
2.1469082832336426,
0.901491641998291,
0.36526167392730713,
1.2572650909423828,
-0.04884278029203415,
-0.4417693614959717,
1.8396756649017334,
-0.33767208456993103,
0.5840535759925842,
1.046409249305725,
-0.42435380816459656,
-1.1733273267745972,
-0.8149799704551697,
-1.1192461252212524,
-0.586266815662384,
1.1882768869400024,
0.16023677587509155,
-1.0514470338821411,
0.20759814977645874,
1.5708571672439575,
0.11585847288370132,
-0.1935022473335266,
0.6004813313484192,
0.37838485836982727,
-0.7499030828475952,
-0.0209207683801651,
-0.8639497756958008,
0.5262284278869629,
-0.09379348903894424,
-0.3157167434692383,
0.27776825428009033,
0.5317607522010803,
1.2821210622787476,
-0.13423945009708405,
0.18557605147361755,
1.0928558111190796,
-1.431219458580017,
1.5370993614196777,
-0.6599229574203491,
0.3526327311992645,
-2.422581195831299,
1.3834015130996704,
-0.7095855474472046,
1.9738743305206299,
-2.4894888401031494,
0.4016973078250885,
-0.5345001220703125,
-0.5476127862930298,
0.30676719546318054,
-0.4162195026874542,
0.07887262850999832,
-0.11431603133678436,
-0.8865395188331604,
0.041164085268974304,
-0.7058120965957642,
0.595432460308075,
1.2944204807281494,
1.4299372434616089,
-1.1407331228256226,
-0.2498205304145813,
-1.6803648471832275,
-0.21771332621574402,
-0.7829950451850891,
0.27138617634773254,
-1.9794563055038452,
-0.20085152983665466,
-1.9721713066101074,
-2.4019975662231445,
-1.460689663887024,
-0.9292676448822021,
1.0267969369888306,
0.2289842963218689,
-0.9996850490570068,
1.2472360134124756,
-0.36157482862472534,
-1.7867709398269653,
1.1772249937057495,
-2.192448616027832
] |
https://github.com/huggingface/datasets/issues/5717 | Errror when saving to disk a dataset of images | Thanks @jplu! I managed to reproduce the `TypeError` - it stems from [this](https://github.com/huggingface/datasets/blob/e3f4f124a1b118a5bfff5bae76b25a68aedbebbc/src/datasets/features/image.py#L258-L264) line, which can return a `ChunkedArray` (its mask is also chunked then, which Arrow does not allow) when the embedded data is too big to fit in a standard `Array`.
I'm working on a fix. | ### Describe the bug
Hello!
I have an issue when I try to save on disk my dataset of images. The error I get is:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_to_disk
for job_id, done, content in Dataset._save_to_disk_single(**kwargs):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1473, in _save_to_disk_single
writer.write_table(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_writer.py", line 570, in write_table
pa_table = embed_table_storage(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2268, in embed_table_storage
arrays = [
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2269, in <listcomp>
embed_array_storage(table[name], feature) if require_storage_embed(feature) else table[name]
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2142, in embed_array_storage
return feature.embed_storage(array)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/features/image.py", line 269, in embed_storage
storage = pa.StructArray.from_arrays([bytes_array, path_array], ["bytes", "path"], mask=bytes_array.is_null())
File "pyarrow/array.pxi", line 2766, in pyarrow.lib.StructArray.from_arrays
File "pyarrow/array.pxi", line 2961, in pyarrow.lib.c_mask_inverted_from_obj
TypeError: Mask must be a pyarrow.Array of type boolean
```
My dataset is around 50K images, is this error might be due to a bad image?
Thanks for the help.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset["train"].save_to_disk("./myds", num_shards=40)
```
### Expected behavior
Having my dataset properly saved to disk.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0 | 216 | 48 | Errror when saving to disk a dataset of images
### Describe the bug
Hello!
I have an issue when I try to save on disk my dataset of images. The error I get is:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_to_disk
for job_id, done, content in Dataset._save_to_disk_single(**kwargs):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1473, in _save_to_disk_single
writer.write_table(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_writer.py", line 570, in write_table
pa_table = embed_table_storage(pa_table)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2268, in embed_table_storage
arrays = [
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2269, in <listcomp>
embed_array_storage(table[name], feature) if require_storage_embed(feature) else table[name]
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 1817, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/table.py", line 2142, in embed_array_storage
return feature.embed_storage(array)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/features/image.py", line 269, in embed_storage
storage = pa.StructArray.from_arrays([bytes_array, path_array], ["bytes", "path"], mask=bytes_array.is_null())
File "pyarrow/array.pxi", line 2766, in pyarrow.lib.StructArray.from_arrays
File "pyarrow/array.pxi", line 2961, in pyarrow.lib.c_mask_inverted_from_obj
TypeError: Mask must be a pyarrow.Array of type boolean
```
My dataset is around 50K images, is this error might be due to a bad image?
Thanks for the help.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset["train"].save_to_disk("./myds", num_shards=40)
```
### Expected behavior
Having my dataset properly saved to disk.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
Thanks @jplu! I managed to reproduce the `TypeError` - it stems from [this](https://github.com/huggingface/datasets/blob/e3f4f124a1b118a5bfff5bae76b25a68aedbebbc/src/datasets/features/image.py#L258-L264) line, which can return a `ChunkedArray` (its mask is also chunked then, which Arrow does not allow) when the embedded data is too big to fit in a standard `Array`.
I'm working on a fix. | [
-1.1648489236831665,
-0.8666452765464783,
-0.726670503616333,
1.4068650007247925,
-0.13274896144866943,
-1.3223906755447388,
0.05514451488852501,
-1.0130778551101685,
1.4621919393539429,
-0.6920582056045532,
0.15534962713718414,
-1.6286884546279907,
-0.1294914335012436,
-0.48921069502830505,
-0.671086847782135,
-0.8929182887077332,
-0.43050244450569153,
-0.9058462381362915,
1.0278630256652832,
2.559143543243408,
1.316210389137268,
-1.2754184007644653,
2.7675819396972656,
0.6605849266052246,
-0.3096545934677124,
-1.0814120769500732,
0.5647587776184082,
-0.0231822170317173,
-1.175918698310852,
-0.5018548965454102,
-0.8761906623840332,
0.020644687116146088,
-0.6146664619445801,
-0.4397585690021515,
0.07452932000160217,
0.48210641741752625,
-0.3047879636287689,
-0.2051377296447754,
-0.6062652468681335,
-0.768559455871582,
0.5536798238754272,
-0.26646262407302856,
0.9763981699943542,
-0.31571006774902344,
1.7032334804534912,
-0.653519332408905,
0.36353960633277893,
0.7150498032569885,
1.3007136583328247,
0.1343584954738617,
0.07273878902196884,
0.2183218151330948,
0.32957929372787476,
-0.02749873325228691,
0.5836570262908936,
1.2404097318649292,
0.6193167567253113,
0.597957193851471,
0.7098543047904968,
-2.202921152114868,
1.3393442630767822,
-0.8993183970451355,
0.2618759572505951,
1.2938573360443115,
-0.7475183010101318,
0.37840744853019714,
-1.8025487661361694,
-0.11501790583133698,
0.642145574092865,
-2.277728319168091,
0.30838772654533386,
-1.25430166721344,
-0.5258139371871948,
0.8737382292747498,
0.3500981032848358,
-1.2394866943359375,
0.24024388194084167,
-0.5169377326965332,
1.124231219291687,
0.5010703802108765,
1.116618275642395,
-1.6375278234481812,
0.009053261019289494,
-0.09236738830804825,
0.07550012320280075,
-1.2714346647262573,
-1.6221998929977417,
0.5792320966720581,
0.47499486804008484,
0.7333913445472717,
0.004779065027832985,
0.9454966187477112,
-1.07680082321167,
0.8362745642662048,
-1.008996844291687,
-1.5232328176498413,
-1.4251097440719604,
-2.5134897232055664,
-2.3166563510894775,
0.7777966260910034,
-0.5430928468704224,
-0.5098268389701843,
2.040613889694214,
-1.022942066192627,
-1.7978646755218506,
1.0811200141906738,
0.3181513845920563,
0.13877341151237488,
2.38387393951416,
0.24713119864463806,
-0.7861667275428772,
0.48422184586524963,
-0.731056809425354,
0.8531503081321716,
-0.2882685363292694,
1.3190745115280151,
0.5093215703964233,
-1.0353435277938843,
1.6607271432876587,
-0.5144753456115723,
0.6215943694114685,
-0.6163166761398315,
-0.5256420373916626,
-0.8768863081932068,
0.2671049237251282,
1.8209515810012817,
-0.3382267951965332,
1.5647529363632202,
-0.316022127866745,
-1.5244553089141846,
-1.5425782203674316,
0.811782956123352,
0.47383788228034973,
-1.0129241943359375,
0.09579318761825562,
-0.46829935908317566,
0.1463732272386551,
0.09722808748483658,
1.2062633037567139,
1.224135398864746,
0.6645382046699524,
-0.3151278495788574,
-0.9211245775222778,
0.21193532645702362,
-0.20195922255516052,
-0.6967209577560425,
-1.8682665824890137,
-0.3843480944633484,
0.3141383230686188,
0.6098279356956482,
-1.2417395114898682,
1.813868522644043,
0.8816074728965759,
2.073442220687866,
0.9186283349990845,
-0.4303528964519501,
1.4145456552505493,
-0.024093803018331528,
1.8355207443237305,
-0.4815610349178314,
0.6182968020439148,
-0.3754221200942993,
-1.2091947793960571,
0.8915704488754272,
-0.4380096197128296,
-1.9929215908050537,
-0.8147410154342651,
-0.7524532079696655,
-0.23914402723312378,
-0.7172010540962219,
0.8721921443939209,
-0.3228539824485779,
-1.4160690307617188,
0.12786166369915009,
-0.6746993064880371,
0.18947537243366241,
-1.2841886281967163,
0.13622616231441498,
0.7341347932815552,
-0.8000323176383972,
-0.095627062022686,
-0.3275594711303711,
-1.3299710750579834,
-0.6175668239593506,
0.3201887309551239,
1.9063273668289185,
-0.6212798357009888,
1.0280791521072388,
0.9544944167137146,
-0.6580325365066528,
0.10524315387010574,
0.19697172939777374,
-0.3197929263114929,
0.7811007499694824,
-1.120481014251709,
-0.47854867577552795,
1.0882394313812256,
-0.2575506865978241,
-0.7667391300201416,
1.3132315874099731,
0.782572865486145,
-1.1209508180618286,
-0.26422572135925293,
-0.23591339588165283,
-0.9369580745697021,
0.04558441787958145,
-1.4753111600875854,
-0.1637755185365677,
0.41637587547302246,
-1.5045526027679443,
-0.27712371945381165,
-0.1199834868311882,
1.4313738346099854,
-0.22721998393535614,
1.4257510900497437,
-0.3921780288219452,
-0.2049773931503296,
-0.2910332679748535,
-0.49755391478538513,
0.25347280502319336,
-0.16463883221149445,
-0.5850849151611328,
0.20365573465824127,
-0.8574835062026978,
0.2446921169757843,
1.5272516012191772,
0.3916895389556885,
0.13989876210689545,
0.39572784304618835,
1.1706839799880981,
0.3778678774833679,
0.00030469056218862534,
-0.8571990728378296,
-1.532004475593567,
1.9965959787368774,
-1.4150195121765137,
1.9012088775634766,
0.849455714225769,
-0.09040703624486923,
-1.8068962097167969,
-1.8418339490890503,
1.2043100595474243,
1.1460641622543335,
2.416965961456299,
0.5721396207809448,
0.4574964642524719,
-0.751610279083252,
-0.7798073887825012,
0.2941788136959076,
-1.0091955661773682,
-0.6899026036262512,
0.1152709349989891,
2.3276615142822266,
1.798458218574524,
-0.5473475456237793,
-0.2743949592113495,
-0.8469626903533936,
1.2775810956954956,
-0.3027256727218628,
0.2815845310688019,
2.01167631149292,
-0.305685818195343,
-1.018141746520996,
1.3133342266082764,
-2.3969521522521973,
0.27943864464759827,
2.1046762466430664,
0.2658427953720093,
0.16448573768138885,
-1.4462521076202393,
-0.6939423680305481,
-0.24232186377048492,
-0.4396747648715973,
-1.2277189493179321,
0.5916035771369934,
-0.3086536228656769,
-0.9232281446456909,
-1.4220095872879028,
-0.01013264711946249,
-1.1415842771530151,
-1.7630672454833984,
0.379615843296051,
1.9588390588760376,
2.1772406101226807,
-0.7999750375747681,
1.3876327276229858,
-0.20271702110767365,
-0.013177618384361267,
1.2485685348510742,
1.4339045286178589,
3.0323309898376465,
1.8251469135284424,
-1.2447383403778076,
0.6452667713165283,
-0.18034902215003967,
-0.4876798689365387,
1.13424551486969,
-1.0914793014526367,
1.0453966856002808,
-0.17492787539958954,
-1.2071069478988647,
-1.2369328737258911,
1.0584759712219238,
0.4823703169822693,
-0.04108645021915436,
-0.4640708863735199,
1.3176054954528809,
0.09316014498472214,
1.2867953777313232,
0.6077395677566528,
-0.4267212450504303,
0.5114864706993103,
-0.3505750596523285,
-0.6173985600471497,
1.643455982208252,
0.18486449122428894,
-1.6388689279556274,
-2.368744373321533,
-0.22268222272396088,
-0.9525721073150635,
-0.07926037907600403,
-0.6074357628822327,
-1.0203142166137695,
1.5671526193618774,
0.3669487535953522,
-1.1640269756317139,
-0.2811754643917084,
-0.2828356921672821,
-0.530979335308075,
2.6872267723083496,
-1.2104846239089966,
-0.1260751187801361,
-0.8809130191802979,
-0.5158115029335022,
1.6463217735290527,
-1.1946866512298584,
-0.21182706952095032,
-1.0352122783660889,
-0.6813905239105225,
-1.3454951047897339,
-0.42186105251312256,
0.0032101906836032867,
-0.9179797172546387,
0.6755224466323853,
0.2027927041053772,
-1.0789719820022583,
-0.2903270721435547,
-0.9301177859306335,
1.0538487434387207,
-0.14452315866947174,
0.24567323923110962,
1.9068140983581543,
0.3177095353603363,
-0.4101402461528778,
0.7393250465393066,
1.22572922706604,
0.6092957854270935,
-0.6575761437416077,
-0.04020354524254799,
-0.6068052053451538,
0.3108195960521698,
-1.4863324165344238,
0.25805261731147766,
-3.0127501487731934,
0.790123462677002,
-0.22159750759601593,
-0.09298475086688995,
-0.12086056172847748,
-1.2949961423873901,
1.0823227167129517,
2.5506751537323,
-1.1565825939178467,
0.46299171447753906,
0.46384528279304504,
1.1185753345489502,
-1.6597777605056763,
0.32092946767807007,
-0.569240391254425,
2.157883644104004,
0.13152249157428741,
1.2098455429077148,
-0.5206570625305176,
-2.175384044647217,
0.6262061595916748,
-1.1814961433410645,
-0.9638696312904358,
0.7420331835746765,
-0.8808916807174683,
0.32417166233062744,
-1.4458919763565063,
-0.15011544525623322,
-0.9798980951309204,
-1.2671111822128296,
0.6974833607673645,
0.10932254046201706,
0.42227914929389954,
-0.4815588891506195,
0.33014702796936035,
-2.136911630630493,
-1.4261512756347656,
-0.2023097574710846,
-0.9732711911201477,
0.5537434816360474,
-0.38579002022743225,
0.6109161972999573,
-0.08458897471427917,
0.13004399836063385,
0.19123470783233643,
1.4946898221969604,
3.4164772033691406,
0.12902556359767914,
0.13628457486629486,
-0.11119114607572556,
-1.0057625770568848,
1.4055055379867554,
0.8585553169250488,
-0.10690032690763474,
-0.5907012224197388,
-0.9750921726226807,
1.381608247756958,
2.0372824668884277,
1.124954104423523,
0.17514465749263763,
-0.8658684492111206,
-0.7252429127693176,
0.03916561231017113,
0.20393864810466766,
0.5411895513534546,
0.8651162385940552,
0.018364425748586655,
0.04892377555370331,
1.3568990230560303,
1.2007955312728882,
-0.24993517994880676,
0.41270381212234497,
-0.9944468140602112,
-0.4005339741706848,
0.36162737011909485,
0.15095467865467072,
0.09739471226930618,
0.49939143657684326,
-1.0084075927734375,
-0.24255168437957764,
-0.20748154819011688,
-0.8839542865753174,
-0.7734634280204773,
-0.377109169960022,
-0.4516277611255646,
1.6015347242355347,
0.08317986875772476,
-0.4982176423072815,
0.08906400948762894,
-0.6169872283935547,
-0.1648194044828415,
-1.061453938484192,
0.10890273749828339,
-0.08693168312311172,
-0.09697209298610687,
-0.207871213555336,
1.6216530799865723,
-0.899067759513855,
-2.1589322090148926,
0.13267074525356293,
0.36678799986839294,
-0.3689768314361572,
0.10751161724328995,
1.7436524629592896,
0.45211872458457947,
1.443209171295166,
1.2667704820632935,
0.9431630373001099,
-0.6128139495849609,
-1.1505540609359741,
0.7354715466499329,
1.0121361017227173,
-1.3776757717132568,
0.9338900446891785,
-0.2594778537750244,
-0.47584956884384155,
0.7235598564147949,
1.3266005516052246,
0.40887197852134705,
-2.046037197113037,
1.002316951751709,
-0.9626981616020203,
0.7780489921569824,
0.766018271446228,
0.7596661448478699,
0.28621718287467957,
0.903342604637146,
-1.2307488918304443,
-1.161340355873108,
-0.6728076934814453,
-0.5714850425720215,
1.839701533317566,
-0.329758882522583,
0.5684859156608582,
-0.22916819155216217,
-1.1155904531478882,
-0.1363927572965622,
0.8383252620697021,
0.356375128030777,
-0.37046071887016296,
0.9505625367164612,
-0.626112699508667,
-0.9884004592895508,
-1.299373984336853,
-0.40420353412628174,
-0.9755929112434387,
-0.9290285110473633,
0.9632272124290466,
0.7265344858169556,
0.507684588432312,
1.9455311298370361,
0.5782585740089417,
0.29905855655670166,
-2.6504499912261963,
0.7949168086051941,
0.26053574681282043,
-0.0009922431781888008,
0.8795419335365295,
0.24225160479545593,
1.230183482170105,
-0.039585307240486145,
0.5881942510604858,
-2.381321668624878,
2.1590378284454346,
-0.18829794228076935,
0.5969952344894409,
0.061255570501089096,
-0.2526082992553711,
1.0955661535263062,
0.5975104570388794,
0.5913907885551453,
-1.1262398958206177,
0.7476886510848999,
-0.5761305093765259,
1.095478892326355,
0.9055481553077698,
-0.9315731525421143,
0.19587522745132446,
1.4629099369049072,
0.47666114568710327,
-0.42930302023887634,
-0.9425223469734192,
-0.7736543416976929,
0.9160996079444885,
1.7313261032104492,
-0.05117259919643402,
0.028313495218753815,
0.8219884634017944,
0.6050258874893188,
-1.1836811304092407,
0.08678853511810303,
-0.6469881534576416,
-0.6702746152877808,
1.6984807252883911,
2.020862340927124,
-0.12642228603363037,
-0.17345191538333893,
-0.6616523265838623,
-1.306772232055664,
0.8004316091537476,
-0.23175515234470367,
0.0634961873292923,
0.6972342729568481,
-0.728138267993927,
1.0580512285232544,
0.583700954914093,
1.0264482498168945,
0.027215860784053802,
0.2549824118614197,
0.3151819109916687,
-0.3760499954223633,
-1.1240534782409668,
-0.29501205682754517,
-1.1217916011810303,
-2.575634002685547,
0.316152960062027,
-0.2450849562883377,
-1.5431861877441406,
0.09174294769763947,
-1.0080057382583618,
0.8702695965766907,
-0.5377281904220581,
-1.1006783246994019,
-1.4623488187789917,
0.3491652011871338,
-0.13377782702445984,
0.9866631627082825,
-1.6842271089553833,
-0.23544560372829437,
1.2456169128417969,
0.8290442228317261,
-0.6651816368103027,
0.9285220503807068,
0.22110193967819214,
0.9556153416633606,
0.7667761445045471,
-0.3981821537017822,
0.5764229893684387,
0.005780684761703014,
-1.4079495668411255,
0.36347612738609314,
1.2458010911941528,
0.17066852748394012,
1.3481333255767822,
-0.4353547990322113,
0.13581125438213348,
0.43087583780288696,
-0.5875062346458435,
-0.5640342831611633,
-0.30299344658851624,
0.7140448093414307,
0.0142646050080657,
-0.9761781692504883,
-0.19187383353710175,
-0.12766528129577637,
-0.2941361963748932,
0.24275138974189758,
-1.4304587841033936,
-0.3284759223461151,
-0.40241357684135437,
-0.4360354542732239,
-1.3338475227355957,
0.020989958196878433,
1.2630088329315186,
-0.7466715574264526,
-0.2484266310930252,
0.5122973918914795,
0.44878068566322327,
0.5472802519798279,
0.536745011806488,
-0.7547312378883362,
-0.28609490394592285,
-0.3285922408103943,
-0.24976415932178497,
0.26397836208343506,
1.2036324739456177,
-0.004653444513678551,
-0.9110178351402283,
0.7034531235694885,
-0.31791722774505615,
0.11937689036130905,
2.0546605587005615,
-0.013379901647567749,
-0.7086962461471558,
0.3793415129184723,
-0.738143265247345,
1.7691136598587036,
1.6778273582458496,
1.2038224935531616,
-0.07397887110710144,
-0.7447232604026794,
0.5840339660644531,
-0.22034184634685516,
-0.2818690240383148,
0.946425199508667,
0.4663190245628357,
-0.19313187897205353,
-1.4856747388839722,
0.6538839340209961,
1.2789721488952637,
-0.7239977717399597,
-0.7037403583526611,
0.06902956962585449,
-0.9229954481124878,
1.2691513299942017,
0.5494415760040283,
0.344948410987854,
0.24010226130485535,
1.5375864505767822,
0.800542950630188,
-0.5080474615097046,
0.4273563027381897,
0.5885323882102966,
-0.14648471772670746,
-2.1106090545654297,
-1.0665215253829956,
0.21231316030025482,
-0.33322978019714355,
-1.573125958442688,
1.34230637550354,
-1.1318302154541016,
-1.0401372909545898,
0.582518994808197,
0.09694622457027435,
1.1696399450302124,
0.3572472035884857,
1.6980489492416382,
2.1469082832336426,
0.901491641998291,
0.36526167392730713,
1.2572650909423828,
-0.04884278029203415,
-0.4417693614959717,
1.8396756649017334,
-0.33767208456993103,
0.5840535759925842,
1.046409249305725,
-0.42435380816459656,
-1.1733273267745972,
-0.8149799704551697,
-1.1192461252212524,
-0.586266815662384,
1.1882768869400024,
0.16023677587509155,
-1.0514470338821411,
0.20759814977645874,
1.5708571672439575,
0.11585847288370132,
-0.1935022473335266,
0.6004813313484192,
0.37838485836982727,
-0.7499030828475952,
-0.0209207683801651,
-0.8639497756958008,
0.5262284278869629,
-0.09379348903894424,
-0.3157167434692383,
0.27776825428009033,
0.5317607522010803,
1.2821210622787476,
-0.13423945009708405,
0.18557605147361755,
1.0928558111190796,
-1.431219458580017,
1.5370993614196777,
-0.6599229574203491,
0.3526327311992645,
-2.422581195831299,
1.3834015130996704,
-0.7095855474472046,
1.9738743305206299,
-2.4894888401031494,
0.4016973078250885,
-0.5345001220703125,
-0.5476127862930298,
0.30676719546318054,
-0.4162195026874542,
0.07887262850999832,
-0.11431603133678436,
-0.8865395188331604,
0.041164085268974304,
-0.7058120965957642,
0.595432460308075,
1.2944204807281494,
1.4299372434616089,
-1.1407331228256226,
-0.2498205304145813,
-1.6803648471832275,
-0.21771332621574402,
-0.7829950451850891,
0.27138617634773254,
-1.9794563055038452,
-0.20085152983665466,
-1.9721713066101074,
-2.4019975662231445,
-1.460689663887024,
-0.9292676448822021,
1.0267969369888306,
0.2289842963218689,
-0.9996850490570068,
1.2472360134124756,
-0.36157482862472534,
-1.7867709398269653,
1.1772249937057495,
-2.192448616027832
] |
https://github.com/huggingface/datasets/issues/5716 | Handle empty audio | Hi! Can you share one of the problematic audio files with us?
I tried to reproduce the error with the following code:
```python
import soundfile as sf
import numpy as np
from datasets import Audio
sf.write("empty.wav", np.array([]), 16000)
Audio(sampling_rate=24000).decode_example({"path": "empty.wav", "bytes": None})
```
But without success.
Also, what version of `librosa` is installed in your env? (You can get this info with `python -c "import librosa; print(librosa.__version__)`)
| Some audio paths exist, but they are empty, and an error will be reported when reading the audio path.How to use the filter function to avoid the empty audio path?
when a audio is empty, when do resample , it will break:
`array, sampling_rate = sf.read(f) array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)` | 217 | 67 | Handle empty audio
Some audio paths exist, but they are empty, and an error will be reported when reading the audio path.How to use the filter function to avoid the empty audio path?
when a audio is empty, when do resample , it will break:
`array, sampling_rate = sf.read(f) array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)`
Hi! Can you share one of the problematic audio files with us?
I tried to reproduce the error with the following code:
```python
import soundfile as sf
import numpy as np
from datasets import Audio
sf.write("empty.wav", np.array([]), 16000)
Audio(sampling_rate=24000).decode_example({"path": "empty.wav", "bytes": None})
```
But without success.
Also, what version of `librosa` is installed in your env? (You can get this info with `python -c "import librosa; print(librosa.__version__)`)
| [
-1.2611968517303467,
-0.8418148756027222,
-0.6879671812057495,
1.530086636543274,
-0.252759724855423,
-1.2516427040100098,
0.1576596200466156,
-1.0573655366897583,
1.6285810470581055,
-0.8257520794868469,
0.44141441583633423,
-1.610791563987732,
0.14550267159938812,
-0.6197282075881958,
-0.9001727104187012,
-0.8223373889923096,
-0.46210986375808716,
-0.6964183449745178,
0.9885234832763672,
2.4886748790740967,
1.2595070600509644,
-1.3564414978027344,
2.657932758331299,
0.711255669593811,
-0.22021572291851044,
-0.9228604435920715,
0.5575433969497681,
0.00018910598009824753,
-1.1684757471084595,
-0.5509037971496582,
-0.8606176972389221,
-0.15732507407665253,
-0.5400732755661011,
-0.5283454656600952,
-0.12146788090467453,
0.37681928277015686,
-0.29194626212120056,
-0.3026169240474701,
-0.48442238569259644,
-0.8247103095054626,
0.43298500776290894,
-0.3506927788257599,
0.9233990907669067,
-0.31479164958000183,
1.8119230270385742,
-0.5604283809661865,
0.5600053668022156,
0.7548573017120361,
1.4567204713821411,
0.27645358443260193,
-0.14368990063667297,
0.44617000222206116,
0.4285273253917694,
-0.015507670119404793,
0.5669919848442078,
1.1407688856124878,
0.7222284078598022,
0.4667451083660126,
0.7547779083251953,
-2.1955931186676025,
1.300504207611084,
-1.1896181106567383,
0.27447396516799927,
1.294082760810852,
-0.8892346024513245,
0.24620236456394196,
-1.635023593902588,
-0.11075226217508316,
0.5163171887397766,
-2.3464365005493164,
0.3342561721801758,
-1.3257331848144531,
-0.5441848635673523,
1.0550371408462524,
0.4287511706352234,
-1.2438215017318726,
0.05845549702644348,
-0.3434729278087616,
0.8910737037658691,
0.36440590023994446,
1.0486890077590942,
-1.5923411846160889,
-0.016374530270695686,
-0.3067812919616699,
0.019518589600920677,
-1.2345499992370605,
-1.458685278892517,
0.6170521378517151,
0.5701241493225098,
0.438141405582428,
-0.1173691675066948,
1.034688949584961,
-1.0663350820541382,
0.9250054955482483,
-1.0241332054138184,
-1.5940698385238647,
-1.4368659257888794,
-2.2857484817504883,
-2.2415900230407715,
0.7908180952072144,
-0.5348073244094849,
-0.540595293045044,
2.158024787902832,
-1.0231337547302246,
-1.689534068107605,
1.2114615440368652,
0.14546333253383636,
0.026569457724690437,
2.3698649406433105,
0.20158842206001282,
-0.6174355745315552,
0.3735947012901306,
-0.7842610478401184,
0.91460120677948,
-0.4801263213157654,
1.3485609292984009,
0.4657649099826813,
-1.0960988998413086,
1.5647855997085571,
-0.3469926416873932,
0.4821344017982483,
-0.5828967094421387,
-0.6192017793655396,
-0.7551557421684265,
0.4581908583641052,
1.8003456592559814,
-0.32222265005111694,
1.5326474905014038,
-0.3419187068939209,
-1.4927362203598022,
-1.6278061866760254,
0.9175355434417725,
0.5532051920890808,
-0.8510014414787292,
0.11543368548154831,
-0.31606602668762207,
0.15778222680091858,
-0.0631135031580925,
1.2226208448410034,
1.3313896656036377,
0.71892911195755,
-0.35832417011260986,
-0.8015821576118469,
0.11728294938802719,
-0.08409512788057327,
-0.7474960684776306,
-1.7513335943222046,
-0.4026027023792267,
-0.01299450546503067,
0.6653136610984802,
-1.2451732158660889,
1.8374900817871094,
0.9648073315620422,
1.8077951669692993,
1.0382053852081299,
-0.2609092593193054,
1.457724690437317,
0.06028395891189575,
1.8813211917877197,
-0.5782048106193542,
0.6284374594688416,
-0.5535861253738403,
-1.155095100402832,
0.8664367198944092,
-0.3049132227897644,
-2.105811834335327,
-0.8621423244476318,
-0.8143462538719177,
-0.16219019889831543,
-0.8050337433815002,
1.0127418041229248,
-0.3194209933280945,
-1.2920790910720825,
0.23664335906505585,
-0.7543993592262268,
0.09054514765739441,
-1.2190155982971191,
0.3662532567977905,
0.6648764610290527,
-0.6342151165008545,
0.06638933718204498,
-0.20124313235282898,
-1.157582402229309,
-0.4705508053302765,
0.2984582185745239,
1.9773926734924316,
-0.790515661239624,
0.9455980658531189,
1.015866994857788,
-0.6777893304824829,
-0.08056119829416275,
0.3307536244392395,
-0.2733560800552368,
0.8865728378295898,
-0.9844894409179688,
-0.4675343930721283,
1.2247711420059204,
-0.21317480504512787,
-0.5541050434112549,
1.50154447555542,
0.6973474025726318,
-0.9725374579429626,
-0.14722940325737,
-0.17381563782691956,
-0.8490914106369019,
0.07203355431556702,
-1.6029349565505981,
-0.16147775948047638,
0.4776250720024109,
-1.5075079202651978,
-0.4290480315685272,
-0.12763209640979767,
1.2597721815109253,
-0.21570192277431488,
1.4950076341629028,
-0.34605705738067627,
-0.23725084960460663,
-0.31713172793388367,
-0.384321391582489,
0.15158529579639435,
-0.09753209352493286,
-0.649364173412323,
0.215417742729187,
-0.7051771283149719,
0.40402132272720337,
1.4125862121582031,
0.2539501488208771,
0.05144002288579941,
0.4636804163455963,
1.0331923961639404,
0.35888320207595825,
-0.012822113931179047,
-0.914023756980896,
-1.4892138242721558,
1.9791040420532227,
-1.4941768646240234,
2.0363807678222656,
0.6851769685745239,
0.01627071015536785,
-1.6919398307800293,
-1.8168717622756958,
1.3064947128295898,
1.169350028038025,
2.2389137744903564,
0.5278415083885193,
0.3377530872821808,
-0.8876726031303406,
-0.5877751111984253,
0.4000162184238434,
-1.19547700881958,
-0.6977300643920898,
0.031320132315158844,
2.4228804111480713,
1.6854159832000732,
-0.44888192415237427,
-0.16596579551696777,
-1.0176340341567993,
1.372346043586731,
-0.13245727121829987,
0.23697316646575928,
1.9518134593963623,
-0.2730332016944885,
-1.1849631071090698,
1.2677572965621948,
-2.4344654083251953,
0.12128660827875137,
2.0234434604644775,
0.3744969069957733,
0.0734931156039238,
-1.397439956665039,
-0.5418393015861511,
-0.2684713900089264,
-0.5051942467689514,
-1.1815731525421143,
0.5645089149475098,
-0.2032153457403183,
-0.8039947748184204,
-1.2733771800994873,
0.12817873060703278,
-1.1379741430282593,
-1.7371219396591187,
0.3033618628978729,
1.872833013534546,
2.008279800415039,
-0.6514306664466858,
1.6005491018295288,
-0.3271474540233612,
0.14136448502540588,
1.2410907745361328,
1.3104654550552368,
3.08180570602417,
1.9444316625595093,
-1.2789257764816284,
0.5251144766807556,
-0.17374145984649658,
-0.4121224284172058,
1.2473869323730469,
-1.184513807296753,
1.288914680480957,
-0.03845076262950897,
-1.0688350200653076,
-1.17716383934021,
0.9194812178611755,
0.4286268949508667,
0.061724111437797546,
-0.4749137759208679,
1.1242542266845703,
0.09852217137813568,
1.272998332977295,
0.6421295404434204,
-0.20700828731060028,
0.5725951194763184,
-0.4200132489204407,
-0.517817497253418,
1.560563087463379,
0.17308403551578522,
-1.4558409452438354,
-2.2732415199279785,
-0.12845009565353394,
-0.8821702599525452,
0.05016636103391647,
-0.5051445960998535,
-1.0037181377410889,
1.6421095132827759,
0.30732667446136475,
-1.340623140335083,
-0.35053274035453796,
-0.3528735041618347,
-0.6003258228302002,
2.7910830974578857,
-1.451113224029541,
-0.3077385723590851,
-1.011613368988037,
-0.7158693075180054,
1.6490429639816284,
-1.2692456245422363,
-0.242912158370018,
-1.0042519569396973,
-0.5230093002319336,
-1.3240795135498047,
-0.49527183175086975,
-0.03703484684228897,
-1.0210661888122559,
0.8584954738616943,
0.19385625422000885,
-1.1933056116104126,
-0.458871066570282,
-0.8498396277427673,
0.8165009617805481,
-0.028896547853946686,
0.23287338018417358,
1.911466121673584,
0.4416627287864685,
-0.37237343192100525,
0.784884512424469,
1.1831207275390625,
0.7236842513084412,
-0.5660032033920288,
0.2910830080509186,
-0.5640854835510254,
0.28372859954833984,
-1.3682042360305786,
0.3088800609111786,
-2.7688276767730713,
0.5258833765983582,
-0.03904859721660614,
-0.20424579083919525,
-0.0782553106546402,
-1.4182102680206299,
1.1014025211334229,
2.4920756816864014,
-1.0866345167160034,
0.45107245445251465,
0.18413355946540833,
1.2060399055480957,
-1.6328481435775757,
0.3035864233970642,
-0.41415485739707947,
2.151277542114258,
0.2939625382423401,
1.2548569440841675,
-0.5078030824661255,
-2.2517495155334473,
0.6758285164833069,
-1.3264507055282593,
-1.215636968612671,
0.6919733881950378,
-0.790472149848938,
0.11021670699119568,
-1.3559199571609497,
-0.19554105401039124,
-0.7999266386032104,
-1.1743135452270508,
0.7635892033576965,
0.24841342866420746,
0.37751081585884094,
-0.5283018946647644,
0.31359854340553284,
-2.1767022609710693,
-1.2750786542892456,
-0.1399621218442917,
-0.9288329482078552,
0.5063457489013672,
-0.43872731924057007,
0.6315035223960876,
-0.2483483850955963,
-0.0077751134522259235,
0.44210535287857056,
1.6387532949447632,
3.485447645187378,
0.19013971090316772,
0.44660302996635437,
-0.30656710267066956,
-0.8514733910560608,
1.5027652978897095,
0.9323951601982117,
-0.0783076360821724,
-0.6226504445075989,
-1.183734655380249,
1.2120662927627563,
1.8655050992965698,
0.9168264269828796,
0.061721138656139374,
-0.8422664403915405,
-0.7239428162574768,
-0.078561931848526,
0.15998440980911255,
0.5221843123435974,
1.017891764640808,
0.060875408351421356,
0.04393202066421509,
1.3260418176651,
1.225594162940979,
-0.46512511372566223,
0.2928231656551361,
-0.7929105758666992,
-0.47005337476730347,
0.4885437786579132,
0.32956215739250183,
-0.10249898582696915,
0.45381560921669006,
-0.8859834671020508,
-0.17087262868881226,
-0.3940947949886322,
-0.8759232759475708,
-0.6931996941566467,
-0.4361177980899811,
-0.4117986261844635,
1.7004691362380981,
0.09015882760286331,
-0.4852552115917206,
-0.023240450769662857,
-0.7147062420845032,
-0.11236153542995453,
-1.0653927326202393,
0.1674261838197708,
-0.07594602555036545,
-0.18879260122776031,
-0.09705772250890732,
1.792008399963379,
-0.8059746623039246,
-2.0509510040283203,
0.30175477266311646,
0.18160594999790192,
-0.32990068197250366,
0.2698574662208557,
1.4902974367141724,
0.5330774188041687,
1.4216798543930054,
1.4377142190933228,
0.9012214541435242,
-0.5671948790550232,
-1.327289342880249,
0.7929078340530396,
0.9596933126449585,
-1.4480774402618408,
0.7567211389541626,
-0.03881269320845604,
-0.44353747367858887,
0.6505631804466248,
1.2454369068145752,
0.5214963555335999,
-2.006078004837036,
0.8399637341499329,
-0.8593594431877136,
0.9429155588150024,
0.6138275265693665,
0.6073638200759888,
0.3918416202068329,
0.8764646053314209,
-1.2030160427093506,
-1.1629831790924072,
-0.6775307059288025,
-0.7591245770454407,
1.9963228702545166,
-0.2612042725086212,
0.6888326406478882,
-0.2614920139312744,
-1.3062255382537842,
-0.2084890604019165,
0.688609778881073,
0.2953717112541199,
-0.47943252325057983,
0.7822046875953674,
-0.6634257435798645,
-1.0677753686904907,
-1.456659197807312,
-0.49689459800720215,
-1.0420066118240356,
-0.9478020071983337,
1.021978735923767,
0.7411096096038818,
0.1555340737104416,
1.8810902833938599,
0.613635241985321,
0.19971007108688354,
-2.6175785064697266,
0.8788659572601318,
0.2748628258705139,
-0.04826731979846954,
0.8275219798088074,
0.39234453439712524,
1.0493226051330566,
-0.0751342698931694,
0.5560861825942993,
-2.5814414024353027,
2.423243999481201,
-0.30948272347450256,
0.6977096199989319,
0.08746343106031418,
-0.168924480676651,
1.1346988677978516,
0.6926187872886658,
0.5623499751091003,
-1.0778669118881226,
0.5388633608818054,
-0.6355709433555603,
1.3549288511276245,
0.9221245646476746,
-0.7841328978538513,
-0.05371423810720444,
1.3350781202316284,
0.4712161123752594,
-0.539195716381073,
-0.8446608781814575,
-1.0370670557022095,
0.901926577091217,
1.7561582326889038,
-0.04415023326873779,
0.019466117024421692,
0.7870912551879883,
0.7607216835021973,
-1.1920164823532104,
0.13116253912448883,
-0.7778329253196716,
-0.8828912377357483,
1.6372379064559937,
2.0640432834625244,
-0.2127818912267685,
-0.33506321907043457,
-0.6518669128417969,
-1.2465792894363403,
0.8574227690696716,
0.018377376720309258,
0.16595642268657684,
0.6187437176704407,
-0.5965750217437744,
1.0757784843444824,
0.9380742907524109,
0.8941266536712646,
0.3098916709423065,
0.2910851836204529,
0.43339067697525024,
-0.28788748383522034,
-1.112673282623291,
-0.2974764108657837,
-1.1366397142410278,
-2.7564005851745605,
0.4000806510448456,
-0.39101821184158325,
-1.3946269750595093,
0.005780610255897045,
-1.1026842594146729,
0.8300027847290039,
-0.600975751876831,
-1.1700409650802612,
-1.5783846378326416,
0.10207019746303558,
-0.06020629405975342,
0.8868392705917358,
-1.7237075567245483,
-0.17114263772964478,
1.2282822132110596,
0.8012832403182983,
-0.6630183458328247,
0.9448120594024658,
0.2286209613084793,
1.0872344970703125,
0.8240377902984619,
-0.4642104506492615,
0.4957650303840637,
-0.026085814461112022,
-1.3365435600280762,
0.4816068112850189,
1.2434923648834229,
0.06595254689455032,
1.513006567955017,
-0.5617825388908386,
0.0008991733193397522,
0.3429233431816101,
-0.6077865958213806,
-0.4946343004703522,
-0.4978696405887604,
0.7062976360321045,
0.033573657274246216,
-0.9194145798683167,
-0.003253608476370573,
-0.05417955666780472,
-0.38749784231185913,
0.0607992559671402,
-1.4370077848434448,
-0.11968602240085602,
-0.3880005180835724,
-0.5708453059196472,
-1.3041836023330688,
-0.20470403134822845,
1.30964195728302,
-0.7295859456062317,
-0.1550343781709671,
0.4634893536567688,
0.3071005642414093,
0.6150019764900208,
0.646461546421051,
-0.6916089057922363,
-0.5228092074394226,
-0.23481279611587524,
-0.38115817308425903,
0.4395875930786133,
1.3169389963150024,
-0.0849834755063057,
-0.9174734354019165,
0.6216906309127808,
-0.24500815570354462,
0.12513858079910278,
1.8786215782165527,
0.01565389335155487,
-0.7338420152664185,
0.4016493558883667,
-0.6632935404777527,
1.899369716644287,
1.5874847173690796,
1.1982898712158203,
-0.0999688059091568,
-0.95750492811203,
0.6289651989936829,
-0.385581910610199,
-0.34171706438064575,
0.7073858976364136,
0.4050620198249817,
-0.21324877440929413,
-1.3408464193344116,
0.7150963544845581,
1.2632997035980225,
-0.8612771034240723,
-0.8668688535690308,
0.15308794379234314,
-0.6564310193061829,
1.0491952896118164,
0.4748355448246002,
0.3977978527545929,
0.3343019485473633,
1.6816843748092651,
0.8293027877807617,
-0.46800467371940613,
0.5804545879364014,
0.5549966096878052,
-0.1368575394153595,
-2.1772005558013916,
-1.1724833250045776,
0.32919368147850037,
-0.5523099303245544,
-1.6334952116012573,
1.4150344133377075,
-1.04293954372406,
-0.9209673404693604,
0.7001979351043701,
0.11494072526693344,
1.462199091911316,
0.35487040877342224,
1.5419870615005493,
2.044827699661255,
0.782023549079895,
0.4799024164676666,
1.2679110765457153,
-0.12230247259140015,
-0.5136527419090271,
1.862592101097107,
-0.42403918504714966,
0.3868148624897003,
1.156387448310852,
-0.30130332708358765,
-1.0022133588790894,
-0.7694945931434631,
-1.2996166944503784,
-0.8448821306228638,
1.2361394166946411,
0.19527402520179749,
-1.0582648515701294,
0.25497785210609436,
1.6449315547943115,
0.0804935097694397,
-0.3118932247161865,
0.5116741061210632,
0.3805013597011566,
-0.7231222987174988,
-0.0999690592288971,
-0.9405274987220764,
0.4918058514595032,
-0.22725524008274078,
-0.4353649914264679,
0.2641814649105072,
0.43030884861946106,
1.2919893264770508,
-0.054870717227458954,
0.11795543879270554,
0.9827643036842346,
-1.6250280141830444,
1.5844545364379883,
-0.5477011203765869,
0.3817942440509796,
-2.1550533771514893,
1.408508539199829,
-0.7696301341056824,
1.9342035055160522,
-2.674863576889038,
0.3603056073188782,
-0.5566659569740295,
-0.5122225284576416,
0.2824954092502594,
-0.30747854709625244,
0.18020053207874298,
-0.24581407010555267,
-1.0969922542572021,
-0.09382826089859009,
-0.641120433807373,
0.5898183584213257,
1.1346266269683838,
1.2768008708953857,
-1.0670664310455322,
-0.36421456933021545,
-1.7059305906295776,
-0.06923432648181915,
-0.6085708737373352,
0.3320563733577728,
-2.1265974044799805,
-0.17908476293087006,
-2.0067949295043945,
-2.1716270446777344,
-1.2974071502685547,
-0.819262683391571,
1.1309893131256104,
0.09667443484067917,
-0.7996153831481934,
1.1930348873138428,
-0.3115895986557007,
-1.7628223896026611,
1.0498846769332886,
-2.1797866821289062
] |
https://github.com/huggingface/datasets/issues/5715 | Return Numpy Array (fixed length) Mode, in __get_item__, Instead of List | Hi!
You can use [`.set_format("np")`](https://huggingface.co/docs/datasets/process#format) to get NumPy arrays (or Pytorch tensors with `.set_format("torch")`) in `__getitem__`.
Also, have you been able to reproduce the linked PyTorch issue with a HF dataset?
| ### Feature request
There are old known issues, but they can be easily forgettable problems in multiprocessing with pytorch-dataloader:
Too high usage of RAM or shared-memory in pytorch when we set num workers > 1 and returning type of dataset or dataloader is "List" or "Dict".
https://github.com/pytorch/pytorch/issues/13246
With huggingface datasets, unfortunately, the default return type is the list, so the problem is raised too often if we do not set anything for the issue.
However, this issue can be released when the returning output is fixed in length.
Therefore, I request the mode, returning outputs with fixed length (e.g. numpy array) rather than list.
The design would be good when we load datasets as
```python
load_dataset(..., with_return_as_fixed_tensor=True)
```
### Motivation
The general solution for this issue is already in the comments: https://github.com/pytorch/pytorch/issues/13246#issuecomment-905703662
: Numpy or Pandas seems not to have problems, while both have the string type.
(I'm not sure that the sequence of huggingface datasets can solve this problem as well)
### Your contribution
I'll read it ! thanks | 218 | 31 | Return Numpy Array (fixed length) Mode, in __get_item__, Instead of List
### Feature request
There are old known issues, but they can be easily forgettable problems in multiprocessing with pytorch-dataloader:
Too high usage of RAM or shared-memory in pytorch when we set num workers > 1 and returning type of dataset or dataloader is "List" or "Dict".
https://github.com/pytorch/pytorch/issues/13246
With huggingface datasets, unfortunately, the default return type is the list, so the problem is raised too often if we do not set anything for the issue.
However, this issue can be released when the returning output is fixed in length.
Therefore, I request the mode, returning outputs with fixed length (e.g. numpy array) rather than list.
The design would be good when we load datasets as
```python
load_dataset(..., with_return_as_fixed_tensor=True)
```
### Motivation
The general solution for this issue is already in the comments: https://github.com/pytorch/pytorch/issues/13246#issuecomment-905703662
: Numpy or Pandas seems not to have problems, while both have the string type.
(I'm not sure that the sequence of huggingface datasets can solve this problem as well)
### Your contribution
I'll read it ! thanks
Hi!
You can use [`.set_format("np")`](https://huggingface.co/docs/datasets/process#format) to get NumPy arrays (or Pytorch tensors with `.set_format("torch")`) in `__getitem__`.
Also, have you been able to reproduce the linked PyTorch issue with a HF dataset?
| [
-1.1912423372268677,
-0.966080367565155,
-0.7264478802680969,
1.425199031829834,
-0.13787509500980377,
-1.255020260810852,
0.090953528881073,
-1.0775001049041748,
1.6279637813568115,
-0.8039613962173462,
0.2949782907962799,
-1.761159062385559,
0.001931612379848957,
-0.5888058543205261,
-0.7348957061767578,
-0.827495276927948,
-0.3984881341457367,
-0.7801622152328491,
0.9751116633415222,
2.497708559036255,
1.2665787935256958,
-1.3624708652496338,
2.6674723625183105,
0.6665371656417847,
-0.20785200595855713,
-1.0427284240722656,
0.51801598072052,
-0.023595280945301056,
-1.228489875793457,
-0.4732825756072998,
-0.9022220969200134,
-0.072435662150383,
-0.5164651274681091,
-0.5127694606781006,
-0.053877875208854675,
0.43775779008865356,
-0.2679845094680786,
-0.3231483995914459,
-0.5655096173286438,
-0.8158209919929504,
0.46037474274635315,
-0.31730106472969055,
0.9427629113197327,
-0.33258625864982605,
1.7927550077438354,
-0.5980449318885803,
0.49790745973587036,
0.7153627872467041,
1.3572750091552734,
0.18518947064876556,
-0.08807945996522903,
0.2872143089771271,
0.40861502289772034,
-0.03748549520969391,
0.5340994596481323,
1.1645443439483643,
0.7129237055778503,
0.47361862659454346,
0.6552379727363586,
-2.237553596496582,
1.2775931358337402,
-0.9710804224014282,
0.29396018385887146,
1.3840973377227783,
-0.9565096497535706,
0.3129957318305969,
-1.7698745727539062,
-0.1218319833278656,
0.5866762399673462,
-2.182596206665039,
0.23424269258975983,
-1.3423035144805908,
-0.4986865818500519,
1.0029953718185425,
0.32122305035591125,
-1.316206932067871,
0.09746284782886505,
-0.4291963279247284,
1.0147396326065063,
0.4588741064071655,
1.1224136352539062,
-1.678852915763855,
-0.05275288224220276,
-0.24753986299037933,
0.06637142598628998,
-1.2837023735046387,
-1.5850549936294556,
0.5074511170387268,
0.6546853184700012,
0.5119302868843079,
-0.06256245821714401,
0.9697627425193787,
-1.057485580444336,
0.8662999272346497,
-0.9648163318634033,
-1.6414780616760254,
-1.440693974494934,
-2.294936418533325,
-2.2730162143707275,
0.742417573928833,
-0.5340592861175537,
-0.5493285059928894,
2.0590343475341797,
-1.1046335697174072,
-1.8534842729568481,
1.1894195079803467,
0.2174920290708542,
0.028417250141501427,
2.375521421432495,
0.2651326060295105,
-0.6923108696937561,
0.4316093921661377,
-0.6937456727027893,
0.768491804599762,
-0.41086888313293457,
1.300370693206787,
0.457497239112854,
-1.0198997259140015,
1.6095277070999146,
-0.5043354630470276,
0.5483624935150146,
-0.6768484711647034,
-0.5443181395530701,
-0.6933836936950684,
0.40693801641464233,
1.8420172929763794,
-0.38580426573753357,
1.535286545753479,
-0.39974990487098694,
-1.536548137664795,
-1.6155585050582886,
0.8571969866752625,
0.44127973914146423,
-0.8484148383140564,
0.09168913960456848,
-0.45326489210128784,
0.041647911071777344,
-0.03705238550901413,
1.0827317237854004,
1.339859962463379,
0.7258289456367493,
-0.3486737608909607,
-0.8899767398834229,
0.14451415836811066,
-0.08255451172590256,
-0.6921395063400269,
-1.792754888534546,
-0.37475332617759705,
0.16101272404193878,
0.6578963398933411,
-1.1779214143753052,
1.7803667783737183,
0.9307007193565369,
1.9198025465011597,
0.976931095123291,
-0.3370218873023987,
1.3807705640792847,
0.06796375662088394,
1.8769845962524414,
-0.5192259550094604,
0.6354618072509766,
-0.3265531063079834,
-1.1373794078826904,
0.8760553598403931,
-0.2883048951625824,
-2.0168204307556152,
-0.7259303331375122,
-0.7947831153869629,
-0.24161827564239502,
-0.8060433268547058,
0.9554511904716492,
-0.17261162400245667,
-1.3222837448120117,
0.2521072328090668,
-0.7379522323608398,
0.13563676178455353,
-1.2066830396652222,
0.2711378037929535,
0.7373571395874023,
-0.6604456305503845,
0.05317040532827377,
-0.20192138850688934,
-1.3441182374954224,
-0.38229480385780334,
0.31660303473472595,
1.924178957939148,
-0.8050737380981445,
0.9520941376686096,
1.0827375650405884,
-0.6932791471481323,
0.10015551745891571,
0.35077574849128723,
-0.35637450218200684,
0.8357083797454834,
-1.0181727409362793,
-0.36784613132476807,
1.1478888988494873,
-0.23827974498271942,
-0.5959648489952087,
1.4537297487258911,
0.7804197072982788,
-1.031229853630066,
-0.17699921131134033,
-0.17495127022266388,
-0.7978100776672363,
-0.0018175337463617325,
-1.64044189453125,
-0.135458305478096,
0.3338806629180908,
-1.3868061304092407,
-0.49191954731941223,
-0.20517416298389435,
1.3239221572875977,
-0.13778576254844666,
1.471345067024231,
-0.4707089364528656,
-0.1965799480676651,
-0.4010811746120453,
-0.3547682464122772,
0.1326141506433487,
-0.1933247148990631,
-0.5293367505073547,
0.1698390543460846,
-0.8038754463195801,
0.29476866126060486,
1.4587502479553223,
0.37185138463974,
0.05407173931598663,
0.5112026929855347,
1.1258411407470703,
0.36688077449798584,
-0.024481158703565598,
-0.8931272029876709,
-1.5535944700241089,
2.0009384155273438,
-1.4449119567871094,
2.042893171310425,
0.7761859893798828,
-0.05520256608724594,
-1.828698992729187,
-1.931408166885376,
1.3204641342163086,
1.1372478008270264,
2.349620819091797,
0.5245057940483093,
0.4373214542865753,
-0.8489601612091064,
-0.6584936380386353,
0.4332568347454071,
-1.0270740985870361,
-0.7006136178970337,
0.10227961093187332,
2.3753480911254883,
1.7735483646392822,
-0.5231533050537109,
-0.17110532522201538,
-1.0054794549942017,
1.3449379205703735,
-0.19156010448932648,
0.2146223485469818,
2.0277669429779053,
-0.2794610559940338,
-1.0352996587753296,
1.3152363300323486,
-2.417940855026245,
0.22669672966003418,
1.9881811141967773,
0.24896685779094696,
0.1033531054854393,
-1.3503154516220093,
-0.5331023335456848,
-0.3356488049030304,
-0.41326674818992615,
-1.1863538026809692,
0.5634267330169678,
-0.286723256111145,
-0.9041541814804077,
-1.3815062046051025,
0.1511855274438858,
-1.1452027559280396,
-1.6921862363815308,
0.3258252739906311,
1.8316612243652344,
2.0840766429901123,
-0.8196089267730713,
1.5519479513168335,
-0.24759003520011902,
0.10823681205511093,
1.2530931234359741,
1.336283564567566,
3.132208824157715,
1.8943111896514893,
-1.3679625988006592,
0.6734476089477539,
-0.11621234565973282,
-0.4550663232803345,
1.2325936555862427,
-1.183711051940918,
1.2595887184143066,
-0.2206837683916092,
-1.2849020957946777,
-1.2050548791885376,
1.0078656673431396,
0.3887520432472229,
0.0742536261677742,
-0.5276409983634949,
1.2304956912994385,
0.1492341160774231,
1.2745698690414429,
0.602962851524353,
-0.34174442291259766,
0.6432279348373413,
-0.4313795268535614,
-0.5188555121421814,
1.4716918468475342,
0.2734300494194031,
-1.4990415573120117,
-2.2888402938842773,
-0.170454740524292,
-0.8958452939987183,
-0.030684741213917732,
-0.6491495966911316,
-1.023624300956726,
1.6235278844833374,
0.4203495979309082,
-1.2820746898651123,
-0.4164372980594635,
-0.36870500445365906,
-0.540757954120636,
2.6336793899536133,
-1.3949631452560425,
-0.22094878554344177,
-1.0123144388198853,
-0.5840621590614319,
1.6761534214019775,
-1.2912505865097046,
-0.16393955051898956,
-1.077892541885376,
-0.6863133311271667,
-1.2698725461959839,
-0.5723339915275574,
-0.031270645558834076,
-0.9354430437088013,
0.7593720555305481,
0.17234139144420624,
-1.1406331062316895,
-0.327788382768631,
-0.8924160003662109,
0.8931712508201599,
-0.21336913108825684,
0.24044951796531677,
1.856469750404358,
0.3453816771507263,
-0.4120050370693207,
0.775509774684906,
1.1596195697784424,
0.5925961136817932,
-0.5345938801765442,
0.15246917307376862,
-0.6553570032119751,
0.3727664351463318,
-1.2619798183441162,
0.2171175181865692,
-2.8964827060699463,
0.6771170496940613,
-0.08302062749862671,
-0.11866467446088791,
-0.08756958693265915,
-1.356780767440796,
1.1064355373382568,
2.5868194103240967,
-1.1581642627716064,
0.49144798517227173,
0.31135159730911255,
1.1811922788619995,
-1.619221568107605,
0.2672106623649597,
-0.4640149474143982,
2.1460962295532227,
0.18966828286647797,
1.260596752166748,
-0.47290170192718506,
-2.1748642921447754,
0.6670278906822205,
-1.2139816284179688,
-1.0734485387802124,
0.8298015594482422,
-0.7916064262390137,
0.07833526283502579,
-1.433621883392334,
-0.1874581128358841,
-0.8519490361213684,
-1.2020963430404663,
0.746250331401825,
0.0386362224817276,
0.40740668773651123,
-0.5725365281105042,
0.2943945527076721,
-2.2181246280670166,
-1.3231825828552246,
-0.1810445934534073,
-0.9581912159919739,
0.4722769260406494,
-0.3549422025680542,
0.6513196229934692,
-0.1799164116382599,
0.00628626998513937,
0.37078163027763367,
1.414271354675293,
3.4111697673797607,
0.23966854810714722,
0.36954888701438904,
-0.18657325208187103,
-0.918515682220459,
1.3853784799575806,
0.9508377313613892,
-0.18924613296985626,
-0.528060793876648,
-0.9303011298179626,
1.2608596086502075,
1.9319682121276855,
0.9730287194252014,
0.059215039014816284,
-0.8319500684738159,
-0.7917550206184387,
-0.046991266310214996,
0.11875520646572113,
0.5189437866210938,
1.0112345218658447,
0.026652323082089424,
0.14760324358940125,
1.438627004623413,
1.1895540952682495,
-0.45344820618629456,
0.35767844319343567,
-0.8689503073692322,
-0.41383296251296997,
0.4408741891384125,
0.3059200942516327,
0.07621686905622482,
0.33335545659065247,
-0.9833999872207642,
-0.3250112533569336,
-0.3485563099384308,
-0.9112018346786499,
-0.7507149577140808,
-0.4151446521282196,
-0.3408452868461609,
1.588703989982605,
0.11767062544822693,
-0.4922516942024231,
0.09809049963951111,
-0.8101581931114197,
-0.11015977710485458,
-1.074845790863037,
0.27563148736953735,
-0.07253658771514893,
-0.12453638017177582,
-0.14654377102851868,
1.7081118822097778,
-0.9525549411773682,
-2.0860888957977295,
0.29229581356048584,
0.2844288945198059,
-0.38196268677711487,
0.2164604663848877,
1.653069019317627,
0.6005110740661621,
1.4611270427703857,
1.3492892980575562,
0.9963578581809998,
-0.6309354901313782,
-1.2220323085784912,
0.7414290904998779,
0.937272310256958,
-1.5148241519927979,
0.8174076080322266,
-0.03067892976105213,
-0.5311228036880493,
0.6901876330375671,
1.3213353157043457,
0.4496326148509979,
-2.007972002029419,
0.8530282378196716,
-0.9287784099578857,
0.8075353503227234,
0.6714929938316345,
0.7710251808166504,
0.2632511556148529,
0.7985314726829529,
-1.1977639198303223,
-1.192874550819397,
-0.7313857078552246,
-0.6655272841453552,
1.917918086051941,
-0.22251838445663452,
0.5688682198524475,
-0.2223256230354309,
-1.3899096250534058,
-0.12578266859054565,
0.7267618179321289,
0.27095508575439453,
-0.4312882125377655,
0.8610497713088989,
-0.5609661340713501,
-1.0191075801849365,
-1.3573126792907715,
-0.4117414355278015,
-1.0270031690597534,
-0.9551023840904236,
0.9751010537147522,
0.7712464928627014,
0.25867152214050293,
1.9274182319641113,
0.5644300580024719,
0.2956158518791199,
-2.591460704803467,
1.0467219352722168,
0.3029637932777405,
-0.10523433983325958,
0.9505454897880554,
0.29066526889801025,
1.0293498039245605,
-0.02797466143965721,
0.5578986406326294,
-2.4538753032684326,
2.316371202468872,
-0.22571422159671783,
0.6702250242233276,
-0.013421300798654556,
-0.1991206407546997,
1.1019424200057983,
0.627074658870697,
0.5288463830947876,
-1.1173787117004395,
0.7534778118133545,
-0.6047371029853821,
1.1829643249511719,
0.9096711874008179,
-0.8320579528808594,
-0.0012199580669403076,
1.3782793283462524,
0.41598668694496155,
-0.5024083256721497,
-0.9161799550056458,
-0.9607871174812317,
0.9531310200691223,
1.7144677639007568,
-0.00022535864263772964,
0.03634878247976303,
0.7772979736328125,
0.6532264351844788,
-1.2616559267044067,
0.12988054752349854,
-0.7549812197685242,
-0.666766881942749,
1.6783040761947632,
1.982171654701233,
-0.14029596745967865,
-0.20052409172058105,
-0.7076622247695923,
-1.271651268005371,
0.7803279161453247,
-0.03853229433298111,
0.14242343604564667,
0.70171058177948,
-0.6793638467788696,
1.1788036823272705,
0.8380318880081177,
0.9208700656890869,
0.13811975717544556,
0.27624478936195374,
0.330293744802475,
-0.28238093852996826,
-1.1498396396636963,
-0.25147250294685364,
-1.1656389236450195,
-2.5159478187561035,
0.43962645530700684,
-0.2121453583240509,
-1.464327096939087,
-0.012869853526353836,
-1.0374689102172852,
0.9032431840896606,
-0.5477479696273804,
-1.1036981344223022,
-1.5330361127853394,
0.22196820378303528,
-0.0795254334807396,
0.9609951972961426,
-1.616956114768982,
-0.11600722372531891,
1.261285424232483,
0.892695426940918,
-0.5943533182144165,
1.0219131708145142,
0.30657947063446045,
1.0988284349441528,
0.8065826296806335,
-0.4390239417552948,
0.5167858004570007,
0.005333506502211094,
-1.341880440711975,
0.4261581599712372,
1.2323464155197144,
0.18556144833564758,
1.4604040384292603,
-0.47370728850364685,
0.022094592452049255,
0.38556602597236633,
-0.6045680642127991,
-0.5185652375221252,
-0.4278724491596222,
0.7364746928215027,
0.09145961701869965,
-0.8858453631401062,
0.03143427520990372,
-0.14602401852607727,
-0.2941204011440277,
0.17787645757198334,
-1.5255711078643799,
-0.19945484399795532,
-0.37763330340385437,
-0.5504387617111206,
-1.238292932510376,
-0.036050692200660706,
1.4190335273742676,
-0.8119233250617981,
-0.16252371668815613,
0.5188612937927246,
0.3153194785118103,
0.5487207174301147,
0.6314971446990967,
-0.5698875784873962,
-0.3348364531993866,
-0.2583044767379761,
-0.334852397441864,
0.2952372133731842,
1.2952812910079956,
-0.05459197610616684,
-0.886435329914093,
0.7670538425445557,
-0.4001519978046417,
0.03767780959606171,
1.852757215499878,
0.03583992272615433,
-0.8014189600944519,
0.39618197083473206,
-0.6254400014877319,
1.9176661968231201,
1.7189754247665405,
1.2940183877944946,
-0.07683058828115463,
-0.9576278924942017,
0.6155729293823242,
-0.3151948153972626,
-0.3233770430088043,
0.8901424407958984,
0.3926159143447876,
-0.24246752262115479,
-1.383707880973816,
0.6810921430587769,
1.1927582025527954,
-0.888516366481781,
-0.70801842212677,
0.08818071335554123,
-0.8194079995155334,
1.0858954191207886,
0.7233549952507019,
0.387789785861969,
0.21387231349945068,
1.634078860282898,
0.6806908845901489,
-0.44812139868736267,
0.5327209830284119,
0.5496464371681213,
-0.16269885003566742,
-2.0888140201568604,
-1.0637176036834717,
0.29678109288215637,
-0.4397077262401581,
-1.6078014373779297,
1.3403886556625366,
-1.209297776222229,
-0.9906254410743713,
0.503797173500061,
0.11731426417827606,
1.3806909322738647,
0.3215496242046356,
1.6083585023880005,
2.1140410900115967,
0.9011561870574951,
0.41312840580940247,
1.2839328050613403,
-0.0857609286904335,
-0.3702585697174072,
1.7801672220230103,
-0.4412083625793457,
0.4716625511646271,
1.0676686763763428,
-0.4239247143268585,
-1.0735286474227905,
-0.8085665702819824,
-1.232757329940796,
-0.7099698781967163,
1.2188937664031982,
0.058072224259376526,
-1.0846360921859741,
0.28304845094680786,
1.5605404376983643,
0.1019100621342659,
-0.33556294441223145,
0.5865952372550964,
0.4619410037994385,
-0.7821027636528015,
-0.04126103222370148,
-0.827897310256958,
0.5160916447639465,
-0.14620226621627808,
-0.35566627979278564,
0.3669379651546478,
0.5077273845672607,
1.3699313402175903,
-0.036369286477565765,
0.19247591495513916,
1.1107463836669922,
-1.48733651638031,
1.52506685256958,
-0.6083180904388428,
0.19213849306106567,
-2.3495917320251465,
1.4212931394577026,
-0.7213282585144043,
1.9533143043518066,
-2.6724002361297607,
0.42036575078964233,
-0.6016028523445129,
-0.5147978067398071,
0.2662073075771332,
-0.33049193024635315,
0.1236005425453186,
-0.1756485402584076,
-1.1148548126220703,
-0.05697564780712128,
-0.6417189240455627,
0.5651512742042542,
1.140816330909729,
1.3395326137542725,
-1.1450918912887573,
-0.2827146351337433,
-1.7277662754058838,
-0.062230370938777924,
-0.716944694519043,
0.33091580867767334,
-2.0016274452209473,
-0.14004306495189667,
-1.976312279701233,
-2.288975715637207,
-1.3715978860855103,
-0.852520763874054,
1.0595065355300903,
0.1572570502758026,
-0.8852339386940002,
1.2052223682403564,
-0.36874502897262573,
-1.798134684562683,
1.0410360097885132,
-2.1432101726531982
] |
https://github.com/huggingface/datasets/issues/5713 | ArrowNotImplementedError when loading dataset from the hub | Hi Julien ! This sounds related to https://github.com/huggingface/datasets/issues/5695 - TL;DR: you need to have shards smaller than 2GB to avoid this issue
The number of rows per shard is computed using an estimated size of the full dataset, which can sometimes lead to shards bigger than `max_shard_size`. The estimation is currently done using the first samples of the dataset (which can surely be improved). We should probably open an issue to fix this once and for all.
Anyway for your specific dataset I'd suggest you to pass `num_shards` instead of `max_shard_size` for now, and make sure to have enough shards to end up with shards smaller than 2GB | ### Describe the bug
Hello,
I have created a dataset by using the image loader. Once the dataset is created I try to download it and I get the error:
```
Traceback (most recent call last):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Steps to reproduce the bug
Create the dataset and push it to the hub:
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset.push_to_hub("org/dataset-name", private=True, max_shard_size="1GB")
```
Then use it:
```python
from datasets import load_dataset
dataset = load_dataset("org/dataset-name")
```
### Expected behavior
To properly download and use the pushed dataset.
Something else to note is that I specified to have shards of 1GB max, but at the end, for the train set, it is an almost 7GB single file that is pushed.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0 | 219 | 108 | ArrowNotImplementedError when loading dataset from the hub
### Describe the bug
Hello,
I have created a dataset by using the image loader. Once the dataset is created I try to download it and I get the error:
```
Traceback (most recent call last):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Steps to reproduce the bug
Create the dataset and push it to the hub:
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset.push_to_hub("org/dataset-name", private=True, max_shard_size="1GB")
```
Then use it:
```python
from datasets import load_dataset
dataset = load_dataset("org/dataset-name")
```
### Expected behavior
To properly download and use the pushed dataset.
Something else to note is that I specified to have shards of 1GB max, but at the end, for the train set, it is an almost 7GB single file that is pushed.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
Hi Julien ! This sounds related to https://github.com/huggingface/datasets/issues/5695 - TL;DR: you need to have shards smaller than 2GB to avoid this issue
The number of rows per shard is computed using an estimated size of the full dataset, which can sometimes lead to shards bigger than `max_shard_size`. The estimation is currently done using the first samples of the dataset (which can surely be improved). We should probably open an issue to fix this once and for all.
Anyway for your specific dataset I'd suggest you to pass `num_shards` instead of `max_shard_size` for now, and make sure to have enough shards to end up with shards smaller than 2GB | [
-1.1596570014953613,
-0.938648521900177,
-0.6518595814704895,
1.388267159461975,
-0.1328403353691101,
-1.3243995904922485,
0.0550222173333168,
-1.083867073059082,
1.5013535022735596,
-0.7486059069633484,
0.192635178565979,
-1.6323572397232056,
-0.0710282102227211,
-0.4398459494113922,
-0.6744556427001953,
-0.9136945009231567,
-0.3630845248699188,
-0.9651598930358887,
1.0892232656478882,
2.525703191757202,
1.3386547565460205,
-1.3513721227645874,
2.7941181659698486,
0.6340774297714233,
-0.2871050238609314,
-1.0311646461486816,
0.5875712633132935,
-0.005821253173053265,
-1.1874624490737915,
-0.47412461042404175,
-0.9299760460853577,
-0.015539589338004589,
-0.5938897132873535,
-0.363664835691452,
0.0643887147307396,
0.49125105142593384,
-0.32336142659187317,
-0.24784259498119354,
-0.6713340282440186,
-0.7690023183822632,
0.5398809909820557,
-0.35004615783691406,
0.9897422790527344,
-0.333865761756897,
1.7062938213348389,
-0.5785567760467529,
0.46365055441856384,
0.7493009567260742,
1.2654799222946167,
0.1291021853685379,
0.08253995329141617,
0.16199444234371185,
0.3072681427001953,
-0.018992194905877113,
0.5800182819366455,
1.2389461994171143,
0.6227234601974487,
0.6042178273200989,
0.6053272485733032,
-2.20876407623291,
1.294721007347107,
-0.8885268568992615,
0.21206450462341309,
1.2965760231018066,
-0.7789940237998962,
0.32663464546203613,
-1.8164215087890625,
-0.09199289977550507,
0.6424270272254944,
-2.25854229927063,
0.27617183327674866,
-1.2588558197021484,
-0.5131444931030273,
0.8794274926185608,
0.34949934482574463,
-1.204285979270935,
0.20928646624088287,
-0.5127342343330383,
1.1433124542236328,
0.512475311756134,
1.125312328338623,
-1.6471998691558838,
0.0058770617470145226,
-0.08260771632194519,
0.11292817443609238,
-1.286443829536438,
-1.655518651008606,
0.5445955395698547,
0.5266355276107788,
0.6771050095558167,
-0.05358617752790451,
1.060503602027893,
-1.1017817258834839,
0.8201655149459839,
-0.9790343642234802,
-1.565138339996338,
-1.3330354690551758,
-2.480025291442871,
-2.3169939517974854,
0.7838006019592285,
-0.5507329106330872,
-0.5227087140083313,
2.111879587173462,
-0.9792653322219849,
-1.7466025352478027,
1.0439385175704956,
0.2442636638879776,
0.13980881869792938,
2.397630214691162,
0.2495981603860855,
-0.8007358312606812,
0.5035349130630493,
-0.7473750114440918,
0.8447846174240112,
-0.2784494161605835,
1.2945383787155151,
0.49417293071746826,
-0.9758772253990173,
1.591601014137268,
-0.47927770018577576,
0.6168884038925171,
-0.5766995549201965,
-0.5467233061790466,
-0.8053930401802063,
0.28258129954338074,
1.8256388902664185,
-0.3483830988407135,
1.5333774089813232,
-0.30350926518440247,
-1.5458357334136963,
-1.5643914937973022,
0.8389034271240234,
0.46093693375587463,
-0.9080424308776855,
0.04834673926234245,
-0.4392528235912323,
0.16901066899299622,
0.040016449987888336,
1.1333281993865967,
1.2045950889587402,
0.7320305705070496,
-0.32007282972335815,
-0.8593997955322266,
0.21810948848724365,
-0.24843953549861908,
-0.661844789981842,
-1.84774649143219,
-0.3124770522117615,
0.18606610596179962,
0.66487056016922,
-1.2558761835098267,
1.8515986204147339,
0.9225860238075256,
2.104330062866211,
0.8768504858016968,
-0.4013470709323883,
1.4918267726898193,
0.010016311891376972,
1.8917577266693115,
-0.45539891719818115,
0.5839806795120239,
-0.42021769285202026,
-1.1865615844726562,
0.9090827703475952,
-0.39234456419944763,
-1.9559894800186157,
-0.7971484661102295,
-0.8006776571273804,
-0.22631561756134033,
-0.7398028373718262,
0.8489965200424194,
-0.3066413402557373,
-1.460811734199524,
0.10806940495967865,
-0.6673704981803894,
0.13686582446098328,
-1.298976182937622,
0.15003998577594757,
0.6984404921531677,
-0.7210086584091187,
-0.12263073772192001,
-0.30609700083732605,
-1.308249831199646,
-0.5536359548568726,
0.31814607977867126,
1.9788668155670166,
-0.5710158348083496,
1.0204161405563354,
1.006968379020691,
-0.7271196246147156,
0.07218869030475616,
0.2013728767633438,
-0.31090179085731506,
0.7788487076759338,
-1.0976825952529907,
-0.46097758412361145,
1.1512593030929565,
-0.3052580952644348,
-0.7587673664093018,
1.3998079299926758,
0.7482768893241882,
-1.1108248233795166,
-0.2675003409385681,
-0.25202476978302,
-0.8819975852966309,
0.0016357265412807465,
-1.4759725332260132,
-0.17967543005943298,
0.39259132742881775,
-1.4724868535995483,
-0.26194483041763306,
-0.11345812678337097,
1.3345540761947632,
-0.16269424557685852,
1.4820144176483154,
-0.3648296892642975,
-0.15692327916622162,
-0.27207109332084656,
-0.5121949315071106,
0.22851359844207764,
-0.19779589772224426,
-0.571869432926178,
0.1645495593547821,
-0.8564438819885254,
0.19710882008075714,
1.4535290002822876,
0.347127228975296,
0.09539683908224106,
0.39007332921028137,
1.1012635231018066,
0.4114534854888916,
-0.014924401417374611,
-0.8669322729110718,
-1.4692879915237427,
1.9980696439743042,
-1.4261294603347778,
1.8901631832122803,
0.8554887771606445,
-0.11464636772871017,
-1.8454399108886719,
-1.824633002281189,
1.2198301553726196,
1.1147820949554443,
2.3643970489501953,
0.5134173631668091,
0.4344768226146698,
-0.7481911778450012,
-0.7841946482658386,
0.35035431385040283,
-0.987316906452179,
-0.6402683854103088,
0.15843793749809265,
2.3241424560546875,
1.7792812585830688,
-0.534264862537384,
-0.2519408166408539,
-0.8136280179023743,
1.2947518825531006,
-0.2366233617067337,
0.294075608253479,
2.08750581741333,
-0.3004511594772339,
-0.951444685459137,
1.3190712928771973,
-2.3923544883728027,
0.290250688791275,
2.0925145149230957,
0.30397680401802063,
0.1585397720336914,
-1.4423648118972778,
-0.6800454258918762,
-0.26124730706214905,
-0.44609251618385315,
-1.2347743511199951,
0.5928613543510437,
-0.3354007601737976,
-0.8917580246925354,
-1.4493712186813354,
0.038679733872413635,
-1.1591248512268066,
-1.8518637418746948,
0.30732372403144836,
1.989963173866272,
2.1623165607452393,
-0.8120588064193726,
1.4087408781051636,
-0.2693841755390167,
0.010281785391271114,
1.268004059791565,
1.3290479183197021,
3.0618855953216553,
1.8072055578231812,
-1.2926340103149414,
0.6668862104415894,
-0.19908545911312103,
-0.473895788192749,
1.1288264989852905,
-1.1188806295394897,
1.083675503730774,
-0.20736052095890045,
-1.2132868766784668,
-1.2226717472076416,
1.098731517791748,
0.4692499041557312,
0.006068387068808079,
-0.4745098054409027,
1.3056373596191406,
0.1275906264781952,
1.3480234146118164,
0.5903028249740601,
-0.43579399585723877,
0.540553867816925,
-0.3284386694431305,
-0.6135295629501343,
1.6655129194259644,
0.16856315732002258,
-1.5464417934417725,
-2.333721160888672,
-0.2854987680912018,
-0.9359140992164612,
0.005829836241900921,
-0.6359174251556396,
-1.0259016752243042,
1.5660232305526733,
0.41375401616096497,
-1.2357192039489746,
-0.3135250508785248,
-0.3659694194793701,
-0.5596365928649902,
2.6754298210144043,
-1.2653045654296875,
-0.08469889312982559,
-0.9109351634979248,
-0.5275893211364746,
1.5894370079040527,
-1.2701592445373535,
-0.2561495900154114,
-1.0081173181533813,
-0.6719985008239746,
-1.3209779262542725,
-0.39981067180633545,
0.00009088870137929916,
-0.9692257046699524,
0.7467761635780334,
0.24090169370174408,
-1.1203757524490356,
-0.30470791459083557,
-0.871817409992218,
1.076790452003479,
-0.14124412834644318,
0.2667448818683624,
1.8818447589874268,
0.3421303331851959,
-0.41596266627311707,
0.7459903359413147,
1.1891686916351318,
0.6147297024726868,
-0.6705261468887329,
-0.048540547490119934,
-0.7001014351844788,
0.3589508831501007,
-1.3681925535202026,
0.2160148024559021,
-3.0379600524902344,
0.7649146318435669,
-0.19064287841320038,
-0.12645463645458221,
-0.11727926880121231,
-1.2974417209625244,
1.0222769975662231,
2.5945866107940674,
-1.1529477834701538,
0.4778347611427307,
0.4733126163482666,
1.1084563732147217,
-1.6270062923431396,
0.2846733331680298,
-0.4957389235496521,
2.0661542415618896,
0.14454038441181183,
1.23460853099823,
-0.5471192002296448,
-2.190371513366699,
0.6489887237548828,
-1.222400188446045,
-1.0521570444107056,
0.7850939035415649,
-0.8850145936012268,
0.3281151056289673,
-1.4260618686676025,
-0.13742534816265106,
-0.9319009184837341,
-1.2417666912078857,
0.7334548234939575,
0.08091427385807037,
0.380655974149704,
-0.4955117404460907,
0.3638610243797302,
-2.1684224605560303,
-1.4469894170761108,
-0.21310047805309296,
-0.9700893759727478,
0.5402472019195557,
-0.4326725900173187,
0.5879093408584595,
-0.09273424744606018,
0.10725809633731842,
0.29288846254348755,
1.4641939401626587,
3.4454457759857178,
0.13889917731285095,
0.18529464304447174,
-0.1175483837723732,
-1.0875074863433838,
1.4748390913009644,
0.849513053894043,
-0.138289213180542,
-0.5669828653335571,
-1.009161114692688,
1.3153076171875,
2.0157783031463623,
1.0943362712860107,
0.17425020039081573,
-0.8154081106185913,
-0.6998175382614136,
0.04143380746245384,
0.14647658169269562,
0.5932244062423706,
0.9439319968223572,
-0.029070686548948288,
0.07313063740730286,
1.384169578552246,
1.1952263116836548,
-0.2585757076740265,
0.38504549860954285,
-0.9517496824264526,
-0.40380290150642395,
0.36128944158554077,
0.20011845231056213,
0.0681561604142189,
0.48303720355033875,
-0.995538055896759,
-0.3007999062538147,
-0.2789907157421112,
-0.8554134368896484,
-0.7520769238471985,
-0.3937135636806488,
-0.4268905818462372,
1.6054657697677612,
0.13699911534786224,
-0.49180665612220764,
0.09671706706285477,
-0.6429454684257507,
-0.13485202193260193,
-1.144813060760498,
0.12219055742025375,
-0.13661815226078033,
-0.10160171240568161,
-0.18719781935214996,
1.6668181419372559,
-0.9173282980918884,
-2.11872935295105,
0.22126391530036926,
0.33855536580085754,
-0.29650935530662537,
0.16941405832767487,
1.7372792959213257,
0.4703693985939026,
1.3882328271865845,
1.282263159751892,
0.9791117310523987,
-0.5922243595123291,
-1.1896402835845947,
0.7687418460845947,
0.9312394857406616,
-1.3777459859848022,
0.9350206255912781,
-0.20890626311302185,
-0.4981527626514435,
0.7156436443328857,
1.344283938407898,
0.43497052788734436,
-2.0538735389709473,
0.9840332269668579,
-0.9194045662879944,
0.7931148409843445,
0.7058396935462952,
0.7441245913505554,
0.23071278631687164,
0.8615862131118774,
-1.2054659128189087,
-1.1713956594467163,
-0.7096256017684937,
-0.6083285212516785,
1.8673280477523804,
-0.2806311547756195,
0.5978059768676758,
-0.2017519623041153,
-1.1620031595230103,
-0.12145645171403885,
0.7634479403495789,
0.42084330320358276,
-0.3476962149143219,
0.873024046421051,
-0.6317363977432251,
-0.9578644037246704,
-1.3126448392868042,
-0.36216121912002563,
-1.0472123622894287,
-0.9080805778503418,
0.9572997689247131,
0.7061812281608582,
0.4905567765235901,
1.9466476440429688,
0.5867371559143066,
0.29769110679626465,
-2.603419303894043,
0.8421569466590881,
0.2985454797744751,
-0.04217606782913208,
0.8775712251663208,
0.2664780020713806,
1.1510671377182007,
-0.004229913931339979,
0.562150776386261,
-2.3410587310791016,
2.1999542713165283,
-0.18338267505168915,
0.5850198864936829,
0.03206579387187958,
-0.2372361272573471,
1.1638890504837036,
0.6363250017166138,
0.5334576964378357,
-1.1511176824569702,
0.7096049189567566,
-0.5497624278068542,
1.106641411781311,
0.9608246684074402,
-0.8744112253189087,
0.1310136765241623,
1.4826140403747559,
0.531947672367096,
-0.4767691493034363,
-0.9722210168838501,
-0.810705304145813,
0.9425476789474487,
1.7016584873199463,
-0.04092254862189293,
-0.012635502964258194,
0.7752857804298401,
0.6323975324630737,
-1.1819556951522827,
0.06654917448759079,
-0.6714234352111816,
-0.7019785642623901,
1.7284245491027832,
1.9990755319595337,
-0.12635865807533264,
-0.20989114046096802,
-0.7216416001319885,
-1.3278450965881348,
0.8107881546020508,
-0.17328649759292603,
0.04426438361406326,
0.6759517192840576,
-0.6746766567230225,
1.0436955690383911,
0.619349479675293,
1.0023177862167358,
-0.006948389112949371,
0.25517737865448,
0.3598094582557678,
-0.4022693336009979,
-1.101877212524414,
-0.27081605792045593,
-1.136607050895691,
-2.5654101371765137,
0.36935853958129883,
-0.26732948422431946,
-1.5199320316314697,
0.04998788237571716,
-1.0291494131088257,
0.906940221786499,
-0.5484427213668823,
-1.1378388404846191,
-1.4388633966445923,
0.3251350224018097,
-0.15353456139564514,
0.9815200567245483,
-1.6368601322174072,
-0.21778540313243866,
1.267900824546814,
0.8153862357139587,
-0.6503317952156067,
0.9559034705162048,
0.20950768887996674,
1.0125348567962646,
0.7237985730171204,
-0.4094727039337158,
0.6356596350669861,
0.01133387815207243,
-1.3487814664840698,
0.3783581554889679,
1.2143760919570923,
0.17466974258422852,
1.3790531158447266,
-0.4265140891075134,
0.15817028284072876,
0.431723415851593,
-0.6070472598075867,
-0.5573173761367798,
-0.36692020297050476,
0.7564460635185242,
-0.03017342835664749,
-1.0047907829284668,
-0.1346956193447113,
-0.13561074435710907,
-0.2991063594818115,
0.22734922170639038,
-1.4016869068145752,
-0.31185275316238403,
-0.38646864891052246,
-0.45735764503479004,
-1.4119610786437988,
0.028858426958322525,
1.3220964670181274,
-0.7542844414710999,
-0.23923057317733765,
0.4009934961795807,
0.41176638007164,
0.5539343357086182,
0.567000687122345,
-0.7848314046859741,
-0.28018173575401306,
-0.3551291227340698,
-0.25860655307769775,
0.2803955078125,
1.2282201051712036,
-0.037037067115306854,
-0.9435698390007019,
0.6271237134933472,
-0.2996233403682709,
0.15543320775032043,
2.041407346725464,
0.05587635934352875,
-0.7033306956291199,
0.3724808096885681,
-0.714409351348877,
1.6843873262405396,
1.740196704864502,
1.2428399324417114,
-0.05851861089468002,
-0.7828051447868347,
0.5539059042930603,
-0.25951865315437317,
-0.30935779213905334,
0.9212984442710876,
0.4127933979034424,
-0.23557822406291962,
-1.4778708219528198,
0.6425963044166565,
1.2688136100769043,
-0.6814894080162048,
-0.7369087934494019,
0.027968909591436386,
-0.8629347085952759,
1.2239258289337158,
0.5488472580909729,
0.34105971455574036,
0.24059750139713287,
1.519955039024353,
0.806046724319458,
-0.5169445276260376,
0.5066874027252197,
0.5201109051704407,
-0.20208364725112915,
-2.1582529544830322,
-1.0429017543792725,
0.30667006969451904,
-0.3947390019893646,
-1.5976316928863525,
1.4245679378509521,
-1.0992858409881592,
-1.0552808046340942,
0.5912891626358032,
0.05718710273504257,
1.232877492904663,
0.34044942259788513,
1.6984411478042603,
2.1520941257476807,
0.933867335319519,
0.3621091842651367,
1.243415355682373,
-0.09515104442834854,
-0.470207542181015,
1.8880031108856201,
-0.40422749519348145,
0.5112468004226685,
1.0097030401229858,
-0.40791499614715576,
-1.1190701723098755,
-0.8402066826820374,
-1.117699384689331,
-0.6083564162254333,
1.181768536567688,
0.12256083637475967,
-1.01637601852417,
0.21381862461566925,
1.6001780033111572,
0.17936210334300995,
-0.2357504516839981,
0.663311243057251,
0.3702246844768524,
-0.7441810965538025,
-0.020883435383439064,
-0.8360897302627563,
0.5223841667175293,
-0.11980604380369186,
-0.3172512948513031,
0.27735042572021484,
0.5483004450798035,
1.2992451190948486,
-0.12794943153858185,
0.1387433111667633,
1.1024307012557983,
-1.3592689037322998,
1.487952470779419,
-0.5748295783996582,
0.3354075253009796,
-2.3695449829101562,
1.3662866353988647,
-0.7757465839385986,
1.988998532295227,
-2.5264501571655273,
0.4076381325721741,
-0.5315421223640442,
-0.4972884953022003,
0.24730272591114044,
-0.4892313480377197,
0.04995245113968849,
-0.10020986944437027,
-0.9321467876434326,
-0.026997532695531845,
-0.7391135096549988,
0.6282088160514832,
1.232985019683838,
1.468451738357544,
-1.1178513765335083,
-0.25890859961509705,
-1.7083057165145874,
-0.16192537546157837,
-0.7998431921005249,
0.298140287399292,
-1.9485975503921509,
-0.19271275401115417,
-2.044203758239746,
-2.323211908340454,
-1.396357536315918,
-0.9119110703468323,
1.0420572757720947,
0.23466657102108002,
-0.9805920720100403,
1.1643126010894775,
-0.33278340101242065,
-1.8090351819992065,
1.1426924467086792,
-2.1907799243927
] |
https://github.com/huggingface/datasets/issues/5713 | ArrowNotImplementedError when loading dataset from the hub | Hi Quentin! Thanks a lot! Using `num_shards` instead of `max_shard_size` works as expected.
Indeed the way you describe how the size is computed cannot really work with the dataset I'm building as all the image doesn't have the same resolution and then size. Opening an issue on this might be a good idea. | ### Describe the bug
Hello,
I have created a dataset by using the image loader. Once the dataset is created I try to download it and I get the error:
```
Traceback (most recent call last):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Steps to reproduce the bug
Create the dataset and push it to the hub:
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset.push_to_hub("org/dataset-name", private=True, max_shard_size="1GB")
```
Then use it:
```python
from datasets import load_dataset
dataset = load_dataset("org/dataset-name")
```
### Expected behavior
To properly download and use the pushed dataset.
Something else to note is that I specified to have shards of 1GB max, but at the end, for the train set, it is an almost 7GB single file that is pushed.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0 | 219 | 53 | ArrowNotImplementedError when loading dataset from the hub
### Describe the bug
Hello,
I have created a dataset by using the image loader. Once the dataset is created I try to download it and I get the error:
```
Traceback (most recent call last):
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Steps to reproduce the bug
Create the dataset and push it to the hub:
```python
from datasets import load_dataset
dataset = load_dataset("imagefolder", data_dir="/path/to/dataset")
dataset.push_to_hub("org/dataset-name", private=True, max_shard_size="1GB")
```
Then use it:
```python
from datasets import load_dataset
dataset = load_dataset("org/dataset-name")
```
### Expected behavior
To properly download and use the pushed dataset.
Something else to note is that I specified to have shards of 1GB max, but at the end, for the train set, it is an almost 7GB single file that is pushed.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
Hi Quentin! Thanks a lot! Using `num_shards` instead of `max_shard_size` works as expected.
Indeed the way you describe how the size is computed cannot really work with the dataset I'm building as all the image doesn't have the same resolution and then size. Opening an issue on this might be a good idea. | [
-1.1596570014953613,
-0.938648521900177,
-0.6518595814704895,
1.388267159461975,
-0.1328403353691101,
-1.3243995904922485,
0.0550222173333168,
-1.083867073059082,
1.5013535022735596,
-0.7486059069633484,
0.192635178565979,
-1.6323572397232056,
-0.0710282102227211,
-0.4398459494113922,
-0.6744556427001953,
-0.9136945009231567,
-0.3630845248699188,
-0.9651598930358887,
1.0892232656478882,
2.525703191757202,
1.3386547565460205,
-1.3513721227645874,
2.7941181659698486,
0.6340774297714233,
-0.2871050238609314,
-1.0311646461486816,
0.5875712633132935,
-0.005821253173053265,
-1.1874624490737915,
-0.47412461042404175,
-0.9299760460853577,
-0.015539589338004589,
-0.5938897132873535,
-0.363664835691452,
0.0643887147307396,
0.49125105142593384,
-0.32336142659187317,
-0.24784259498119354,
-0.6713340282440186,
-0.7690023183822632,
0.5398809909820557,
-0.35004615783691406,
0.9897422790527344,
-0.333865761756897,
1.7062938213348389,
-0.5785567760467529,
0.46365055441856384,
0.7493009567260742,
1.2654799222946167,
0.1291021853685379,
0.08253995329141617,
0.16199444234371185,
0.3072681427001953,
-0.018992194905877113,
0.5800182819366455,
1.2389461994171143,
0.6227234601974487,
0.6042178273200989,
0.6053272485733032,
-2.20876407623291,
1.294721007347107,
-0.8885268568992615,
0.21206450462341309,
1.2965760231018066,
-0.7789940237998962,
0.32663464546203613,
-1.8164215087890625,
-0.09199289977550507,
0.6424270272254944,
-2.25854229927063,
0.27617183327674866,
-1.2588558197021484,
-0.5131444931030273,
0.8794274926185608,
0.34949934482574463,
-1.204285979270935,
0.20928646624088287,
-0.5127342343330383,
1.1433124542236328,
0.512475311756134,
1.125312328338623,
-1.6471998691558838,
0.0058770617470145226,
-0.08260771632194519,
0.11292817443609238,
-1.286443829536438,
-1.655518651008606,
0.5445955395698547,
0.5266355276107788,
0.6771050095558167,
-0.05358617752790451,
1.060503602027893,
-1.1017817258834839,
0.8201655149459839,
-0.9790343642234802,
-1.565138339996338,
-1.3330354690551758,
-2.480025291442871,
-2.3169939517974854,
0.7838006019592285,
-0.5507329106330872,
-0.5227087140083313,
2.111879587173462,
-0.9792653322219849,
-1.7466025352478027,
1.0439385175704956,
0.2442636638879776,
0.13980881869792938,
2.397630214691162,
0.2495981603860855,
-0.8007358312606812,
0.5035349130630493,
-0.7473750114440918,
0.8447846174240112,
-0.2784494161605835,
1.2945383787155151,
0.49417293071746826,
-0.9758772253990173,
1.591601014137268,
-0.47927770018577576,
0.6168884038925171,
-0.5766995549201965,
-0.5467233061790466,
-0.8053930401802063,
0.28258129954338074,
1.8256388902664185,
-0.3483830988407135,
1.5333774089813232,
-0.30350926518440247,
-1.5458357334136963,
-1.5643914937973022,
0.8389034271240234,
0.46093693375587463,
-0.9080424308776855,
0.04834673926234245,
-0.4392528235912323,
0.16901066899299622,
0.040016449987888336,
1.1333281993865967,
1.2045950889587402,
0.7320305705070496,
-0.32007282972335815,
-0.8593997955322266,
0.21810948848724365,
-0.24843953549861908,
-0.661844789981842,
-1.84774649143219,
-0.3124770522117615,
0.18606610596179962,
0.66487056016922,
-1.2558761835098267,
1.8515986204147339,
0.9225860238075256,
2.104330062866211,
0.8768504858016968,
-0.4013470709323883,
1.4918267726898193,
0.010016311891376972,
1.8917577266693115,
-0.45539891719818115,
0.5839806795120239,
-0.42021769285202026,
-1.1865615844726562,
0.9090827703475952,
-0.39234456419944763,
-1.9559894800186157,
-0.7971484661102295,
-0.8006776571273804,
-0.22631561756134033,
-0.7398028373718262,
0.8489965200424194,
-0.3066413402557373,
-1.460811734199524,
0.10806940495967865,
-0.6673704981803894,
0.13686582446098328,
-1.298976182937622,
0.15003998577594757,
0.6984404921531677,
-0.7210086584091187,
-0.12263073772192001,
-0.30609700083732605,
-1.308249831199646,
-0.5536359548568726,
0.31814607977867126,
1.9788668155670166,
-0.5710158348083496,
1.0204161405563354,
1.006968379020691,
-0.7271196246147156,
0.07218869030475616,
0.2013728767633438,
-0.31090179085731506,
0.7788487076759338,
-1.0976825952529907,
-0.46097758412361145,
1.1512593030929565,
-0.3052580952644348,
-0.7587673664093018,
1.3998079299926758,
0.7482768893241882,
-1.1108248233795166,
-0.2675003409385681,
-0.25202476978302,
-0.8819975852966309,
0.0016357265412807465,
-1.4759725332260132,
-0.17967543005943298,
0.39259132742881775,
-1.4724868535995483,
-0.26194483041763306,
-0.11345812678337097,
1.3345540761947632,
-0.16269424557685852,
1.4820144176483154,
-0.3648296892642975,
-0.15692327916622162,
-0.27207109332084656,
-0.5121949315071106,
0.22851359844207764,
-0.19779589772224426,
-0.571869432926178,
0.1645495593547821,
-0.8564438819885254,
0.19710882008075714,
1.4535290002822876,
0.347127228975296,
0.09539683908224106,
0.39007332921028137,
1.1012635231018066,
0.4114534854888916,
-0.014924401417374611,
-0.8669322729110718,
-1.4692879915237427,
1.9980696439743042,
-1.4261294603347778,
1.8901631832122803,
0.8554887771606445,
-0.11464636772871017,
-1.8454399108886719,
-1.824633002281189,
1.2198301553726196,
1.1147820949554443,
2.3643970489501953,
0.5134173631668091,
0.4344768226146698,
-0.7481911778450012,
-0.7841946482658386,
0.35035431385040283,
-0.987316906452179,
-0.6402683854103088,
0.15843793749809265,
2.3241424560546875,
1.7792812585830688,
-0.534264862537384,
-0.2519408166408539,
-0.8136280179023743,
1.2947518825531006,
-0.2366233617067337,
0.294075608253479,
2.08750581741333,
-0.3004511594772339,
-0.951444685459137,
1.3190712928771973,
-2.3923544883728027,
0.290250688791275,
2.0925145149230957,
0.30397680401802063,
0.1585397720336914,
-1.4423648118972778,
-0.6800454258918762,
-0.26124730706214905,
-0.44609251618385315,
-1.2347743511199951,
0.5928613543510437,
-0.3354007601737976,
-0.8917580246925354,
-1.4493712186813354,
0.038679733872413635,
-1.1591248512268066,
-1.8518637418746948,
0.30732372403144836,
1.989963173866272,
2.1623165607452393,
-0.8120588064193726,
1.4087408781051636,
-0.2693841755390167,
0.010281785391271114,
1.268004059791565,
1.3290479183197021,
3.0618855953216553,
1.8072055578231812,
-1.2926340103149414,
0.6668862104415894,
-0.19908545911312103,
-0.473895788192749,
1.1288264989852905,
-1.1188806295394897,
1.083675503730774,
-0.20736052095890045,
-1.2132868766784668,
-1.2226717472076416,
1.098731517791748,
0.4692499041557312,
0.006068387068808079,
-0.4745098054409027,
1.3056373596191406,
0.1275906264781952,
1.3480234146118164,
0.5903028249740601,
-0.43579399585723877,
0.540553867816925,
-0.3284386694431305,
-0.6135295629501343,
1.6655129194259644,
0.16856315732002258,
-1.5464417934417725,
-2.333721160888672,
-0.2854987680912018,
-0.9359140992164612,
0.005829836241900921,
-0.6359174251556396,
-1.0259016752243042,
1.5660232305526733,
0.41375401616096497,
-1.2357192039489746,
-0.3135250508785248,
-0.3659694194793701,
-0.5596365928649902,
2.6754298210144043,
-1.2653045654296875,
-0.08469889312982559,
-0.9109351634979248,
-0.5275893211364746,
1.5894370079040527,
-1.2701592445373535,
-0.2561495900154114,
-1.0081173181533813,
-0.6719985008239746,
-1.3209779262542725,
-0.39981067180633545,
0.00009088870137929916,
-0.9692257046699524,
0.7467761635780334,
0.24090169370174408,
-1.1203757524490356,
-0.30470791459083557,
-0.871817409992218,
1.076790452003479,
-0.14124412834644318,
0.2667448818683624,
1.8818447589874268,
0.3421303331851959,
-0.41596266627311707,
0.7459903359413147,
1.1891686916351318,
0.6147297024726868,
-0.6705261468887329,
-0.048540547490119934,
-0.7001014351844788,
0.3589508831501007,
-1.3681925535202026,
0.2160148024559021,
-3.0379600524902344,
0.7649146318435669,
-0.19064287841320038,
-0.12645463645458221,
-0.11727926880121231,
-1.2974417209625244,
1.0222769975662231,
2.5945866107940674,
-1.1529477834701538,
0.4778347611427307,
0.4733126163482666,
1.1084563732147217,
-1.6270062923431396,
0.2846733331680298,
-0.4957389235496521,
2.0661542415618896,
0.14454038441181183,
1.23460853099823,
-0.5471192002296448,
-2.190371513366699,
0.6489887237548828,
-1.222400188446045,
-1.0521570444107056,
0.7850939035415649,
-0.8850145936012268,
0.3281151056289673,
-1.4260618686676025,
-0.13742534816265106,
-0.9319009184837341,
-1.2417666912078857,
0.7334548234939575,
0.08091427385807037,
0.380655974149704,
-0.4955117404460907,
0.3638610243797302,
-2.1684224605560303,
-1.4469894170761108,
-0.21310047805309296,
-0.9700893759727478,
0.5402472019195557,
-0.4326725900173187,
0.5879093408584595,
-0.09273424744606018,
0.10725809633731842,
0.29288846254348755,
1.4641939401626587,
3.4454457759857178,
0.13889917731285095,
0.18529464304447174,
-0.1175483837723732,
-1.0875074863433838,
1.4748390913009644,
0.849513053894043,
-0.138289213180542,
-0.5669828653335571,
-1.009161114692688,
1.3153076171875,
2.0157783031463623,
1.0943362712860107,
0.17425020039081573,
-0.8154081106185913,
-0.6998175382614136,
0.04143380746245384,
0.14647658169269562,
0.5932244062423706,
0.9439319968223572,
-0.029070686548948288,
0.07313063740730286,
1.384169578552246,
1.1952263116836548,
-0.2585757076740265,
0.38504549860954285,
-0.9517496824264526,
-0.40380290150642395,
0.36128944158554077,
0.20011845231056213,
0.0681561604142189,
0.48303720355033875,
-0.995538055896759,
-0.3007999062538147,
-0.2789907157421112,
-0.8554134368896484,
-0.7520769238471985,
-0.3937135636806488,
-0.4268905818462372,
1.6054657697677612,
0.13699911534786224,
-0.49180665612220764,
0.09671706706285477,
-0.6429454684257507,
-0.13485202193260193,
-1.144813060760498,
0.12219055742025375,
-0.13661815226078033,
-0.10160171240568161,
-0.18719781935214996,
1.6668181419372559,
-0.9173282980918884,
-2.11872935295105,
0.22126391530036926,
0.33855536580085754,
-0.29650935530662537,
0.16941405832767487,
1.7372792959213257,
0.4703693985939026,
1.3882328271865845,
1.282263159751892,
0.9791117310523987,
-0.5922243595123291,
-1.1896402835845947,
0.7687418460845947,
0.9312394857406616,
-1.3777459859848022,
0.9350206255912781,
-0.20890626311302185,
-0.4981527626514435,
0.7156436443328857,
1.344283938407898,
0.43497052788734436,
-2.0538735389709473,
0.9840332269668579,
-0.9194045662879944,
0.7931148409843445,
0.7058396935462952,
0.7441245913505554,
0.23071278631687164,
0.8615862131118774,
-1.2054659128189087,
-1.1713956594467163,
-0.7096256017684937,
-0.6083285212516785,
1.8673280477523804,
-0.2806311547756195,
0.5978059768676758,
-0.2017519623041153,
-1.1620031595230103,
-0.12145645171403885,
0.7634479403495789,
0.42084330320358276,
-0.3476962149143219,
0.873024046421051,
-0.6317363977432251,
-0.9578644037246704,
-1.3126448392868042,
-0.36216121912002563,
-1.0472123622894287,
-0.9080805778503418,
0.9572997689247131,
0.7061812281608582,
0.4905567765235901,
1.9466476440429688,
0.5867371559143066,
0.29769110679626465,
-2.603419303894043,
0.8421569466590881,
0.2985454797744751,
-0.04217606782913208,
0.8775712251663208,
0.2664780020713806,
1.1510671377182007,
-0.004229913931339979,
0.562150776386261,
-2.3410587310791016,
2.1999542713165283,
-0.18338267505168915,
0.5850198864936829,
0.03206579387187958,
-0.2372361272573471,
1.1638890504837036,
0.6363250017166138,
0.5334576964378357,
-1.1511176824569702,
0.7096049189567566,
-0.5497624278068542,
1.106641411781311,
0.9608246684074402,
-0.8744112253189087,
0.1310136765241623,
1.4826140403747559,
0.531947672367096,
-0.4767691493034363,
-0.9722210168838501,
-0.810705304145813,
0.9425476789474487,
1.7016584873199463,
-0.04092254862189293,
-0.012635502964258194,
0.7752857804298401,
0.6323975324630737,
-1.1819556951522827,
0.06654917448759079,
-0.6714234352111816,
-0.7019785642623901,
1.7284245491027832,
1.9990755319595337,
-0.12635865807533264,
-0.20989114046096802,
-0.7216416001319885,
-1.3278450965881348,
0.8107881546020508,
-0.17328649759292603,
0.04426438361406326,
0.6759517192840576,
-0.6746766567230225,
1.0436955690383911,
0.619349479675293,
1.0023177862167358,
-0.006948389112949371,
0.25517737865448,
0.3598094582557678,
-0.4022693336009979,
-1.101877212524414,
-0.27081605792045593,
-1.136607050895691,
-2.5654101371765137,
0.36935853958129883,
-0.26732948422431946,
-1.5199320316314697,
0.04998788237571716,
-1.0291494131088257,
0.906940221786499,
-0.5484427213668823,
-1.1378388404846191,
-1.4388633966445923,
0.3251350224018097,
-0.15353456139564514,
0.9815200567245483,
-1.6368601322174072,
-0.21778540313243866,
1.267900824546814,
0.8153862357139587,
-0.6503317952156067,
0.9559034705162048,
0.20950768887996674,
1.0125348567962646,
0.7237985730171204,
-0.4094727039337158,
0.6356596350669861,
0.01133387815207243,
-1.3487814664840698,
0.3783581554889679,
1.2143760919570923,
0.17466974258422852,
1.3790531158447266,
-0.4265140891075134,
0.15817028284072876,
0.431723415851593,
-0.6070472598075867,
-0.5573173761367798,
-0.36692020297050476,
0.7564460635185242,
-0.03017342835664749,
-1.0047907829284668,
-0.1346956193447113,
-0.13561074435710907,
-0.2991063594818115,
0.22734922170639038,
-1.4016869068145752,
-0.31185275316238403,
-0.38646864891052246,
-0.45735764503479004,
-1.4119610786437988,
0.028858426958322525,
1.3220964670181274,
-0.7542844414710999,
-0.23923057317733765,
0.4009934961795807,
0.41176638007164,
0.5539343357086182,
0.567000687122345,
-0.7848314046859741,
-0.28018173575401306,
-0.3551291227340698,
-0.25860655307769775,
0.2803955078125,
1.2282201051712036,
-0.037037067115306854,
-0.9435698390007019,
0.6271237134933472,
-0.2996233403682709,
0.15543320775032043,
2.041407346725464,
0.05587635934352875,
-0.7033306956291199,
0.3724808096885681,
-0.714409351348877,
1.6843873262405396,
1.740196704864502,
1.2428399324417114,
-0.05851861089468002,
-0.7828051447868347,
0.5539059042930603,
-0.25951865315437317,
-0.30935779213905334,
0.9212984442710876,
0.4127933979034424,
-0.23557822406291962,
-1.4778708219528198,
0.6425963044166565,
1.2688136100769043,
-0.6814894080162048,
-0.7369087934494019,
0.027968909591436386,
-0.8629347085952759,
1.2239258289337158,
0.5488472580909729,
0.34105971455574036,
0.24059750139713287,
1.519955039024353,
0.806046724319458,
-0.5169445276260376,
0.5066874027252197,
0.5201109051704407,
-0.20208364725112915,
-2.1582529544830322,
-1.0429017543792725,
0.30667006969451904,
-0.3947390019893646,
-1.5976316928863525,
1.4245679378509521,
-1.0992858409881592,
-1.0552808046340942,
0.5912891626358032,
0.05718710273504257,
1.232877492904663,
0.34044942259788513,
1.6984411478042603,
2.1520941257476807,
0.933867335319519,
0.3621091842651367,
1.243415355682373,
-0.09515104442834854,
-0.470207542181015,
1.8880031108856201,
-0.40422749519348145,
0.5112468004226685,
1.0097030401229858,
-0.40791499614715576,
-1.1190701723098755,
-0.8402066826820374,
-1.117699384689331,
-0.6083564162254333,
1.181768536567688,
0.12256083637475967,
-1.01637601852417,
0.21381862461566925,
1.6001780033111572,
0.17936210334300995,
-0.2357504516839981,
0.663311243057251,
0.3702246844768524,
-0.7441810965538025,
-0.020883435383439064,
-0.8360897302627563,
0.5223841667175293,
-0.11980604380369186,
-0.3172512948513031,
0.27735042572021484,
0.5483004450798035,
1.2992451190948486,
-0.12794943153858185,
0.1387433111667633,
1.1024307012557983,
-1.3592689037322998,
1.487952470779419,
-0.5748295783996582,
0.3354075253009796,
-2.3695449829101562,
1.3662866353988647,
-0.7757465839385986,
1.988998532295227,
-2.5264501571655273,
0.4076381325721741,
-0.5315421223640442,
-0.4972884953022003,
0.24730272591114044,
-0.4892313480377197,
0.04995245113968849,
-0.10020986944437027,
-0.9321467876434326,
-0.026997532695531845,
-0.7391135096549988,
0.6282088160514832,
1.232985019683838,
1.468451738357544,
-1.1178513765335083,
-0.25890859961509705,
-1.7083057165145874,
-0.16192537546157837,
-0.7998431921005249,
0.298140287399292,
-1.9485975503921509,
-0.19271275401115417,
-2.044203758239746,
-2.323211908340454,
-1.396357536315918,
-0.9119110703468323,
1.0420572757720947,
0.23466657102108002,
-0.9805920720100403,
1.1643126010894775,
-0.33278340101242065,
-1.8090351819992065,
1.1426924467086792,
-2.1907799243927
] |
https://github.com/huggingface/datasets/issues/5712 | load_dataset in v2.11.0 raises "ValueError: seek of closed file" in np.load() | > Closing since this is a duplicate of #5711
Sorry @mariosasko , my internet went down went submitting the issue, and somehow it ended up creating a duplicate | ### Describe the bug
Hi,
I have some `dataset_load()` code of a custom offline dataset that works with datasets v2.10.1.
```python
ds = datasets.load_dataset(path=dataset_dir,
name=configuration,
data_dir=dataset_dir,
cache_dir=cache_dir,
aux_dir=aux_dir,
# download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD,
num_proc=18)
```
When upgrading datasets to 2.11.0, it fails with error
```
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 1651, in _download_and_prepare
super()._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 964, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 682, in _split_generators
self.some_function()
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 1314, in some_function()
x_df = pd.DataFrame({'cell_type_descriptor': fp['x'].tolist()})
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/numpy/lib/npyio.py", line 248, in __getitem__
bytes = self.zip.open(key)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 1530, in open
fheader = zef_file.read(sizeFileHeader)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 744, in read
self._file.seek(self._pos)
ValueError: seek of closed file
```
### Steps to reproduce the bug
Sorry, I cannot share the data or code because they are not mine to share, but the point of failure is a call in `some_function()`
```python
with np.load(filename) as fp:
x_df = pd.DataFrame({'feature': fp['x'].tolist()})
```
I'll try to generate a short snippet that reproduces the error.
### Expected behavior
I would expect that `load_dataset` works on the custom datasets generation script for v2.11.0 the same way it works for 2.10.1, without making `np.load()` give a `ValueError: seek of closed file` error.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.8
- Huggingface_hub version: 0.12.0
- PyArrow version: 11.0.0
- Pandas version: 1.5.2
- numpy: 1.24.2
- This is an offline dataset that uses `datasets.config.HF_DATASETS_OFFLINE = True` in the generation script.
| 220 | 28 | load_dataset in v2.11.0 raises "ValueError: seek of closed file" in np.load()
### Describe the bug
Hi,
I have some `dataset_load()` code of a custom offline dataset that works with datasets v2.10.1.
```python
ds = datasets.load_dataset(path=dataset_dir,
name=configuration,
data_dir=dataset_dir,
cache_dir=cache_dir,
aux_dir=aux_dir,
# download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD,
num_proc=18)
```
When upgrading datasets to 2.11.0, it fails with error
```
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 1651, in _download_and_prepare
super()._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 964, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 682, in _split_generators
self.some_function()
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 1314, in some_function()
x_df = pd.DataFrame({'cell_type_descriptor': fp['x'].tolist()})
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/numpy/lib/npyio.py", line 248, in __getitem__
bytes = self.zip.open(key)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 1530, in open
fheader = zef_file.read(sizeFileHeader)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 744, in read
self._file.seek(self._pos)
ValueError: seek of closed file
```
### Steps to reproduce the bug
Sorry, I cannot share the data or code because they are not mine to share, but the point of failure is a call in `some_function()`
```python
with np.load(filename) as fp:
x_df = pd.DataFrame({'feature': fp['x'].tolist()})
```
I'll try to generate a short snippet that reproduces the error.
### Expected behavior
I would expect that `load_dataset` works on the custom datasets generation script for v2.11.0 the same way it works for 2.10.1, without making `np.load()` give a `ValueError: seek of closed file` error.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.8
- Huggingface_hub version: 0.12.0
- PyArrow version: 11.0.0
- Pandas version: 1.5.2
- numpy: 1.24.2
- This is an offline dataset that uses `datasets.config.HF_DATASETS_OFFLINE = True` in the generation script.
> Closing since this is a duplicate of #5711
Sorry @mariosasko , my internet went down went submitting the issue, and somehow it ended up creating a duplicate | [
-1.230379343032837,
-0.9509338140487671,
-0.5962800979614258,
1.3825098276138306,
-0.13830339908599854,
-1.265310287475586,
0.14627224206924438,
-1.0201997756958008,
1.541718602180481,
-0.7841740846633911,
0.20867927372455597,
-1.6697447299957275,
-0.1392941027879715,
-0.4840589165687561,
-0.6968950033187866,
-0.9110810160636902,
-0.3904823958873749,
-0.8923600316047668,
1.0561226606369019,
2.4793717861175537,
1.3075876235961914,
-1.255653738975525,
2.7554080486297607,
0.6542779207229614,
-0.2613511383533478,
-1.0685203075408936,
0.5532418489456177,
-0.011404354125261307,
-1.2088886499404907,
-0.42030853033065796,
-0.9243490099906921,
0.011794610880315304,
-0.5746622681617737,
-0.36175304651260376,
0.048965610563755035,
0.4999513030052185,
-0.29074999690055847,
-0.25544649362564087,
-0.6237919926643372,
-0.7366076707839966,
0.537285327911377,
-0.3471217155456543,
0.9293602705001831,
-0.31861212849617004,
1.775133728981018,
-0.5726870894432068,
0.4623531103134155,
0.7139425873756409,
1.211738109588623,
0.14430242776870728,
0.07393418997526169,
0.20985780656337738,
0.36693358421325684,
0.06210828199982643,
0.5700882077217102,
1.2994792461395264,
0.5564014315605164,
0.5508535504341125,
0.6537477374076843,
-2.2344934940338135,
1.272377610206604,
-0.8654391765594482,
0.3063904643058777,
1.310949444770813,
-0.7917866706848145,
0.3133442997932434,
-1.7882885932922363,
-0.13007430732250214,
0.6114678382873535,
-2.300900936126709,
0.31314846873283386,
-1.3696563243865967,
-0.5600916743278503,
0.9025211930274963,
0.4041334390640259,
-1.2133619785308838,
0.2159235179424286,
-0.5308303833007812,
1.118515133857727,
0.4732353687286377,
1.0825892686843872,
-1.663373351097107,
-0.09328093379735947,
-0.13905614614486694,
0.05031631886959076,
-1.312131404876709,
-1.6592570543289185,
0.5775367021560669,
0.587180495262146,
0.7827521562576294,
-0.092127725481987,
1.0445042848587036,
-1.09689199924469,
0.818681001663208,
-1.0096226930618286,
-1.6000107526779175,
-1.4147112369537354,
-2.4368207454681396,
-2.3279869556427,
0.7679206728935242,
-0.46819624304771423,
-0.5419813990592957,
2.0431149005889893,
-0.9567683339118958,
-1.7422057390213013,
1.1095247268676758,
0.2615705132484436,
0.050822559744119644,
2.3890624046325684,
0.24107934534549713,
-0.7997376918792725,
0.4390828609466553,
-0.7257329225540161,
0.8596858382225037,
-0.2262389361858368,
1.3084832429885864,
0.5602383613586426,
-0.9799206256866455,
1.610295295715332,
-0.4670180380344391,
0.5797890424728394,
-0.607809841632843,
-0.5325955748558044,
-0.7927877306938171,
0.2771705687046051,
1.8612332344055176,
-0.3289894759654999,
1.5861281156539917,
-0.297550767660141,
-1.5793273448944092,
-1.619425892829895,
0.8527147173881531,
0.4210510551929474,
-0.8442333936691284,
-0.007055386900901794,
-0.47097328305244446,
0.17876222729682922,
0.004264378920197487,
1.1846592426300049,
1.2115517854690552,
0.7496123909950256,
-0.3555794954299927,
-0.781455397605896,
0.2305365800857544,
-0.16492390632629395,
-0.6427649855613708,
-1.8360295295715332,
-0.3087618947029114,
0.2433641105890274,
0.5773038268089294,
-1.1821672916412354,
1.850465178489685,
0.929532527923584,
2.03826642036438,
0.9265729784965515,
-0.35996270179748535,
1.4126392602920532,
-0.029019523411989212,
1.8390525579452515,
-0.47585079073905945,
0.5940857529640198,
-0.36995184421539307,
-1.1487263441085815,
0.9093949794769287,
-0.31031808257102966,
-1.9849803447723389,
-0.8462508320808411,
-0.7847155332565308,
-0.17442719638347626,
-0.7688613533973694,
0.826551079750061,
-0.31485217809677124,
-1.5251411199569702,
0.05520676448941231,
-0.6781954765319824,
0.15901625156402588,
-1.2254563570022583,
0.1630125343799591,
0.7343977093696594,
-0.7273284196853638,
-0.06735793501138687,
-0.254665732383728,
-1.2827210426330566,
-0.5000223517417908,
0.33501824736595154,
1.9539538621902466,
-0.5580719113349915,
0.9266539216041565,
1.0388108491897583,
-0.7603203654289246,
0.12936735153198242,
0.1658354550600052,
-0.2656024694442749,
0.737015426158905,
-1.0733377933502197,
-0.3792572021484375,
1.210495948791504,
-0.2592565715312958,
-0.7606815099716187,
1.4714242219924927,
0.7740939855575562,
-1.1100929975509644,
-0.2046278864145279,
-0.2574474811553955,
-0.8442569375038147,
0.014842686243355274,
-1.4543598890304565,
-0.1915525496006012,
0.45434582233428955,
-1.4535038471221924,
-0.3475804328918457,
-0.18892048299312592,
1.380141019821167,
-0.18971681594848633,
1.4421758651733398,
-0.33906617760658264,
-0.136773481965065,
-0.30560821294784546,
-0.4843655824661255,
0.18816320598125458,
-0.14336776733398438,
-0.5470214486122131,
0.15914946794509888,
-0.8736380338668823,
0.2089904546737671,
1.541321873664856,
0.2797013521194458,
0.12263625115156174,
0.4667987525463104,
1.0793755054473877,
0.44751617312431335,
-0.05353135988116264,
-0.8664050102233887,
-1.535801649093628,
1.9364371299743652,
-1.453559160232544,
1.8767551183700562,
0.7263990640640259,
-0.1351960301399231,
-1.8106547594070435,
-1.8683606386184692,
1.2115955352783203,
1.0918172597885132,
2.397611141204834,
0.45513883233070374,
0.3893817365169525,
-0.7499669194221497,
-0.7684491276741028,
0.3456726670265198,
-1.0077241659164429,
-0.6235948801040649,
0.13269546627998352,
2.3300960063934326,
1.8475360870361328,
-0.6069560050964355,
-0.2439446896314621,
-0.8385104537010193,
1.3213306665420532,
-0.2478531152009964,
0.2932455241680145,
2.042402505874634,
-0.3314021825790405,
-0.9594091773033142,
1.366070032119751,
-2.350226640701294,
0.2746718227863312,
2.0928211212158203,
0.22479568421840668,
0.1371186077594757,
-1.4222333431243896,
-0.6014672517776489,
-0.32139158248901367,
-0.4850376844406128,
-1.2540923357009888,
0.5817457437515259,
-0.29911497235298157,
-0.8833494782447815,
-1.3837581872940063,
0.08037679642438889,
-1.109043836593628,
-1.8122124671936035,
0.32030656933784485,
2.019254684448242,
2.084052324295044,
-0.7962914705276489,
1.3895765542984009,
-0.2656809985637665,
0.042263004928827286,
1.2210582494735718,
1.3854769468307495,
3.0671546459198,
1.8811333179473877,
-1.2428234815597534,
0.726428747177124,
-0.20585447549819946,
-0.47716182470321655,
1.0753191709518433,
-1.1679835319519043,
1.0975357294082642,
-0.1936439871788025,
-1.2280900478363037,
-1.2182692289352417,
1.1184661388397217,
0.5061339139938354,
0.00828737486153841,
-0.547282338142395,
1.2918950319290161,
0.09919381886720657,
1.3932914733886719,
0.5708235502243042,
-0.43899521231651306,
0.54859459400177,
-0.3863030672073364,
-0.6366627216339111,
1.6214882135391235,
0.2592317461967468,
-1.5339081287384033,
-2.2950100898742676,
-0.27081960439682007,
-0.9864834547042847,
-0.015412853099405766,
-0.5867794752120972,
-0.9887149333953857,
1.594893217086792,
0.3921292722225189,
-1.2015342712402344,
-0.2799842357635498,
-0.2924307584762573,
-0.5258911848068237,
2.6919779777526855,
-1.1715176105499268,
-0.07073971629142761,
-0.9615259170532227,
-0.5446220636367798,
1.6734575033187866,
-1.2448296546936035,
-0.23186321556568146,
-1.0208125114440918,
-0.664151668548584,
-1.3160693645477295,
-0.43098604679107666,
0.09347204118967056,
-1.0133291482925415,
0.76375412940979,
0.1470033824443817,
-1.1271543502807617,
-0.3074970543384552,
-0.863017201423645,
1.1324416399002075,
-0.07579933106899261,
0.16506056487560272,
1.8586125373840332,
0.2757006883621216,
-0.45155659317970276,
0.7244764566421509,
1.2086254358291626,
0.6382840275764465,
-0.6920285820960999,
0.059712525457143784,
-0.6962761878967285,
0.3424379825592041,
-1.4267427921295166,
0.2433999925851822,
-2.982856035232544,
0.7978774905204773,
-0.20161187648773193,
-0.17057421803474426,
-0.11574327200651169,
-1.2925797700881958,
1.06719970703125,
2.5624067783355713,
-1.1889958381652832,
0.5031705498695374,
0.4669463336467743,
1.106501817703247,
-1.5621939897537231,
0.3167494833469391,
-0.5336560010910034,
2.0353758335113525,
0.18378810584545135,
1.2273120880126953,
-0.5392001867294312,
-2.150109052658081,
0.6452082991600037,
-1.1948773860931396,
-1.0046786069869995,
0.8597320914268494,
-0.9697356224060059,
0.3436576724052429,
-1.3617202043533325,
-0.1640685349702835,
-0.9522312879562378,
-1.2360122203826904,
0.6860967874526978,
0.11630625277757645,
0.37242868542671204,
-0.5301748514175415,
0.42700639367103577,
-2.2011091709136963,
-1.39275324344635,
-0.2558273375034332,
-0.9830764532089233,
0.5700152516365051,
-0.38134118914604187,
0.5464200973510742,
-0.06419209390878677,
0.12925772368907928,
0.326040655374527,
1.4909875392913818,
3.4118974208831787,
0.1157413199543953,
0.09444192796945572,
-0.07011544704437256,
-1.0938677787780762,
1.4726910591125488,
0.8750703930854797,
-0.08973822742700577,
-0.5862455368041992,
-1.0148530006408691,
1.2953757047653198,
2.0144307613372803,
1.1741290092468262,
0.07668422162532806,
-0.7844012379646301,
-0.7186510562896729,
0.0659342110157013,
0.1969262957572937,
0.5871855020523071,
0.9528797268867493,
0.005567665211856365,
0.12420196086168289,
1.3443810939788818,
1.1965534687042236,
-0.2661197781562805,
0.3429286479949951,
-0.9870513081550598,
-0.4360768496990204,
0.3452814817428589,
0.1376187801361084,
0.07136065512895584,
0.4659648835659027,
-1.092402696609497,
-0.31467416882514954,
-0.27903011441230774,
-0.8676584362983704,
-0.7822458744049072,
-0.39858299493789673,
-0.4527120590209961,
1.5767579078674316,
0.08323885500431061,
-0.4734029173851013,
0.10625287890434265,
-0.690813422203064,
-0.21120180189609528,
-1.158278226852417,
0.13941647112369537,
-0.09310062974691391,
-0.09347081929445267,
-0.17290949821472168,
1.6253403425216675,
-0.9131689667701721,
-2.107590436935425,
0.17868605256080627,
0.2592194676399231,
-0.3048522174358368,
0.18155740201473236,
1.6784168481826782,
0.4978014826774597,
1.366120457649231,
1.2792729139328003,
0.9669852256774902,
-0.5355949401855469,
-1.1832606792449951,
0.7722059488296509,
0.9326733946800232,
-1.3603529930114746,
0.9155318737030029,
-0.1806541383266449,
-0.508308470249176,
0.7289416193962097,
1.2865437269210815,
0.4009951055049896,
-2.027780055999756,
0.9545371532440186,
-0.9443077445030212,
0.7659487724304199,
0.6878831386566162,
0.7715397477149963,
0.2396049052476883,
0.9187477827072144,
-1.2383501529693604,
-1.1603949069976807,
-0.6552119255065918,
-0.6647233366966248,
1.9217700958251953,
-0.2332012951374054,
0.6120129823684692,
-0.19237031042575836,
-1.1126890182495117,
-0.08194538205862045,
0.8122655749320984,
0.37785378098487854,
-0.4586758613586426,
0.9119247794151306,
-0.5969706773757935,
-0.8826316595077515,
-1.307366967201233,
-0.3919329047203064,
-1.0707237720489502,
-0.8954682350158691,
0.9503614902496338,
0.7629688382148743,
0.47675812244415283,
1.9540109634399414,
0.61991947889328,
0.41482728719711304,
-2.588263511657715,
0.858548104763031,
0.2846732437610626,
-0.033525776118040085,
0.8032506108283997,
0.2237815409898758,
1.1755988597869873,
-0.007059698458760977,
0.5985289216041565,
-2.356961250305176,
2.2191174030303955,
-0.1937185823917389,
0.5842773914337158,
0.03880605474114418,
-0.18914900720119476,
1.1253650188446045,
0.6678884029388428,
0.561485767364502,
-1.0778075456619263,
0.7315950393676758,
-0.5584526658058167,
1.0784785747528076,
0.9512887001037598,
-0.9307667016983032,
0.1202404573559761,
1.5036091804504395,
0.47608527541160583,
-0.4576546251773834,
-0.9800841808319092,
-0.895233154296875,
0.9299219250679016,
1.634691834449768,
-0.091774120926857,
-0.03868916630744934,
0.8356248140335083,
0.6326514482498169,
-1.2011909484863281,
0.028267744928598404,
-0.6363425254821777,
-0.6602222919464111,
1.7338881492614746,
2.036020040512085,
-0.13027890026569366,
-0.2216871678829193,
-0.7526600956916809,
-1.2895199060440063,
0.770825982093811,
-0.19118079543113708,
0.07769689708948135,
0.6908250451087952,
-0.6517185568809509,
1.0383119583129883,
0.5845649838447571,
1.0095648765563965,
0.024502158164978027,
0.2338775247335434,
0.42270442843437195,
-0.37895697355270386,
-1.178056240081787,
-0.3766869306564331,
-1.1055673360824585,
-2.641753911972046,
0.37158969044685364,
-0.24318064749240875,
-1.4650994539260864,
0.04582953453063965,
-1.0857512950897217,
0.8913878202438354,
-0.6412913203239441,
-1.1196529865264893,
-1.4053442478179932,
0.3494853973388672,
-0.12289928644895554,
0.9593415856361389,
-1.6756129264831543,
-0.2052030861377716,
1.2714649438858032,
0.795477032661438,
-0.6326805353164673,
0.9909766316413879,
0.2382456213235855,
1.0046254396438599,
0.7284058332443237,
-0.4098206162452698,
0.6567922830581665,
-0.049643196165561676,
-1.3776979446411133,
0.3774397075176239,
1.2311557531356812,
0.15931542217731476,
1.3322362899780273,
-0.4705222249031067,
0.1403006911277771,
0.4367505609989166,
-0.7182672619819641,
-0.5398016571998596,
-0.36463040113449097,
0.7081398367881775,
-0.004512184765189886,
-1.0235705375671387,
-0.20803077518939972,
-0.14819630980491638,
-0.32062819600105286,
0.23233866691589355,
-1.4603286981582642,
-0.31635427474975586,
-0.3923155963420868,
-0.44547316431999207,
-1.3854546546936035,
0.019137535244226456,
1.3356889486312866,
-0.8213927149772644,
-0.24995233118534088,
0.3997810184955597,
0.38478022813796997,
0.5675968527793884,
0.579973578453064,
-0.7759632468223572,
-0.18111775815486908,
-0.41741764545440674,
-0.2607465386390686,
0.27674126625061035,
1.3186026811599731,
-0.0679684653878212,
-0.9567219614982605,
0.691155731678009,
-0.31491580605506897,
0.18960309028625488,
2.0038294792175293,
0.017281770706176758,
-0.6872645020484924,
0.32568785548210144,
-0.7077301144599915,
1.7120873928070068,
1.703460693359375,
1.273730993270874,
-0.09899720549583435,
-0.7514128684997559,
0.49795329570770264,
-0.3127816915512085,
-0.3485203683376312,
0.8962140083312988,
0.4281250834465027,
-0.22821402549743652,
-1.4611849784851074,
0.7386871576309204,
1.2364344596862793,
-0.7445230484008789,
-0.7558544278144836,
0.06899198889732361,
-0.8659391403198242,
1.198024868965149,
0.5645813345909119,
0.350944459438324,
0.25096142292022705,
1.5603551864624023,
0.7735328078269958,
-0.44085821509361267,
0.47193416953086853,
0.5370444059371948,
-0.15172842144966125,
-2.1744613647460938,
-0.9920059442520142,
0.31331145763397217,
-0.4801010489463806,
-1.6049020290374756,
1.3617918491363525,
-1.0647435188293457,
-1.0700048208236694,
0.538247287273407,
0.07355969399213791,
1.3371198177337646,
0.43330931663513184,
1.7010581493377686,
2.103468418121338,
0.9040122032165527,
0.38182392716407776,
1.2810965776443481,
-0.08334451168775558,
-0.43597811460494995,
1.82236909866333,
-0.42408016324043274,
0.5080128908157349,
1.0099693536758423,
-0.3722367584705353,
-1.1006108522415161,
-0.7998275756835938,
-1.2207801342010498,
-0.560390830039978,
1.1837923526763916,
0.11986669152975082,
-1.050590991973877,
0.2346956729888916,
1.592630386352539,
0.1565878540277481,
-0.19368639588356018,
0.7073649168014526,
0.3108554184436798,
-0.7285557985305786,
-0.08855266124010086,
-0.8511108756065369,
0.5191763639450073,
-0.0875140130519867,
-0.3612160384654999,
0.24977324903011322,
0.528529703617096,
1.325616717338562,
-0.17212578654289246,
0.1642216295003891,
1.1056346893310547,
-1.36458158493042,
1.5044677257537842,
-0.5881931781768799,
0.28933626413345337,
-2.4280648231506348,
1.3357369899749756,
-0.7717038989067078,
1.96844482421875,
-2.5818653106689453,
0.4460609555244446,
-0.4930976927280426,
-0.5414416790008545,
0.3239171802997589,
-0.4453793466091156,
0.027102872729301453,
-0.13796544075012207,
-0.9916121959686279,
0.01210790779441595,
-0.6570194363594055,
0.6203927993774414,
1.1903408765792847,
1.440686821937561,
-1.1559202671051025,
-0.27590420842170715,
-1.7422780990600586,
-0.18249717354774475,
-0.8597941994667053,
0.3454609811306,
-1.9967252016067505,
-0.1600566953420639,
-1.9918802976608276,
-2.3469414710998535,
-1.3204625844955444,
-0.8991519808769226,
1.0468415021896362,
0.15312959253787994,
-0.9328480958938599,
1.2437572479248047,
-0.32038354873657227,
-1.8358221054077148,
1.129989504814148,
-2.1884026527404785
] |
https://github.com/huggingface/datasets/issues/5711 | load_dataset in v2.11.0 raises "ValueError: seek of closed file" in np.load() | It seems like https://github.com/huggingface/datasets/pull/5626 has introduced this error.
cc @albertvillanova
I think replacing:
https://github.com/huggingface/datasets/blob/0803a006db1c395ac715662cc6079651f77c11ea/src/datasets/download/streaming_download_manager.py#L777-L778
with:
```python
return np.load(xopen(filepath_or_buffer, "rb", use_auth_token=use_auth_token), *args, **kwargs)
```
should fix the issue.
(Maybe this is also worth doing a patch release afterward) | ### Describe the bug
Hi,
I have some `dataset_load()` code of a custom offline dataset that works with datasets v2.10.1.
```python
ds = datasets.load_dataset(path=dataset_dir,
name=configuration,
data_dir=dataset_dir,
cache_dir=cache_dir,
aux_dir=aux_dir,
# download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD,
num_proc=18)
```
When upgrading datasets to 2.11.0, it fails with error
```
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 1651, in _download_and_prepare
super()._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 964, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 682, in _split_generators
self.some_function()
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 1314, in some_function()
x_df = pd.DataFrame({'cell_type_descriptor': fp['x'].tolist()})
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/numpy/lib/npyio.py", line 248, in __getitem__
bytes = self.zip.open(key)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 1530, in open
fheader = zef_file.read(sizeFileHeader)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 744, in read
self._file.seek(self._pos)
ValueError: seek of closed file
```
### Steps to reproduce the bug
Sorry, I cannot share the data or code because they are not mine to share, but the point of failure is a call in `some_function()`
```python
with np.load(embedding_filename) as fp:
x_df = pd.DataFrame({'feature': fp['x'].tolist()})
```
I'll try to generate a short snippet that reproduces the error.
### Expected behavior
I would expect that `load_dataset` works on the custom datasets generation script for v2.11.0 the same way it works for 2.10.1, without making `np.load()` give a `ValueError: seek of closed file` error.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.8
- Huggingface_hub version: 0.12.0
- PyArrow version: 11.0.0
- Pandas version: 1.5.2
- numpy: 1.24.2
- This is an offline dataset that uses `datasets.config.HF_DATASETS_OFFLINE = True` in the generation script.
| 221 | 37 | load_dataset in v2.11.0 raises "ValueError: seek of closed file" in np.load()
### Describe the bug
Hi,
I have some `dataset_load()` code of a custom offline dataset that works with datasets v2.10.1.
```python
ds = datasets.load_dataset(path=dataset_dir,
name=configuration,
data_dir=dataset_dir,
cache_dir=cache_dir,
aux_dir=aux_dir,
# download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD,
num_proc=18)
```
When upgrading datasets to 2.11.0, it fails with error
```
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 1651, in _download_and_prepare
super()._download_and_prepare(
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/datasets/builder.py", line 964, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 682, in _split_generators
self.some_function()
File "/home/ramon.casero/.cache/huggingface/modules/datasets_modules/datasets/71f67f69e6e00e139903a121f96b71f39b65a6b6aaeb0862e6a5da3a3f565b4c/mydataset.py", line 1314, in some_function()
x_df = pd.DataFrame({'cell_type_descriptor': fp['x'].tolist()})
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/site-packages/numpy/lib/npyio.py", line 248, in __getitem__
bytes = self.zip.open(key)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 1530, in open
fheader = zef_file.read(sizeFileHeader)
File "/home/ramon.casero/opt/miniconda3/envs/myenv/lib/python3.10/zipfile.py", line 744, in read
self._file.seek(self._pos)
ValueError: seek of closed file
```
### Steps to reproduce the bug
Sorry, I cannot share the data or code because they are not mine to share, but the point of failure is a call in `some_function()`
```python
with np.load(embedding_filename) as fp:
x_df = pd.DataFrame({'feature': fp['x'].tolist()})
```
I'll try to generate a short snippet that reproduces the error.
### Expected behavior
I would expect that `load_dataset` works on the custom datasets generation script for v2.11.0 the same way it works for 2.10.1, without making `np.load()` give a `ValueError: seek of closed file` error.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-4.18.0-483.el8.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.8
- Huggingface_hub version: 0.12.0
- PyArrow version: 11.0.0
- Pandas version: 1.5.2
- numpy: 1.24.2
- This is an offline dataset that uses `datasets.config.HF_DATASETS_OFFLINE = True` in the generation script.
It seems like https://github.com/huggingface/datasets/pull/5626 has introduced this error.
cc @albertvillanova
I think replacing:
https://github.com/huggingface/datasets/blob/0803a006db1c395ac715662cc6079651f77c11ea/src/datasets/download/streaming_download_manager.py#L777-L778
with:
```python
return np.load(xopen(filepath_or_buffer, "rb", use_auth_token=use_auth_token), *args, **kwargs)
```
should fix the issue.
(Maybe this is also worth doing a patch release afterward) | [
-1.230379343032837,
-0.9509338140487671,
-0.5962800979614258,
1.3825098276138306,
-0.13830339908599854,
-1.265310287475586,
0.14627224206924438,
-1.0201997756958008,
1.541718602180481,
-0.7841740846633911,
0.20867927372455597,
-1.6697447299957275,
-0.1392941027879715,
-0.4840589165687561,
-0.6968950033187866,
-0.9110810160636902,
-0.3904823958873749,
-0.8923600316047668,
1.0561226606369019,
2.4793717861175537,
1.3075876235961914,
-1.255653738975525,
2.7554080486297607,
0.6542779207229614,
-0.2613511383533478,
-1.0685203075408936,
0.5532418489456177,
-0.011404354125261307,
-1.2088886499404907,
-0.42030853033065796,
-0.9243490099906921,
0.011794610880315304,
-0.5746622681617737,
-0.36175304651260376,
0.048965610563755035,
0.4999513030052185,
-0.29074999690055847,
-0.25544649362564087,
-0.6237919926643372,
-0.7366076707839966,
0.537285327911377,
-0.3471217155456543,
0.9293602705001831,
-0.31861212849617004,
1.775133728981018,
-0.5726870894432068,
0.4623531103134155,
0.7139425873756409,
1.211738109588623,
0.14430242776870728,
0.07393418997526169,
0.20985780656337738,
0.36693358421325684,
0.06210828199982643,
0.5700882077217102,
1.2994792461395264,
0.5564014315605164,
0.5508535504341125,
0.6537477374076843,
-2.2344934940338135,
1.272377610206604,
-0.8654391765594482,
0.3063904643058777,
1.310949444770813,
-0.7917866706848145,
0.3133442997932434,
-1.7882885932922363,
-0.13007430732250214,
0.6114678382873535,
-2.300900936126709,
0.31314846873283386,
-1.3696563243865967,
-0.5600916743278503,
0.9025211930274963,
0.4041334390640259,
-1.2133619785308838,
0.2159235179424286,
-0.5308303833007812,
1.118515133857727,
0.4732353687286377,
1.0825892686843872,
-1.663373351097107,
-0.09328093379735947,
-0.13905614614486694,
0.05031631886959076,
-1.312131404876709,
-1.6592570543289185,
0.5775367021560669,
0.587180495262146,
0.7827521562576294,
-0.092127725481987,
1.0445042848587036,
-1.09689199924469,
0.818681001663208,
-1.0096226930618286,
-1.6000107526779175,
-1.4147112369537354,
-2.4368207454681396,
-2.3279869556427,
0.7679206728935242,
-0.46819624304771423,
-0.5419813990592957,
2.0431149005889893,
-0.9567683339118958,
-1.7422057390213013,
1.1095247268676758,
0.2615705132484436,
0.050822559744119644,
2.3890624046325684,
0.24107934534549713,
-0.7997376918792725,
0.4390828609466553,
-0.7257329225540161,
0.8596858382225037,
-0.2262389361858368,
1.3084832429885864,
0.5602383613586426,
-0.9799206256866455,
1.610295295715332,
-0.4670180380344391,
0.5797890424728394,
-0.607809841632843,
-0.5325955748558044,
-0.7927877306938171,
0.2771705687046051,
1.8612332344055176,
-0.3289894759654999,
1.5861281156539917,
-0.297550767660141,
-1.5793273448944092,
-1.619425892829895,
0.8527147173881531,
0.4210510551929474,
-0.8442333936691284,
-0.007055386900901794,
-0.47097328305244446,
0.17876222729682922,
0.004264378920197487,
1.1846592426300049,
1.2115517854690552,
0.7496123909950256,
-0.3555794954299927,
-0.781455397605896,
0.2305365800857544,
-0.16492390632629395,
-0.6427649855613708,
-1.8360295295715332,
-0.3087618947029114,
0.2433641105890274,
0.5773038268089294,
-1.1821672916412354,
1.850465178489685,
0.929532527923584,
2.03826642036438,
0.9265729784965515,
-0.35996270179748535,
1.4126392602920532,
-0.029019523411989212,
1.8390525579452515,
-0.47585079073905945,
0.5940857529640198,
-0.36995184421539307,
-1.1487263441085815,
0.9093949794769287,
-0.31031808257102966,
-1.9849803447723389,
-0.8462508320808411,
-0.7847155332565308,
-0.17442719638347626,
-0.7688613533973694,
0.826551079750061,
-0.31485217809677124,
-1.5251411199569702,
0.05520676448941231,
-0.6781954765319824,
0.15901625156402588,
-1.2254563570022583,
0.1630125343799591,
0.7343977093696594,
-0.7273284196853638,
-0.06735793501138687,
-0.254665732383728,
-1.2827210426330566,
-0.5000223517417908,
0.33501824736595154,
1.9539538621902466,
-0.5580719113349915,
0.9266539216041565,
1.0388108491897583,
-0.7603203654289246,
0.12936735153198242,
0.1658354550600052,
-0.2656024694442749,
0.737015426158905,
-1.0733377933502197,
-0.3792572021484375,
1.210495948791504,
-0.2592565715312958,
-0.7606815099716187,
1.4714242219924927,
0.7740939855575562,
-1.1100929975509644,
-0.2046278864145279,
-0.2574474811553955,
-0.8442569375038147,
0.014842686243355274,
-1.4543598890304565,
-0.1915525496006012,
0.45434582233428955,
-1.4535038471221924,
-0.3475804328918457,
-0.18892048299312592,
1.380141019821167,
-0.18971681594848633,
1.4421758651733398,
-0.33906617760658264,
-0.136773481965065,
-0.30560821294784546,
-0.4843655824661255,
0.18816320598125458,
-0.14336776733398438,
-0.5470214486122131,
0.15914946794509888,
-0.8736380338668823,
0.2089904546737671,
1.541321873664856,
0.2797013521194458,
0.12263625115156174,
0.4667987525463104,
1.0793755054473877,
0.44751617312431335,
-0.05353135988116264,
-0.8664050102233887,
-1.535801649093628,
1.9364371299743652,
-1.453559160232544,
1.8767551183700562,
0.7263990640640259,
-0.1351960301399231,
-1.8106547594070435,
-1.8683606386184692,
1.2115955352783203,
1.0918172597885132,
2.397611141204834,
0.45513883233070374,
0.3893817365169525,
-0.7499669194221497,
-0.7684491276741028,
0.3456726670265198,
-1.0077241659164429,
-0.6235948801040649,
0.13269546627998352,
2.3300960063934326,
1.8475360870361328,
-0.6069560050964355,
-0.2439446896314621,
-0.8385104537010193,
1.3213306665420532,
-0.2478531152009964,
0.2932455241680145,
2.042402505874634,
-0.3314021825790405,
-0.9594091773033142,
1.366070032119751,
-2.350226640701294,
0.2746718227863312,
2.0928211212158203,
0.22479568421840668,
0.1371186077594757,
-1.4222333431243896,
-0.6014672517776489,
-0.32139158248901367,
-0.4850376844406128,
-1.2540923357009888,
0.5817457437515259,
-0.29911497235298157,
-0.8833494782447815,
-1.3837581872940063,
0.08037679642438889,
-1.109043836593628,
-1.8122124671936035,
0.32030656933784485,
2.019254684448242,
2.084052324295044,
-0.7962914705276489,
1.3895765542984009,
-0.2656809985637665,
0.042263004928827286,
1.2210582494735718,
1.3854769468307495,
3.0671546459198,
1.8811333179473877,
-1.2428234815597534,
0.726428747177124,
-0.20585447549819946,
-0.47716182470321655,
1.0753191709518433,
-1.1679835319519043,
1.0975357294082642,
-0.1936439871788025,
-1.2280900478363037,
-1.2182692289352417,
1.1184661388397217,
0.5061339139938354,
0.00828737486153841,
-0.547282338142395,
1.2918950319290161,
0.09919381886720657,
1.3932914733886719,
0.5708235502243042,
-0.43899521231651306,
0.54859459400177,
-0.3863030672073364,
-0.6366627216339111,
1.6214882135391235,
0.2592317461967468,
-1.5339081287384033,
-2.2950100898742676,
-0.27081960439682007,
-0.9864834547042847,
-0.015412853099405766,
-0.5867794752120972,
-0.9887149333953857,
1.594893217086792,
0.3921292722225189,
-1.2015342712402344,
-0.2799842357635498,
-0.2924307584762573,
-0.5258911848068237,
2.6919779777526855,
-1.1715176105499268,
-0.07073971629142761,
-0.9615259170532227,
-0.5446220636367798,
1.6734575033187866,
-1.2448296546936035,
-0.23186321556568146,
-1.0208125114440918,
-0.664151668548584,
-1.3160693645477295,
-0.43098604679107666,
0.09347204118967056,
-1.0133291482925415,
0.76375412940979,
0.1470033824443817,
-1.1271543502807617,
-0.3074970543384552,
-0.863017201423645,
1.1324416399002075,
-0.07579933106899261,
0.16506056487560272,
1.8586125373840332,
0.2757006883621216,
-0.45155659317970276,
0.7244764566421509,
1.2086254358291626,
0.6382840275764465,
-0.6920285820960999,
0.059712525457143784,
-0.6962761878967285,
0.3424379825592041,
-1.4267427921295166,
0.2433999925851822,
-2.982856035232544,
0.7978774905204773,
-0.20161187648773193,
-0.17057421803474426,
-0.11574327200651169,
-1.2925797700881958,
1.06719970703125,
2.5624067783355713,
-1.1889958381652832,
0.5031705498695374,
0.4669463336467743,
1.106501817703247,
-1.5621939897537231,
0.3167494833469391,
-0.5336560010910034,
2.0353758335113525,
0.18378810584545135,
1.2273120880126953,
-0.5392001867294312,
-2.150109052658081,
0.6452082991600037,
-1.1948773860931396,
-1.0046786069869995,
0.8597320914268494,
-0.9697356224060059,
0.3436576724052429,
-1.3617202043533325,
-0.1640685349702835,
-0.9522312879562378,
-1.2360122203826904,
0.6860967874526978,
0.11630625277757645,
0.37242868542671204,
-0.5301748514175415,
0.42700639367103577,
-2.2011091709136963,
-1.39275324344635,
-0.2558273375034332,
-0.9830764532089233,
0.5700152516365051,
-0.38134118914604187,
0.5464200973510742,
-0.06419209390878677,
0.12925772368907928,
0.326040655374527,
1.4909875392913818,
3.4118974208831787,
0.1157413199543953,
0.09444192796945572,
-0.07011544704437256,
-1.0938677787780762,
1.4726910591125488,
0.8750703930854797,
-0.08973822742700577,
-0.5862455368041992,
-1.0148530006408691,
1.2953757047653198,
2.0144307613372803,
1.1741290092468262,
0.07668422162532806,
-0.7844012379646301,
-0.7186510562896729,
0.0659342110157013,
0.1969262957572937,
0.5871855020523071,
0.9528797268867493,
0.005567665211856365,
0.12420196086168289,
1.3443810939788818,
1.1965534687042236,
-0.2661197781562805,
0.3429286479949951,
-0.9870513081550598,
-0.4360768496990204,
0.3452814817428589,
0.1376187801361084,
0.07136065512895584,
0.4659648835659027,
-1.092402696609497,
-0.31467416882514954,
-0.27903011441230774,
-0.8676584362983704,
-0.7822458744049072,
-0.39858299493789673,
-0.4527120590209961,
1.5767579078674316,
0.08323885500431061,
-0.4734029173851013,
0.10625287890434265,
-0.690813422203064,
-0.21120180189609528,
-1.158278226852417,
0.13941647112369537,
-0.09310062974691391,
-0.09347081929445267,
-0.17290949821472168,
1.6253403425216675,
-0.9131689667701721,
-2.107590436935425,
0.17868605256080627,
0.2592194676399231,
-0.3048522174358368,
0.18155740201473236,
1.6784168481826782,
0.4978014826774597,
1.366120457649231,
1.2792729139328003,
0.9669852256774902,
-0.5355949401855469,
-1.1832606792449951,
0.7722059488296509,
0.9326733946800232,
-1.3603529930114746,
0.9155318737030029,
-0.1806541383266449,
-0.508308470249176,
0.7289416193962097,
1.2865437269210815,
0.4009951055049896,
-2.027780055999756,
0.9545371532440186,
-0.9443077445030212,
0.7659487724304199,
0.6878831386566162,
0.7715397477149963,
0.2396049052476883,
0.9187477827072144,
-1.2383501529693604,
-1.1603949069976807,
-0.6552119255065918,
-0.6647233366966248,
1.9217700958251953,
-0.2332012951374054,
0.6120129823684692,
-0.19237031042575836,
-1.1126890182495117,
-0.08194538205862045,
0.8122655749320984,
0.37785378098487854,
-0.4586758613586426,
0.9119247794151306,
-0.5969706773757935,
-0.8826316595077515,
-1.307366967201233,
-0.3919329047203064,
-1.0707237720489502,
-0.8954682350158691,
0.9503614902496338,
0.7629688382148743,
0.47675812244415283,
1.9540109634399414,
0.61991947889328,
0.41482728719711304,
-2.588263511657715,
0.858548104763031,
0.2846732437610626,
-0.033525776118040085,
0.8032506108283997,
0.2237815409898758,
1.1755988597869873,
-0.007059698458760977,
0.5985289216041565,
-2.356961250305176,
2.2191174030303955,
-0.1937185823917389,
0.5842773914337158,
0.03880605474114418,
-0.18914900720119476,
1.1253650188446045,
0.6678884029388428,
0.561485767364502,
-1.0778075456619263,
0.7315950393676758,
-0.5584526658058167,
1.0784785747528076,
0.9512887001037598,
-0.9307667016983032,
0.1202404573559761,
1.5036091804504395,
0.47608527541160583,
-0.4576546251773834,
-0.9800841808319092,
-0.895233154296875,
0.9299219250679016,
1.634691834449768,
-0.091774120926857,
-0.03868916630744934,
0.8356248140335083,
0.6326514482498169,
-1.2011909484863281,
0.028267744928598404,
-0.6363425254821777,
-0.6602222919464111,
1.7338881492614746,
2.036020040512085,
-0.13027890026569366,
-0.2216871678829193,
-0.7526600956916809,
-1.2895199060440063,
0.770825982093811,
-0.19118079543113708,
0.07769689708948135,
0.6908250451087952,
-0.6517185568809509,
1.0383119583129883,
0.5845649838447571,
1.0095648765563965,
0.024502158164978027,
0.2338775247335434,
0.42270442843437195,
-0.37895697355270386,
-1.178056240081787,
-0.3766869306564331,
-1.1055673360824585,
-2.641753911972046,
0.37158969044685364,
-0.24318064749240875,
-1.4650994539260864,
0.04582953453063965,
-1.0857512950897217,
0.8913878202438354,
-0.6412913203239441,
-1.1196529865264893,
-1.4053442478179932,
0.3494853973388672,
-0.12289928644895554,
0.9593415856361389,
-1.6756129264831543,
-0.2052030861377716,
1.2714649438858032,
0.795477032661438,
-0.6326805353164673,
0.9909766316413879,
0.2382456213235855,
1.0046254396438599,
0.7284058332443237,
-0.4098206162452698,
0.6567922830581665,
-0.049643196165561676,
-1.3776979446411133,
0.3774397075176239,
1.2311557531356812,
0.15931542217731476,
1.3322362899780273,
-0.4705222249031067,
0.1403006911277771,
0.4367505609989166,
-0.7182672619819641,
-0.5398016571998596,
-0.36463040113449097,
0.7081398367881775,
-0.004512184765189886,
-1.0235705375671387,
-0.20803077518939972,
-0.14819630980491638,
-0.32062819600105286,
0.23233866691589355,
-1.4603286981582642,
-0.31635427474975586,
-0.3923155963420868,
-0.44547316431999207,
-1.3854546546936035,
0.019137535244226456,
1.3356889486312866,
-0.8213927149772644,
-0.24995233118534088,
0.3997810184955597,
0.38478022813796997,
0.5675968527793884,
0.579973578453064,
-0.7759632468223572,
-0.18111775815486908,
-0.41741764545440674,
-0.2607465386390686,
0.27674126625061035,
1.3186026811599731,
-0.0679684653878212,
-0.9567219614982605,
0.691155731678009,
-0.31491580605506897,
0.18960309028625488,
2.0038294792175293,
0.017281770706176758,
-0.6872645020484924,
0.32568785548210144,
-0.7077301144599915,
1.7120873928070068,
1.703460693359375,
1.273730993270874,
-0.09899720549583435,
-0.7514128684997559,
0.49795329570770264,
-0.3127816915512085,
-0.3485203683376312,
0.8962140083312988,
0.4281250834465027,
-0.22821402549743652,
-1.4611849784851074,
0.7386871576309204,
1.2364344596862793,
-0.7445230484008789,
-0.7558544278144836,
0.06899198889732361,
-0.8659391403198242,
1.198024868965149,
0.5645813345909119,
0.350944459438324,
0.25096142292022705,
1.5603551864624023,
0.7735328078269958,
-0.44085821509361267,
0.47193416953086853,
0.5370444059371948,
-0.15172842144966125,
-2.1744613647460938,
-0.9920059442520142,
0.31331145763397217,
-0.4801010489463806,
-1.6049020290374756,
1.3617918491363525,
-1.0647435188293457,
-1.0700048208236694,
0.538247287273407,
0.07355969399213791,
1.3371198177337646,
0.43330931663513184,
1.7010581493377686,
2.103468418121338,
0.9040122032165527,
0.38182392716407776,
1.2810965776443481,
-0.08334451168775558,
-0.43597811460494995,
1.82236909866333,
-0.42408016324043274,
0.5080128908157349,
1.0099693536758423,
-0.3722367584705353,
-1.1006108522415161,
-0.7998275756835938,
-1.2207801342010498,
-0.560390830039978,
1.1837923526763916,
0.11986669152975082,
-1.050590991973877,
0.2346956729888916,
1.592630386352539,
0.1565878540277481,
-0.19368639588356018,
0.7073649168014526,
0.3108554184436798,
-0.7285557985305786,
-0.08855266124010086,
-0.8511108756065369,
0.5191763639450073,
-0.0875140130519867,
-0.3612160384654999,
0.24977324903011322,
0.528529703617096,
1.325616717338562,
-0.17212578654289246,
0.1642216295003891,
1.1056346893310547,
-1.36458158493042,
1.5044677257537842,
-0.5881931781768799,
0.28933626413345337,
-2.4280648231506348,
1.3357369899749756,
-0.7717038989067078,
1.96844482421875,
-2.5818653106689453,
0.4460609555244446,
-0.4930976927280426,
-0.5414416790008545,
0.3239171802997589,
-0.4453793466091156,
0.027102872729301453,
-0.13796544075012207,
-0.9916121959686279,
0.01210790779441595,
-0.6570194363594055,
0.6203927993774414,
1.1903408765792847,
1.440686821937561,
-1.1559202671051025,
-0.27590420842170715,
-1.7422780990600586,
-0.18249717354774475,
-0.8597941994667053,
0.3454609811306,
-1.9967252016067505,
-0.1600566953420639,
-1.9918802976608276,
-2.3469414710998535,
-1.3204625844955444,
-0.8991519808769226,
1.0468415021896362,
0.15312959253787994,
-0.9328480958938599,
1.2437572479248047,
-0.32038354873657227,
-1.8358221054077148,
1.129989504814148,
-2.1884026527404785
] |
https://github.com/huggingface/datasets/issues/5710 | OSError: Memory mapping file failed: Cannot allocate memory | Hi! This error means that PyArrow's internal [`mmap`](https://man7.org/linux/man-pages/man2/mmap.2.html) call failed to allocate memory, which can be tricky to debug. Since this error is more related to PyArrow than us, I think it's best to report this issue in their [repo](https://github.com/apache/arrow) (they are more experienced on this matter). Also, googling "mmap cannot allocate memory" returns some approaches to solving this problem. | ### Describe the bug
Hello, I have a series of datasets each of 5 GB, 600 datasets in total. So together this makes 3TB.
When I trying to load all the 600 datasets into memory, I get the above error message.
Is this normal because I'm hitting the max size of memory mapping of the OS?
Thank you
```terminal
0_21/cache-e9c42499f65b1881.arrow
load_hf_datasets_from_disk: 82%|████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 494/600 [07:26<01:35, 1.11it/s]
Traceback (most recent call last):
File "example_load_genkalm_dataset.py", line 35, in <module>
multi_ds.post_process(max_node_num=args.max_node_num,max_seq_length=args.max_seq_length,delay=args.delay)
File "/home/geng/GenKaLM/src/dataloader/dataset.py", line 142, in post_process
genkalm_dataset = GenKaLM_Dataset.from_hf_dataset(path_or_name=ds_path, max_seq_length=self.max_seq_length,
File "/home/geng/GenKaLM/src/dataloader/dataset.py", line 47, in from_hf_dataset
hf_ds = load_from_disk(path_or_name)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/load.py", line 1848, in load_from_disk
return Dataset.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1549, in load_from_disk
arrow_table = concat_tables(
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 1805, in concat_tables
tables = list(tables)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1550, in <genexpr>
table_cls.from_file(Path(dataset_path, data_file["filename"]).as_posix())
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 1065, in from_file
table = _memory_mapped_arrow_table_from_file(filename)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 50, in _memory_mapped_arrow_table_from_file
memory_mapped_stream = pa.memory_map(filename)
File "pyarrow/io.pxi", line 950, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 911, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 115, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
### Steps to reproduce the bug
Sorry I can not provide a reproducible code as the data is stored on my server and it's too large to share.
### Expected behavior
I expect the 3TB of data can be fully mapped to memory
### Environment info
- `datasets` version: 2.9.0
- Platform: Linux-4.15.0-204-generic-x86_64-with-debian-buster-sid
- Python version: 3.7.6
- PyArrow version: 11.0.0
- Pandas version: 1.0.1 | 222 | 60 | OSError: Memory mapping file failed: Cannot allocate memory
### Describe the bug
Hello, I have a series of datasets each of 5 GB, 600 datasets in total. So together this makes 3TB.
When I trying to load all the 600 datasets into memory, I get the above error message.
Is this normal because I'm hitting the max size of memory mapping of the OS?
Thank you
```terminal
0_21/cache-e9c42499f65b1881.arrow
load_hf_datasets_from_disk: 82%|████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 494/600 [07:26<01:35, 1.11it/s]
Traceback (most recent call last):
File "example_load_genkalm_dataset.py", line 35, in <module>
multi_ds.post_process(max_node_num=args.max_node_num,max_seq_length=args.max_seq_length,delay=args.delay)
File "/home/geng/GenKaLM/src/dataloader/dataset.py", line 142, in post_process
genkalm_dataset = GenKaLM_Dataset.from_hf_dataset(path_or_name=ds_path, max_seq_length=self.max_seq_length,
File "/home/geng/GenKaLM/src/dataloader/dataset.py", line 47, in from_hf_dataset
hf_ds = load_from_disk(path_or_name)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/load.py", line 1848, in load_from_disk
return Dataset.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1549, in load_from_disk
arrow_table = concat_tables(
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 1805, in concat_tables
tables = list(tables)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1550, in <genexpr>
table_cls.from_file(Path(dataset_path, data_file["filename"]).as_posix())
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 1065, in from_file
table = _memory_mapped_arrow_table_from_file(filename)
File "/home/geng/.conda/envs/genkalm/lib/python3.8/site-packages/datasets/table.py", line 50, in _memory_mapped_arrow_table_from_file
memory_mapped_stream = pa.memory_map(filename)
File "pyarrow/io.pxi", line 950, in pyarrow.lib.memory_map
File "pyarrow/io.pxi", line 911, in pyarrow.lib.MemoryMappedFile._open
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 115, in pyarrow.lib.check_status
OSError: Memory mapping file failed: Cannot allocate memory
```
### Steps to reproduce the bug
Sorry I can not provide a reproducible code as the data is stored on my server and it's too large to share.
### Expected behavior
I expect the 3TB of data can be fully mapped to memory
### Environment info
- `datasets` version: 2.9.0
- Platform: Linux-4.15.0-204-generic-x86_64-with-debian-buster-sid
- Python version: 3.7.6
- PyArrow version: 11.0.0
- Pandas version: 1.0.1
Hi! This error means that PyArrow's internal [`mmap`](https://man7.org/linux/man-pages/man2/mmap.2.html) call failed to allocate memory, which can be tricky to debug. Since this error is more related to PyArrow than us, I think it's best to report this issue in their [repo](https://github.com/apache/arrow) (they are more experienced on this matter). Also, googling "mmap cannot allocate memory" returns some approaches to solving this problem. | [
-1.2294020652770996,
-0.9469408392906189,
-0.6352747082710266,
1.4415980577468872,
-0.12678483128547668,
-1.2599518299102783,
0.1894005835056305,
-1.0809638500213623,
1.57621431350708,
-0.7967254519462585,
0.19476710259914398,
-1.6998927593231201,
-0.06687450408935547,
-0.5440621376037598,
-0.6509373188018799,
-0.9741385579109192,
-0.34313976764678955,
-0.8638680577278137,
1.0528358221054077,
2.4841420650482178,
1.3684998750686646,
-1.2809940576553345,
2.76509690284729,
0.5781147480010986,
-0.30754175782203674,
-1.0302457809448242,
0.4964592456817627,
0.037975579500198364,
-1.1771833896636963,
-0.5133140087127686,
-0.8740612268447876,
-0.03274686262011528,
-0.6003257036209106,
-0.3512036204338074,
0.054393697530031204,
0.4697206914424896,
-0.35146576166152954,
-0.19116860628128052,
-0.6283328533172607,
-0.8209024667739868,
0.5906164646148682,
-0.35822299122810364,
0.9719772338867188,
-0.3658866286277771,
1.7161412239074707,
-0.6512531042098999,
0.5016729235649109,
0.822265625,
1.164411187171936,
0.10260003805160522,
0.09464457631111145,
0.22977013885974884,
0.2803005576133728,
0.07610413432121277,
0.5410531759262085,
1.1569408178329468,
0.6141290068626404,
0.5278275609016418,
0.6411871910095215,
-2.163073778152466,
1.3337218761444092,
-0.9313568472862244,
0.19039921462535858,
1.4021697044372559,
-0.8861786723136902,
0.4066389799118042,
-1.784222960472107,
-0.15032783150672913,
0.6441545486450195,
-2.249295473098755,
0.3353884518146515,
-1.342757225036621,
-0.5404537320137024,
0.9024754166603088,
0.34351736307144165,
-1.0633490085601807,
0.1576944887638092,
-0.5870819687843323,
1.1279586553573608,
0.5334141254425049,
1.0259515047073364,
-1.7233376502990723,
-0.08636657893657684,
-0.12098243832588196,
0.0614786334335804,
-1.358386516571045,
-1.6379187107086182,
0.645213782787323,
0.5064465999603271,
0.6376232504844666,
-0.0770009309053421,
1.1210602521896362,
-1.0632734298706055,
0.7688416838645935,
-1.05238938331604,
-1.5015029907226562,
-1.4372724294662476,
-2.4581856727600098,
-2.3199329376220703,
0.8195016980171204,
-0.47874346375465393,
-0.557937741279602,
2.0764517784118652,
-1.0276414155960083,
-1.6582369804382324,
1.0455074310302734,
0.2200334519147873,
0.12147054076194763,
2.412571907043457,
0.24569325149059296,
-0.7646837830543518,
0.4374328851699829,
-0.7251485586166382,
0.7542634606361389,
-0.2460816204547882,
1.3123576641082764,
0.5328189134597778,
-1.0546265840530396,
1.501145601272583,
-0.456542432308197,
0.5699296593666077,
-0.6264111399650574,
-0.5677551031112671,
-0.8173459768295288,
0.15639695525169373,
1.8525590896606445,
-0.2640780508518219,
1.5248830318450928,
-0.2546353042125702,
-1.5091629028320312,
-1.5448017120361328,
0.9016687870025635,
0.4076281189918518,
-0.9287527799606323,
0.054121602326631546,
-0.5570269823074341,
0.17628084123134613,
-0.02845088392496109,
1.1805042028427124,
1.2709602117538452,
0.6974166631698608,
-0.41869544982910156,
-0.7604750990867615,
0.15095019340515137,
-0.24501769244670868,
-0.6281207203865051,
-1.8831859827041626,
-0.29136961698532104,
0.15242375433444977,
0.6666296720504761,
-1.158590316772461,
1.8011260032653809,
0.9703984260559082,
1.9000412225723267,
0.9714961647987366,
-0.413331001996994,
1.375573754310608,
-0.024055693298578262,
1.8347667455673218,
-0.5401390790939331,
0.6250345706939697,
-0.3663783669471741,
-1.15179443359375,
0.9740974307060242,
-0.30327099561691284,
-1.9642868041992188,
-0.82597815990448,
-0.7001016139984131,
-0.1877644658088684,
-0.7937490344047546,
0.8556390404701233,
-0.27257975935935974,
-1.494236946105957,
0.1819998174905777,
-0.6275695562362671,
0.2519795894622803,
-1.221482515335083,
0.17035120725631714,
0.6431400179862976,
-0.5930470824241638,
-0.01758705824613571,
-0.2384965419769287,
-1.2949550151824951,
-0.5355563163757324,
0.38475367426872253,
1.8572304248809814,
-0.5605749487876892,
0.962230384349823,
1.013542890548706,
-0.6471744775772095,
0.14261271059513092,
0.15333415567874908,
-0.2775387763977051,
0.7438573241233826,
-1.0627050399780273,
-0.47154709696769714,
1.2217047214508057,
-0.35248899459838867,
-0.7182634472846985,
1.5248280763626099,
0.8016749620437622,
-1.0809816122055054,
-0.2433408498764038,
-0.27909204363822937,
-0.9647672176361084,
-0.042600810527801514,
-1.502842903137207,
-0.1710527092218399,
0.4338141977787018,
-1.4823421239852905,
-0.28744542598724365,
-0.14704743027687073,
1.4763686656951904,
-0.27195867896080017,
1.525651216506958,
-0.3756480813026428,
-0.1688721776008606,
-0.29618579149246216,
-0.4065954089164734,
0.17509080469608307,
-0.1276114583015442,
-0.4807494878768921,
0.12018068134784698,
-0.9166978597640991,
0.25442183017730713,
1.5141141414642334,
0.3461070954799652,
0.03181896358728409,
0.39857009053230286,
1.1169922351837158,
0.3479681611061096,
-0.08914777636528015,
-0.8426306843757629,
-1.4989490509033203,
1.920692801475525,
-1.4055756330490112,
1.9616609811782837,
0.7457627654075623,
-0.08371920883655548,
-1.7763915061950684,
-1.749496579170227,
1.1812080144882202,
1.114640712738037,
2.2321434020996094,
0.45090925693511963,
0.3446017801761627,
-0.7847974300384521,
-0.7897289991378784,
0.3495406210422516,
-1.0273972749710083,
-0.5659615993499756,
0.187588632106781,
2.394550085067749,
1.8287672996520996,
-0.484900563955307,
-0.17833097279071808,
-0.9149615168571472,
1.3124821186065674,
-0.29113027453422546,
0.28941529989242554,
2.100292682647705,
-0.33870452642440796,
-1.0248593091964722,
1.3227262496948242,
-2.410374641418457,
0.23107120394706726,
2.090481996536255,
0.2989516258239746,
0.15014584362506866,
-1.433485507965088,
-0.661836564540863,
-0.4391768276691437,
-0.4070936143398285,
-1.2375544309616089,
0.5825889706611633,
-0.40115615725517273,
-0.8503660559654236,
-1.399509310722351,
0.11933337152004242,
-1.1201987266540527,
-1.7877579927444458,
0.36504054069519043,
1.9389197826385498,
2.1373369693756104,
-0.7066119313240051,
1.3833650350570679,
-0.3197040259838104,
0.022803522646427155,
1.2871737480163574,
1.4082478284835815,
3.046109676361084,
1.8533223867416382,
-1.3267581462860107,
0.7088700532913208,
-0.15396475791931152,
-0.5311184525489807,
1.1141902208328247,
-1.1506438255310059,
1.187772274017334,
-0.18071402609348297,
-1.2313833236694336,
-1.2824742794036865,
1.1092896461486816,
0.47617024183273315,
0.06375326216220856,
-0.525050699710846,
1.3613468408584595,
0.10985255241394043,
1.4158824682235718,
0.6111325621604919,
-0.46223267912864685,
0.5066050291061401,
-0.4591527581214905,
-0.614840567111969,
1.6481400728225708,
0.21162603795528412,
-1.6085234880447388,
-2.2965636253356934,
-0.3720919191837311,
-0.8594540357589722,
-0.022103387862443924,
-0.5379738211631775,
-0.9827112555503845,
1.604914665222168,
0.39820417761802673,
-1.2399343252182007,
-0.265932559967041,
-0.2553553581237793,
-0.4805243909358978,
2.6827893257141113,
-1.2291351556777954,
-0.053545087575912476,
-0.9634132385253906,
-0.6195021867752075,
1.6288037300109863,
-1.2767153978347778,
-0.2480061948299408,
-1.0109423398971558,
-0.6674814224243164,
-1.2715270519256592,
-0.3705902099609375,
0.04811438173055649,
-1.0625908374786377,
0.7645184993743896,
0.14058509469032288,
-1.1203973293304443,
-0.32332926988601685,
-0.844075620174408,
1.049275517463684,
-0.12479345500469208,
0.22454999387264252,
1.8078182935714722,
0.23900744318962097,
-0.5255022644996643,
0.7581601142883301,
1.1846797466278076,
0.5762922763824463,
-0.6532631516456604,
-0.10487580299377441,
-0.7004117965698242,
0.33794909715652466,
-1.3413387537002563,
0.229326069355011,
-3.0194740295410156,
0.7053031325340271,
-0.17877011001110077,
-0.14646390080451965,
-0.10704563558101654,
-1.322887897491455,
1.0956933498382568,
2.596421003341675,
-1.2056245803833008,
0.5127901434898376,
0.43895426392555237,
1.0451550483703613,
-1.618419885635376,
0.3710142970085144,
-0.40757954120635986,
2.0140740871429443,
0.2259482592344284,
1.305891990661621,
-0.4289274215698242,
-2.2055580615997314,
0.6146593689918518,
-1.130541205406189,
-1.082498550415039,
0.856212854385376,
-0.8432740569114685,
0.3040006160736084,
-1.5044887065887451,
-0.2389172464609146,
-0.9169845581054688,
-1.2532693147659302,
0.6498534083366394,
0.12125121057033539,
0.39813974499702454,
-0.5214771032333374,
0.28386828303337097,
-2.209921360015869,
-1.3373645544052124,
-0.1310001164674759,
-0.9968183636665344,
0.5898025631904602,
-0.45412492752075195,
0.6076934933662415,
-0.060394275933504105,
0.06362020969390869,
0.38394656777381897,
1.5387002229690552,
3.4363291263580322,
0.09719245135784149,
0.1377977579832077,
-0.12292549014091492,
-0.9337843060493469,
1.4476227760314941,
0.8681865930557251,
-0.08453039824962616,
-0.5151721239089966,
-1.015150785446167,
1.2675542831420898,
1.9981168508529663,
0.9914800524711609,
0.10289505124092102,
-0.8380639553070068,
-0.6728565692901611,
-0.08882561326026917,
0.17813356220722198,
0.6079724431037903,
0.9198067784309387,
-0.06727904081344604,
0.011639051139354706,
1.4213310480117798,
1.150916337966919,
-0.3792361319065094,
0.32499435544013977,
-0.9724937081336975,
-0.39328017830848694,
0.41648703813552856,
0.14669275283813477,
-0.013530712574720383,
0.5395759344100952,
-1.002861499786377,
-0.21148201823234558,
-0.3180559575557709,
-0.8510692715644836,
-0.8316584825515747,
-0.39181068539619446,
-0.4522983729839325,
1.5769010782241821,
0.16568253934383392,
-0.49485334753990173,
0.06662973761558533,
-0.6507838368415833,
-0.3144686818122864,
-1.151368260383606,
0.17211216688156128,
-0.034250278025865555,
-0.09100623428821564,
-0.26549890637397766,
1.5686137676239014,
-0.8856870532035828,
-2.1166818141937256,
0.18494129180908203,
0.3147304654121399,
-0.23793625831604004,
0.2829694151878357,
1.7753890752792358,
0.47444280982017517,
1.4046660661697388,
1.1733216047286987,
0.9667086601257324,
-0.5773419737815857,
-1.276829719543457,
0.826605498790741,
0.9656801223754883,
-1.4164918661117554,
0.9622263312339783,
-0.22554948925971985,
-0.4863406717777252,
0.703319251537323,
1.240761637687683,
0.49795210361480713,
-2.068176507949829,
0.8987849354743958,
-1.039096713066101,
0.788262128829956,
0.733896791934967,
0.721634566783905,
0.2763643264770508,
0.9412529468536377,
-1.1482778787612915,
-1.1256794929504395,
-0.7063258290290833,
-0.6865379810333252,
1.9533724784851074,
-0.3357572555541992,
0.6126123666763306,
-0.21060197055339813,
-1.1516348123550415,
-0.0799628496170044,
0.8128642439842224,
0.3948327600955963,
-0.4494408071041107,
0.8563095331192017,
-0.6078603267669678,
-1.0127003192901611,
-1.1710214614868164,
-0.3964031934738159,
-1.1417131423950195,
-0.8995684385299683,
1.044774055480957,
0.7270367741584778,
0.3885621726512909,
1.8439922332763672,
0.6201052069664001,
0.3765900731086731,
-2.5902583599090576,
0.9379764199256897,
0.2360563427209854,
-0.04731697589159012,
0.9274423122406006,
0.30122530460357666,
1.181792974472046,
0.03433626890182495,
0.5641157627105713,
-2.3855092525482178,
2.2571771144866943,
-0.18665415048599243,
0.5944072604179382,
0.0326928086578846,
-0.23706646263599396,
1.1476458311080933,
0.6373444199562073,
0.5263166427612305,
-1.0414091348648071,
0.7529449462890625,
-0.5202007293701172,
1.141638159751892,
0.9769552946090698,
-0.885137140750885,
0.02748461440205574,
1.496476173400879,
0.47288134694099426,
-0.5367521047592163,
-0.8576897978782654,
-0.9022392630577087,
0.8671888709068298,
1.6304945945739746,
-0.07932543754577637,
-0.0856245905160904,
0.7510480880737305,
0.6645677089691162,
-1.1599730253219604,
0.15041199326515198,
-0.664175271987915,
-0.6755408644676208,
1.6791893243789673,
2.0289695262908936,
-0.17145578563213348,
-0.15437574684619904,
-0.6955732703208923,
-1.2459436655044556,
0.7868407368659973,
-0.1135137528181076,
0.051118046045303345,
0.568616509437561,
-0.6554490923881531,
1.0779709815979004,
0.6087096929550171,
1.003003478050232,
0.1214781105518341,
0.34602564573287964,
0.3776858448982239,
-0.3502253293991089,
-1.1428619623184204,
-0.40338289737701416,
-1.1450477838516235,
-2.604325771331787,
0.44305306673049927,
-0.32501739263534546,
-1.5070048570632935,
-0.0259335208684206,
-1.0908781290054321,
0.8918347954750061,
-0.5801457166671753,
-1.155937671661377,
-1.54106605052948,
0.29989132285118103,
-0.1672309935092926,
0.9922228455543518,
-1.6475801467895508,
-0.14947198331356049,
1.238938808441162,
0.7096427083015442,
-0.5953689217567444,
1.0093448162078857,
0.21443015336990356,
0.9898139834403992,
0.6802495121955872,
-0.3503234386444092,
0.6495293974876404,
0.018785938620567322,
-1.3663777112960815,
0.5152810215950012,
1.2419252395629883,
0.12512840330600739,
1.4726016521453857,
-0.3694383203983307,
0.11543619632720947,
0.3789614140987396,
-0.687037467956543,
-0.5080999732017517,
-0.3036847710609436,
0.792178213596344,
0.048878464847803116,
-0.9978059530258179,
-0.07463246583938599,
-0.20567280054092407,
-0.35623082518577576,
0.16875742375850677,
-1.445873737335205,
-0.2739515006542206,
-0.4263443350791931,
-0.4667149782180786,
-1.367828607559204,
-0.007145227864384651,
1.3773423433303833,
-0.6829975247383118,
-0.20399752259254456,
0.4439225494861603,
0.3959476053714752,
0.5908182263374329,
0.6205085515975952,
-0.8346819281578064,
-0.2542095482349396,
-0.3633166253566742,
-0.20894333720207214,
0.28302037715911865,
1.241242527961731,
-0.041442789137363434,
-0.971483051776886,
0.7381232976913452,
-0.3470906913280487,
0.14472173154354095,
2.02894926071167,
0.10005949437618256,
-0.6354113221168518,
0.41203001141548157,
-0.7416258454322815,
1.8380852937698364,
1.736931324005127,
1.2403558492660522,
-0.15689517557621002,
-0.882493257522583,
0.5734553337097168,
-0.33599716424942017,
-0.28907835483551025,
0.8894978761672974,
0.3787781298160553,
-0.301453560590744,
-1.3944060802459717,
0.7449197769165039,
1.211667776107788,
-0.6984926462173462,
-0.7845841646194458,
0.15117143094539642,
-0.8428019285202026,
1.202470302581787,
0.499045729637146,
0.34842878580093384,
0.24140192568302155,
1.5371897220611572,
0.7268224954605103,
-0.5111997127532959,
0.5573562383651733,
0.5244810581207275,
-0.14824125170707703,
-2.12117600440979,
-1.1353780031204224,
0.33696451783180237,
-0.49788960814476013,
-1.532185673713684,
1.3784996271133423,
-1.0620348453521729,
-1.0725048780441284,
0.5863684415817261,
0.07623015344142914,
1.2962709665298462,
0.2969038188457489,
1.6661646366119385,
2.091705322265625,
0.8892831206321716,
0.41961899399757385,
1.2690004110336304,
-0.09692977368831635,
-0.46821334958076477,
1.8881694078445435,
-0.36863505840301514,
0.49859941005706787,
1.0710184574127197,
-0.4360610246658325,
-1.0560256242752075,
-0.8384045958518982,
-1.0821802616119385,
-0.5816341638565063,
1.2146202325820923,
0.07951346039772034,
-1.0164107084274292,
0.18737776577472687,
1.5765410661697388,
0.23289668560028076,
-0.22413970530033112,
0.7130827307701111,
0.3939421474933624,
-0.7515392303466797,
-0.10591544210910797,
-0.9093247056007385,
0.5750799775123596,
-0.2112148404121399,
-0.32265427708625793,
0.30504658818244934,
0.5165008306503296,
1.3278154134750366,
-0.11761224269866943,
0.20390960574150085,
1.0741472244262695,
-1.3825199604034424,
1.5230414867401123,
-0.5685703158378601,
0.2614124119281769,
-2.3567490577697754,
1.311061143875122,
-0.6679787039756775,
1.991273045539856,
-2.6136152744293213,
0.3909991383552551,
-0.6254218816757202,
-0.5234346985816956,
0.21823261678218842,
-0.4030435383319855,
0.09896329045295715,
-0.11115923523902893,
-1.0264242887496948,
0.028742309659719467,
-0.7364240884780884,
0.6620790362358093,
1.1399897336959839,
1.4786850214004517,
-1.1916157007217407,
-0.2340787798166275,
-1.6762667894363403,
-0.19143898785114288,
-0.8886600732803345,
0.35156288743019104,
-1.9949992895126343,
-0.08233155310153961,
-2.074375867843628,
-2.392568588256836,
-1.3532752990722656,
-0.8412951231002808,
1.0454254150390625,
0.17887309193611145,
-0.9058628678321838,
1.2389180660247803,
-0.318269282579422,
-1.8241291046142578,
1.1564079523086548,
-2.0558485984802246
] |
https://github.com/huggingface/datasets/issues/5709 | Manually dataset info made not taken into account | hi @jplu ! Did I understand you correctly that you create the dataset, push it to the Hub with `.push_to_hub` and you see a `dataset_infos.json` file there, then you edit this file, load the dataset with `load_dataset` and you don't see any changes in `.info` attribute of a dataset object?
This is actually weird that when you push your dataset to the Hub, a `dataset_infos.json` file is created, because this file is deprecated and it should create `README.md` with the `dataset_info` field instead. Some keys are also deprecated, like "supervised_keys" and "task_templates".
Can you please provide a toy reproducible example of how you create and push the dataset? And also why do you want to change this file, especially the number of bytes and examples? | ### Describe the bug
Hello,
I'm manually building an image dataset with the `from_dict` approach. I also build the features with the `cast_features` methods. Once the dataset is created I push it on the hub, and a default `dataset_infos.json` file seems to have been automatically added to the repo in same time. Hence I update it manually with all the missing info, but when I download the dataset the info are never updated.
Former `dataset_infos.json` file:
```
{"default": {
"description": "",
"citation": "",
"homepage": "",
"license": "",
"features": {
"image": {
"_type": "Image"
},
"labels": {
"names": [
"Fake",
"Real"
],
"_type": "ClassLabel"
}
},
"splits": {
"validation": {
"name": "validation",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
},
"train": {
"name": "train",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
}
},
"download_size": 1802008414,
"dataset_size": 1802020188.0,
"size_in_bytes": 3604028602.0
}}
```
After I update it manually it looks like:
```
{
"bstrai--deepfake-detection":{
"description":"",
"citation":"",
"homepage":"",
"license":"",
"features":{
"image":{
"decode":true,
"id":null,
"_type":"Image"
},
"labels":{
"num_classes":2,
"names":[
"Fake",
"Real"
],
"id":null,
"_type":"ClassLabel"
}
},
"supervised_keys":{
"input":"image",
"output":"labels"
},
"task_templates":[
{
"task":"image-classification",
"image_column":"image",
"label_column":"labels"
}
],
"config_name":null,
"splits":{
"validation":{
"name":"validation",
"num_bytes":36627822,
"num_examples":123,
"dataset_name":"deepfake-detection"
},
"train":{
"name":"train",
"num_bytes":901023694,
"num_examples":3200,
"dataset_name":"deepfake-detection"
}
},
"download_checksums":null,
"download_size":937562209,
"dataset_size":937651516,
"size_in_bytes":1875213725
}
}
```
Anything I should do to have the new infos in the `dataset_infos.json` to be taken into account? Or it is not possible yet?
Thanks!
### Steps to reproduce the bug
-
### Expected behavior
-
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0 | 223 | 125 | Manually dataset info made not taken into account
### Describe the bug
Hello,
I'm manually building an image dataset with the `from_dict` approach. I also build the features with the `cast_features` methods. Once the dataset is created I push it on the hub, and a default `dataset_infos.json` file seems to have been automatically added to the repo in same time. Hence I update it manually with all the missing info, but when I download the dataset the info are never updated.
Former `dataset_infos.json` file:
```
{"default": {
"description": "",
"citation": "",
"homepage": "",
"license": "",
"features": {
"image": {
"_type": "Image"
},
"labels": {
"names": [
"Fake",
"Real"
],
"_type": "ClassLabel"
}
},
"splits": {
"validation": {
"name": "validation",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
},
"train": {
"name": "train",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
}
},
"download_size": 1802008414,
"dataset_size": 1802020188.0,
"size_in_bytes": 3604028602.0
}}
```
After I update it manually it looks like:
```
{
"bstrai--deepfake-detection":{
"description":"",
"citation":"",
"homepage":"",
"license":"",
"features":{
"image":{
"decode":true,
"id":null,
"_type":"Image"
},
"labels":{
"num_classes":2,
"names":[
"Fake",
"Real"
],
"id":null,
"_type":"ClassLabel"
}
},
"supervised_keys":{
"input":"image",
"output":"labels"
},
"task_templates":[
{
"task":"image-classification",
"image_column":"image",
"label_column":"labels"
}
],
"config_name":null,
"splits":{
"validation":{
"name":"validation",
"num_bytes":36627822,
"num_examples":123,
"dataset_name":"deepfake-detection"
},
"train":{
"name":"train",
"num_bytes":901023694,
"num_examples":3200,
"dataset_name":"deepfake-detection"
}
},
"download_checksums":null,
"download_size":937562209,
"dataset_size":937651516,
"size_in_bytes":1875213725
}
}
```
Anything I should do to have the new infos in the `dataset_infos.json` to be taken into account? Or it is not possible yet?
Thanks!
### Steps to reproduce the bug
-
### Expected behavior
-
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
hi @jplu ! Did I understand you correctly that you create the dataset, push it to the Hub with `.push_to_hub` and you see a `dataset_infos.json` file there, then you edit this file, load the dataset with `load_dataset` and you don't see any changes in `.info` attribute of a dataset object?
This is actually weird that when you push your dataset to the Hub, a `dataset_infos.json` file is created, because this file is deprecated and it should create `README.md` with the `dataset_info` field instead. Some keys are also deprecated, like "supervised_keys" and "task_templates".
Can you please provide a toy reproducible example of how you create and push the dataset? And also why do you want to change this file, especially the number of bytes and examples? | [
-1.0765917301177979,
-0.7900568842887878,
-0.8582562208175659,
1.4377800226211548,
-0.3254699110984802,
-1.065354347229004,
0.19453677535057068,
-1.2827577590942383,
1.51032555103302,
-0.622691810131073,
0.43129032850265503,
-1.58029043674469,
-0.03407546132802963,
-0.5407861471176147,
-0.6765013933181763,
-0.9065803289413452,
-0.5263396501541138,
-0.6228306293487549,
0.9815385341644287,
2.5337607860565186,
1.3678218126296997,
-1.3924719095230103,
2.4666948318481445,
0.7017360329627991,
-0.014431565068662167,
-0.7989261746406555,
0.679320752620697,
-0.02891475334763527,
-1.1003224849700928,
-0.3623017370700836,
-0.8942766785621643,
-0.2403072714805603,
-0.3421344459056854,
-0.47001317143440247,
-0.20492683351039886,
0.6176334619522095,
-0.577283501625061,
-0.5793604254722595,
-0.8397115468978882,
-0.9331851005554199,
0.4515366554260254,
-0.454508513212204,
1.1135263442993164,
-0.5565001368522644,
1.765540599822998,
-0.5622631311416626,
0.5601576566696167,
0.8353921175003052,
1.106218695640564,
0.4565899074077606,
0.24806351959705353,
0.23464208841323853,
0.4555217921733856,
-0.2090793401002884,
0.5316035747528076,
1.1070526838302612,
0.589799702167511,
0.47671881318092346,
0.9232569336891174,
-2.0848610401153564,
1.0239932537078857,
-1.1949024200439453,
0.004498356953263283,
1.5992496013641357,
-0.5339460372924805,
0.312398225069046,
-1.8668935298919678,
0.03488372638821602,
0.5733927488327026,
-2.076021194458008,
0.5853500962257385,
-1.249127984046936,
-0.5896023511886597,
1.0294700860977173,
0.42401015758514404,
-0.9974486827850342,
0.031255435198545456,
-0.2279907613992691,
0.7215492129325867,
0.32624977827072144,
1.133967638015747,
-1.5187327861785889,
-0.07323701679706573,
-0.330253928899765,
0.025274500250816345,
-1.2201635837554932,
-1.4548711776733398,
0.554011344909668,
0.3125550448894501,
0.47049519419670105,
-0.07440425455570221,
1.07366943359375,
-1.1483981609344482,
0.7748308181762695,
-1.1390503644943237,
-1.6193076372146606,
-1.5571167469024658,
-2.2019917964935303,
-2.1677002906799316,
0.8096203804016113,
-0.607499361038208,
-0.48139235377311707,
1.965508222579956,
-0.8345169425010681,
-1.330610990524292,
1.1583014726638794,
0.4108859896659851,
0.13617654144763947,
2.4172825813293457,
0.25273826718330383,
-0.7074474096298218,
0.6414121389389038,
-0.8129979372024536,
0.6776831150054932,
-0.23398317396640778,
1.27283775806427,
0.34710267186164856,
-0.9321802258491516,
1.5912106037139893,
-0.34495270252227783,
0.7766926288604736,
-0.43545082211494446,
-0.50954270362854,
-0.6058526635169983,
0.4001045525074005,
1.6786731481552124,
-0.2968713343143463,
1.3810955286026,
-0.09726917743682861,
-1.5601452589035034,
-1.723241925239563,
0.9998675584793091,
0.45657697319984436,
-0.7454828023910522,
0.07302428781986237,
-0.2665350139141083,
0.14125636219978333,
-0.4902338683605194,
1.1640856266021729,
1.350082278251648,
0.9846243858337402,
-0.4206438660621643,
-0.8575876951217651,
0.09057150781154633,
0.038698140531778336,
-1.099835753440857,
-1.446632742881775,
-0.33071210980415344,
0.2357722371816635,
0.453281432390213,
-1.3186002969741821,
1.870478868484497,
0.9670630097389221,
1.8279930353164673,
0.843586802482605,
-0.41077008843421936,
1.4704833030700684,
0.14656120538711548,
1.7072652578353882,
-0.5236495733261108,
0.44563940167427063,
-0.27641016244888306,
-1.2250027656555176,
1.0445843935012817,
-0.22649432718753815,
-2.0657739639282227,
-1.0131051540374756,
-0.8350130915641785,
-0.25121620297431946,
-0.6630957126617432,
0.9425101280212402,
-0.22318513691425323,
-1.3173483610153198,
0.21092261373996735,
-0.7294697761535645,
-0.28724005818367004,
-1.236829400062561,
0.3551040291786194,
0.46780160069465637,
-0.7407531142234802,
0.05508003756403923,
0.148944690823555,
-1.1536513566970825,
-0.40752166509628296,
0.07096891105175018,
2.0636744499206543,
-0.7656335830688477,
0.8524132966995239,
1.1496918201446533,
-0.8824111819267273,
0.08485890924930573,
0.22149638831615448,
-0.5492015480995178,
0.7110275030136108,
-1.0367212295532227,
-0.7334582209587097,
1.2006453275680542,
-0.18155252933502197,
-0.6110593676567078,
1.466905951499939,
0.5686672925949097,
-1.0480096340179443,
-0.3395666480064392,
-0.06754103302955627,
-0.6637346744537354,
0.10423094034194946,
-1.3147094249725342,
-0.003142261877655983,
0.40408721566200256,
-1.5021482706069946,
-0.5360672473907471,
-0.13465866446495056,
1.1324537992477417,
-0.42424795031547546,
1.2581323385238647,
-0.4452759623527527,
-0.19931185245513916,
-0.3555729389190674,
-0.3441038131713867,
-0.03424458205699921,
-0.23794706165790558,
-0.7146384119987488,
0.09075835347175598,
-0.915610134601593,
0.32705214619636536,
1.268066644668579,
0.3769579231739044,
-0.10805116593837738,
0.364656537771225,
1.0633612871170044,
0.6267120838165283,
0.1743931919336319,
-1.0618114471435547,
-1.147710919380188,
1.8722206354141235,
-1.4609792232513428,
2.0247716903686523,
0.6807457804679871,
-0.05370029807090759,
-1.736342430114746,
-2.1085386276245117,
1.2558907270431519,
1.2076830863952637,
2.262977361679077,
0.42153429985046387,
0.4266059100627899,
-0.8216206431388855,
-0.7168880105018616,
0.38257917761802673,
-1.1088463068008423,
-0.4514053463935852,
0.35591408610343933,
2.352167844772339,
1.6840282678604126,
-0.5310693383216858,
-0.2085316926240921,
-0.9342254996299744,
1.3481966257095337,
-0.0068008205853402615,
0.17549951374530792,
2.1143224239349365,
-0.225238636136055,
-0.9771623611450195,
1.388231635093689,
-2.222144842147827,
0.10197117924690247,
1.9741345643997192,
0.3572408854961395,
0.1475113183259964,
-1.1491893529891968,
-0.795309841632843,
-0.38739854097366333,
-0.5784878730773926,
-1.0523818731307983,
0.5921384692192078,
-0.08676812052726746,
-0.8030572533607483,
-1.3237029314041138,
0.21234430372714996,
-1.2569524049758911,
-1.5698738098144531,
0.17200283706188202,
1.803043007850647,
2.1444005966186523,
-1.0420199632644653,
1.5059069395065308,
-0.3297275900840759,
-0.13975848257541656,
1.1893001794815063,
1.3368242979049683,
3.0801947116851807,
1.7325798273086548,
-1.253760814666748,
0.5022374987602234,
-0.2039579302072525,
-0.37795522809028625,
1.1871013641357422,
-1.380075216293335,
1.3276921510696411,
-0.05827124044299126,
-0.8239070773124695,
-1.0026649236679077,
0.7306516766548157,
0.3265475034713745,
0.210551917552948,
-0.45034900307655334,
0.8474915623664856,
0.25903645157814026,
1.4304643869400024,
0.6973816752433777,
-0.19061775505542755,
0.6982218027114868,
-0.3931646943092346,
-0.2596389651298523,
1.5192030668258667,
0.13763156533241272,
-1.519882321357727,
-2.2878053188323975,
-0.28839242458343506,
-0.988963782787323,
0.12579315900802612,
-0.3996427655220032,
-1.1456718444824219,
1.9088249206542969,
0.18217061460018158,
-1.2585701942443848,
-0.3888816833496094,
-0.4162968695163727,
-0.5601785182952881,
2.965752601623535,
-1.3981115818023682,
-0.14955081045627594,
-1.0051352977752686,
-0.8205862045288086,
1.842585802078247,
-1.0634567737579346,
-0.17975746095180511,
-1.1517919301986694,
-0.3080991208553314,
-1.4780702590942383,
-0.5824760794639587,
0.28921085596084595,
-1.0471906661987305,
1.0770316123962402,
0.3245079219341278,
-1.119875431060791,
-0.40742027759552,
-0.8804191946983337,
0.8079438209533691,
-0.21622733771800995,
0.22159509360790253,
2.069772720336914,
0.4453531503677368,
-0.04256739839911461,
0.6359464526176453,
1.2220617532730103,
0.6700911521911621,
-0.599319577217102,
0.12065990269184113,
-0.715316891670227,
0.32064059376716614,
-1.2710529565811157,
0.13047292828559875,
-2.584824562072754,
0.551051914691925,
-0.13111932575702667,
-0.102237269282341,
0.09209246933460236,
-1.1826196908950806,
1.2589284181594849,
2.5947933197021484,
-1.1893274784088135,
0.3959111273288727,
0.32465678453445435,
1.0774164199829102,
-1.697282075881958,
0.27362483739852905,
-0.3633311986923218,
2.022716999053955,
0.026903856545686722,
1.078762173652649,
-0.5268613696098328,
-2.3063347339630127,
0.8086318969726562,
-1.395575761795044,
-1.453912615776062,
0.7173322439193726,
-0.967535138130188,
0.330838143825531,
-1.6198534965515137,
-0.2747168242931366,
-0.8733987212181091,
-1.166764497756958,
0.6527287364006042,
-0.03784159943461418,
0.28130102157592773,
-0.49481475353240967,
0.4664560556411743,
-2.43713641166687,
-1.651626706123352,
-0.4793465733528137,
-0.8554059863090515,
0.608450174331665,
-0.5178325176239014,
0.9915157556533813,
-0.24223099648952484,
-0.06685011088848114,
0.47254201769828796,
1.4897854328155518,
3.546766757965088,
0.2679930329322815,
0.18774932622909546,
-0.2907663583755493,
-1.0924530029296875,
1.641089916229248,
0.895881712436676,
0.2013123482465744,
-0.5309762358665466,
-1.1430021524429321,
1.0507402420043945,
2.102083683013916,
1.0627899169921875,
-0.16064263880252838,
-0.8867721557617188,
-0.5945150852203369,
-0.20056553184986115,
0.1118767261505127,
0.32302427291870117,
0.9897897839546204,
-0.10316906869411469,
-0.10972572863101959,
1.5928852558135986,
1.1262985467910767,
-0.20584236085414886,
-0.04760095104575157,
-0.6540819406509399,
-0.5003266930580139,
0.7905599474906921,
0.187798872590065,
0.2025381326675415,
0.6475229263305664,
-1.0329655408859253,
-0.49886971712112427,
-0.4529786705970764,
-0.8870824575424194,
-0.5417290329933167,
-0.5812568664550781,
-0.26287615299224854,
1.487227201461792,
0.17863808572292328,
-0.5570204854011536,
0.014108676463365555,
-0.9857218861579895,
0.0005134530365467072,
-1.3002113103866577,
0.07333521544933319,
-0.20129665732383728,
-0.2683880627155304,
-0.2962649166584015,
1.8047057390213013,
-0.9137448072433472,
-1.8671780824661255,
0.13273848593235016,
0.47185561060905457,
-0.13449934124946594,
0.26024138927459717,
1.5271540880203247,
0.5965974926948547,
1.470864176750183,
0.9904108047485352,
0.8343285322189331,
-0.7091600298881531,
-1.3048080205917358,
0.5330144166946411,
1.187874674797058,
-1.3747601509094238,
0.8014427423477173,
-0.05303897336125374,
-0.40455254912376404,
0.3348153233528137,
1.193967580795288,
0.5225430727005005,
-1.7547472715377808,
0.7169713973999023,
-0.8768746256828308,
0.9244568347930908,
0.5971285700798035,
0.6228719353675842,
0.050897445529699326,
0.654830276966095,
-1.0698001384735107,
-0.9298999905586243,
-0.6800439953804016,
-0.6424566507339478,
1.9836437702178955,
-0.3936065137386322,
0.7504845261573792,
-0.3418683111667633,
-1.091688632965088,
0.04979778826236725,
0.686188280582428,
0.4054500460624695,
-0.4377947449684143,
0.7235928773880005,
-0.5547162890434265,
-0.9795259237289429,
-1.3121235370635986,
-0.2471938133239746,
-1.1139463186264038,
-0.9903713464736938,
1.1422982215881348,
0.6467075347900391,
0.35364091396331787,
1.9115040302276611,
1.064004898071289,
0.3607703447341919,
-2.5010454654693604,
1.006984829902649,
0.3283238410949707,
-0.07349817454814911,
0.9449620842933655,
0.37648993730545044,
1.0313024520874023,
-0.23854020237922668,
0.5909876823425293,
-2.537705183029175,
2.3590147495269775,
-0.12424179911613464,
0.6600974798202515,
0.06834292411804199,
-0.3321205675601959,
1.0499114990234375,
0.6262927055358887,
0.2457454651594162,
-1.1034765243530273,
0.33025404810905457,
-0.3269777297973633,
1.164039134979248,
0.8665777444839478,
-0.6829147338867188,
0.10574924945831299,
1.3539459705352783,
0.690302312374115,
-0.4174623191356659,
-1.029718279838562,
-0.6504914164543152,
1.0660362243652344,
1.5832653045654297,
-0.1869819164276123,
0.023108944296836853,
0.9890663623809814,
0.5391401052474976,
-1.2713115215301514,
-0.13397233188152313,
-0.8673436045646667,
-0.696994960308075,
1.849043369293213,
2.2017157077789307,
-0.12056633830070496,
-0.3478040397167206,
-0.7158920168876648,
-1.3774493932724,
0.905534565448761,
-0.09182952344417572,
0.452301561832428,
0.490740567445755,
-0.6330681443214417,
0.9803694486618042,
0.7829222083091736,
1.02894127368927,
0.2730265259742737,
0.34307700395584106,
0.5468621253967285,
-0.45502492785453796,
-1.0309844017028809,
-0.13666509091854095,
-0.9764416813850403,
-2.6110475063323975,
0.5461780428886414,
-0.18124541640281677,
-1.2973406314849854,
-0.23678037524223328,
-0.9268076419830322,
1.1858168840408325,
-0.48783954977989197,
-0.8730730414390564,
-1.5216472148895264,
0.2166319340467453,
0.12518826127052307,
1.1773290634155273,
-1.552909016609192,
-0.623746395111084,
1.310889720916748,
0.9294755458831787,
-0.9480286836624146,
0.7038316130638123,
-0.014302460476756096,
1.164598822593689,
0.6025230288505554,
-0.38258203864097595,
0.5577235817909241,
-0.2443893998861313,
-1.4524894952774048,
0.3500644266605377,
1.228991985321045,
0.12074576318264008,
1.6103893518447876,
-0.34646347165107727,
0.22472162544727325,
0.3118399977684021,
-0.5809401869773865,
-0.5724794268608093,
-0.4414953291416168,
0.5241280198097229,
0.08962187170982361,
-1.0971230268478394,
-0.14563407003879547,
0.03312701731920242,
-0.24090184271335602,
0.004258600063621998,
-1.2107332944869995,
-0.08993348479270935,
-0.413205623626709,
-0.7082008719444275,
-1.0032234191894531,
-0.14974717795848846,
1.2288429737091064,
-0.7378054261207581,
-0.024761425331234932,
0.3791114389896393,
0.055319320410490036,
0.47786834836006165,
0.44324883818626404,
-0.8373562693595886,
-0.3789862394332886,
-0.27550995349884033,
-0.3255646824836731,
0.3329469561576843,
1.4917926788330078,
0.018084846436977386,
-1.089908480644226,
0.6693593263626099,
-0.1669960767030716,
0.12814775109291077,
1.972218632698059,
0.01659032329916954,
-0.6103800535202026,
0.29056721925735474,
-0.5835202932357788,
1.796595573425293,
1.6433149576187134,
1.2897909879684448,
-0.26581212878227234,
-0.7879645824432373,
0.7519508600234985,
-0.5420783758163452,
-0.45692959427833557,
0.7134181261062622,
0.08539898693561554,
-0.30241334438323975,
-1.6347368955612183,
0.8428648114204407,
1.3124445676803589,
-0.991631269454956,
-0.7936303615570068,
0.36773139238357544,
-0.8756170868873596,
1.030932903289795,
0.4583643674850464,
0.4616988003253937,
0.5992427468299866,
1.6802219152450562,
0.9920099973678589,
-0.43040046095848083,
0.3978418707847595,
0.8141765594482422,
-0.07330246269702911,
-2.0144755840301514,
-1.3150891065597534,
0.4560675024986267,
-0.7653045654296875,
-1.4910856485366821,
1.595050573348999,
-1.1010493040084839,
-1.2325512170791626,
0.7392124533653259,
0.033161357045173645,
1.3067299127578735,
0.5143324136734009,
1.5194951295852661,
1.9739995002746582,
0.8345476984977722,
0.4775286912918091,
1.0627166032791138,
-0.11335818469524384,
-0.5568675398826599,
1.9076567888259888,
-0.43860673904418945,
0.33149686455726624,
1.0565658807754517,
-0.18426494300365448,
-1.1915829181671143,
-0.7874385118484497,
-1.3443373441696167,
-0.8831670880317688,
1.3134022951126099,
0.011650115251541138,
-1.049232840538025,
0.2241111546754837,
1.7683714628219604,
-0.03823292627930641,
-0.6356197595596313,
0.6677255630493164,
0.4042327105998993,
-1.1167806386947632,
-0.01848309114575386,
-0.7598695755004883,
0.6909058690071106,
0.03324754536151886,
-0.3264853060245514,
0.22917237877845764,
0.5898995399475098,
1.7150722742080688,
-0.3192524313926697,
0.1715693324804306,
0.7606443166732788,
-1.4573129415512085,
1.7844847440719604,
-0.7876492142677307,
0.07747118175029755,
-2.215059280395508,
1.1846833229064941,
-0.7621713280677795,
2.016693353652954,
-2.496244430541992,
0.3980517089366913,
-0.35378697514533997,
-0.4267406165599823,
0.07341904938220978,
-0.6219851970672607,
0.19326691329479218,
0.011417195200920105,
-1.1320120096206665,
-0.01598227582871914,
-0.5435206294059753,
0.8078113198280334,
1.0663460493087769,
1.520537257194519,
-1.1837061643600464,
-0.5359404683113098,
-1.6531425714492798,
-0.09863968193531036,
-0.8375309109687805,
0.0657455325126648,
-1.8915205001831055,
-0.3189649283885956,
-1.7918334007263184,
-2.1448018550872803,
-1.3428211212158203,
-0.8905940651893616,
1.1938259601593018,
0.09271010756492615,
-1.1028698682785034,
1.2347344160079956,
-0.39603912830352783,
-1.9935280084609985,
1.426336646080017,
-2.119101047515869
] |
https://github.com/huggingface/datasets/issues/5709 | Manually dataset info made not taken into account | Hi @polinaeterna Yes I have created the dataset with `Dataset.from_dict` applied some updates afterward and when I pushed to the hub I had a `dataset_infos.json` file and there was a `README.md` file as well.
I didn't know that the JSON file was deprecated. So I have built my dataset with `ImageBuilder` instead and now it works like a charm without having to touch anything.
I haven't succeed to reproduce the creation of the JSON file with a toy example, hence, I certainly did some mistakes when I have manipulated my dataset manually at first. My bad. | ### Describe the bug
Hello,
I'm manually building an image dataset with the `from_dict` approach. I also build the features with the `cast_features` methods. Once the dataset is created I push it on the hub, and a default `dataset_infos.json` file seems to have been automatically added to the repo in same time. Hence I update it manually with all the missing info, but when I download the dataset the info are never updated.
Former `dataset_infos.json` file:
```
{"default": {
"description": "",
"citation": "",
"homepage": "",
"license": "",
"features": {
"image": {
"_type": "Image"
},
"labels": {
"names": [
"Fake",
"Real"
],
"_type": "ClassLabel"
}
},
"splits": {
"validation": {
"name": "validation",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
},
"train": {
"name": "train",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
}
},
"download_size": 1802008414,
"dataset_size": 1802020188.0,
"size_in_bytes": 3604028602.0
}}
```
After I update it manually it looks like:
```
{
"bstrai--deepfake-detection":{
"description":"",
"citation":"",
"homepage":"",
"license":"",
"features":{
"image":{
"decode":true,
"id":null,
"_type":"Image"
},
"labels":{
"num_classes":2,
"names":[
"Fake",
"Real"
],
"id":null,
"_type":"ClassLabel"
}
},
"supervised_keys":{
"input":"image",
"output":"labels"
},
"task_templates":[
{
"task":"image-classification",
"image_column":"image",
"label_column":"labels"
}
],
"config_name":null,
"splits":{
"validation":{
"name":"validation",
"num_bytes":36627822,
"num_examples":123,
"dataset_name":"deepfake-detection"
},
"train":{
"name":"train",
"num_bytes":901023694,
"num_examples":3200,
"dataset_name":"deepfake-detection"
}
},
"download_checksums":null,
"download_size":937562209,
"dataset_size":937651516,
"size_in_bytes":1875213725
}
}
```
Anything I should do to have the new infos in the `dataset_infos.json` to be taken into account? Or it is not possible yet?
Thanks!
### Steps to reproduce the bug
-
### Expected behavior
-
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0 | 223 | 96 | Manually dataset info made not taken into account
### Describe the bug
Hello,
I'm manually building an image dataset with the `from_dict` approach. I also build the features with the `cast_features` methods. Once the dataset is created I push it on the hub, and a default `dataset_infos.json` file seems to have been automatically added to the repo in same time. Hence I update it manually with all the missing info, but when I download the dataset the info are never updated.
Former `dataset_infos.json` file:
```
{"default": {
"description": "",
"citation": "",
"homepage": "",
"license": "",
"features": {
"image": {
"_type": "Image"
},
"labels": {
"names": [
"Fake",
"Real"
],
"_type": "ClassLabel"
}
},
"splits": {
"validation": {
"name": "validation",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
},
"train": {
"name": "train",
"num_bytes": 901010094.0,
"num_examples": 3200,
"dataset_name": null
}
},
"download_size": 1802008414,
"dataset_size": 1802020188.0,
"size_in_bytes": 3604028602.0
}}
```
After I update it manually it looks like:
```
{
"bstrai--deepfake-detection":{
"description":"",
"citation":"",
"homepage":"",
"license":"",
"features":{
"image":{
"decode":true,
"id":null,
"_type":"Image"
},
"labels":{
"num_classes":2,
"names":[
"Fake",
"Real"
],
"id":null,
"_type":"ClassLabel"
}
},
"supervised_keys":{
"input":"image",
"output":"labels"
},
"task_templates":[
{
"task":"image-classification",
"image_column":"image",
"label_column":"labels"
}
],
"config_name":null,
"splits":{
"validation":{
"name":"validation",
"num_bytes":36627822,
"num_examples":123,
"dataset_name":"deepfake-detection"
},
"train":{
"name":"train",
"num_bytes":901023694,
"num_examples":3200,
"dataset_name":"deepfake-detection"
}
},
"download_checksums":null,
"download_size":937562209,
"dataset_size":937651516,
"size_in_bytes":1875213725
}
}
```
Anything I should do to have the new infos in the `dataset_infos.json` to be taken into account? Or it is not possible yet?
Thanks!
### Steps to reproduce the bug
-
### Expected behavior
-
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.10
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
Hi @polinaeterna Yes I have created the dataset with `Dataset.from_dict` applied some updates afterward and when I pushed to the hub I had a `dataset_infos.json` file and there was a `README.md` file as well.
I didn't know that the JSON file was deprecated. So I have built my dataset with `ImageBuilder` instead and now it works like a charm without having to touch anything.
I haven't succeed to reproduce the creation of the JSON file with a toy example, hence, I certainly did some mistakes when I have manipulated my dataset manually at first. My bad. | [
-1.0765917301177979,
-0.7900568842887878,
-0.8582562208175659,
1.4377800226211548,
-0.3254699110984802,
-1.065354347229004,
0.19453677535057068,
-1.2827577590942383,
1.51032555103302,
-0.622691810131073,
0.43129032850265503,
-1.58029043674469,
-0.03407546132802963,
-0.5407861471176147,
-0.6765013933181763,
-0.9065803289413452,
-0.5263396501541138,
-0.6228306293487549,
0.9815385341644287,
2.5337607860565186,
1.3678218126296997,
-1.3924719095230103,
2.4666948318481445,
0.7017360329627991,
-0.014431565068662167,
-0.7989261746406555,
0.679320752620697,
-0.02891475334763527,
-1.1003224849700928,
-0.3623017370700836,
-0.8942766785621643,
-0.2403072714805603,
-0.3421344459056854,
-0.47001317143440247,
-0.20492683351039886,
0.6176334619522095,
-0.577283501625061,
-0.5793604254722595,
-0.8397115468978882,
-0.9331851005554199,
0.4515366554260254,
-0.454508513212204,
1.1135263442993164,
-0.5565001368522644,
1.765540599822998,
-0.5622631311416626,
0.5601576566696167,
0.8353921175003052,
1.106218695640564,
0.4565899074077606,
0.24806351959705353,
0.23464208841323853,
0.4555217921733856,
-0.2090793401002884,
0.5316035747528076,
1.1070526838302612,
0.589799702167511,
0.47671881318092346,
0.9232569336891174,
-2.0848610401153564,
1.0239932537078857,
-1.1949024200439453,
0.004498356953263283,
1.5992496013641357,
-0.5339460372924805,
0.312398225069046,
-1.8668935298919678,
0.03488372638821602,
0.5733927488327026,
-2.076021194458008,
0.5853500962257385,
-1.249127984046936,
-0.5896023511886597,
1.0294700860977173,
0.42401015758514404,
-0.9974486827850342,
0.031255435198545456,
-0.2279907613992691,
0.7215492129325867,
0.32624977827072144,
1.133967638015747,
-1.5187327861785889,
-0.07323701679706573,
-0.330253928899765,
0.025274500250816345,
-1.2201635837554932,
-1.4548711776733398,
0.554011344909668,
0.3125550448894501,
0.47049519419670105,
-0.07440425455570221,
1.07366943359375,
-1.1483981609344482,
0.7748308181762695,
-1.1390503644943237,
-1.6193076372146606,
-1.5571167469024658,
-2.2019917964935303,
-2.1677002906799316,
0.8096203804016113,
-0.607499361038208,
-0.48139235377311707,
1.965508222579956,
-0.8345169425010681,
-1.330610990524292,
1.1583014726638794,
0.4108859896659851,
0.13617654144763947,
2.4172825813293457,
0.25273826718330383,
-0.7074474096298218,
0.6414121389389038,
-0.8129979372024536,
0.6776831150054932,
-0.23398317396640778,
1.27283775806427,
0.34710267186164856,
-0.9321802258491516,
1.5912106037139893,
-0.34495270252227783,
0.7766926288604736,
-0.43545082211494446,
-0.50954270362854,
-0.6058526635169983,
0.4001045525074005,
1.6786731481552124,
-0.2968713343143463,
1.3810955286026,
-0.09726917743682861,
-1.5601452589035034,
-1.723241925239563,
0.9998675584793091,
0.45657697319984436,
-0.7454828023910522,
0.07302428781986237,
-0.2665350139141083,
0.14125636219978333,
-0.4902338683605194,
1.1640856266021729,
1.350082278251648,
0.9846243858337402,
-0.4206438660621643,
-0.8575876951217651,
0.09057150781154633,
0.038698140531778336,
-1.099835753440857,
-1.446632742881775,
-0.33071210980415344,
0.2357722371816635,
0.453281432390213,
-1.3186002969741821,
1.870478868484497,
0.9670630097389221,
1.8279930353164673,
0.843586802482605,
-0.41077008843421936,
1.4704833030700684,
0.14656120538711548,
1.7072652578353882,
-0.5236495733261108,
0.44563940167427063,
-0.27641016244888306,
-1.2250027656555176,
1.0445843935012817,
-0.22649432718753815,
-2.0657739639282227,
-1.0131051540374756,
-0.8350130915641785,
-0.25121620297431946,
-0.6630957126617432,
0.9425101280212402,
-0.22318513691425323,
-1.3173483610153198,
0.21092261373996735,
-0.7294697761535645,
-0.28724005818367004,
-1.236829400062561,
0.3551040291786194,
0.46780160069465637,
-0.7407531142234802,
0.05508003756403923,
0.148944690823555,
-1.1536513566970825,
-0.40752166509628296,
0.07096891105175018,
2.0636744499206543,
-0.7656335830688477,
0.8524132966995239,
1.1496918201446533,
-0.8824111819267273,
0.08485890924930573,
0.22149638831615448,
-0.5492015480995178,
0.7110275030136108,
-1.0367212295532227,
-0.7334582209587097,
1.2006453275680542,
-0.18155252933502197,
-0.6110593676567078,
1.466905951499939,
0.5686672925949097,
-1.0480096340179443,
-0.3395666480064392,
-0.06754103302955627,
-0.6637346744537354,
0.10423094034194946,
-1.3147094249725342,
-0.003142261877655983,
0.40408721566200256,
-1.5021482706069946,
-0.5360672473907471,
-0.13465866446495056,
1.1324537992477417,
-0.42424795031547546,
1.2581323385238647,
-0.4452759623527527,
-0.19931185245513916,
-0.3555729389190674,
-0.3441038131713867,
-0.03424458205699921,
-0.23794706165790558,
-0.7146384119987488,
0.09075835347175598,
-0.915610134601593,
0.32705214619636536,
1.268066644668579,
0.3769579231739044,
-0.10805116593837738,
0.364656537771225,
1.0633612871170044,
0.6267120838165283,
0.1743931919336319,
-1.0618114471435547,
-1.147710919380188,
1.8722206354141235,
-1.4609792232513428,
2.0247716903686523,
0.6807457804679871,
-0.05370029807090759,
-1.736342430114746,
-2.1085386276245117,
1.2558907270431519,
1.2076830863952637,
2.262977361679077,
0.42153429985046387,
0.4266059100627899,
-0.8216206431388855,
-0.7168880105018616,
0.38257917761802673,
-1.1088463068008423,
-0.4514053463935852,
0.35591408610343933,
2.352167844772339,
1.6840282678604126,
-0.5310693383216858,
-0.2085316926240921,
-0.9342254996299744,
1.3481966257095337,
-0.0068008205853402615,
0.17549951374530792,
2.1143224239349365,
-0.225238636136055,
-0.9771623611450195,
1.388231635093689,
-2.222144842147827,
0.10197117924690247,
1.9741345643997192,
0.3572408854961395,
0.1475113183259964,
-1.1491893529891968,
-0.795309841632843,
-0.38739854097366333,
-0.5784878730773926,
-1.0523818731307983,
0.5921384692192078,
-0.08676812052726746,
-0.8030572533607483,
-1.3237029314041138,
0.21234430372714996,
-1.2569524049758911,
-1.5698738098144531,
0.17200283706188202,
1.803043007850647,
2.1444005966186523,
-1.0420199632644653,
1.5059069395065308,
-0.3297275900840759,
-0.13975848257541656,
1.1893001794815063,
1.3368242979049683,
3.0801947116851807,
1.7325798273086548,
-1.253760814666748,
0.5022374987602234,
-0.2039579302072525,
-0.37795522809028625,
1.1871013641357422,
-1.380075216293335,
1.3276921510696411,
-0.05827124044299126,
-0.8239070773124695,
-1.0026649236679077,
0.7306516766548157,
0.3265475034713745,
0.210551917552948,
-0.45034900307655334,
0.8474915623664856,
0.25903645157814026,
1.4304643869400024,
0.6973816752433777,
-0.19061775505542755,
0.6982218027114868,
-0.3931646943092346,
-0.2596389651298523,
1.5192030668258667,
0.13763156533241272,
-1.519882321357727,
-2.2878053188323975,
-0.28839242458343506,
-0.988963782787323,
0.12579315900802612,
-0.3996427655220032,
-1.1456718444824219,
1.9088249206542969,
0.18217061460018158,
-1.2585701942443848,
-0.3888816833496094,
-0.4162968695163727,
-0.5601785182952881,
2.965752601623535,
-1.3981115818023682,
-0.14955081045627594,
-1.0051352977752686,
-0.8205862045288086,
1.842585802078247,
-1.0634567737579346,
-0.17975746095180511,
-1.1517919301986694,
-0.3080991208553314,
-1.4780702590942383,
-0.5824760794639587,
0.28921085596084595,
-1.0471906661987305,
1.0770316123962402,
0.3245079219341278,
-1.119875431060791,
-0.40742027759552,
-0.8804191946983337,
0.8079438209533691,
-0.21622733771800995,
0.22159509360790253,
2.069772720336914,
0.4453531503677368,
-0.04256739839911461,
0.6359464526176453,
1.2220617532730103,
0.6700911521911621,
-0.599319577217102,
0.12065990269184113,
-0.715316891670227,
0.32064059376716614,
-1.2710529565811157,
0.13047292828559875,
-2.584824562072754,
0.551051914691925,
-0.13111932575702667,
-0.102237269282341,
0.09209246933460236,
-1.1826196908950806,
1.2589284181594849,
2.5947933197021484,
-1.1893274784088135,
0.3959111273288727,
0.32465678453445435,
1.0774164199829102,
-1.697282075881958,
0.27362483739852905,
-0.3633311986923218,
2.022716999053955,
0.026903856545686722,
1.078762173652649,
-0.5268613696098328,
-2.3063347339630127,
0.8086318969726562,
-1.395575761795044,
-1.453912615776062,
0.7173322439193726,
-0.967535138130188,
0.330838143825531,
-1.6198534965515137,
-0.2747168242931366,
-0.8733987212181091,
-1.166764497756958,
0.6527287364006042,
-0.03784159943461418,
0.28130102157592773,
-0.49481475353240967,
0.4664560556411743,
-2.43713641166687,
-1.651626706123352,
-0.4793465733528137,
-0.8554059863090515,
0.608450174331665,
-0.5178325176239014,
0.9915157556533813,
-0.24223099648952484,
-0.06685011088848114,
0.47254201769828796,
1.4897854328155518,
3.546766757965088,
0.2679930329322815,
0.18774932622909546,
-0.2907663583755493,
-1.0924530029296875,
1.641089916229248,
0.895881712436676,
0.2013123482465744,
-0.5309762358665466,
-1.1430021524429321,
1.0507402420043945,
2.102083683013916,
1.0627899169921875,
-0.16064263880252838,
-0.8867721557617188,
-0.5945150852203369,
-0.20056553184986115,
0.1118767261505127,
0.32302427291870117,
0.9897897839546204,
-0.10316906869411469,
-0.10972572863101959,
1.5928852558135986,
1.1262985467910767,
-0.20584236085414886,
-0.04760095104575157,
-0.6540819406509399,
-0.5003266930580139,
0.7905599474906921,
0.187798872590065,
0.2025381326675415,
0.6475229263305664,
-1.0329655408859253,
-0.49886971712112427,
-0.4529786705970764,
-0.8870824575424194,
-0.5417290329933167,
-0.5812568664550781,
-0.26287615299224854,
1.487227201461792,
0.17863808572292328,
-0.5570204854011536,
0.014108676463365555,
-0.9857218861579895,
0.0005134530365467072,
-1.3002113103866577,
0.07333521544933319,
-0.20129665732383728,
-0.2683880627155304,
-0.2962649166584015,
1.8047057390213013,
-0.9137448072433472,
-1.8671780824661255,
0.13273848593235016,
0.47185561060905457,
-0.13449934124946594,
0.26024138927459717,
1.5271540880203247,
0.5965974926948547,
1.470864176750183,
0.9904108047485352,
0.8343285322189331,
-0.7091600298881531,
-1.3048080205917358,
0.5330144166946411,
1.187874674797058,
-1.3747601509094238,
0.8014427423477173,
-0.05303897336125374,
-0.40455254912376404,
0.3348153233528137,
1.193967580795288,
0.5225430727005005,
-1.7547472715377808,
0.7169713973999023,
-0.8768746256828308,
0.9244568347930908,
0.5971285700798035,
0.6228719353675842,
0.050897445529699326,
0.654830276966095,
-1.0698001384735107,
-0.9298999905586243,
-0.6800439953804016,
-0.6424566507339478,
1.9836437702178955,
-0.3936065137386322,
0.7504845261573792,
-0.3418683111667633,
-1.091688632965088,
0.04979778826236725,
0.686188280582428,
0.4054500460624695,
-0.4377947449684143,
0.7235928773880005,
-0.5547162890434265,
-0.9795259237289429,
-1.3121235370635986,
-0.2471938133239746,
-1.1139463186264038,
-0.9903713464736938,
1.1422982215881348,
0.6467075347900391,
0.35364091396331787,
1.9115040302276611,
1.064004898071289,
0.3607703447341919,
-2.5010454654693604,
1.006984829902649,
0.3283238410949707,
-0.07349817454814911,
0.9449620842933655,
0.37648993730545044,
1.0313024520874023,
-0.23854020237922668,
0.5909876823425293,
-2.537705183029175,
2.3590147495269775,
-0.12424179911613464,
0.6600974798202515,
0.06834292411804199,
-0.3321205675601959,
1.0499114990234375,
0.6262927055358887,
0.2457454651594162,
-1.1034765243530273,
0.33025404810905457,
-0.3269777297973633,
1.164039134979248,
0.8665777444839478,
-0.6829147338867188,
0.10574924945831299,
1.3539459705352783,
0.690302312374115,
-0.4174623191356659,
-1.029718279838562,
-0.6504914164543152,
1.0660362243652344,
1.5832653045654297,
-0.1869819164276123,
0.023108944296836853,
0.9890663623809814,
0.5391401052474976,
-1.2713115215301514,
-0.13397233188152313,
-0.8673436045646667,
-0.696994960308075,
1.849043369293213,
2.2017157077789307,
-0.12056633830070496,
-0.3478040397167206,
-0.7158920168876648,
-1.3774493932724,
0.905534565448761,
-0.09182952344417572,
0.452301561832428,
0.490740567445755,
-0.6330681443214417,
0.9803694486618042,
0.7829222083091736,
1.02894127368927,
0.2730265259742737,
0.34307700395584106,
0.5468621253967285,
-0.45502492785453796,
-1.0309844017028809,
-0.13666509091854095,
-0.9764416813850403,
-2.6110475063323975,
0.5461780428886414,
-0.18124541640281677,
-1.2973406314849854,
-0.23678037524223328,
-0.9268076419830322,
1.1858168840408325,
-0.48783954977989197,
-0.8730730414390564,
-1.5216472148895264,
0.2166319340467453,
0.12518826127052307,
1.1773290634155273,
-1.552909016609192,
-0.623746395111084,
1.310889720916748,
0.9294755458831787,
-0.9480286836624146,
0.7038316130638123,
-0.014302460476756096,
1.164598822593689,
0.6025230288505554,
-0.38258203864097595,
0.5577235817909241,
-0.2443893998861313,
-1.4524894952774048,
0.3500644266605377,
1.228991985321045,
0.12074576318264008,
1.6103893518447876,
-0.34646347165107727,
0.22472162544727325,
0.3118399977684021,
-0.5809401869773865,
-0.5724794268608093,
-0.4414953291416168,
0.5241280198097229,
0.08962187170982361,
-1.0971230268478394,
-0.14563407003879547,
0.03312701731920242,
-0.24090184271335602,
0.004258600063621998,
-1.2107332944869995,
-0.08993348479270935,
-0.413205623626709,
-0.7082008719444275,
-1.0032234191894531,
-0.14974717795848846,
1.2288429737091064,
-0.7378054261207581,
-0.024761425331234932,
0.3791114389896393,
0.055319320410490036,
0.47786834836006165,
0.44324883818626404,
-0.8373562693595886,
-0.3789862394332886,
-0.27550995349884033,
-0.3255646824836731,
0.3329469561576843,
1.4917926788330078,
0.018084846436977386,
-1.089908480644226,
0.6693593263626099,
-0.1669960767030716,
0.12814775109291077,
1.972218632698059,
0.01659032329916954,
-0.6103800535202026,
0.29056721925735474,
-0.5835202932357788,
1.796595573425293,
1.6433149576187134,
1.2897909879684448,
-0.26581212878227234,
-0.7879645824432373,
0.7519508600234985,
-0.5420783758163452,
-0.45692959427833557,
0.7134181261062622,
0.08539898693561554,
-0.30241334438323975,
-1.6347368955612183,
0.8428648114204407,
1.3124445676803589,
-0.991631269454956,
-0.7936303615570068,
0.36773139238357544,
-0.8756170868873596,
1.030932903289795,
0.4583643674850464,
0.4616988003253937,
0.5992427468299866,
1.6802219152450562,
0.9920099973678589,
-0.43040046095848083,
0.3978418707847595,
0.8141765594482422,
-0.07330246269702911,
-2.0144755840301514,
-1.3150891065597534,
0.4560675024986267,
-0.7653045654296875,
-1.4910856485366821,
1.595050573348999,
-1.1010493040084839,
-1.2325512170791626,
0.7392124533653259,
0.033161357045173645,
1.3067299127578735,
0.5143324136734009,
1.5194951295852661,
1.9739995002746582,
0.8345476984977722,
0.4775286912918091,
1.0627166032791138,
-0.11335818469524384,
-0.5568675398826599,
1.9076567888259888,
-0.43860673904418945,
0.33149686455726624,
1.0565658807754517,
-0.18426494300365448,
-1.1915829181671143,
-0.7874385118484497,
-1.3443373441696167,
-0.8831670880317688,
1.3134022951126099,
0.011650115251541138,
-1.049232840538025,
0.2241111546754837,
1.7683714628219604,
-0.03823292627930641,
-0.6356197595596313,
0.6677255630493164,
0.4042327105998993,
-1.1167806386947632,
-0.01848309114575386,
-0.7598695755004883,
0.6909058690071106,
0.03324754536151886,
-0.3264853060245514,
0.22917237877845764,
0.5898995399475098,
1.7150722742080688,
-0.3192524313926697,
0.1715693324804306,
0.7606443166732788,
-1.4573129415512085,
1.7844847440719604,
-0.7876492142677307,
0.07747118175029755,
-2.215059280395508,
1.1846833229064941,
-0.7621713280677795,
2.016693353652954,
-2.496244430541992,
0.3980517089366913,
-0.35378697514533997,
-0.4267406165599823,
0.07341904938220978,
-0.6219851970672607,
0.19326691329479218,
0.011417195200920105,
-1.1320120096206665,
-0.01598227582871914,
-0.5435206294059753,
0.8078113198280334,
1.0663460493087769,
1.520537257194519,
-1.1837061643600464,
-0.5359404683113098,
-1.6531425714492798,
-0.09863968193531036,
-0.8375309109687805,
0.0657455325126648,
-1.8915205001831055,
-0.3189649283885956,
-1.7918334007263184,
-2.1448018550872803,
-1.3428211212158203,
-0.8905940651893616,
1.1938259601593018,
0.09271010756492615,
-1.1028698682785034,
1.2347344160079956,
-0.39603912830352783,
-1.9935280084609985,
1.426336646080017,
-2.119101047515869
] |
https://github.com/huggingface/datasets/issues/5708 | Dataset sizes are in MiB instead of MB in dataset cards | looks great!
Do you encode the fact that you've already converted a dataset? (to not convert it twice) or do you base yourself on the info contained in `dataset_info` | As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations | 224 | 29 | Dataset sizes are in MiB instead of MB in dataset cards
As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations
looks great!
Do you encode the fact that you've already converted a dataset? (to not convert it twice) or do you base yourself on the info contained in `dataset_info` | [
-1.2046717405319214,
-0.7668105363845825,
-0.8254385590553284,
1.4705817699432373,
-0.10656994581222534,
-1.2954580783843994,
0.07286349684000015,
-1.09921395778656,
1.6157042980194092,
-0.7746984958648682,
0.31586214900016785,
-1.7292100191116333,
0.028935784474015236,
-0.5893017649650574,
-0.7444440126419067,
-0.9063081741333008,
-0.48073092103004456,
-0.7815008759498596,
0.9975621104240417,
2.5506904125213623,
1.2444367408752441,
-1.4329594373703003,
2.728090524673462,
0.7071300148963928,
-0.19495165348052979,
-0.9965212941169739,
0.5095376372337341,
0.02507522888481617,
-1.3180816173553467,
-0.4576839506626129,
-0.8898343443870544,
-0.06194106489419937,
-0.5520466566085815,
-0.5026298761367798,
0.049905166029930115,
0.40494972467422485,
-0.22024744749069214,
-0.3392547070980072,
-0.49073389172554016,
-0.8081634044647217,
0.4804662764072418,
-0.3763994872570038,
0.8706647157669067,
-0.3636687397956848,
1.8641164302825928,
-0.608227014541626,
0.3389646112918854,
0.7299747467041016,
1.3197009563446045,
0.20905888080596924,
-0.05933370441198349,
0.3242666721343994,
0.3122903108596802,
-0.10046510398387909,
0.45484843850135803,
1.240578532218933,
0.711087703704834,
0.5250277519226074,
0.7335902452468872,
-2.1979005336761475,
1.3268074989318848,
-0.983109712600708,
0.258986234664917,
1.4455558061599731,
-1.028104305267334,
0.35137924551963806,
-1.878026008605957,
-0.0810726210474968,
0.4784427881240845,
-2.303725004196167,
0.23561590909957886,
-1.1917774677276611,
-0.529643177986145,
1.031549096107483,
0.18429753184318542,
-1.1959855556488037,
0.16316907107830048,
-0.4116557538509369,
1.0658601522445679,
0.5114824175834656,
1.2775684595108032,
-1.6345409154891968,
0.039289869368076324,
-0.2914648950099945,
0.12952780723571777,
-1.381553053855896,
-1.5926508903503418,
0.5105029344558716,
0.6086636781692505,
0.5459542870521545,
-0.10158730298280716,
0.9481381177902222,
-0.9408425092697144,
0.7760323286056519,
-0.9159027338027954,
-1.6414663791656494,
-1.4659833908081055,
-2.2879111766815186,
-2.3402438163757324,
0.7635573148727417,
-0.5116006135940552,
-0.526109516620636,
1.9944548606872559,
-1.0550954341888428,
-1.7982776165008545,
1.1110033988952637,
0.3443690836429596,
-0.014987213537096977,
2.4300472736358643,
0.16563904285430908,
-0.7334291338920593,
0.42153793573379517,
-0.6920697689056396,
0.7729842066764832,
-0.3737662136554718,
1.332109808921814,
0.5256179571151733,
-1.0817598104476929,
1.5949290990829468,
-0.46133968234062195,
0.5055380463600159,
-0.7229961156845093,
-0.4666931629180908,
-0.8414198756217957,
0.29775622487068176,
1.8674777746200562,
-0.3406256139278412,
1.5848948955535889,
-0.25529688596725464,
-1.5804455280303955,
-1.4757401943206787,
0.8003968596458435,
0.5034356713294983,
-0.815883457660675,
0.16883452236652374,
-0.40714144706726074,
0.06359614431858063,
0.009651271626353264,
1.0520813465118408,
1.141840934753418,
0.7009152770042419,
-0.3013281524181366,
-0.8799691796302795,
0.20999296009540558,
-0.018394604325294495,
-0.6410327553749084,
-1.7429360151290894,
-0.325359970331192,
0.17029064893722534,
0.5715725421905518,
-1.2758238315582275,
1.768815040588379,
0.8481612801551819,
1.8799645900726318,
1.0632765293121338,
-0.3820953071117401,
1.6012144088745117,
0.002622874453663826,
1.8370692729949951,
-0.4638979434967041,
0.65581214427948,
-0.3333868086338043,
-1.2393803596496582,
0.8206157684326172,
-0.3529844582080841,
-2.036665916442871,
-0.7874364256858826,
-0.8129615187644958,
-0.16885729134082794,
-0.8316146731376648,
0.9994376301765442,
-0.2210201621055603,
-1.315047264099121,
0.24150586128234863,
-0.6010898947715759,
0.17367570102214813,
-1.312743902206421,
0.34984180331230164,
0.7337424755096436,
-0.6707276105880737,
0.007580786943435669,
-0.2840862572193146,
-1.281461477279663,
-0.47320058941841125,
0.2281329482793808,
1.8528814315795898,
-0.7553101778030396,
0.9034322500228882,
1.0828148126602173,
-0.7267364859580994,
0.028612351045012474,
0.3594422936439514,
-0.31554362177848816,
0.9227809309959412,
-1.0278890132904053,
-0.3983314633369446,
1.160923957824707,
-0.15511149168014526,
-0.58173668384552,
1.4515721797943115,
0.7745819091796875,
-0.9672449231147766,
-0.2500210106372833,
-0.19122198224067688,
-0.9282004833221436,
-0.0207818616181612,
-1.5125188827514648,
-0.08958521485328674,
0.3053043484687805,
-1.500011682510376,
-0.4393640458583832,
-0.21347211301326752,
1.3320279121398926,
-0.26788952946662903,
1.465984582901001,
-0.39418062567710876,
-0.19154462218284607,
-0.4077220559120178,
-0.35541844367980957,
0.20675967633724213,
-0.14612112939357758,
-0.7224175930023193,
0.2756481170654297,
-0.7506232261657715,
0.32283565402030945,
1.3620952367782593,
0.4648587703704834,
0.0384664461016655,
0.5544523000717163,
1.1441686153411865,
0.26521894335746765,
-0.06766758114099503,
-0.8125895261764526,
-1.643039345741272,
2.0665600299835205,
-1.4804729223251343,
1.8735756874084473,
0.8284975290298462,
-0.02884274162352085,
-1.7621148824691772,
-1.8191406726837158,
1.3718479871749878,
1.2029694318771362,
2.4395768642425537,
0.6076933145523071,
0.4102939963340759,
-0.796636700630188,
-0.7114357948303223,
0.3553992509841919,
-1.0617121458053589,
-0.7571345567703247,
0.18640415370464325,
2.33506178855896,
1.7602734565734863,
-0.4818408489227295,
-0.20104557275772095,
-0.9162679314613342,
1.3702774047851562,
-0.1794358342885971,
0.1436515748500824,
1.9647959470748901,
-0.22644326090812683,
-1.120185136795044,
1.2758195400238037,
-2.377206802368164,
0.14879363775253296,
2.010807514190674,
0.30230602622032166,
0.018592266365885735,
-1.3309355974197388,
-0.6883078217506409,
-0.2486874908208847,
-0.5084794759750366,
-1.2760502099990845,
0.49650678038597107,
-0.2707522213459015,
-0.7657159566879272,
-1.4679113626480103,
0.0917792096734047,
-1.1718026399612427,
-1.616182804107666,
0.326340913772583,
1.7468129396438599,
2.042386293411255,
-0.7615417838096619,
1.4464378356933594,
-0.28927046060562134,
0.15485461056232452,
1.2248727083206177,
1.2719656229019165,
3.2135300636291504,
1.8571105003356934,
-1.3074876070022583,
0.680683434009552,
-0.15398958325386047,
-0.5550257563591003,
1.1912801265716553,
-1.0990078449249268,
1.2382036447525024,
-0.15879270434379578,
-1.2713563442230225,
-1.2866865396499634,
0.9292261600494385,
0.4584408402442932,
0.1370263546705246,
-0.5540788173675537,
1.116498351097107,
0.0939379632472992,
1.3309284448623657,
0.5751382112503052,
-0.31733807921409607,
0.5105332732200623,
-0.4178968667984009,
-0.5322958827018738,
1.593637466430664,
0.08881237357854843,
-1.4198088645935059,
-2.328739881515503,
-0.17705078423023224,
-0.8007611632347107,
-0.04581809043884277,
-0.6609093546867371,
-1.039530634880066,
1.5985898971557617,
0.47951340675354004,
-1.2812105417251587,
-0.33565619587898254,
-0.3989463746547699,
-0.6415472626686096,
2.639455556869507,
-1.4844082593917847,
-0.1710573434829712,
-0.9172239899635315,
-0.5641000866889954,
1.634419322013855,
-1.1121083498001099,
-0.19960424304008484,
-0.966788113117218,
-0.531071662902832,
-1.385703682899475,
-0.6442444920539856,
-0.01567719504237175,
-0.8871128559112549,
0.7734339833259583,
0.12228973954916,
-1.1106195449829102,
-0.27579304575920105,
-0.8866739869117737,
0.863188624382019,
-0.1670234352350235,
0.25630974769592285,
1.86855947971344,
0.4630659520626068,
-0.35097426176071167,
0.6563514471054077,
1.1318354606628418,
0.6252290606498718,
-0.5591874718666077,
0.15671472251415253,
-0.752133309841156,
0.2876700758934021,
-1.3241055011749268,
0.27847015857696533,
-2.871833562850952,
0.6564923524856567,
0.008931504562497139,
-0.01793784834444523,
-0.015019379556179047,
-1.333219051361084,
1.1038163900375366,
2.585869073867798,
-1.214658260345459,
0.48338037729263306,
0.31459495425224304,
1.1555739641189575,
-1.6883559226989746,
0.1718614250421524,
-0.4866514503955841,
2.137645721435547,
0.12119575589895248,
1.2181735038757324,
-0.43288642168045044,
-2.3361313343048096,
0.5350979566574097,
-1.2849986553192139,
-1.1438910961151123,
0.9039843678474426,
-0.8740496635437012,
0.05697663128376007,
-1.3974016904830933,
-0.2356174737215042,
-0.9175136685371399,
-1.158875823020935,
0.8582586646080017,
0.03294944763183594,
0.5103916525840759,
-0.6303818225860596,
0.3279985189437866,
-2.199319362640381,
-1.3192569017410278,
-0.19492359459400177,
-0.9262493252754211,
0.42307496070861816,
-0.30753228068351746,
0.6531247496604919,
-0.09301092475652695,
0.037246547639369965,
0.3626479506492615,
1.4161800146102905,
3.304286241531372,
0.23880986869335175,
0.4173986613750458,
-0.08121352642774582,
-0.9563701152801514,
1.4941250085830688,
0.8935343623161316,
-0.08960569649934769,
-0.5733826160430908,
-0.9984179139137268,
1.2507247924804688,
1.8392068147659302,
1.0667749643325806,
0.03245805203914642,
-0.8430145978927612,
-0.7599403262138367,
-0.017195936292409897,
0.14517469704151154,
0.48725634813308716,
0.909517228603363,
-0.07975184172391891,
0.10274740308523178,
1.3925000429153442,
1.1820402145385742,
-0.4002528786659241,
0.45156434178352356,
-0.8284781575202942,
-0.44664961099624634,
0.526572585105896,
0.24433523416519165,
-0.019828353077173233,
0.4913003146648407,
-0.9876946210861206,
-0.24715857207775116,
-0.30682259798049927,
-0.9224112629890442,
-0.7119720578193665,
-0.47673994302749634,
-0.3371308147907257,
1.6400340795516968,
0.03511364758014679,
-0.4961744248867035,
-0.008375199511647224,
-0.8682156801223755,
-0.1724512130022049,
-1.13863205909729,
0.28262388706207275,
-0.18123914301395416,
-0.10168557614088058,
-0.16010157763957977,
1.7103991508483887,
-0.971383810043335,
-2.107727527618408,
0.23535187542438507,
0.2739506959915161,
-0.44163277745246887,
0.06968658417463303,
1.7110885381698608,
0.4651842415332794,
1.422919511795044,
1.3523889780044556,
0.9914669394493103,
-0.6579546928405762,
-1.32394540309906,
0.7245593070983887,
0.9918455481529236,
-1.3125836849212646,
0.8941972255706787,
-0.08545442670583725,
-0.5729436874389648,
0.6048892736434937,
1.255087971687317,
0.3731689453125,
-1.9836890697479248,
0.8446826338768005,
-0.8983039259910583,
0.6975447535514832,
0.6524883508682251,
0.7931739687919617,
0.1559213399887085,
0.8618934154510498,
-1.2707099914550781,
-1.1390427350997925,
-0.7016302943229675,
-0.6193631291389465,
1.848193645477295,
-0.2102445363998413,
0.5455241203308105,
-0.17319917678833008,
-1.3405647277832031,
-0.0690774992108345,
0.6885236501693726,
0.3208412528038025,
-0.3407139182090759,
0.8522340059280396,
-0.6618547439575195,
-1.1383241415023804,
-1.4485242366790771,
-0.40672948956489563,
-0.9540112018585205,
-0.8360934257507324,
1.0678496360778809,
0.7971587181091309,
0.24960550665855408,
1.9044556617736816,
0.6586160659790039,
0.14472414553165436,
-2.6628973484039307,
0.8159289956092834,
0.2937491238117218,
0.004122026264667511,
0.9193728566169739,
0.32100996375083923,
1.1040294170379639,
0.057450465857982635,
0.46045222878456116,
-2.4214706420898438,
2.2406530380249023,
-0.20496989786624908,
0.7511140704154968,
-0.027175256982445717,
-0.24349553883075714,
1.025132417678833,
0.6096396446228027,
0.6014078259468079,
-1.1608775854110718,
0.7126681208610535,
-0.5637984275817871,
1.1815416812896729,
0.9166909456253052,
-0.8435274362564087,
-0.005448618903756142,
1.338602066040039,
0.4440850615501404,
-0.4828241765499115,
-0.9339608550071716,
-0.8467866778373718,
1.0080640316009521,
1.7901934385299683,
0.027879012748599052,
0.11057370901107788,
0.893743634223938,
0.7186938524246216,
-1.295051097869873,
0.07587645202875137,
-0.7193567156791687,
-0.7908684611320496,
1.7444274425506592,
2.016061782836914,
-0.05883768945932388,
-0.2103746086359024,
-0.792266845703125,
-1.2288864850997925,
0.8273274898529053,
0.026036588475108147,
0.09902873635292053,
0.6921313405036926,
-0.7203903794288635,
1.1119723320007324,
0.9499291181564331,
0.899652898311615,
0.2277202606201172,
0.2949035167694092,
0.33961787819862366,
-0.2750476598739624,
-1.154213786125183,
-0.20452556014060974,
-1.0969297885894775,
-2.566082239151001,
0.49539217352867126,
-0.2662983536720276,
-1.4329476356506348,
0.01982736401259899,
-1.0337077379226685,
0.9035694003105164,
-0.5776914358139038,
-1.0872275829315186,
-1.5054625272750854,
0.32899025082588196,
-0.061233751475811005,
0.864696204662323,
-1.525995135307312,
-0.09736984223127365,
1.2338674068450928,
0.9257717132568359,
-0.5814285278320312,
0.9379482865333557,
0.2672716975212097,
1.0330687761306763,
0.8900820016860962,
-0.41254544258117676,
0.43575382232666016,
0.15520814061164856,
-1.3568021059036255,
0.43505972623825073,
1.185645341873169,
0.15880919992923737,
1.4541300535202026,
-0.5134674310684204,
0.017295703291893005,
0.37952208518981934,
-0.4463996887207031,
-0.4227403998374939,
-0.5947622656822205,
0.7154260277748108,
0.061227843165397644,
-0.9441604614257812,
0.09943434596061707,
-0.13890434801578522,
-0.21626390516757965,
0.22254593670368195,
-1.4501841068267822,
-0.210476353764534,
-0.3552660048007965,
-0.5475359559059143,
-1.3056336641311646,
0.00017397385090589523,
1.3786896467208862,
-0.7923097014427185,
-0.16485507786273956,
0.544641375541687,
0.3070877492427826,
0.5704087018966675,
0.5983700156211853,
-0.6675246357917786,
-0.3100268840789795,
-0.25242024660110474,
-0.39783960580825806,
0.22022801637649536,
1.2081183195114136,
-0.14207018911838531,
-0.8735414147377014,
0.6908965110778809,
-0.2116372436285019,
0.04424557089805603,
1.952617883682251,
0.1226649358868599,
-0.8233441114425659,
0.3331434726715088,
-0.6736338138580322,
1.9052013158798218,
1.7893216609954834,
1.371285080909729,
-0.16561979055404663,
-0.9428623914718628,
0.6310891509056091,
-0.3567347824573517,
-0.36932551860809326,
0.9140838980674744,
0.4745742082595825,
-0.1238480731844902,
-1.4823894500732422,
0.583760142326355,
1.3097783327102661,
-0.8819319605827332,
-0.717960000038147,
0.09312888234853745,
-0.8199381232261658,
1.128124713897705,
0.7307034730911255,
0.336308091878891,
0.24152594804763794,
1.647177815437317,
0.7133752703666687,
-0.4610755741596222,
0.5357444286346436,
0.5397456288337708,
-0.09387937188148499,
-2.050046443939209,
-1.0945258140563965,
0.3454911410808563,
-0.32378241419792175,
-1.5174719095230103,
1.3425884246826172,
-1.1981347799301147,
-0.9656347036361694,
0.5412200689315796,
0.0696762278676033,
1.4341530799865723,
0.29248762130737305,
1.6714195013046265,
2.0798840522766113,
0.9047546982765198,
0.25147494673728943,
1.3073240518569946,
-0.0642143040895462,
-0.3677816390991211,
1.7872021198272705,
-0.4686911106109619,
0.49841657280921936,
1.0807117223739624,
-0.40325310826301575,
-1.1027363538742065,
-0.7799758911132812,
-1.2308506965637207,
-0.7337796092033386,
1.1762646436691284,
0.08837451785802841,
-1.07998788356781,
0.24331942200660706,
1.6108266115188599,
0.031074004247784615,
-0.2742500901222229,
0.6397990584373474,
0.4947143495082855,
-0.7483936548233032,
-0.05141322314739227,
-0.9404973387718201,
0.5313077569007874,
-0.13313037157058716,
-0.32279038429260254,
0.3004438281059265,
0.5083642601966858,
1.3061926364898682,
0.08935651183128357,
0.10823672264814377,
1.2196080684661865,
-1.396531105041504,
1.4250824451446533,
-0.7496268153190613,
0.20583179593086243,
-2.3564624786376953,
1.4958566427230835,
-0.8521785140037537,
1.947582721710205,
-2.59452223777771,
0.43624547123908997,
-0.528690755367279,
-0.4661281704902649,
0.323293000459671,
-0.41813650727272034,
0.13342703878879547,
-0.10506348311901093,
-0.9948174357414246,
-0.13487547636032104,
-0.7570310235023499,
0.5850542187690735,
1.1618225574493408,
1.3342080116271973,
-1.0945887565612793,
-0.379827618598938,
-1.7040956020355225,
-0.21296821534633636,
-0.5744194388389587,
0.3123168647289276,
-1.844818115234375,
-0.2364499419927597,
-2.014375686645508,
-2.4252336025238037,
-1.3425227403640747,
-0.8536955118179321,
1.1656569242477417,
0.17163321375846863,
-0.9621148109436035,
1.0868312120437622,
-0.3879322111606598,
-1.7684234380722046,
1.1637389659881592,
-2.0948069095611572
] |
https://github.com/huggingface/datasets/issues/5708 | Dataset sizes are in MiB instead of MB in dataset cards | I am only looping trough the dataset cards, assuming that all of them were created with MiB.
I agree we should only run the bulk edit once for all canonical datasets: I'm using a for-loop over canonical datasets. | As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations | 224 | 38 | Dataset sizes are in MiB instead of MB in dataset cards
As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations
I am only looping trough the dataset cards, assuming that all of them were created with MiB.
I agree we should only run the bulk edit once for all canonical datasets: I'm using a for-loop over canonical datasets. | [
-1.220298409461975,
-0.7835490107536316,
-0.8450846076011658,
1.4336456060409546,
-0.10030520707368851,
-1.2730183601379395,
0.0861118733882904,
-1.0976701974868774,
1.614246129989624,
-0.7821232080459595,
0.3039436936378479,
-1.7050234079360962,
0.03946385905146599,
-0.568356454372406,
-0.718590259552002,
-0.9071112275123596,
-0.44656360149383545,
-0.7986939549446106,
1.0229454040527344,
2.5580127239227295,
1.2312531471252441,
-1.4286640882492065,
2.727210521697998,
0.7079792618751526,
-0.199464812874794,
-1.0137035846710205,
0.5498776435852051,
0.0251292884349823,
-1.3311983346939087,
-0.4405650794506073,
-0.9152255654335022,
-0.03982962295413017,
-0.5500378012657166,
-0.5057207345962524,
0.08001617342233658,
0.37784865498542786,
-0.20869390666484833,
-0.38287514448165894,
-0.48496681451797485,
-0.8140588402748108,
0.5013243556022644,
-0.3695805072784424,
0.8772798776626587,
-0.3486914038658142,
1.8497309684753418,
-0.5953509211540222,
0.3043782114982605,
0.728977382183075,
1.2831971645355225,
0.1883361041545868,
-0.0694652795791626,
0.2936214506626129,
0.3280579745769501,
-0.07383652031421661,
0.4411947727203369,
1.206485629081726,
0.6888056397438049,
0.5187844634056091,
0.7546770572662354,
-2.183809757232666,
1.3083020448684692,
-0.974301815032959,
0.23942402005195618,
1.476770043373108,
-1.0123622417449951,
0.391849547624588,
-1.8888133764266968,
-0.09301532804965973,
0.45209652185440063,
-2.3291783332824707,
0.21013109385967255,
-1.1990538835525513,
-0.5119084119796753,
1.033569574356079,
0.1802699714899063,
-1.1853893995285034,
0.16441410779953003,
-0.43180492520332336,
1.054121732711792,
0.5023610591888428,
1.2837977409362793,
-1.6479341983795166,
0.01669134944677353,
-0.3040715456008911,
0.14483265578746796,
-1.365071415901184,
-1.58872389793396,
0.506458580493927,
0.606525719165802,
0.5471871495246887,
-0.10369213670492172,
0.9193881154060364,
-0.9588790535926819,
0.7585394382476807,
-0.8989182114601135,
-1.6364946365356445,
-1.4487934112548828,
-2.3126537799835205,
-2.3612465858459473,
0.7605695724487305,
-0.5052788853645325,
-0.5309526920318604,
1.9799200296401978,
-1.070199966430664,
-1.8132535219192505,
1.103990077972412,
0.31497207283973694,
-0.01140512153506279,
2.4342477321624756,
0.17316380143165588,
-0.7416248321533203,
0.4036279022693634,
-0.7411853671073914,
0.7518355846405029,
-0.3293520212173462,
1.334454894065857,
0.5443339943885803,
-1.0550363063812256,
1.5922131538391113,
-0.45278507471084595,
0.5155251026153564,
-0.7237758636474609,
-0.4509533643722534,
-0.8457150459289551,
0.31903788447380066,
1.8619276285171509,
-0.3307335674762726,
1.5785168409347534,
-0.2459200769662857,
-1.6085968017578125,
-1.4491697549819946,
0.7865574359893799,
0.5150662660598755,
-0.7893242835998535,
0.17257504165172577,
-0.3799161911010742,
0.06855394691228867,
0.025859035551548004,
1.0547699928283691,
1.1422392129898071,
0.7208414077758789,
-0.2968459725379944,
-0.8995147347450256,
0.2556022107601166,
-0.03921353816986084,
-0.6958038210868835,
-1.7333076000213623,
-0.3129059076309204,
0.15120193362236023,
0.5940155982971191,
-1.2727994918823242,
1.7480568885803223,
0.853235125541687,
1.8994468450546265,
1.0635440349578857,
-0.40768805146217346,
1.5838804244995117,
0.022449173033237457,
1.852698802947998,
-0.4773755371570587,
0.6770606637001038,
-0.3070905804634094,
-1.2355902194976807,
0.8263857960700989,
-0.33882763981819153,
-2.035280704498291,
-0.7719345688819885,
-0.8351741433143616,
-0.1795886904001236,
-0.8093560338020325,
1.0495344400405884,
-0.2379065901041031,
-1.3297157287597656,
0.2530822455883026,
-0.5861914753913879,
0.1727265566587448,
-1.342153549194336,
0.3159697353839874,
0.7366389036178589,
-0.6729758977890015,
0.02184762805700302,
-0.28747814893722534,
-1.303900122642517,
-0.4831233322620392,
0.2121993452310562,
1.8362451791763306,
-0.7609916925430298,
0.9384394288063049,
1.0589700937271118,
-0.7170942425727844,
0.024255335330963135,
0.35577869415283203,
-0.3089491128921509,
0.9150078296661377,
-1.0440943241119385,
-0.40452197194099426,
1.1285029649734497,
-0.1584402620792389,
-0.5700902938842773,
1.4055169820785522,
0.7903332114219666,
-0.9676242470741272,
-0.24610799551010132,
-0.1942814588546753,
-0.958325207233429,
0.02202146127820015,
-1.5159192085266113,
-0.11499899625778198,
0.27913835644721985,
-1.515402913093567,
-0.4433072805404663,
-0.2023606151342392,
1.3315550088882446,
-0.2592998147010803,
1.4481617212295532,
-0.3859670162200928,
-0.1953902393579483,
-0.43743833899497986,
-0.33790090680122375,
0.21524588763713837,
-0.12384248524904251,
-0.7171005606651306,
0.3108334243297577,
-0.7924217581748962,
0.2992563247680664,
1.3783016204833984,
0.45427313446998596,
0.023601070046424866,
0.5479118227958679,
1.1373082399368286,
0.28664714097976685,
-0.08836217224597931,
-0.8475385308265686,
-1.6203440427780151,
2.103522539138794,
-1.5035120248794556,
1.8432774543762207,
0.8042414784431458,
-0.026922352612018585,
-1.7436619997024536,
-1.800766944885254,
1.3897526264190674,
1.1989989280700684,
2.4373910427093506,
0.6104797124862671,
0.39934682846069336,
-0.7659990787506104,
-0.7118452787399292,
0.32004135847091675,
-1.0728340148925781,
-0.7451198101043701,
0.21222592890262604,
2.312530040740967,
1.7311961650848389,
-0.4951706528663635,
-0.19818851351737976,
-0.9017931818962097,
1.3183329105377197,
-0.16181030869483948,
0.12329606711864471,
1.9780058860778809,
-0.26208776235580444,
-1.127228856086731,
1.2722386121749878,
-2.3858835697174072,
0.19259113073349,
1.9641735553741455,
0.3081888258457184,
0.0383044108748436,
-1.3465579748153687,
-0.7331816554069519,
-0.23893971741199493,
-0.5031875967979431,
-1.2786215543746948,
0.5122266411781311,
-0.2513507604598999,
-0.7980383634567261,
-1.5086628198623657,
0.09487725049257278,
-1.1690877676010132,
-1.6610910892486572,
0.33969846367836,
1.7347753047943115,
2.063065767288208,
-0.7708548903465271,
1.4104632139205933,
-0.2757028341293335,
0.13981923460960388,
1.2041938304901123,
1.2290184497833252,
3.19315242767334,
1.8492822647094727,
-1.2985296249389648,
0.706063985824585,
-0.11830981075763702,
-0.5293248891830444,
1.1560100317001343,
-1.0736128091812134,
1.2370566129684448,
-0.17136862874031067,
-1.2777231931686401,
-1.2876371145248413,
0.9175169467926025,
0.4711821675300598,
0.1353512406349182,
-0.5492375493049622,
1.152564287185669,
0.07019713521003723,
1.3572710752487183,
0.5558808445930481,
-0.3172677457332611,
0.530915379524231,
-0.40753501653671265,
-0.5093457698822021,
1.5997755527496338,
0.06143491342663765,
-1.4235528707504272,
-2.3313162326812744,
-0.21035876870155334,
-0.7833408117294312,
-0.062326494604349136,
-0.6705748438835144,
-1.0255533456802368,
1.6205862760543823,
0.47224387526512146,
-1.2443550825119019,
-0.3461679220199585,
-0.4195573925971985,
-0.6525475382804871,
2.633930206298828,
-1.4948480129241943,
-0.1688775271177292,
-0.9188616871833801,
-0.5496256947517395,
1.5895664691925049,
-1.1173771619796753,
-0.20690816640853882,
-1.01466703414917,
-0.5479033589363098,
-1.3871948719024658,
-0.6473963856697083,
-0.0076578520238399506,
-0.8831847310066223,
0.78057861328125,
0.11191364377737045,
-1.0661693811416626,
-0.2450389862060547,
-0.8950856328010559,
0.8500164151191711,
-0.15159334242343903,
0.2643146812915802,
1.8500796556472778,
0.4461844265460968,
-0.360362708568573,
0.6438407897949219,
1.119989037513733,
0.6637170314788818,
-0.5757228136062622,
0.11638927459716797,
-0.7636153101921082,
0.2580098807811737,
-1.3157740831375122,
0.31532514095306396,
-2.8549675941467285,
0.6670038104057312,
-0.01646730676293373,
0.03175215795636177,
-0.005770196206867695,
-1.3255730867385864,
1.1283470392227173,
2.593787431716919,
-1.1963815689086914,
0.4635354280471802,
0.343806654214859,
1.1469993591308594,
-1.675589919090271,
0.21835947036743164,
-0.4342809319496155,
2.145935535430908,
0.1655089557170868,
1.2312370538711548,
-0.44524484872817993,
-2.3531415462493896,
0.522396445274353,
-1.2699817419052124,
-1.1483063697814941,
0.9104601144790649,
-0.8291863799095154,
0.030589081346988678,
-1.4071215391159058,
-0.21805299818515778,
-0.9171561598777771,
-1.188266634941101,
0.8456430435180664,
0.06538670510053635,
0.5482823848724365,
-0.6531690359115601,
0.3356463611125946,
-2.2166943550109863,
-1.3182003498077393,
-0.17955543100833893,
-0.9101479053497314,
0.40578386187553406,
-0.2986874282360077,
0.6737778186798096,
-0.10505201667547226,
0.02619469165802002,
0.35083702206611633,
1.4109681844711304,
3.375863790512085,
0.23702594637870789,
0.4316873252391815,
-0.07175300270318985,
-0.9609177708625793,
1.4992246627807617,
0.9087066054344177,
-0.08962011337280273,
-0.5575075149536133,
-0.9774826169013977,
1.2492609024047852,
1.8600629568099976,
1.078795075416565,
0.03792434185743332,
-0.8599848747253418,
-0.7363390922546387,
-0.002988281659781933,
0.19183595478534698,
0.49385762214660645,
0.916262149810791,
-0.07906309515237808,
0.06886991858482361,
1.4207667112350464,
1.1548715829849243,
-0.4026993215084076,
0.44058531522750854,
-0.8498697876930237,
-0.4305360019207001,
0.5456274151802063,
0.2628247141838074,
0.014765067957341671,
0.49744194746017456,
-0.9903072714805603,
-0.23271150887012482,
-0.2803720533847809,
-0.9548383355140686,
-0.71956467628479,
-0.44507426023483276,
-0.3492524027824402,
1.6490709781646729,
0.041634853929281235,
-0.4938790798187256,
-0.03225989267230034,
-0.8554330468177795,
-0.18260404467582703,
-1.1312005519866943,
0.2699633240699768,
-0.1668456643819809,
-0.0992005318403244,
-0.14360374212265015,
1.7234915494918823,
-0.9431588053703308,
-2.109825611114502,
0.19206775724887848,
0.27418094873428345,
-0.4432831406593323,
0.07829324156045914,
1.7295188903808594,
0.45100778341293335,
1.4251490831375122,
1.3305022716522217,
0.9958546161651611,
-0.6479103565216064,
-1.3328677415847778,
0.7297679781913757,
0.9868739247322083,
-1.3436778783798218,
0.8890411257743835,
-0.09658506512641907,
-0.5636406540870667,
0.6275351643562317,
1.2749991416931152,
0.3742949366569519,
-2.0088090896606445,
0.8233899474143982,
-0.87920081615448,
0.6911664009094238,
0.6251316070556641,
0.8035703897476196,
0.11325737833976746,
0.8389272093772888,
-1.28313148021698,
-1.1055428981781006,
-0.6934460401535034,
-0.5635305643081665,
1.8431090116500854,
-0.19731976091861725,
0.5244407057762146,
-0.224817156791687,
-1.304964303970337,
-0.016498472541570663,
0.6819726228713989,
0.3164956867694855,
-0.3172294497489929,
0.8327320218086243,
-0.6887838244438171,
-1.1423145532608032,
-1.4291632175445557,
-0.40153616666793823,
-0.9245138764381409,
-0.8358049392700195,
1.0860871076583862,
0.7778789401054382,
0.2505781352519989,
1.8849838972091675,
0.6267157196998596,
0.14838159084320068,
-2.6761159896850586,
0.8193818926811218,
0.3020930886268616,
0.010443930514156818,
0.951564610004425,
0.3068806231021881,
1.1433147192001343,
0.05231630429625511,
0.46723341941833496,
-2.4334516525268555,
2.225029468536377,
-0.19061529636383057,
0.7488018870353699,
-0.012837527319788933,
-0.2736956775188446,
1.0304687023162842,
0.6353108286857605,
0.6089062690734863,
-1.1729090213775635,
0.7070034742355347,
-0.5887311697006226,
1.1804563999176025,
0.942057192325592,
-0.8359782695770264,
0.015056991018354893,
1.3176984786987305,
0.49318093061447144,
-0.4600018262863159,
-0.9143144488334656,
-0.8360905051231384,
0.9911373853683472,
1.7491506338119507,
0.01163001824170351,
0.0823526531457901,
0.8533058166503906,
0.7394792437553406,
-1.2959575653076172,
0.08296950161457062,
-0.706866443157196,
-0.7717076539993286,
1.7391557693481445,
2.03016996383667,
-0.04005832225084305,
-0.20805656909942627,
-0.7851164937019348,
-1.2589572668075562,
0.8267573118209839,
0.0350055955350399,
0.14743494987487793,
0.6874348521232605,
-0.7054539918899536,
1.1209460496902466,
0.9438116550445557,
0.9117105007171631,
0.22153054177761078,
0.32963886857032776,
0.3254254162311554,
-0.2607245445251465,
-1.1680282354354858,
-0.22356213629245758,
-1.1277765035629272,
-2.5627756118774414,
0.5269671678543091,
-0.2847909927368164,
-1.4623522758483887,
0.032113686203956604,
-1.016598105430603,
0.9009708166122437,
-0.5914832949638367,
-1.0573867559432983,
-1.4985864162445068,
0.3486632704734802,
-0.07263359427452087,
0.8417943716049194,
-1.5219146013259888,
-0.08092545717954636,
1.2851269245147705,
0.9174101948738098,
-0.5695415735244751,
0.9509744644165039,
0.23782749474048615,
1.0233103036880493,
0.8720743060112,
-0.41007792949676514,
0.43702733516693115,
0.1766165792942047,
-1.3819646835327148,
0.43102338910102844,
1.1629014015197754,
0.17392738163471222,
1.4349578619003296,
-0.5146849751472473,
0.04622669145464897,
0.3745277225971222,
-0.42743226885795593,
-0.47265106439590454,
-0.601040780544281,
0.7180687785148621,
0.03334997966885567,
-0.9131645560264587,
0.09751403331756592,
-0.11239790916442871,
-0.19744908809661865,
0.24725471436977386,
-1.4412930011749268,
-0.26265668869018555,
-0.3939240872859955,
-0.5545693039894104,
-1.3249006271362305,
0.004899146966636181,
1.3565565347671509,
-0.7959756255149841,
-0.1651425063610077,
0.5342482924461365,
0.32404273748397827,
0.5299696922302246,
0.6016887426376343,
-0.6661414504051208,
-0.32111722230911255,
-0.2597646415233612,
-0.3770758807659149,
0.22623507678508759,
1.2320117950439453,
-0.14248867332935333,
-0.9323835372924805,
0.6847860813140869,
-0.22762638330459595,
0.06660667806863785,
1.965323805809021,
0.1316981166601181,
-0.836798906326294,
0.32142505049705505,
-0.6565006375312805,
1.8781943321228027,
1.774369716644287,
1.3651459217071533,
-0.17591416835784912,
-0.9164600372314453,
0.6224392056465149,
-0.3359735608100891,
-0.3775172829627991,
0.9309384226799011,
0.5089383125305176,
-0.10914895683526993,
-1.4931678771972656,
0.5598371624946594,
1.3234944343566895,
-0.880084753036499,
-0.733646035194397,
0.1057756245136261,
-0.834119975566864,
1.1075011491775513,
0.7395698428153992,
0.3496890962123871,
0.2284276783466339,
1.6366899013519287,
0.7122054100036621,
-0.49158573150634766,
0.5143260955810547,
0.5199318528175354,
-0.0836675688624382,
-2.0692851543426514,
-1.0795786380767822,
0.32399702072143555,
-0.3178771436214447,
-1.5042479038238525,
1.368359923362732,
-1.211632490158081,
-0.9735905528068542,
0.543870210647583,
0.08787468820810318,
1.3926106691360474,
0.3268747925758362,
1.7084472179412842,
2.077418327331543,
0.8890237212181091,
0.21022365987300873,
1.2828441858291626,
-0.06511354446411133,
-0.3690701127052307,
1.7869457006454468,
-0.44292157888412476,
0.5449656844139099,
1.1018130779266357,
-0.4109327495098114,
-1.1013187170028687,
-0.7930683493614197,
-1.2006587982177734,
-0.690890371799469,
1.183076024055481,
0.13269731402397156,
-1.1034317016601562,
0.25650858879089355,
1.6020078659057617,
0.03127690777182579,
-0.2960754930973053,
0.6450114846229553,
0.5098989605903625,
-0.7538513541221619,
-0.06955470144748688,
-0.9537627100944519,
0.5249074101448059,
-0.15331409871578217,
-0.3256688416004181,
0.29248321056365967,
0.5129550695419312,
1.294980764389038,
0.07545044273138046,
0.11920446157455444,
1.2391047477722168,
-1.4027159214019775,
1.4482759237289429,
-0.7530391216278076,
0.19384518265724182,
-2.311647891998291,
1.4795023202896118,
-0.8512829542160034,
1.9449968338012695,
-2.577679395675659,
0.40597814321517944,
-0.5232790112495422,
-0.4553830623626709,
0.31777212023735046,
-0.4372362792491913,
0.1371772438287735,
-0.1012035682797432,
-0.9784319400787354,
-0.1542627364397049,
-0.7640167474746704,
0.6125365495681763,
1.1854703426361084,
1.3530412912368774,
-1.0796915292739868,
-0.36648064851760864,
-1.6971837282180786,
-0.2651159465312958,
-0.5809081196784973,
0.30402806401252747,
-1.8401590585708618,
-0.21431691944599152,
-2.0156869888305664,
-2.426727056503296,
-1.3556790351867676,
-0.8657056093215942,
1.174818992614746,
0.182560995221138,
-0.9583325386047363,
1.0802284479141235,
-0.4035816788673401,
-1.7860298156738281,
1.1874068975448608,
-2.1008760929107666
] |
https://github.com/huggingface/datasets/issues/5708 | Dataset sizes are in MiB instead of MB in dataset cards | I have just included as well the conversion from MB to GB if necessary. See:
- https://huggingface.co/datasets/bookcorpus/discussions/2/files
- https://huggingface.co/datasets/asnq/discussions/2/files | As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations | 224 | 19 | Dataset sizes are in MiB instead of MB in dataset cards
As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations
I have just included as well the conversion from MB to GB if necessary. See:
- https://huggingface.co/datasets/bookcorpus/discussions/2/files
- https://huggingface.co/datasets/asnq/discussions/2/files | [
-1.1752947568893433,
-0.7803303599357605,
-0.859883725643158,
1.4678722620010376,
-0.07658718526363373,
-1.287837266921997,
0.05509507283568382,
-1.041992425918579,
1.5613751411437988,
-0.7213760614395142,
0.3123348355293274,
-1.736629605293274,
-0.018133509904146194,
-0.604993462562561,
-0.7078953981399536,
-0.8560192584991455,
-0.4592796862125397,
-0.8027617931365967,
0.9692620635032654,
2.546678066253662,
1.2965337038040161,
-1.405592918395996,
2.738309144973755,
0.7216678857803345,
-0.21036545932292938,
-1.0244309902191162,
0.530722975730896,
0.036679498851299286,
-1.3215584754943848,
-0.4596433937549591,
-0.8810956478118896,
-0.014283007010817528,
-0.5451275706291199,
-0.47521716356277466,
0.09866061806678772,
0.4353567361831665,
-0.2132757604122162,
-0.298279345035553,
-0.5121251940727234,
-0.8038985133171082,
0.4940877854824066,
-0.37323397397994995,
0.9016380906105042,
-0.3281199038028717,
1.866659164428711,
-0.6113642454147339,
0.3051133155822754,
0.7402999401092529,
1.2815699577331543,
0.15733712911605835,
-0.043914712965488434,
0.3085978329181671,
0.32740098237991333,
-0.07954569160938263,
0.45333102345466614,
1.2669968605041504,
0.6657241582870483,
0.5188157558441162,
0.7138074636459351,
-2.1840174198150635,
1.331701397895813,
-0.9278356432914734,
0.24385517835617065,
1.4758390188217163,
-1.0203816890716553,
0.37616315484046936,
-1.8846241235733032,
-0.08380645513534546,
0.4685327112674713,
-2.312570333480835,
0.2208562046289444,
-1.206758737564087,
-0.5248193740844727,
1.0161687135696411,
0.1815480887889862,
-1.2073460817337036,
0.16234324872493744,
-0.44252824783325195,
1.0386934280395508,
0.5263221859931946,
1.2922531366348267,
-1.6602109670639038,
0.04054971784353256,
-0.2735060751438141,
0.10681700706481934,
-1.3695710897445679,
-1.597002387046814,
0.483879953622818,
0.6194879412651062,
0.5877422094345093,
-0.09636881947517395,
0.9265084862709045,
-0.967290997505188,
0.7714154720306396,
-0.8764964938163757,
-1.6217191219329834,
-1.451177954673767,
-2.3300557136535645,
-2.327113628387451,
0.7656517028808594,
-0.4986329674720764,
-0.5102216005325317,
1.9371168613433838,
-1.0418695211410522,
-1.8224889039993286,
1.071500301361084,
0.35633498430252075,
0.014111961238086224,
2.4066781997680664,
0.2008502185344696,
-0.7456240057945251,
0.37932834029197693,
-0.718852162361145,
0.7990355491638184,
-0.3383229672908783,
1.3257197141647339,
0.559403657913208,
-1.076412558555603,
1.6269258260726929,
-0.4858371615409851,
0.48416224122047424,
-0.7475156188011169,
-0.4442235827445984,
-0.8361030220985413,
0.28980693221092224,
1.8658738136291504,
-0.35854822397232056,
1.5888761281967163,
-0.23120014369487762,
-1.6161900758743286,
-1.477191686630249,
0.7661527395248413,
0.5036104917526245,
-0.8269894123077393,
0.14581193029880524,
-0.4303375482559204,
0.05896466597914696,
0.02944561466574669,
1.035448670387268,
1.1295034885406494,
0.6692340970039368,
-0.3044246733188629,
-0.8836960196495056,
0.2549131512641907,
-0.06691665202379227,
-0.658164918422699,
-1.7588671445846558,
-0.31663206219673157,
0.2152179777622223,
0.5745223760604858,
-1.3049777746200562,
1.7907048463821411,
0.8506031036376953,
1.9275187253952026,
1.035154104232788,
-0.3817873001098633,
1.584327220916748,
-0.019902866333723068,
1.8605706691741943,
-0.47881224751472473,
0.6470634341239929,
-0.32398736476898193,
-1.2244912385940552,
0.8355639576911926,
-0.33772486448287964,
-2.0260009765625,
-0.7850102782249451,
-0.8393402695655823,
-0.1636006236076355,
-0.8109275102615356,
1.0294541120529175,
-0.21042883396148682,
-1.3098864555358887,
0.2175256758928299,
-0.5926220417022705,
0.1664285957813263,
-1.358572006225586,
0.2591504156589508,
0.7572442889213562,
-0.6831793785095215,
-0.020440779626369476,
-0.2681087553501129,
-1.316378116607666,
-0.4837912619113922,
0.2619384825229645,
1.8925451040267944,
-0.7186462879180908,
0.9509663581848145,
1.0408328771591187,
-0.7237871289253235,
0.09968078136444092,
0.3570721447467804,
-0.32890620827674866,
0.9073838591575623,
-1.0278997421264648,
-0.36670079827308655,
1.1279488801956177,
-0.14976437389850616,
-0.6142968535423279,
1.4503034353256226,
0.8295888304710388,
-0.9681552648544312,
-0.29584816098213196,
-0.19873853027820587,
-0.8812597990036011,
-0.009999104775488377,
-1.4832366704940796,
-0.08704525977373123,
0.24837809801101685,
-1.4799262285232544,
-0.44729068875312805,
-0.22904585301876068,
1.346789002418518,
-0.2641947269439697,
1.4677467346191406,
-0.3522789776325226,
-0.2098548412322998,
-0.4072541296482086,
-0.38421452045440674,
0.19956925511360168,
-0.1309518814086914,
-0.7099368572235107,
0.3317210078239441,
-0.8142138719558716,
0.3168809711933136,
1.3720341920852661,
0.4514946937561035,
0.04437269642949104,
0.5482077598571777,
1.1460667848587036,
0.2710454761981964,
-0.06837482750415802,
-0.8503818511962891,
-1.6477677822113037,
2.0676705837249756,
-1.476321816444397,
1.8631023168563843,
0.8272594213485718,
-0.018682213500142097,
-1.7682133913040161,
-1.8140379190444946,
1.3896275758743286,
1.1999741792678833,
2.470376968383789,
0.6109338998794556,
0.4059474766254425,
-0.7923810482025146,
-0.7376099824905396,
0.33152323961257935,
-1.0469613075256348,
-0.7642927765846252,
0.20950709283351898,
2.3302359580993652,
1.7568718194961548,
-0.5261899828910828,
-0.24255084991455078,
-0.9040085077285767,
1.295501708984375,
-0.22118018567562103,
0.10077369213104248,
2.012815237045288,
-0.25326409935951233,
-1.0698267221450806,
1.294716715812683,
-2.4042019844055176,
0.21250440180301666,
1.984870195388794,
0.28244274854660034,
0.04457741603255272,
-1.3470213413238525,
-0.7517635822296143,
-0.22583244740962982,
-0.5380856394767761,
-1.2612959146499634,
0.505335807800293,
-0.2814564108848572,
-0.870028018951416,
-1.4898885488510132,
0.08540590107440948,
-1.1658397912979126,
-1.6656478643417358,
0.36744868755340576,
1.7500355243682861,
2.028805732727051,
-0.7786783576011658,
1.393264889717102,
-0.2559484541416168,
0.10931351780891418,
1.235565185546875,
1.2991498708724976,
3.2073941230773926,
1.8431756496429443,
-1.2933846712112427,
0.7391359806060791,
-0.13681013882160187,
-0.5513613820075989,
1.1729427576065063,
-1.0903677940368652,
1.1886839866638184,
-0.21875996887683868,
-1.324101448059082,
-1.2888545989990234,
0.9795197248458862,
0.489241361618042,
0.1296364963054657,
-0.5567734837532043,
1.151719331741333,
0.0995425134897232,
1.3346353769302368,
0.6071558594703674,
-0.3331564962863922,
0.4981095492839813,
-0.39374399185180664,
-0.5087265968322754,
1.57197904586792,
0.05737835541367531,
-1.4449695348739624,
-2.335667848587036,
-0.19466714560985565,
-0.8304389715194702,
-0.12043838948011398,
-0.6919386386871338,
-1.0334405899047852,
1.5757873058319092,
0.49533411860466003,
-1.2763981819152832,
-0.3334830105304718,
-0.412542462348938,
-0.6083698272705078,
2.6040501594543457,
-1.4777820110321045,
-0.1604352742433548,
-0.9440553784370422,
-0.51817387342453,
1.620628833770752,
-1.1029624938964844,
-0.20243880152702332,
-0.993166983127594,
-0.5863358378410339,
-1.407693862915039,
-0.660696804523468,
0.01542533840984106,
-0.8748137354850769,
0.7384313941001892,
0.04902161657810211,
-1.0481774806976318,
-0.2518203854560852,
-0.9367910027503967,
0.8859978914260864,
-0.144503653049469,
0.24597448110580444,
1.8575352430343628,
0.4526950418949127,
-0.3820172846317291,
0.6350521445274353,
1.130369782447815,
0.6453629732131958,
-0.5691140294075012,
0.16959604620933533,
-0.7093778252601624,
0.2576439380645752,
-1.386460781097412,
0.28491294384002686,
-2.8888673782348633,
0.6902300715446472,
0.013561525382101536,
-0.015356604941189289,
-0.017937444150447845,
-1.3181593418121338,
1.1473267078399658,
2.5750484466552734,
-1.2047251462936401,
0.4661886990070343,
0.3307815194129944,
1.1273945569992065,
-1.6763194799423218,
0.1724480539560318,
-0.4563463032245636,
2.1093971729278564,
0.09789615869522095,
1.245768427848816,
-0.41622573137283325,
-2.2671282291412354,
0.528307318687439,
-1.2886699438095093,
-1.0628842115402222,
0.9076884388923645,
-0.8383833169937134,
0.07890170067548752,
-1.4124116897583008,
-0.20343279838562012,
-0.9154635667800903,
-1.2004932165145874,
0.8484542369842529,
0.0344373844563961,
0.5235152244567871,
-0.6226518154144287,
0.3563176989555359,
-2.1974093914031982,
-1.3090711832046509,
-0.16744719445705414,
-0.9233822822570801,
0.4268062114715576,
-0.2642044425010681,
0.6306872367858887,
-0.07186852395534515,
0.05109835043549538,
0.31197166442871094,
1.3870090246200562,
3.3601982593536377,
0.22057338058948517,
0.3853149712085724,
-0.026686761528253555,
-0.9836729168891907,
1.5124157667160034,
0.934516191482544,
-0.07007463276386261,
-0.5759202837944031,
-0.9567338228225708,
1.2579426765441895,
1.872055172920227,
1.1351163387298584,
0.06560549885034561,
-0.870903730392456,
-0.7902973890304565,
0.03287745639681816,
0.18326929211616516,
0.5025182962417603,
0.9162352681159973,
-0.0740998238325119,
0.07629722356796265,
1.391634225845337,
1.1922308206558228,
-0.3693646788597107,
0.45632287859916687,
-0.8889219760894775,
-0.40951552987098694,
0.4782642126083374,
0.2607925832271576,
0.03241223469376564,
0.5202472805976868,
-1.0217618942260742,
-0.23937076330184937,
-0.2531339228153229,
-0.9705893397331238,
-0.7093614339828491,
-0.4837813675403595,
-0.35677269101142883,
1.6219626665115356,
0.021555759012699127,
-0.4582977592945099,
-0.003299709875136614,
-0.8459078073501587,
-0.17873267829418182,
-1.1207973957061768,
0.26158958673477173,
-0.16620415449142456,
-0.04286197945475578,
-0.1802232414484024,
1.716307520866394,
-0.9645862579345703,
-2.1441166400909424,
0.2117488533258438,
0.2800462245941162,
-0.4685799181461334,
0.08273175358772278,
1.7293994426727295,
0.4439344108104706,
1.395196557044983,
1.317945122718811,
1.0146894454956055,
-0.6245883703231812,
-1.2868629693984985,
0.7131662964820862,
1.0064737796783447,
-1.2952302694320679,
0.9098503589630127,
-0.12408973276615143,
-0.5489183664321899,
0.6283167600631714,
1.2694591283798218,
0.3510409891605377,
-1.9800704717636108,
0.8095499873161316,
-0.842465877532959,
0.6844394207000732,
0.6243289113044739,
0.8161423802375793,
0.16410554945468903,
0.8302022814750671,
-1.342969536781311,
-1.0900100469589233,
-0.6857530474662781,
-0.5534493327140808,
1.8409409523010254,
-0.1801009625196457,
0.5348457098007202,
-0.20218728482723236,
-1.3153116703033447,
-0.05129507556557655,
0.7219724655151367,
0.32299619913101196,
-0.32366275787353516,
0.8795322179794312,
-0.6388378143310547,
-1.1189323663711548,
-1.4067721366882324,
-0.38806241750717163,
-0.9275293946266174,
-0.7981886267662048,
1.052978754043579,
0.7490537166595459,
0.2601301074028015,
1.9307258129119873,
0.6142286062240601,
0.16391058266162872,
-2.722465991973877,
0.8363199830055237,
0.2871518135070801,
0.03906751424074173,
0.9643133878707886,
0.26427507400512695,
1.167782187461853,
0.032708920538425446,
0.46222734451293945,
-2.4047281742095947,
2.190539598464966,
-0.1721392720937729,
0.7007113695144653,
-0.023959198966622353,
-0.2676290273666382,
1.028117060661316,
0.621545135974884,
0.6196514368057251,
-1.1859586238861084,
0.7255324721336365,
-0.5958893895149231,
1.1283516883850098,
0.8987143039703369,
-0.8807845115661621,
0.0059076277539134026,
1.3420430421829224,
0.4826633334159851,
-0.4389689564704895,
-0.906766414642334,
-0.806936502456665,
0.9830888509750366,
1.7530139684677124,
0.04201697185635567,
0.09918328374624252,
0.8950939178466797,
0.7049285769462585,
-1.2884738445281982,
0.08002210408449173,
-0.6927930116653442,
-0.7268197536468506,
1.770289421081543,
1.9968535900115967,
-0.01916426047682762,
-0.23460665345191956,
-0.8038985133171082,
-1.2104763984680176,
0.794217050075531,
0.02719748020172119,
0.1342371106147766,
0.7190988659858704,
-0.7386177182197571,
1.1522125005722046,
0.8265053629875183,
0.9367892146110535,
0.1332017481327057,
0.31872478127479553,
0.32980382442474365,
-0.322078138589859,
-1.2036950588226318,
-0.27455031871795654,
-1.1128288507461548,
-2.5488548278808594,
0.536295473575592,
-0.2757282257080078,
-1.4596213102340698,
0.021545566618442535,
-1.0655341148376465,
0.9070791006088257,
-0.6055746078491211,
-1.0828949213027954,
-1.472170352935791,
0.36314287781715393,
-0.1289621889591217,
0.8422134518623352,
-1.5176334381103516,
-0.10080359876155853,
1.2748844623565674,
0.8983438611030579,
-0.5612403154373169,
0.9511321783065796,
0.2318371683359146,
1.0368597507476807,
0.8751882314682007,
-0.37932711839675903,
0.445083349943161,
0.19031968712806702,
-1.3847843408584595,
0.4173901081085205,
1.1549975872039795,
0.15378572046756744,
1.4061487913131714,
-0.5195756554603577,
0.0741681158542633,
0.4227311611175537,
-0.46903297305107117,
-0.48140934109687805,
-0.5776074528694153,
0.7128726840019226,
0.04097827151417732,
-1.0204133987426758,
0.07029950618743896,
-0.12933775782585144,
-0.19144181907176971,
0.21862566471099854,
-1.4480700492858887,
-0.25877541303634644,
-0.3436863124370575,
-0.5201325416564941,
-1.329154133796692,
0.04227548465132713,
1.3192806243896484,
-0.7995426058769226,
-0.1765689253807068,
0.541053295135498,
0.28806817531585693,
0.5872645974159241,
0.5862261652946472,
-0.6724625825881958,
-0.2934861481189728,
-0.26880913972854614,
-0.3814130127429962,
0.22994910180568695,
1.2017958164215088,
-0.14247623085975647,
-0.9188363552093506,
0.7120625376701355,
-0.26921001076698303,
0.10139267891645432,
2.0197181701660156,
0.10997354984283447,
-0.8072291612625122,
0.34219351410865784,
-0.6311029195785522,
1.852968454360962,
1.7583140134811401,
1.3534786701202393,
-0.1441870778799057,
-0.8940438628196716,
0.6205101609230042,
-0.32822632789611816,
-0.361524760723114,
0.9427597522735596,
0.48951366543769836,
-0.11361776292324066,
-1.478744387626648,
0.5173660516738892,
1.3669134378433228,
-0.9018384218215942,
-0.7333046197891235,
0.1191934198141098,
-0.8915770053863525,
1.1100568771362305,
0.7342129945755005,
0.3407732844352722,
0.22331587970256805,
1.5677298307418823,
0.681774914264679,
-0.45381927490234375,
0.5115258097648621,
0.4817953109741211,
-0.09935404360294342,
-2.0393269062042236,
-1.032172441482544,
0.31899765133857727,
-0.32481423020362854,
-1.4951144456863403,
1.309694528579712,
-1.2004252672195435,
-0.9855586290359497,
0.5329144597053528,
0.09790866076946259,
1.4108963012695312,
0.30163198709487915,
1.7173657417297363,
2.1028237342834473,
0.8904392123222351,
0.21439588069915771,
1.2740519046783447,
0.0009148381650447845,
-0.3765023350715637,
1.7927511930465698,
-0.47316837310791016,
0.5734736919403076,
1.079831600189209,
-0.3985197842121124,
-1.113799810409546,
-0.7974467277526855,
-1.1967188119888306,
-0.7039563059806824,
1.2184972763061523,
0.16132375597953796,
-1.0685100555419922,
0.21668578684329987,
1.6040536165237427,
0.07217462360858917,
-0.260089248418808,
0.6640614867210388,
0.49114033579826355,
-0.7511732578277588,
-0.0525304451584816,
-0.9198949337005615,
0.5387771725654602,
-0.12958939373493195,
-0.30378103256225586,
0.25561222434043884,
0.5318167209625244,
1.2744464874267578,
0.07463286817073822,
0.11179276555776596,
1.2486544847488403,
-1.3564791679382324,
1.5085803270339966,
-0.7152628302574158,
0.20812804996967316,
-2.3703951835632324,
1.4855799674987793,
-0.8800121545791626,
1.9182980060577393,
-2.5617005825042725,
0.395117849111557,
-0.4960096776485443,
-0.47495219111442566,
0.3045291304588318,
-0.42350128293037415,
0.12385448813438416,
-0.13790161907672882,
-0.9458451867103577,
-0.12726742029190063,
-0.7593727111816406,
0.5660297274589539,
1.1987851858139038,
1.3680675029754639,
-1.1008769273757935,
-0.3904493451118469,
-1.7658833265304565,
-0.24790148437023163,
-0.637447714805603,
0.34572556614875793,
-1.8426551818847656,
-0.20592783391475677,
-2.0004382133483887,
-2.408602237701416,
-1.4088186025619507,
-0.881258487701416,
1.1383774280548096,
0.16944389045238495,
-0.9582687616348267,
1.0643980503082275,
-0.39040133357048035,
-1.7776293754577637,
1.1475245952606201,
-2.130235195159912
] |
https://github.com/huggingface/datasets/issues/5708 | Dataset sizes are in MiB instead of MB in dataset cards | First, I tested some batches to check the changes made. Then I incorporated the MB to GB conversion. Now I'm running the rest. | As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations | 224 | 23 | Dataset sizes are in MiB instead of MB in dataset cards
As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations
First, I tested some batches to check the changes made. Then I incorporated the MB to GB conversion. Now I'm running the rest. | [
-1.2253615856170654,
-0.7664063572883606,
-0.8383656144142151,
1.4474267959594727,
-0.10679659992456436,
-1.2920939922332764,
0.089198037981987,
-1.11149001121521,
1.6050868034362793,
-0.769134521484375,
0.2943383455276489,
-1.7169718742370605,
0.024684257805347443,
-0.5918784737586975,
-0.7493265867233276,
-0.8922246098518372,
-0.45972689986228943,
-0.7743695974349976,
0.9651898741722107,
2.5478193759918213,
1.2483261823654175,
-1.4298933744430542,
2.7061502933502197,
0.7202485799789429,
-0.1689084768295288,
-1.0429116487503052,
0.5269613265991211,
0.026799149811267853,
-1.3127310276031494,
-0.4567360579967499,
-0.8838225603103638,
-0.054250817745923996,
-0.5440441370010376,
-0.5005947947502136,
0.06607182323932648,
0.3915289044380188,
-0.21058568358421326,
-0.35786932706832886,
-0.4738357365131378,
-0.8179881572723389,
0.4827321469783783,
-0.38678014278411865,
0.8941879272460938,
-0.339108407497406,
1.8537967205047607,
-0.6006591320037842,
0.36060038208961487,
0.7259137630462646,
1.3337171077728271,
0.194421648979187,
-0.06913971155881882,
0.3121005892753601,
0.3215813934803009,
-0.06663285195827484,
0.4353368282318115,
1.2054167985916138,
0.7207958102226257,
0.5173201560974121,
0.7461182475090027,
-2.186647891998291,
1.30316960811615,
-0.9893125891685486,
0.24916867911815643,
1.4722999334335327,
-1.036332130432129,
0.3696923851966858,
-1.8803809881210327,
-0.08855262398719788,
0.4732092320919037,
-2.3107187747955322,
0.22647616267204285,
-1.1989190578460693,
-0.5142322778701782,
1.0474815368652344,
0.20637623965740204,
-1.209722876548767,
0.14777632057666779,
-0.4387580156326294,
1.0302666425704956,
0.5082563757896423,
1.2792580127716064,
-1.6281267404556274,
0.035806406289339066,
-0.3117843568325043,
0.11966286599636078,
-1.3531413078308105,
-1.5763686895370483,
0.48782843351364136,
0.5951024889945984,
0.5463030338287354,
-0.09432797878980637,
0.92359858751297,
-0.9532302618026733,
0.7638910412788391,
-0.9051613807678223,
-1.626543641090393,
-1.4593273401260376,
-2.301608085632324,
-2.33305287361145,
0.7549810409545898,
-0.48867571353912354,
-0.5391675233840942,
1.9880799055099487,
-1.0535544157028198,
-1.7877312898635864,
1.098145842552185,
0.3157707452774048,
-0.00642368383705616,
2.4464175701141357,
0.1814807504415512,
-0.7342351078987122,
0.40400415658950806,
-0.7125170826911926,
0.7794262170791626,
-0.3918437957763672,
1.3448114395141602,
0.5326012969017029,
-1.058783769607544,
1.628835916519165,
-0.4580400288105011,
0.468461811542511,
-0.7424061298370361,
-0.4469922184944153,
-0.8569622039794922,
0.31535446643829346,
1.8638317584991455,
-0.3124738335609436,
1.5785024166107178,
-0.22282040119171143,
-1.5942556858062744,
-1.4691194295883179,
0.811323881149292,
0.5042253136634827,
-0.8185436129570007,
0.16146281361579895,
-0.4068748354911804,
0.06556385010480881,
0.013449118472635746,
1.0301414728164673,
1.1619194746017456,
0.6975975632667542,
-0.2931978702545166,
-0.9077708125114441,
0.23693294823169708,
-0.05332278832793236,
-0.6971334218978882,
-1.7518986463546753,
-0.30835333466529846,
0.14979182183742523,
0.5913316011428833,
-1.306565523147583,
1.7775450944900513,
0.8309713006019592,
1.8685358762741089,
1.058925986289978,
-0.3921228349208832,
1.5963332653045654,
-0.0005094241350889206,
1.8621461391448975,
-0.4613302946090698,
0.6911479830741882,
-0.3016335070133209,
-1.2149914503097534,
0.8028174638748169,
-0.3355475068092346,
-2.0519487857818604,
-0.7935523390769958,
-0.8032736778259277,
-0.18938298523426056,
-0.8021841049194336,
1.0267860889434814,
-0.22913195192813873,
-1.2875736951828003,
0.28235873579978943,
-0.5986687541007996,
0.16986910998821259,
-1.3415595293045044,
0.326911985874176,
0.7391273975372314,
-0.6618949174880981,
0.013702698983252048,
-0.3028462529182434,
-1.27915620803833,
-0.48480111360549927,
0.2033262848854065,
1.857531189918518,
-0.7565109133720398,
0.9253507256507874,
1.0657480955123901,
-0.7142888903617859,
0.02157903090119362,
0.3766622841358185,
-0.3167518079280853,
0.9180863499641418,
-1.0516780614852905,
-0.39547112584114075,
1.155387282371521,
-0.1751294881105423,
-0.5694814324378967,
1.4404046535491943,
0.8012961745262146,
-0.9442234039306641,
-0.2403714507818222,
-0.16042394936084747,
-0.9337873458862305,
0.0297471322119236,
-1.5335742235183716,
-0.08384700864553452,
0.27596402168273926,
-1.5138362646102905,
-0.43897101283073425,
-0.21095222234725952,
1.34151291847229,
-0.2543826401233673,
1.4745430946350098,
-0.3910186290740967,
-0.20950524508953094,
-0.39844244718551636,
-0.3402206003665924,
0.2229333221912384,
-0.13335663080215454,
-0.716596782207489,
0.3007515072822571,
-0.7595658898353577,
0.3095807433128357,
1.3531495332717896,
0.4575841426849365,
0.03390294313430786,
0.578263521194458,
1.1278157234191895,
0.2674349546432495,
-0.05050913989543915,
-0.8268266320228577,
-1.6346582174301147,
2.0789568424224854,
-1.4847121238708496,
1.885277509689331,
0.822828471660614,
-0.044041119515895844,
-1.7237457036972046,
-1.799095630645752,
1.3956364393234253,
1.197569727897644,
2.43778657913208,
0.61286461353302,
0.3926672339439392,
-0.8000660538673401,
-0.7136462330818176,
0.31753963232040405,
-1.0663132667541504,
-0.7608674764633179,
0.18308348953723907,
2.335928440093994,
1.7424062490463257,
-0.4930800497531891,
-0.2060030847787857,
-0.9170167446136475,
1.3299003839492798,
-0.19481158256530762,
0.1469886749982834,
1.968622088432312,
-0.25014635920524597,
-1.1257599592208862,
1.2647773027420044,
-2.411484956741333,
0.16271395981311798,
1.9855358600616455,
0.30617228150367737,
0.01872040331363678,
-1.346138834953308,
-0.7061944007873535,
-0.23502254486083984,
-0.5091832876205444,
-1.2257063388824463,
0.4880896806716919,
-0.25879785418510437,
-0.7966296672821045,
-1.4899526834487915,
0.10530528426170349,
-1.1627833843231201,
-1.6289492845535278,
0.34487679600715637,
1.7462100982666016,
2.0411932468414307,
-0.7394111752510071,
1.4347004890441895,
-0.2541816830635071,
0.1563209444284439,
1.207526683807373,
1.2412667274475098,
3.2051496505737305,
1.8538998365402222,
-1.305344581604004,
0.6958609819412231,
-0.13439452648162842,
-0.5598045587539673,
1.1300742626190186,
-1.1092660427093506,
1.229716181755066,
-0.14636661112308502,
-1.284625768661499,
-1.2859349250793457,
0.9083786606788635,
0.45455753803253174,
0.12402074038982391,
-0.5431501865386963,
1.132706642150879,
0.09660504758358002,
1.3572779893875122,
0.5584572553634644,
-0.296633243560791,
0.5026472806930542,
-0.4107609689235687,
-0.5280177593231201,
1.6071826219558716,
0.07849577069282532,
-1.437124490737915,
-2.336056709289551,
-0.20777861773967743,
-0.8114146590232849,
-0.04297548532485962,
-0.6767940521240234,
-1.0181218385696411,
1.6281789541244507,
0.4639146029949188,
-1.2365992069244385,
-0.34944090247154236,
-0.40701282024383545,
-0.6424069404602051,
2.6444292068481445,
-1.4787007570266724,
-0.21418039500713348,
-0.9100364446640015,
-0.5699378252029419,
1.6149239540100098,
-1.112146258354187,
-0.192513570189476,
-0.976865291595459,
-0.5624342560768127,
-1.393515944480896,
-0.6434017419815063,
-0.003977470099925995,
-0.8968077301979065,
0.7747606635093689,
0.11397276818752289,
-1.080817699432373,
-0.25401511788368225,
-0.918555498123169,
0.828583836555481,
-0.12461508065462112,
0.27067694067955017,
1.8441284894943237,
0.47980996966362,
-0.36015647649765015,
0.6455749869346619,
1.135378122329712,
0.6609699130058289,
-0.5518271923065186,
0.14369510114192963,
-0.7247737050056458,
0.2555825710296631,
-1.3218390941619873,
0.3233226239681244,
-2.8678622245788574,
0.6775531768798828,
-0.006305767223238945,
0.006864176131784916,
-0.024270791560411453,
-1.3363429307937622,
1.144129753112793,
2.591688394546509,
-1.187415361404419,
0.4801488518714905,
0.3320606052875519,
1.16512131690979,
-1.686132788658142,
0.2034011334180832,
-0.45629873871803284,
2.1669700145721436,
0.13311778008937836,
1.2064143419265747,
-0.40973857045173645,
-2.347273826599121,
0.5484792590141296,
-1.2869703769683838,
-1.1567026376724243,
0.8892068862915039,
-0.854758083820343,
0.03681056946516037,
-1.39583158493042,
-0.22394274175167084,
-0.9104175567626953,
-1.163157343864441,
0.8531579375267029,
0.05329856649041176,
0.5258395075798035,
-0.6567283868789673,
0.32510778307914734,
-2.224457263946533,
-1.3190903663635254,
-0.18721535801887512,
-0.9209234118461609,
0.38899970054626465,
-0.29688993096351624,
0.6637095808982849,
-0.10239001363515854,
0.05698956176638603,
0.34650641679763794,
1.420525074005127,
3.3131017684936523,
0.2328542172908783,
0.420293927192688,
-0.07867968082427979,
-0.949985921382904,
1.5240744352340698,
0.8839379549026489,
-0.09169141948223114,
-0.5852015614509583,
-0.9538013935089111,
1.2237619161605835,
1.8600170612335205,
1.0676004886627197,
0.04810665175318718,
-0.842023491859436,
-0.713168740272522,
-0.02035447210073471,
0.18145011365413666,
0.4930378496646881,
0.9259057641029358,
-0.09648562222719193,
0.06523144245147705,
1.401718258857727,
1.1952934265136719,
-0.41718220710754395,
0.43326616287231445,
-0.8268250226974487,
-0.42750084400177,
0.5397308468818665,
0.2526959478855133,
-0.005896782502532005,
0.4739634692668915,
-1.01267671585083,
-0.20877882838249207,
-0.2800569534301758,
-0.9634748697280884,
-0.7098289728164673,
-0.4600524604320526,
-0.33983632922172546,
1.6392405033111572,
0.05857938900589943,
-0.4622161388397217,
-0.01507306657731533,
-0.8542579412460327,
-0.16999278962612152,
-1.1329107284545898,
0.24873284995555878,
-0.17620787024497986,
-0.0931352898478508,
-0.14246505498886108,
1.756502389907837,
-0.9588940143585205,
-2.1156744956970215,
0.21462160348892212,
0.2576601505279541,
-0.4482003450393677,
0.10362587869167328,
1.7312740087509155,
0.45377272367477417,
1.436916470527649,
1.3540256023406982,
0.9952885508537292,
-0.6529936194419861,
-1.2939743995666504,
0.732943058013916,
0.9985961318016052,
-1.3168216943740845,
0.8684992790222168,
-0.07418123632669449,
-0.57645583152771,
0.6137006878852844,
1.250128984451294,
0.3484148383140564,
-2.001624345779419,
0.8475809097290039,
-0.875938355922699,
0.6937465667724609,
0.6155884861946106,
0.7809826731681824,
0.16192179918289185,
0.8526463508605957,
-1.2784537076950073,
-1.1072087287902832,
-0.7230338454246521,
-0.5816622376441956,
1.872596025466919,
-0.20838981866836548,
0.5344297885894775,
-0.16761815547943115,
-1.3282697200775146,
-0.04057689383625984,
0.674674391746521,
0.33837470412254333,
-0.30291202664375305,
0.8492734432220459,
-0.6843249797821045,
-1.1743751764297485,
-1.458919882774353,
-0.41896238923072815,
-0.9284130930900574,
-0.8228096961975098,
1.078698992729187,
0.7743063569068909,
0.21007540822029114,
1.8977197408676147,
0.6512806415557861,
0.12428610026836395,
-2.6887598037719727,
0.8048919439315796,
0.2884519696235657,
0.007463171146810055,
0.9251280426979065,
0.29856425523757935,
1.1222423315048218,
0.05711964890360832,
0.4505995810031891,
-2.443821907043457,
2.2338058948516846,
-0.21566233038902283,
0.7593544721603394,
-0.017439892515540123,
-0.25842973589897156,
1.0252069234848022,
0.6430657505989075,
0.6120110154151917,
-1.1591633558273315,
0.7178865075111389,
-0.5839278697967529,
1.1935540437698364,
0.9297608733177185,
-0.8368515372276306,
0.00816392246633768,
1.325912594795227,
0.4896184802055359,
-0.4691716730594635,
-0.9319664835929871,
-0.849620521068573,
0.9805153012275696,
1.7879832983016968,
0.009110652841627598,
0.10571040213108063,
0.8624233603477478,
0.7403106093406677,
-1.2886937856674194,
0.05872427299618721,
-0.7318102121353149,
-0.781794011592865,
1.736738920211792,
2.013357639312744,
-0.03301338106393814,
-0.24959294497966766,
-0.7962555885314941,
-1.2355926036834717,
0.8257178664207458,
0.00001884065568447113,
0.13242581486701965,
0.6914896368980408,
-0.7176392078399658,
1.1103798151016235,
0.9214865565299988,
0.9176769256591797,
0.21056590974330902,
0.29379376769065857,
0.3102096617221832,
-0.27784496545791626,
-1.1449313163757324,
-0.21594662964344025,
-1.116436243057251,
-2.5578949451446533,
0.5219419598579407,
-0.2879105508327484,
-1.4766654968261719,
0.05329267680644989,
-1.0344903469085693,
0.9091620445251465,
-0.5676491260528564,
-1.0624040365219116,
-1.4854004383087158,
0.3312307894229889,
-0.0803215280175209,
0.8413690328598022,
-1.5139963626861572,
-0.09159731864929199,
1.2841945886611938,
0.8976680636405945,
-0.5626150369644165,
0.9552293419837952,
0.2547908425331116,
1.0621668100357056,
0.878832995891571,
-0.40488681197166443,
0.4067494869232178,
0.15108910202980042,
-1.3676437139511108,
0.4433254897594452,
1.1484057903289795,
0.14207926392555237,
1.4365410804748535,
-0.5240694284439087,
0.03893521800637245,
0.3782392144203186,
-0.4380675256252289,
-0.4732385277748108,
-0.62916100025177,
0.746245801448822,
0.010215838439762592,
-0.9390243291854858,
0.09101999551057816,
-0.14480005204677582,
-0.19084084033966064,
0.23064538836479187,
-1.4422743320465088,
-0.224348247051239,
-0.36565327644348145,
-0.5418651700019836,
-1.3059931993484497,
0.020132608711719513,
1.347251534461975,
-0.7925568222999573,
-0.1301572322845459,
0.5449849367141724,
0.33252832293510437,
0.5740218162536621,
0.6001207232475281,
-0.6744943261146545,
-0.33115682005882263,
-0.2554154396057129,
-0.4088299572467804,
0.23640543222427368,
1.2117739915847778,
-0.15363100171089172,
-0.9123810529708862,
0.696422278881073,
-0.19925712049007416,
0.04478570818901062,
1.9617595672607422,
0.1317186951637268,
-0.7864243388175964,
0.3420191705226898,
-0.6568461060523987,
1.9062144756317139,
1.7549992799758911,
1.3634434938430786,
-0.17333367466926575,
-0.9385810494422913,
0.6358785033226013,
-0.35783204436302185,
-0.36596164107322693,
0.8979659080505371,
0.539943277835846,
-0.08720892667770386,
-1.4784351587295532,
0.5539136528968811,
1.321789264678955,
-0.8825308680534363,
-0.719784140586853,
0.09690754115581512,
-0.8342773914337158,
1.1146780252456665,
0.7423664927482605,
0.3698180317878723,
0.21711404621601105,
1.6535507440567017,
0.6767609119415283,
-0.49839335680007935,
0.5054174661636353,
0.5091564655303955,
-0.1008681207895279,
-2.041266679763794,
-1.0920135974884033,
0.31716787815093994,
-0.30243822932243347,
-1.5171762704849243,
1.345275640487671,
-1.1900004148483276,
-0.9448923468589783,
0.5138244032859802,
0.11476746946573257,
1.4167921543121338,
0.3332703411579132,
1.6859288215637207,
2.0788207054138184,
0.9011785984039307,
0.23822498321533203,
1.2933707237243652,
-0.04847181588411331,
-0.40972116589546204,
1.786481261253357,
-0.446452796459198,
0.5150727033615112,
1.1127095222473145,
-0.38665083050727844,
-1.1081178188323975,
-0.8064364194869995,
-1.1964457035064697,
-0.7125065326690674,
1.1960450410842896,
0.12154589593410492,
-1.0853331089019775,
0.23139801621437073,
1.624717116355896,
0.04042545706033707,
-0.300216943025589,
0.6265314817428589,
0.47225040197372437,
-0.733956515789032,
-0.06626327335834503,
-0.9465216994285583,
0.5319284200668335,
-0.17177028954029083,
-0.3464207947254181,
0.27701687812805176,
0.5287634134292603,
1.2870442867279053,
0.053210679441690445,
0.13943175971508026,
1.2287341356277466,
-1.4155856370925903,
1.4475865364074707,
-0.7339646816253662,
0.2060997486114502,
-2.3286848068237305,
1.483730673789978,
-0.8583691120147705,
1.9338932037353516,
-2.581418752670288,
0.39328324794769287,
-0.5291761755943298,
-0.45146629214286804,
0.3076457679271698,
-0.43087565898895264,
0.1306426227092743,
-0.11712151765823364,
-1.0052077770233154,
-0.15092745423316956,
-0.7350078225135803,
0.5828679203987122,
1.171007513999939,
1.3180873394012451,
-1.0609525442123413,
-0.35408899188041687,
-1.7118022441864014,
-0.2556532025337219,
-0.5751252770423889,
0.32937419414520264,
-1.8612412214279175,
-0.23418168723583221,
-2.0285513401031494,
-2.38967227935791,
-1.3842017650604248,
-0.8833166360855103,
1.1601802110671997,
0.18944495916366577,
-0.971180260181427,
1.0905466079711914,
-0.38672715425491333,
-1.7806050777435303,
1.1751973628997803,
-2.1238842010498047
] |
https://github.com/huggingface/datasets/issues/5708 | Dataset sizes are in MiB instead of MB in dataset cards | Thanks a lot!
The sizes now match as expected!
<img width="1446" alt="Capture d’écran 2023-04-05 à 16 10 15" src="https://user-images.githubusercontent.com/1676121/230107044-ac2a76ea-a4fe-4e81-a925-f464b85f5edd.png">
| As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations | 224 | 19 | Dataset sizes are in MiB instead of MB in dataset cards
As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations
Thanks a lot!
The sizes now match as expected!
<img width="1446" alt="Capture d’écran 2023-04-05 à 16 10 15" src="https://user-images.githubusercontent.com/1676121/230107044-ac2a76ea-a4fe-4e81-a925-f464b85f5edd.png">
| [
-1.1935147047042847,
-0.7717230916023254,
-0.811415433883667,
1.4357655048370361,
-0.09520718455314636,
-1.2881561517715454,
0.07582470029592514,
-1.0629013776779175,
1.6163002252578735,
-0.740859866142273,
0.32253989577293396,
-1.6775602102279663,
-0.0020219730213284492,
-0.5701136589050293,
-0.7113025188446045,
-0.8576841950416565,
-0.44354957342147827,
-0.7956995964050293,
1.024743676185608,
2.555070161819458,
1.2874555587768555,
-1.4265217781066895,
2.731818199157715,
0.7354016900062561,
-0.2252345085144043,
-0.9679176211357117,
0.49078646302223206,
0.04089377447962761,
-1.3554177284240723,
-0.4498966634273529,
-0.8778073787689209,
-0.01786154881119728,
-0.5299411416053772,
-0.5160518288612366,
0.028667982667684555,
0.41663214564323425,
-0.21579255163669586,
-0.3800174295902252,
-0.5002936720848083,
-0.817699134349823,
0.49449971318244934,
-0.39445698261260986,
0.8739819526672363,
-0.3318648040294647,
1.8419997692108154,
-0.6109786033630371,
0.35252654552459717,
0.7039538025856018,
1.269080638885498,
0.20180131494998932,
-0.043850112706422806,
0.3030255138874054,
0.3303886651992798,
-0.12833760678768158,
0.4736422300338745,
1.2736053466796875,
0.7410288453102112,
0.5189793109893799,
0.7607125043869019,
-2.1812915802001953,
1.3490314483642578,
-0.9371732473373413,
0.23747387528419495,
1.4508236646652222,
-1.0314637422561646,
0.3766082227230072,
-1.8884104490280151,
-0.08038608729839325,
0.4260570704936981,
-2.3389015197753906,
0.24396146833896637,
-1.2579206228256226,
-0.551964521408081,
0.9955922365188599,
0.17637114226818085,
-1.1957348585128784,
0.14997498691082,
-0.4255666434764862,
1.030214548110962,
0.47792375087738037,
1.265900731086731,
-1.656738042831421,
-0.053366221487522125,
-0.263082891702652,
0.1405414342880249,
-1.352010726928711,
-1.6161712408065796,
0.5037730932235718,
0.5791715979576111,
0.5717578530311584,
-0.0917123407125473,
0.945805549621582,
-0.98349928855896,
0.7727855443954468,
-0.9301517009735107,
-1.636796236038208,
-1.4170774221420288,
-2.2997212409973145,
-2.3174431324005127,
0.749000608921051,
-0.4573798179626465,
-0.5288124084472656,
2.0063250064849854,
-1.0800455808639526,
-1.7689203023910522,
1.0616286993026733,
0.3417665660381317,
-0.01598397269845009,
2.4447832107543945,
0.195132777094841,
-0.7642317414283752,
0.425893634557724,
-0.7305635213851929,
0.7821928858757019,
-0.37422671914100647,
1.357581377029419,
0.5139883756637573,
-1.0384825468063354,
1.609480619430542,
-0.44527971744537354,
0.507425844669342,
-0.7512547969818115,
-0.45579442381858826,
-0.8072564601898193,
0.2791278660297394,
1.8729575872421265,
-0.3442191481590271,
1.5619672536849976,
-0.25334638357162476,
-1.610755443572998,
-1.484604835510254,
0.7961742281913757,
0.5308398008346558,
-0.826328456401825,
0.138693168759346,
-0.4000949263572693,
0.09748611599206924,
0.02329680323600769,
1.0368103981018066,
1.197763204574585,
0.7259827852249146,
-0.320639967918396,
-0.9238690137863159,
0.1831732839345932,
-0.05368000268936157,
-0.6703555583953857,
-1.7102727890014648,
-0.30367955565452576,
0.17090007662773132,
0.5759726166725159,
-1.295983910560608,
1.7982481718063354,
0.8593292236328125,
1.9116861820220947,
1.0226165056228638,
-0.40837010741233826,
1.5929783582687378,
0.03194700926542282,
1.8419761657714844,
-0.47604477405548096,
0.6752265691757202,
-0.3238646984100342,
-1.2227072715759277,
0.8073016405105591,
-0.32307183742523193,
-2.025777578353882,
-0.7347996234893799,
-0.8140028119087219,
-0.1826757937669754,
-0.8223943710327148,
1.0089845657348633,
-0.23471777141094208,
-1.3146765232086182,
0.24003301560878754,
-0.6160421371459961,
0.1600116789340973,
-1.3484511375427246,
0.3153028190135956,
0.7220731973648071,
-0.6412818431854248,
0.07380467653274536,
-0.26547372341156006,
-1.2795878648757935,
-0.5094971060752869,
0.2289218306541443,
1.8590197563171387,
-0.7156588435173035,
0.9255796670913696,
1.0911608934402466,
-0.703889787197113,
0.05511125922203064,
0.3796328008174896,
-0.3120677173137665,
0.9225779175758362,
-1.071911096572876,
-0.33934736251831055,
1.127350091934204,
-0.16016246378421783,
-0.5501209497451782,
1.4293935298919678,
0.8031487464904785,
-0.9391083717346191,
-0.27315276861190796,
-0.1284167468547821,
-0.9101032018661499,
0.017280425876379013,
-1.5036793947219849,
-0.07926896959543228,
0.30540037155151367,
-1.4949733018875122,
-0.4443374276161194,
-0.2502119243144989,
1.3032742738723755,
-0.2584570646286011,
1.4371623992919922,
-0.3585607707500458,
-0.20620711147785187,
-0.40071073174476624,
-0.34757471084594727,
0.18196704983711243,
-0.15796566009521484,
-0.6944191455841064,
0.30713725090026855,
-0.7701334953308105,
0.2532694637775421,
1.4331837892532349,
0.43514132499694824,
0.03348514065146446,
0.48229700326919556,
1.1657814979553223,
0.3101644217967987,
-0.08406659215688705,
-0.8165063858032227,
-1.6063483953475952,
2.053480386734009,
-1.5212886333465576,
1.8855669498443604,
0.8518260717391968,
-0.003134384285658598,
-1.74306321144104,
-1.8559205532073975,
1.3685028553009033,
1.1879620552062988,
2.4988038539886475,
0.6134527325630188,
0.41753530502319336,
-0.7855727076530457,
-0.7170371413230896,
0.35760965943336487,
-1.0669339895248413,
-0.7548092007637024,
0.21549509465694427,
2.325427293777466,
1.7239365577697754,
-0.4875105023384094,
-0.20455795526504517,
-0.9071887135505676,
1.3457094430923462,
-0.14163193106651306,
0.1544957160949707,
1.9471447467803955,
-0.24382442235946655,
-1.108436107635498,
1.2692968845367432,
-2.3875625133514404,
0.16546690464019775,
1.9706844091415405,
0.314959853887558,
0.03472789749503136,
-1.3144891262054443,
-0.7184470891952515,
-0.27008873224258423,
-0.5153921842575073,
-1.2343440055847168,
0.4819335341453552,
-0.260254442691803,
-0.8168504238128662,
-1.5216569900512695,
0.10825905203819275,
-1.1603091955184937,
-1.6452840566635132,
0.32416602969169617,
1.7616463899612427,
2.028813362121582,
-0.7992475628852844,
1.4163745641708374,
-0.28536200523376465,
0.12270969152450562,
1.19797682762146,
1.2871973514556885,
3.222602605819702,
1.841294288635254,
-1.2923892736434937,
0.7114564776420593,
-0.15363803505897522,
-0.5090171694755554,
1.1427332162857056,
-1.1173405647277832,
1.2097723484039307,
-0.14830340445041656,
-1.2844420671463013,
-1.2684955596923828,
0.8954893350601196,
0.4750121533870697,
0.11641675233840942,
-0.5094609260559082,
1.1251426935195923,
0.13228003680706024,
1.3650702238082886,
0.578269362449646,
-0.29010435938835144,
0.5627484917640686,
-0.3823719620704651,
-0.4803299605846405,
1.5839977264404297,
0.0634884163737297,
-1.4319311380386353,
-2.327279567718506,
-0.21487031877040863,
-0.8403726816177368,
-0.025562454015016556,
-0.6712571978569031,
-1.0572634935379028,
1.6462701559066772,
0.4701797068119049,
-1.2375072240829468,
-0.3126635253429413,
-0.40103664994239807,
-0.6103614568710327,
2.591299057006836,
-1.4620773792266846,
-0.15609239041805267,
-0.9540029168128967,
-0.5538018345832825,
1.587684988975525,
-1.1138933897018433,
-0.23996397852897644,
-0.9733694195747375,
-0.5032882690429688,
-1.3726774454116821,
-0.6030194759368896,
-0.02161596342921257,
-0.8636893033981323,
0.7380340099334717,
0.1464604139328003,
-1.0913121700286865,
-0.27616947889328003,
-0.9375302791595459,
0.8332025408744812,
-0.15153923630714417,
0.21984273195266724,
1.8480414152145386,
0.44526511430740356,
-0.34090766310691833,
0.6771915555000305,
1.1347556114196777,
0.6084310412406921,
-0.5636203289031982,
0.13385632634162903,
-0.7506849765777588,
0.29347479343414307,
-1.3336265087127686,
0.28811970353126526,
-2.841423988342285,
0.6602604985237122,
-0.028619516640901566,
-0.00874688196927309,
0.0032084817066788673,
-1.3641360998153687,
1.150748610496521,
2.560945749282837,
-1.1517934799194336,
0.526470422744751,
0.30883461236953735,
1.1511472463607788,
-1.7005460262298584,
0.1884184032678604,
-0.45210111141204834,
2.1302947998046875,
0.15674270689487457,
1.211976408958435,
-0.4616701006889343,
-2.3744637966156006,
0.5098550915718079,
-1.2376923561096191,
-1.130325436592102,
0.8699148893356323,
-0.868817150592804,
0.0533306822180748,
-1.3674482107162476,
-0.2488924115896225,
-0.9449899792671204,
-1.1704145669937134,
0.7861350178718567,
0.04572974517941475,
0.5278270840644836,
-0.6605607271194458,
0.3480737507343292,
-2.219703197479248,
-1.2931488752365112,
-0.17989139258861542,
-0.9143832921981812,
0.4573865830898285,
-0.32368940114974976,
0.6511447429656982,
-0.10484891384840012,
0.03349204733967781,
0.3357737064361572,
1.4352006912231445,
3.316866159439087,
0.22827386856079102,
0.40130898356437683,
-0.088627390563488,
-0.9889460206031799,
1.5184650421142578,
0.9001447558403015,
-0.07889879494905472,
-0.6160591244697571,
-1.0253828763961792,
1.2462749481201172,
1.8522932529449463,
1.0646958351135254,
0.00897290837019682,
-0.8452791571617126,
-0.7716637253761292,
-0.003724511247128248,
0.17614011466503143,
0.45725521445274353,
0.969559907913208,
-0.04195056110620499,
0.07013725489377975,
1.4080344438552856,
1.1897352933883667,
-0.4000701904296875,
0.4386252462863922,
-0.8622665405273438,
-0.4281006157398224,
0.5024094581604004,
0.24805240333080292,
-0.024335991591215134,
0.44857531785964966,
-1.0304856300354004,
-0.20854367315769196,
-0.30024254322052,
-0.9301463961601257,
-0.7347064018249512,
-0.4480663537979126,
-0.32078391313552856,
1.6673659086227417,
0.01462624128907919,
-0.47366514801979065,
-0.0005772355943918228,
-0.8430089354515076,
-0.15898895263671875,
-1.1434476375579834,
0.29551100730895996,
-0.19565577805042267,
-0.08897947520017624,
-0.14659719169139862,
1.7459980249404907,
-0.9327331185340881,
-2.104217052459717,
0.20955996215343475,
0.2407872974872589,
-0.46224746108055115,
0.08839039504528046,
1.7393842935562134,
0.4492773413658142,
1.4386593103408813,
1.341176152229309,
0.9945851564407349,
-0.6623231768608093,
-1.3160170316696167,
0.7496463656425476,
0.9570863842964172,
-1.2940431833267212,
0.8805755972862244,
-0.08446363359689713,
-0.5507398247718811,
0.6037600636482239,
1.2492464780807495,
0.398907870054245,
-2.00044322013855,
0.864376425743103,
-0.8923622965812683,
0.7074474096298218,
0.6738511919975281,
0.8047283291816711,
0.1429421305656433,
0.8394441604614258,
-1.2957673072814941,
-1.1032034158706665,
-0.6703159809112549,
-0.5796160101890564,
1.8241626024246216,
-0.21702422201633453,
0.5410200953483582,
-0.21427175402641296,
-1.2671964168548584,
-0.02307240292429924,
0.6797599196434021,
0.32938146591186523,
-0.3435225784778595,
0.8077422380447388,
-0.6569004058837891,
-1.1604595184326172,
-1.4211676120758057,
-0.42926496267318726,
-0.9447843432426453,
-0.8390363454818726,
1.0304983854293823,
0.7487650513648987,
0.2556435763835907,
1.9423712491989136,
0.6820189952850342,
0.17316372692584991,
-2.6928014755249023,
0.8091779351234436,
0.3222044110298157,
0.030247826129198074,
1.001070261001587,
0.31286531686782837,
1.1087452173233032,
0.04712553322315216,
0.45714271068573,
-2.440825939178467,
2.2695560455322266,
-0.20205801725387573,
0.7854247689247131,
-0.05376503989100456,
-0.2554931640625,
1.0332766771316528,
0.6013596653938293,
0.5796971321105957,
-1.1900311708450317,
0.7317943572998047,
-0.580790638923645,
1.1460708379745483,
0.8568504452705383,
-0.8401374816894531,
0.05257878080010414,
1.2897937297821045,
0.4646191895008087,
-0.4834485650062561,
-0.9201337099075317,
-0.8455222249031067,
0.9490854740142822,
1.8036681413650513,
0.005321545526385307,
0.12881892919540405,
0.8506224155426025,
0.7047816514968872,
-1.3037453889846802,
0.0219246968626976,
-0.667836606502533,
-0.7608111500740051,
1.7644867897033691,
1.99437415599823,
-0.025658786296844482,
-0.25806570053100586,
-0.7386534810066223,
-1.2683823108673096,
0.8477853536605835,
0.05118532478809357,
0.12185680866241455,
0.699315071105957,
-0.7377666234970093,
1.149357557296753,
0.89349365234375,
0.9335506558418274,
0.18383482098579407,
0.2703504264354706,
0.37364956736564636,
-0.3170832395553589,
-1.1648210287094116,
-0.20486050844192505,
-1.1195766925811768,
-2.5608861446380615,
0.513422966003418,
-0.2355230450630188,
-1.4857418537139893,
0.02299315482378006,
-1.028786301612854,
0.8957489132881165,
-0.5813080072402954,
-1.0903034210205078,
-1.4806201457977295,
0.30987119674682617,
-0.11305594444274902,
0.8510757088661194,
-1.5290582180023193,
-0.14318983256816864,
1.2602137327194214,
0.9611741304397583,
-0.5606706738471985,
0.9480808973312378,
0.2240147441625595,
1.026009440422058,
0.8982970118522644,
-0.3805379867553711,
0.42920196056365967,
0.1453392654657364,
-1.388291835784912,
0.401317834854126,
1.2273786067962646,
0.1583271473646164,
1.4447358846664429,
-0.5227693915367126,
0.043973714113235474,
0.38772761821746826,
-0.39441177248954773,
-0.4717274308204651,
-0.5795419812202454,
0.7379451394081116,
0.02409801259636879,
-0.9680782556533813,
0.061787135899066925,
-0.14297769963741302,
-0.1674269437789917,
0.23386605083942413,
-1.4270684719085693,
-0.23931509256362915,
-0.4108703136444092,
-0.5540926456451416,
-1.3075292110443115,
-0.0009144945070147514,
1.330592155456543,
-0.8115017414093018,
-0.1506694257259369,
0.5500288605690002,
0.3004785478115082,
0.561354398727417,
0.5901432037353516,
-0.7066360712051392,
-0.34028512239456177,
-0.22059522569179535,
-0.42540425062179565,
0.263568639755249,
1.2173219919204712,
-0.11633637547492981,
-0.9381710290908813,
0.6481103897094727,
-0.22250904142856598,
0.07109725475311279,
1.9460991621017456,
0.08926154673099518,
-0.7841069102287292,
0.31953972578048706,
-0.6517295241355896,
1.8977934122085571,
1.7698496580123901,
1.374385118484497,
-0.1586371809244156,
-0.9167082905769348,
0.6371142268180847,
-0.3520581126213074,
-0.3664698600769043,
0.9299603700637817,
0.46997037529945374,
-0.15131846070289612,
-1.4998104572296143,
0.5514543652534485,
1.3288440704345703,
-0.9111944437026978,
-0.6977723240852356,
0.10426409542560577,
-0.8271958827972412,
1.1469531059265137,
0.699185848236084,
0.33437469601631165,
0.24647365510463715,
1.6742525100708008,
0.7337357997894287,
-0.4637220799922943,
0.5574947595596313,
0.4980410635471344,
-0.10086722671985626,
-2.07658314704895,
-1.0833466053009033,
0.3039754331111908,
-0.31504279375076294,
-1.4854130744934082,
1.3891781568527222,
-1.1908888816833496,
-1.0051811933517456,
0.5338704586029053,
0.10447730869054794,
1.4006017446517944,
0.33261480927467346,
1.7014940977096558,
2.1304852962493896,
0.8863365650177002,
0.24410288035869598,
1.253859519958496,
-0.09602179378271103,
-0.39299795031547546,
1.7743948698043823,
-0.4875868558883667,
0.5171940922737122,
1.0594444274902344,
-0.4048393964767456,
-1.117363452911377,
-0.7957776784896851,
-1.2301044464111328,
-0.7547222971916199,
1.1891613006591797,
0.10404828935861588,
-1.0625594854354858,
0.285627156496048,
1.6385393142700195,
0.02275271713733673,
-0.3148860037326813,
0.625459611415863,
0.49919936060905457,
-0.7382509112358093,
-0.0810156986117363,
-0.951910138130188,
0.5589486956596375,
-0.13261304795742035,
-0.343975305557251,
0.25442269444465637,
0.5360289216041565,
1.2784318923950195,
0.079290010035038,
0.09639225900173187,
1.2504416704177856,
-1.4096310138702393,
1.4572676420211792,
-0.7813673615455627,
0.18777209520339966,
-2.2925684452056885,
1.4976692199707031,
-0.8556846380233765,
1.9640069007873535,
-2.595689296722412,
0.4132131040096283,
-0.4891112446784973,
-0.4589228332042694,
0.2771855890750885,
-0.4174044132232666,
0.16448482871055603,
-0.12839758396148682,
-0.9688721895217896,
-0.15787674486637115,
-0.756145179271698,
0.572498083114624,
1.1731593608856201,
1.3521991968154907,
-1.0842821598052979,
-0.3449556231498718,
-1.7016805410385132,
-0.2020087093114853,
-0.5947715640068054,
0.2530527710914612,
-1.8583080768585205,
-0.23067855834960938,
-2.023751974105835,
-2.378934383392334,
-1.3529703617095947,
-0.8738223314285278,
1.1519025564193726,
0.1897713541984558,
-0.9327629804611206,
1.0763896703720093,
-0.39182576537132263,
-1.7898443937301636,
1.190352439880371,
-2.1260604858398438
] |
https://github.com/huggingface/datasets/issues/5708 | Dataset sizes are in MiB instead of MB in dataset cards | I made another bulk edit of ancient canonical datasets that were moved to community organization. I have parsed 11 datasets and opened a PR on 3 of them:
- [ ] "allenai/scicite": https://huggingface.co/datasets/allenai/scicite/discussions/3
- [ ] "allenai/scifact": https://huggingface.co/datasets/allenai/scifact/discussions/2
- [x] "dair-ai/emotion": https://huggingface.co/datasets/dair-ai/emotion/discussions/6 | As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations | 224 | 42 | Dataset sizes are in MiB instead of MB in dataset cards
As @severo reported in an internal discussion (https://github.com/huggingface/moon-landing/issues/5929):
Now we show the dataset size:
- from the dataset card (in the side column)
- from the datasets-server (in the viewer)
But, even if the size is the same, we see a mismatch because the viewer shows MB, while the info from the README generally shows MiB (even if it's written MB -> https://huggingface.co/datasets/blimp/blob/main/README.md?code=true#L1932)
<img width="664" alt="Capture d’écran 2023-04-04 à 10 16 01" src="https://user-images.githubusercontent.com/1676121/229730887-0bd8fa6e-9462-46c6-bd4e-4d2c5784cabb.png">
TODO: Values to be fixed in: `Size of downloaded dataset files:`, `Size of the generated dataset:` and `Total amount of disk used:`
- [x] Bulk edit on the Hub to fix this in all canonical datasets
- [x] Bulk PR on the Hub to fix ancient canonical datasets that were moved to organizations
I made another bulk edit of ancient canonical datasets that were moved to community organization. I have parsed 11 datasets and opened a PR on 3 of them:
- [ ] "allenai/scicite": https://huggingface.co/datasets/allenai/scicite/discussions/3
- [ ] "allenai/scifact": https://huggingface.co/datasets/allenai/scifact/discussions/2
- [x] "dair-ai/emotion": https://huggingface.co/datasets/dair-ai/emotion/discussions/6 | [
-1.1573801040649414,
-0.8201228380203247,
-0.865340530872345,
1.4684096574783325,
-0.08929367363452911,
-1.2788543701171875,
0.07812592387199402,
-1.0435172319412231,
1.6008310317993164,
-0.6957985758781433,
0.32823997735977173,
-1.7212263345718384,
-0.08405008912086487,
-0.589867115020752,
-0.6965566873550415,
-0.8671836853027344,
-0.40662041306495667,
-0.8006373047828674,
0.9482797384262085,
2.562835693359375,
1.2828741073608398,
-1.4056793451309204,
2.7463181018829346,
0.7213723659515381,
-0.23314110934734344,
-1.004036545753479,
0.5681824088096619,
0.053170088678598404,
-1.3273224830627441,
-0.445596307516098,
-0.86507648229599,
0.011623959057033062,
-0.5166165232658386,
-0.45480257272720337,
0.07688681036233902,
0.4237658679485321,
-0.19896705448627472,
-0.32784172892570496,
-0.5434494614601135,
-0.7930784225463867,
0.48502427339553833,
-0.35079121589660645,
0.8850814700126648,
-0.3554903566837311,
1.814009666442871,
-0.6348143219947815,
0.2993105947971344,
0.707532525062561,
1.2603617906570435,
0.20554427802562714,
0.015541200526058674,
0.26801708340644836,
0.3465479910373688,
-0.06676717847585678,
0.5148593187332153,
1.281457781791687,
0.6800883412361145,
0.5210384726524353,
0.7386490702629089,
-2.1938281059265137,
1.2829225063323975,
-0.9039433598518372,
0.2765350043773651,
1.443692684173584,
-0.9761253595352173,
0.37682870030403137,
-1.8814842700958252,
-0.09479295462369919,
0.495800644159317,
-2.2929396629333496,
0.1982540637254715,
-1.2435094118118286,
-0.5514083504676819,
0.9619275331497192,
0.19062954187393188,
-1.2053858041763306,
0.21533866226673126,
-0.4611346423625946,
1.051703691482544,
0.5200718641281128,
1.2972328662872314,
-1.612055778503418,
0.00005245767533779144,
-0.2198699712753296,
0.09574814885854721,
-1.3202258348464966,
-1.6165393590927124,
0.49593546986579895,
0.584267795085907,
0.6277428865432739,
-0.1091575175523758,
0.8993187546730042,
-0.9896201491355896,
0.8001299500465393,
-0.9035021066665649,
-1.6823954582214355,
-1.4586608409881592,
-2.3046069145202637,
-2.2935938835144043,
0.8007693886756897,
-0.46451112627983093,
-0.46825918555259705,
1.918973445892334,
-1.0320521593093872,
-1.803138017654419,
1.0255377292633057,
0.3926609456539154,
0.0028242450207471848,
2.4193456172943115,
0.2335532158613205,
-0.754903256893158,
0.4132039248943329,
-0.6998288631439209,
0.757892370223999,
-0.3219223618507385,
1.3126375675201416,
0.5429354906082153,
-1.0359379053115845,
1.628458023071289,
-0.46582257747650146,
0.5262409448623657,
-0.7511028051376343,
-0.4606547951698303,
-0.8051747679710388,
0.2605849504470825,
1.827487587928772,
-0.3738192617893219,
1.5682191848754883,
-0.23711638152599335,
-1.6206154823303223,
-1.4954726696014404,
0.7536855340003967,
0.547907829284668,
-0.8187761306762695,
0.08813644200563431,
-0.47491469979286194,
0.08202866464853287,
0.003145640715956688,
1.0844922065734863,
1.1235095262527466,
0.7330198884010315,
-0.28954368829727173,
-0.8732630610466003,
0.2254384458065033,
-0.014441725797951221,
-0.70679771900177,
-1.7487621307373047,
-0.3043119013309479,
0.2338845431804657,
0.578193187713623,
-1.3112341165542603,
1.7595223188400269,
0.8292999267578125,
1.948647379875183,
1.058213233947754,
-0.40132129192352295,
1.595471978187561,
-0.012186557985842228,
1.8417984247207642,
-0.4914219379425049,
0.6120930314064026,
-0.3040609061717987,
-1.2116756439208984,
0.7875258922576904,
-0.3672531545162201,
-2.0490434169769287,
-0.7528971433639526,
-0.8360754251480103,
-0.16453512012958527,
-0.8332176804542542,
1.0019639730453491,
-0.2507655918598175,
-1.3387001752853394,
0.16858148574829102,
-0.6497456431388855,
0.11597584187984467,
-1.306592583656311,
0.23938626050949097,
0.7517112493515015,
-0.6670743227005005,
-0.01647832617163658,
-0.2394724041223526,
-1.3002194166183472,
-0.5123672485351562,
0.27101001143455505,
1.8852291107177734,
-0.7131897211074829,
0.923301637172699,
1.081717610359192,
-0.7278143763542175,
0.10132899880409241,
0.3548957109451294,
-0.324872225522995,
0.9105480313301086,
-1.0353888273239136,
-0.3942165970802307,
1.090293288230896,
-0.11918304860591888,
-0.6314826011657715,
1.4699524641036987,
0.8235182166099548,
-0.9545513987541199,
-0.32456159591674805,
-0.1299889236688614,
-0.8957910537719727,
-0.02046782150864601,
-1.5142067670822144,
-0.09591670334339142,
0.24385111033916473,
-1.465808391571045,
-0.45931944251060486,
-0.22711196541786194,
1.3449687957763672,
-0.2511757016181946,
1.422929286956787,
-0.3216617703437805,
-0.20095796883106232,
-0.39255234599113464,
-0.4102852940559387,
0.18228860199451447,
-0.17041246592998505,
-0.7132284641265869,
0.3476542532444,
-0.8060974478721619,
0.2815572917461395,
1.4315598011016846,
0.45055583119392395,
-0.0011181794106960297,
0.5415331721305847,
1.1665812730789185,
0.3173792362213135,
-0.0629250779747963,
-0.8408095240592957,
-1.6179890632629395,
2.0668232440948486,
-1.4799039363861084,
1.881067156791687,
0.8453080654144287,
-0.046012770384550095,
-1.7849476337432861,
-1.8993754386901855,
1.370979905128479,
1.170316457748413,
2.4943742752075195,
0.5758638381958008,
0.4046753942966461,
-0.7670246958732605,
-0.7481756806373596,
0.3369981646537781,
-1.0030605792999268,
-0.7427237629890442,
0.1936725676059723,
2.341625213623047,
1.7886580228805542,
-0.5415270924568176,
-0.22774028778076172,
-0.9042381048202515,
1.2762938737869263,
-0.19310209155082703,
0.1265382617712021,
2.0337300300598145,
-0.23534740507602692,
-1.0640462636947632,
1.3228259086608887,
-2.3926937580108643,
0.20963497459888458,
2.001264810562134,
0.314653605222702,
0.017439089715480804,
-1.3783543109893799,
-0.7270245552062988,
-0.27483755350112915,
-0.5492023229598999,
-1.2522258758544922,
0.49611517786979675,
-0.2580384910106659,
-0.9042261838912964,
-1.4802261590957642,
0.014937582425773144,
-1.1636046171188354,
-1.6768074035644531,
0.37505409121513367,
1.7514864206314087,
2.020343780517578,
-0.8191618323326111,
1.3907569646835327,
-0.25464949011802673,
0.06758134812116623,
1.2287311553955078,
1.2789332866668701,
3.2205488681793213,
1.8412048816680908,
-1.3336139917373657,
0.751187264919281,
-0.150277242064476,
-0.5135111212730408,
1.1203408241271973,
-1.1075079441070557,
1.1453303098678589,
-0.23567968606948853,
-1.2991864681243896,
-1.2709851264953613,
0.992383599281311,
0.491806298494339,
0.08441470563411713,
-0.5637664794921875,
1.0964971780776978,
0.10080872476100922,
1.329244613647461,
0.6310072541236877,
-0.33423101902008057,
0.5120357275009155,
-0.32888686656951904,
-0.5015015006065369,
1.5814238786697388,
0.06744494289159775,
-1.4641432762145996,
-2.3301379680633545,
-0.1699390411376953,
-0.8710174560546875,
-0.1254040002822876,
-0.668613076210022,
-1.0604639053344727,
1.6284390687942505,
0.47715914249420166,
-1.2759685516357422,
-0.3247634470462799,
-0.36653387546539307,
-0.5789543986320496,
2.636474370956421,
-1.4212818145751953,
-0.14639736711978912,
-0.9642993211746216,
-0.49676230549812317,
1.6249172687530518,
-1.1063392162322998,
-0.18541540205478668,
-0.9959239959716797,
-0.6000325679779053,
-1.359025239944458,
-0.5910948514938354,
0.057007934898138046,
-0.8407043218612671,
0.7683976292610168,
0.056364756077528,
-1.0562888383865356,
-0.21333301067352295,
-0.9285308122634888,
0.9368396401405334,
-0.17258037626743317,
0.22621162235736847,
1.9026888608932495,
0.43782028555870056,
-0.35667604207992554,
0.6243717670440674,
1.1497982740402222,
0.6469277143478394,
-0.6180630326271057,
0.14505386352539062,
-0.7182521820068359,
0.2756337821483612,
-1.4210429191589355,
0.26972395181655884,
-2.8534011840820312,
0.6958760023117065,
-0.014086644165217876,
-0.046941883862018585,
0.014420648105442524,
-1.330148696899414,
1.116025686264038,
2.5376360416412354,
-1.1754720211029053,
0.4829247295856476,
0.3533451557159424,
1.1586874723434448,
-1.6701141595840454,
0.17675678431987762,
-0.4878680408000946,
2.095167398452759,
0.12219057977199554,
1.2071927785873413,
-0.43014243245124817,
-2.1980621814727783,
0.527227520942688,
-1.3027098178863525,
-1.0425834655761719,
0.8592786192893982,
-0.8751306533813477,
0.1451411247253418,
-1.4593461751937866,
-0.1700226217508316,
-0.9412221312522888,
-1.1650512218475342,
0.8121902346611023,
0.07085146009922028,
0.4575888514518738,
-0.6524754166603088,
0.36725887656211853,
-2.1747701168060303,
-1.3169050216674805,
-0.13856403529644012,
-0.9226080775260925,
0.4801503121852875,
-0.2928723096847534,
0.6628338694572449,
-0.07821694016456604,
-0.016031403094530106,
0.3000558018684387,
1.3624974489212036,
3.352653980255127,
0.20348332822322845,
0.34178221225738525,
-0.06216895207762718,
-0.994272768497467,
1.5103777647018433,
0.9253474473953247,
-0.0641343891620636,
-0.5925372242927551,
-1.0195060968399048,
1.2891855239868164,
1.9042446613311768,
1.2048569917678833,
0.10216289013624191,
-0.904891848564148,
-0.8047373294830322,
0.002558312378823757,
0.22456149756908417,
0.515419602394104,
0.9180645942687988,
-0.09759218990802765,
0.09469040483236313,
1.401737093925476,
1.1848350763320923,
-0.34980443120002747,
0.49609610438346863,
-0.9215108752250671,
-0.41032442450523376,
0.4924236238002777,
0.234758660197258,
0.051838427782058716,
0.5111061930656433,
-1.0960693359375,
-0.2790960967540741,
-0.251880407333374,
-0.9265550374984741,
-0.7006270885467529,
-0.47526323795318604,
-0.3333999514579773,
1.6168875694274902,
0.02576175332069397,
-0.4909609258174896,
0.004758899100124836,
-0.8387682437896729,
-0.21278904378414154,
-1.125314474105835,
0.30515435338020325,
-0.1954898089170456,
-0.03813278675079346,
-0.1848231554031372,
1.6963098049163818,
-0.9464395046234131,
-2.126469373703003,
0.18491412699222565,
0.26993027329444885,
-0.4988405108451843,
0.10366414487361908,
1.7178908586502075,
0.4964868128299713,
1.3561619520187378,
1.3205277919769287,
0.9962058067321777,
-0.621612012386322,
-1.2820749282836914,
0.6663258671760559,
1.0040704011917114,
-1.277309775352478,
0.9281637072563171,
-0.1775411069393158,
-0.5778329968452454,
0.6445878148078918,
1.2959963083267212,
0.32272469997406006,
-1.9883801937103271,
0.8382478356361389,
-0.8250800371170044,
0.6876876354217529,
0.6304810643196106,
0.8408758640289307,
0.19859488308429718,
0.8120754957199097,
-1.3643728494644165,
-1.1073843240737915,
-0.7010884881019592,
-0.5708512663841248,
1.8229361772537231,
-0.15506839752197266,
0.5441285967826843,
-0.22488705813884735,
-1.2946723699569702,
-0.06921511888504028,
0.6974524855613708,
0.3622509241104126,
-0.3768638074398041,
0.8586637377738953,
-0.6346546411514282,
-1.0622843503952026,
-1.3249006271362305,
-0.38558292388916016,
-0.9228218197822571,
-0.8177636861801147,
1.0413366556167603,
0.785401463508606,
0.3498806059360504,
1.9417870044708252,
0.6290581822395325,
0.2095908671617508,
-2.683986186981201,
0.815883994102478,
0.2888007164001465,
0.02016422525048256,
0.9616938233375549,
0.2951675355434418,
1.174293041229248,
0.03154025599360466,
0.49557337164878845,
-2.404961585998535,
2.1953186988830566,
-0.14987340569496155,
0.7050732374191284,
-0.016695592552423477,
-0.23712722957134247,
1.0613518953323364,
0.6115208268165588,
0.5882412791252136,
-1.151121973991394,
0.7231743931770325,
-0.5646704435348511,
1.097246527671814,
0.8855472803115845,
-0.8421241044998169,
0.03499547764658928,
1.3186923265457153,
0.5079628229141235,
-0.42253050208091736,
-0.9321811199188232,
-0.7733938694000244,
0.9735754132270813,
1.7677379846572876,
0.03464167192578316,
0.11063794046640396,
0.9226503968238831,
0.6883522868156433,
-1.314370036125183,
0.0451461486518383,
-0.6945474147796631,
-0.7223984599113464,
1.7676446437835693,
1.98287832736969,
-0.03449061140418053,
-0.18639492988586426,
-0.7721332311630249,
-1.23848557472229,
0.7927847504615784,
-0.016291547566652298,
0.13833239674568176,
0.7350109219551086,
-0.7371795773506165,
1.1802952289581299,
0.8067264556884766,
0.9448456764221191,
0.07327660918235779,
0.3208754360675812,
0.3319316506385803,
-0.3019896447658539,
-1.220271110534668,
-0.30288684368133545,
-1.09841787815094,
-2.519719123840332,
0.5166410803794861,
-0.2761150300502777,
-1.4284989833831787,
0.00480705127120018,
-1.057418704032898,
0.915800154209137,
-0.6355781555175781,
-1.0488152503967285,
-1.4402012825012207,
0.40688836574554443,
-0.10216519236564636,
0.8722621202468872,
-1.558561086654663,
-0.1328258216381073,
1.232138991355896,
0.901688814163208,
-0.5352455973625183,
0.9023004770278931,
0.2397836148738861,
1.0306727886199951,
0.8635246157646179,
-0.35945066809654236,
0.42085322737693787,
0.16732178628444672,
-1.3709971904754639,
0.38039782643318176,
1.1889175176620483,
0.17325688898563385,
1.421154499053955,
-0.5344849228858948,
0.09208820015192032,
0.4336927831172943,
-0.4421986937522888,
-0.4680314362049103,
-0.6021737456321716,
0.7031891942024231,
0.04623847082257271,
-1.0226364135742188,
-0.01247011311352253,
-0.09069465845823288,
-0.18020318448543549,
0.21114854514598846,
-1.4275007247924805,
-0.243145152926445,
-0.367211252450943,
-0.5280477404594421,
-1.3118027448654175,
0.07142338901758194,
1.2978073358535767,
-0.8436520099639893,
-0.17982882261276245,
0.5612728595733643,
0.27078571915626526,
0.5834121108055115,
0.5794904232025146,
-0.7083698511123657,
-0.3173960745334625,
-0.264803946018219,
-0.40247324109077454,
0.20964869856834412,
1.2475817203521729,
-0.1345711648464203,
-0.9312468767166138,
0.6848869323730469,
-0.2980417311191559,
0.11644721031188965,
2.0631906986236572,
0.05840769037604332,
-0.7701090574264526,
0.3358455002307892,
-0.6520802974700928,
1.8508380651474,
1.753156304359436,
1.389559030532837,
-0.16307374835014343,
-0.886418879032135,
0.5903591513633728,
-0.32932016253471375,
-0.39483189582824707,
0.9447895884513855,
0.4539003074169159,
-0.13581956923007965,
-1.5094382762908936,
0.4988225996494293,
1.3871792554855347,
-0.9641401767730713,
-0.695282518863678,
0.131703183054924,
-0.8987376093864441,
1.1380705833435059,
0.7002041935920715,
0.3157387971878052,
0.2574058175086975,
1.5474915504455566,
0.6860556602478027,
-0.4318626821041107,
0.47260361909866333,
0.542348325252533,
-0.0961105152964592,
-2.060523271560669,
-1.045990228652954,
0.3011401295661926,
-0.2933434844017029,
-1.545990228652954,
1.3368983268737793,
-1.2319189310073853,
-0.974774956703186,
0.5527827143669128,
0.10834343731403351,
1.3529428243637085,
0.3317819833755493,
1.738828420639038,
2.117893695831299,
0.8837565779685974,
0.25022321939468384,
1.2986760139465332,
-0.037647753953933716,
-0.38841772079467773,
1.7693990468978882,
-0.478622168302536,
0.5824270248413086,
1.018413782119751,
-0.39071646332740784,
-1.1413551568984985,
-0.7925027012825012,
-1.2090598344802856,
-0.7225913405418396,
1.2340673208236694,
0.16424836218357086,
-1.071434497833252,
0.24803857505321503,
1.6159921884536743,
0.039346013218164444,
-0.30183303356170654,
0.6760086417198181,
0.4784291982650757,
-0.719131588935852,
-0.044873181730508804,
-0.9193779230117798,
0.5493682026863098,
-0.09480465948581696,
-0.33110401034355164,
0.2449607104063034,
0.5396637916564941,
1.303023338317871,
0.03743568807840347,
0.1067495346069336,
1.2977817058563232,
-1.366869568824768,
1.5069659948349,
-0.762093722820282,
0.20459935069084167,
-2.4143991470336914,
1.4981764554977417,
-0.8672048449516296,
1.9007222652435303,
-2.5319108963012695,
0.43548670411109924,
-0.4792720079421997,
-0.4630536735057831,
0.24604599177837372,
-0.3827912509441376,
0.12820079922676086,
-0.1234208345413208,
-0.9706969261169434,
-0.11139135807752609,
-0.7828126549720764,
0.5776795744895935,
1.2192260026931763,
1.363688588142395,
-1.0958255529403687,
-0.3778237998485565,
-1.7472708225250244,
-0.24751034379005432,
-0.6225264668464661,
0.2828315198421478,
-1.8810784816741943,
-0.2006242573261261,
-1.9611880779266357,
-2.421788454055786,
-1.4443014860153198,
-0.8728823661804199,
1.142289161682129,
0.2048420011997223,
-0.9867708683013916,
1.0748260021209717,
-0.42913562059402466,
-1.7677181959152222,
1.1180925369262695,
-2.1826703548431396
] |
https://github.com/huggingface/datasets/issues/5706 | Support categorical data types for Parquet | Hi ! We could definitely a type that holds the categories and uses a DictionaryType storage. There's a ClassLabel type that is similar with a 'names' parameter (similar to a id2label in deep learning frameworks) that uses an integer array as storage.
It can be added in `features.py`. Here are some pointers:
- the conversion from HF type to PyArrow type is done in `get_nested_type`
- the conversion from Pyarrow type to HF type is done in `generate_from_arrow_type`
- `encode_nested_example` and `decode_nested_example` are used to do user's value (what users see) <-> storage value (what is in the pyarrow.array) if there's any conversion to do | ### Feature request
Huggingface datasets does not seem to support categorical / dictionary data types for Parquet as of now. There seems to be a `TODO` in the code for this feature but no implementation yet. Below you can find sample code to reproduce the error that is currently thrown when attempting to read a Parquet file with categorical columns:
```python
import pandas as pd
import pyarrow.parquet as pq
from datasets import load_dataset
# Create categorical sample DataFrame
df = pd.DataFrame({'type': ['foo', 'bar']}).astype('category')
df.to_parquet('data.parquet')
# Read back as pyarrow table
table = pq.read_table('data.parquet')
print(table.schema)
# type: dictionary<values=string, indices=int32, ordered=0>
# Load with huggingface datasets
load_dataset('parquet', data_files='data.parquet')
```
Error:
```
Traceback (most recent call last):
File ".venv/lib/python3.10/site-packages/datasets/builder.py", line 1875, in _prepare_split_single
writer.write_table(table)
File ".venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 566, in write_table
self._build_writer(inferred_schema=pa_table.schema)
File ".venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 379, in _build_writer
inferred_features = Features.from_arrow_schema(inferred_schema)
File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1622, in from_arrow_schema
obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema}
File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1622, in <dictcomp>
obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema}
File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1361, in generate_from_arrow_type
raise NotImplementedError # TODO(thom) this will need access to the dictionary as well (for labels). I.e. to the py_table
NotImplementedError
```
### Motivation
Categorical data types, as offered by Pandas and implemented with the `DictionaryType` dtype in `pyarrow` can significantly reduce dataset size and are a handy way to turn textual features into numerical representations and back. Lack of support in Huggingface datasets greatly reduces compatibility with a common Pandas / Parquet feature.
### Your contribution
I could provide a PR. However, it would be nice to have an initial complexity estimate from one of the core developers first. | 225 | 105 | Support categorical data types for Parquet
### Feature request
Huggingface datasets does not seem to support categorical / dictionary data types for Parquet as of now. There seems to be a `TODO` in the code for this feature but no implementation yet. Below you can find sample code to reproduce the error that is currently thrown when attempting to read a Parquet file with categorical columns:
```python
import pandas as pd
import pyarrow.parquet as pq
from datasets import load_dataset
# Create categorical sample DataFrame
df = pd.DataFrame({'type': ['foo', 'bar']}).astype('category')
df.to_parquet('data.parquet')
# Read back as pyarrow table
table = pq.read_table('data.parquet')
print(table.schema)
# type: dictionary<values=string, indices=int32, ordered=0>
# Load with huggingface datasets
load_dataset('parquet', data_files='data.parquet')
```
Error:
```
Traceback (most recent call last):
File ".venv/lib/python3.10/site-packages/datasets/builder.py", line 1875, in _prepare_split_single
writer.write_table(table)
File ".venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 566, in write_table
self._build_writer(inferred_schema=pa_table.schema)
File ".venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 379, in _build_writer
inferred_features = Features.from_arrow_schema(inferred_schema)
File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1622, in from_arrow_schema
obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema}
File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1622, in <dictcomp>
obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema}
File ".venv/lib/python3.10/site-packages/datasets/features/features.py", line 1361, in generate_from_arrow_type
raise NotImplementedError # TODO(thom) this will need access to the dictionary as well (for labels). I.e. to the py_table
NotImplementedError
```
### Motivation
Categorical data types, as offered by Pandas and implemented with the `DictionaryType` dtype in `pyarrow` can significantly reduce dataset size and are a handy way to turn textual features into numerical representations and back. Lack of support in Huggingface datasets greatly reduces compatibility with a common Pandas / Parquet feature.
### Your contribution
I could provide a PR. However, it would be nice to have an initial complexity estimate from one of the core developers first.
Hi ! We could definitely a type that holds the categories and uses a DictionaryType storage. There's a ClassLabel type that is similar with a 'names' parameter (similar to a id2label in deep learning frameworks) that uses an integer array as storage.
It can be added in `features.py`. Here are some pointers:
- the conversion from HF type to PyArrow type is done in `get_nested_type`
- the conversion from Pyarrow type to HF type is done in `generate_from_arrow_type`
- `encode_nested_example` and `decode_nested_example` are used to do user's value (what users see) <-> storage value (what is in the pyarrow.array) if there's any conversion to do | [
-1.2156469821929932,
-0.9089517593383789,
-0.6239255666732788,
1.5814688205718994,
-0.16109225153923035,
-1.3004839420318604,
0.14531029760837555,
-1.0219446420669556,
1.5611436367034912,
-0.7600907683372498,
0.21801573038101196,
-1.6442843675613403,
0.02730175107717514,
-0.49609190225601196,
-0.7165215015411377,
-0.849928081035614,
-0.38078373670578003,
-0.8251489400863647,
1.0926223993301392,
2.4331188201904297,
1.257759690284729,
-1.3926628828048706,
2.7247445583343506,
0.7244232296943665,
-0.24364252388477325,
-1.0607401132583618,
0.517295241355896,
0.04494762420654297,
-1.3060694932937622,
-0.41370710730552673,
-1.0017225742340088,
-0.04847768321633339,
-0.5553732514381409,
-0.4601821303367615,
0.1376817226409912,
0.46780529618263245,
-0.2717314660549164,
-0.3912774622440338,
-0.6422421932220459,
-0.7265757918357849,
0.43996042013168335,
-0.3635905385017395,
0.9142528176307678,
-0.3243756890296936,
1.7653026580810547,
-0.5935631990432739,
0.39042726159095764,
0.7276389002799988,
1.3207199573516846,
0.12071619182825089,
-0.0567796565592289,
0.3260515034198761,
0.37707918882369995,
0.024455681443214417,
0.5912622213363647,
1.2395248413085938,
0.6224172115325928,
0.4522618353366852,
0.7270913124084473,
-2.272087574005127,
1.3234184980392456,
-1.0046495199203491,
0.3196498453617096,
1.248194694519043,
-0.899227499961853,
0.4074035882949829,
-1.7283046245574951,
-0.023562105372548103,
0.6294363141059875,
-2.2563552856445312,
0.2900219261646271,
-1.3972541093826294,
-0.5455905795097351,
0.8886551856994629,
0.3566215932369232,
-1.1806244850158691,
0.1930646151304245,
-0.452131450176239,
1.064163088798523,
0.4566037952899933,
1.044838547706604,
-1.6697940826416016,
0.06759265810251236,
-0.20688942074775696,
0.09222520887851715,
-1.2673894166946411,
-1.6013139486312866,
0.5700955390930176,
0.7395004034042358,
0.6456283330917358,
-0.14051270484924316,
1.0625004768371582,
-1.1459852457046509,
0.7920024394989014,
-0.9463873505592346,
-1.627617359161377,
-1.4246447086334229,
-2.3565073013305664,
-2.2618892192840576,
0.7008573412895203,
-0.5818814039230347,
-0.4450676441192627,
2.054821491241455,
-1.0279277563095093,
-1.7409287691116333,
1.133286952972412,
0.2634623348712921,
0.029013697057962418,
2.322800397872925,
0.23087334632873535,
-0.6975533962249756,
0.35091355443000793,
-0.7241982817649841,
0.7145505547523499,
-0.3707113265991211,
1.3064863681793213,
0.4775409996509552,
-0.9618312120437622,
1.5878679752349854,
-0.3959254324436188,
0.5674995183944702,
-0.5988606214523315,
-0.47935032844543457,
-0.7618218660354614,
0.2863371968269348,
1.9221231937408447,
-0.2979852855205536,
1.501944661140442,
-0.34810343384742737,
-1.6075469255447388,
-1.575524926185608,
0.8622927069664001,
0.4753029942512512,
-0.8202807903289795,
0.08512554317712784,
-0.4401715397834778,
0.17506656050682068,
-0.01997472532093525,
1.208140254020691,
1.2631137371063232,
0.7416458129882812,
-0.3805626332759857,
-0.8421177864074707,
0.13313856720924377,
-0.08193653076887131,
-0.5701051950454712,
-1.8908579349517822,
-0.3126693069934845,
0.20692455768585205,
0.6347671747207642,
-1.185461163520813,
1.7311509847640991,
0.9147330522537231,
1.9170668125152588,
0.9798449873924255,
-0.34050193428993225,
1.528586983680725,
0.0682053416967392,
1.8334665298461914,
-0.5355739593505859,
0.6048454642295837,
-0.40013575553894043,
-1.1741870641708374,
0.8831109404563904,
-0.30050742626190186,
-1.988999843597412,
-0.7787360548973083,
-0.7423741817474365,
-0.22845615446567535,
-0.7598592638969421,
0.848295271396637,
-0.3419025242328644,
-1.48069429397583,
0.15810948610305786,
-0.7054094076156616,
0.19276775419712067,
-1.1514177322387695,
0.27158495783805847,
0.7430109977722168,
-0.6829821467399597,
0.043941840529441833,
-0.3309401869773865,
-1.3127760887145996,
-0.4763738512992859,
0.3781796991825104,
1.889350175857544,
-0.7117419838905334,
0.9032258987426758,
1.0813238620758057,
-0.7138234972953796,
0.07533024996519089,
0.17767943441867828,
-0.2953656315803528,
0.7609995603561401,
-1.1470539569854736,
-0.4628937542438507,
1.1761538982391357,
-0.16861969232559204,
-0.6962529420852661,
1.370627999305725,
0.7390555143356323,
-1.061908483505249,
-0.24890680611133575,
-0.26675015687942505,
-0.8479294776916504,
0.06676708906888962,
-1.5860791206359863,
-0.1887332797050476,
0.39023080468177795,
-1.5448375940322876,
-0.38161301612854004,
-0.19630420207977295,
1.3635109663009644,
-0.16604813933372498,
1.4257290363311768,
-0.3377125859260559,
-0.20244061946868896,
-0.2174166589975357,
-0.45422571897506714,
0.2635544240474701,
-0.20729096233844757,
-0.5675311088562012,
0.18517914414405823,
-0.8831270933151245,
0.30578312277793884,
1.5149924755096436,
0.34903597831726074,
0.05397454649209976,
0.5322612524032593,
1.0627691745758057,
0.3736438453197479,
0.03161632642149925,
-0.8627772331237793,
-1.586552619934082,
1.9924888610839844,
-1.4787131547927856,
1.991894006729126,
0.6782538294792175,
0.05189169570803642,
-1.8909579515457153,
-1.841261863708496,
1.2131730318069458,
1.104123830795288,
2.3290069103240967,
0.499626100063324,
0.3662213683128357,
-0.7864969968795776,
-0.709315836429596,
0.42958927154541016,
-1.006449580192566,
-0.666702389717102,
0.2255067229270935,
2.3735101222991943,
1.7775845527648926,
-0.502913236618042,
-0.21321798861026764,
-0.8154863715171814,
1.3777072429656982,
-0.21424417197704315,
0.2976231276988983,
2.0944201946258545,
-0.2710055112838745,
-0.9957777261734009,
1.2628991603851318,
-2.5152456760406494,
0.25646156072616577,
2.042400598526001,
0.21371136605739594,
0.1324910968542099,
-1.419356107711792,
-0.6540725827217102,
-0.2962378263473511,
-0.40304723381996155,
-1.2678273916244507,
0.5807988047599792,
-0.31567320227622986,
-0.8079245686531067,
-1.4462608098983765,
0.12993693351745605,
-1.1355406045913696,
-1.7740504741668701,
0.2318689376115799,
2.0004661083221436,
2.0784547328948975,
-0.7742800712585449,
1.521769404411316,
-0.3277904689311981,
0.0809168592095375,
1.2050144672393799,
1.2556425333023071,
3.023174524307251,
1.869286060333252,
-1.231369137763977,
0.6777728199958801,
-0.18802200257778168,
-0.4190783202648163,
1.1377214193344116,
-1.1530930995941162,
1.1169828176498413,
-0.11681760847568512,
-1.199779748916626,
-1.138870358467102,
1.0879485607147217,
0.5027808547019958,
-0.045074719935655594,
-0.45615604519844055,
1.2915706634521484,
0.06321223825216293,
1.374664545059204,
0.5737190842628479,
-0.4637598693370819,
0.5434150695800781,
-0.3103821873664856,
-0.5826448798179626,
1.5389248132705688,
0.16842152178287506,
-1.4455441236495972,
-2.316697835922241,
-0.24474036693572998,
-0.834299623966217,
-0.073038749396801,
-0.5907586216926575,
-1.0215710401535034,
1.6021583080291748,
0.3187156915664673,
-1.2339602708816528,
-0.170952707529068,
-0.2913406491279602,
-0.43490365147590637,
2.6577184200286865,
-1.29756760597229,
-0.23421965539455414,
-0.9339417219161987,
-0.5912488102912903,
1.6143519878387451,
-1.2163175344467163,
-0.25842398405075073,
-1.0542515516281128,
-0.5246457457542419,
-1.3391437530517578,
-0.582216203212738,
0.0007261345162987709,
-0.8965392112731934,
0.7798596620559692,
0.20743946731090546,
-1.1766729354858398,
-0.3733816146850586,
-0.9020416736602783,
1.0628037452697754,
-0.04745474085211754,
0.20766331255435944,
1.9639517068862915,
0.3280881643295288,
-0.4386579096317291,
0.794529378414154,
1.0613893270492554,
0.6450148820877075,
-0.5807055234909058,
0.18737249076366425,
-0.5977365970611572,
0.3348928689956665,
-1.4304145574569702,
0.24128228425979614,
-2.9559130668640137,
0.6863918304443359,
-0.10442963242530823,
-0.07230732589960098,
-0.09758876264095306,
-1.303861141204834,
0.9924911260604858,
2.587769031524658,
-1.147088646888733,
0.5445858836174011,
0.40703049302101135,
1.22445547580719,
-1.55531907081604,
0.34471872448921204,
-0.40239739418029785,
2.11122727394104,
0.22126898169517517,
1.2272281646728516,
-0.45650428533554077,
-2.261417865753174,
0.539783775806427,
-1.2714370489120483,
-1.0576344728469849,
0.7597002387046814,
-0.9484753012657166,
0.23187437653541565,
-1.4614591598510742,
-0.20236794650554657,
-0.900182843208313,
-1.2681666612625122,
0.706753134727478,
0.16566886007785797,
0.3256714642047882,
-0.5996156930923462,
0.3445148766040802,
-2.101903200149536,
-1.3122310638427734,
-0.2537889778614044,
-0.9422587752342224,
0.5390986204147339,
-0.30706989765167236,
0.6097658276557922,
-0.12073463201522827,
0.10168192535638809,
0.24569931626319885,
1.4832508563995361,
3.447528600692749,
0.09804372489452362,
0.23313170671463013,
-0.17451421916484833,
-0.9860280752182007,
1.4269548654556274,
0.9333152770996094,
-0.1480773389339447,
-0.5875279307365417,
-1.074887990951538,
1.2989070415496826,
1.981913685798645,
1.0042170286178589,
0.06303263455629349,
-0.8435736298561096,
-0.8115221261978149,
0.040470827370882034,
0.1215570941567421,
0.5633121728897095,
0.8764637112617493,
0.02361476793885231,
0.06033192574977875,
1.4481868743896484,
1.2057607173919678,
-0.3607955276966095,
0.3272361755371094,
-0.9943798780441284,
-0.4262494742870331,
0.3919964134693146,
0.2341518998146057,
-0.03991035372018814,
0.3518383502960205,
-0.9532620906829834,
-0.2241295725107193,
-0.3840736746788025,
-0.9289290308952332,
-0.7442600727081299,
-0.4215894341468811,
-0.42414361238479614,
1.622664451599121,
0.22350168228149414,
-0.5152052044868469,
-0.04842758551239967,
-0.6758464574813843,
-0.15817295014858246,
-1.1050211191177368,
0.20847395062446594,
-0.06264175474643707,
-0.06712934374809265,
-0.16069430112838745,
1.7380942106246948,
-0.8774359822273254,
-2.0287673473358154,
0.1477755606174469,
0.28947219252586365,
-0.25677046179771423,
0.2070186287164688,
1.831931710243225,
0.4534884989261627,
1.3595211505889893,
1.3010984659194946,
0.9550765752792358,
-0.566772997379303,
-1.2566250562667847,
0.6732607483863831,
0.9654306769371033,
-1.4759999513626099,
0.8619210124015808,
-0.1388753056526184,
-0.40527334809303284,
0.695816695690155,
1.3384393453598022,
0.46807387471199036,
-2.0862152576446533,
0.915896475315094,
-0.9731055498123169,
0.7568963170051575,
0.7697257995605469,
0.7195623517036438,
0.24808156490325928,
0.8680297136306763,
-1.175354242324829,
-1.197877049446106,
-0.7919772863388062,
-0.6646670699119568,
1.888830542564392,
-0.32014456391334534,
0.5924108028411865,
-0.15561850368976593,
-1.3547420501708984,
-0.13470345735549927,
0.7736250758171082,
0.3345681130886078,
-0.4763373136520386,
0.8736125230789185,
-0.6709495782852173,
-1.0281481742858887,
-1.3096842765808105,
-0.4720461070537567,
-1.048028588294983,
-0.9917616248130798,
0.9788044095039368,
0.8532160520553589,
0.3611606955528259,
1.872462272644043,
0.5175671577453613,
0.23570489883422852,
-2.6437807083129883,
0.8888194561004639,
0.2424432635307312,
-0.0035570929758250713,
0.8737666010856628,
0.2575727105140686,
1.0700231790542603,
-0.06681947410106659,
0.58650141954422,
-2.3921122550964355,
2.218909502029419,
-0.20425637066364288,
0.7765587568283081,
-0.0021560555323958397,
-0.2285614162683487,
1.073360562324524,
0.5291883945465088,
0.6754736304283142,
-1.0595014095306396,
0.6305341124534607,
-0.6179665923118591,
1.1807992458343506,
0.9875198602676392,
-0.8672996759414673,
0.012292617000639439,
1.4000591039657593,
0.3520815968513489,
-0.6085525155067444,
-0.9189985394477844,
-0.9864932894706726,
0.9189196228981018,
1.6980773210525513,
-0.04155506566166878,
-0.052424851804971695,
0.8131222724914551,
0.5997208952903748,
-1.2289029359817505,
0.07722575962543488,
-0.7436690926551819,
-0.6299042701721191,
1.6456788778305054,
2.0724382400512695,
-0.2050035297870636,
-0.15643197298049927,
-0.676588773727417,
-1.2506712675094604,
0.7567505240440369,
-0.13816919922828674,
-0.005165976472198963,
0.6549087762832642,
-0.6186390519142151,
1.0393657684326172,
0.6141884922981262,
1.0584006309509277,
0.08118640631437302,
0.369897723197937,
0.40030694007873535,
-0.3956184685230255,
-1.153717041015625,
-0.3170371353626251,
-1.0886578559875488,
-2.5252325534820557,
0.4300761818885803,
-0.19735023379325867,
-1.4401133060455322,
0.03339648246765137,
-1.047178030014038,
0.958229124546051,
-0.5838983654975891,
-1.1000862121582031,
-1.3558557033538818,
0.23195114731788635,
-0.11675793677568436,
0.9022929072380066,
-1.6437021493911743,
-0.10954071581363678,
1.2656854391098022,
0.9400364756584167,
-0.6124094724655151,
1.046736478805542,
0.25985440611839294,
1.0077441930770874,
0.811269998550415,
-0.3428244888782501,
0.6295084953308105,
-0.0007170392200350761,
-1.2729367017745972,
0.47672510147094727,
1.1859521865844727,
0.20680251717567444,
1.3591153621673584,
-0.49068161845207214,
0.04092667996883392,
0.42055872082710266,
-0.798593282699585,
-0.40975216031074524,
-0.3804011046886444,
0.719343364238739,
-0.02623472735285759,
-0.8663836121559143,
-0.07002752274274826,
-0.01486719585955143,
-0.2943607568740845,
0.15582068264484406,
-1.524855136871338,
-0.23912891745567322,
-0.26345330476760864,
-0.45913222432136536,
-1.3792688846588135,
-0.01071980595588684,
1.359729528427124,
-0.7788856625556946,
-0.26132839918136597,
0.46479088068008423,
0.41256996989250183,
0.5666862726211548,
0.5749120116233826,
-0.7291320562362671,
-0.2629883885383606,
-0.24839669466018677,
-0.3288818895816803,
0.32606083154678345,
1.3158529996871948,
-0.07089118659496307,
-0.939349889755249,
0.6742487549781799,
-0.3719872236251831,
0.053571633994579315,
1.9806714057922363,
0.06417297571897507,
-0.7502776980400085,
0.2846098244190216,
-0.7486453056335449,
1.8391517400741577,
1.7732917070388794,
1.2695093154907227,
-0.17866022884845734,
-0.8640338182449341,
0.6226286292076111,
-0.36904239654541016,
-0.3425074517726898,
0.8663565516471863,
0.48967117071151733,
-0.15784581005573273,
-1.39582359790802,
0.7257707715034485,
1.2338815927505493,
-0.795173704624176,
-0.7467510104179382,
0.09939729422330856,
-0.7811004519462585,
1.1834710836410522,
0.6647893786430359,
0.35914403200149536,
0.22434601187705994,
1.6241347789764404,
0.7667004466056824,
-0.48573628067970276,
0.5465344190597534,
0.534359335899353,
-0.20066389441490173,
-2.0762836933135986,
-1.0600088834762573,
0.3553926944732666,
-0.4146958589553833,
-1.6534441709518433,
1.449528694152832,
-1.1903198957443237,
-0.992676317691803,
0.5081698894500732,
0.09175695478916168,
1.2905819416046143,
0.3499854505062103,
1.6239221096038818,
2.089556932449341,
0.9030449390411377,
0.47774243354797363,
1.2994451522827148,
-0.07883789390325546,
-0.47487902641296387,
1.7935504913330078,
-0.4328165352344513,
0.5265435576438904,
1.0921857357025146,
-0.3549271821975708,
-1.0592974424362183,
-0.7725558876991272,
-1.171973466873169,
-0.6496376991271973,
1.2039350271224976,
0.10885541141033173,
-1.1004976034164429,
0.26148658990859985,
1.5523309707641602,
0.12297160178422928,
-0.30086225271224976,
0.7430095076560974,
0.31416454911231995,
-0.7701541185379028,
-0.1110755205154419,
-0.8165432810783386,
0.45856666564941406,
-0.24266070127487183,
-0.32405999302864075,
0.3880522549152374,
0.3814292550086975,
1.3331336975097656,
-0.029730908572673798,
0.13412156701087952,
1.1140047311782837,
-1.4864314794540405,
1.5077399015426636,
-0.6369138360023499,
0.3439882695674896,
-2.416764259338379,
1.4152331352233887,
-0.7959300875663757,
1.9875341653823853,
-2.6098427772521973,
0.4939560294151306,
-0.5104813575744629,
-0.4615214467048645,
0.28965404629707336,
-0.3711840808391571,
0.018743712455034256,
-0.07552433013916016,
-1.075203537940979,
0.0027343370020389557,
-0.7178811430931091,
0.625280499458313,
1.115808129310608,
1.3584051132202148,
-1.208650827407837,
-0.25469204783439636,
-1.7091422080993652,
-0.20519991219043732,
-0.8160424828529358,
0.34187132120132446,
-2.0078845024108887,
-0.1767074316740036,
-1.9758131504058838,
-2.369267463684082,
-1.3518494367599487,
-0.833141028881073,
1.0512120723724365,
0.16332028806209564,
-0.8793460726737976,
1.1878172159194946,
-0.29354313015937805,
-1.8687231540679932,
1.1176667213439941,
-2.1392359733581543
] |
https://github.com/huggingface/datasets/issues/5705 | Getting next item from IterableDataset took forever. | Hi! It can take some time to iterate over Parquet files as big as yours, convert the samples to Python, and find the first one that matches a filter predicate before yielding it... | ### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".", streaming=True)
dataset = dataset.filter(lambda example: example['text'].startswith('Ar'))
print(next(iter(dataset)))
```
However, this function never finish. I waited ~10mins, the function was still running so I killed the process. I'm now using `line_profiler` to profile how long it would take to return one item. I'll be patient and wait for as long as it needs.
I suspect the filter operation is the reason why it took so long. Can I get some possible reasons behind this?
### Steps to reproduce the bug
Unfortunately without my data files, there is no way to reproduce this bug.
### Expected behavior
With `IteralbeDataset`, I expect the first item to be returned instantly.
### Environment info
- datasets version: 2.11.0
- python: 3.7.12 | 226 | 33 | Getting next item from IterableDataset took forever.
### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".", streaming=True)
dataset = dataset.filter(lambda example: example['text'].startswith('Ar'))
print(next(iter(dataset)))
```
However, this function never finish. I waited ~10mins, the function was still running so I killed the process. I'm now using `line_profiler` to profile how long it would take to return one item. I'll be patient and wait for as long as it needs.
I suspect the filter operation is the reason why it took so long. Can I get some possible reasons behind this?
### Steps to reproduce the bug
Unfortunately without my data files, there is no way to reproduce this bug.
### Expected behavior
With `IteralbeDataset`, I expect the first item to be returned instantly.
### Environment info
- datasets version: 2.11.0
- python: 3.7.12
Hi! It can take some time to iterate over Parquet files as big as yours, convert the samples to Python, and find the first one that matches a filter predicate before yielding it... | [
-1.2091004848480225,
-0.9663013815879822,
-0.80097895860672,
1.465312123298645,
-0.21287478506565094,
-1.231318473815918,
0.12084490060806274,
-1.0223610401153564,
1.7190569639205933,
-0.8318138122558594,
0.30743804574012756,
-1.6892739534378052,
0.048130352050065994,
-0.5359034538269043,
-0.7587985396385193,
-0.943340539932251,
-0.4134424924850464,
-0.7482231259346008,
1.0151054859161377,
2.5339395999908447,
1.1146917343139648,
-1.4074268341064453,
2.632441282272339,
0.6037365198135376,
-0.07811199128627777,
-1.1059077978134155,
0.5615447163581848,
0.017623156309127808,
-1.250565528869629,
-0.4485492706298828,
-0.9823970794677734,
-0.13438250124454498,
-0.5072118639945984,
-0.5588108897209167,
0.04795648902654648,
0.40647491812705994,
-0.26687920093536377,
-0.45190081000328064,
-0.4256099462509155,
-0.7728663682937622,
0.5257942080497742,
-0.4073391556739807,
1.0103302001953125,
-0.31256359815597534,
1.8735886812210083,
-0.49727755784988403,
0.5459184646606445,
0.7812052369117737,
1.3448214530944824,
0.22307990491390228,
-0.01783015951514244,
0.31075045466423035,
0.40575286746025085,
0.060683723539114,
0.44114553928375244,
1.0677731037139893,
0.5987452864646912,
0.4778447449207306,
0.7079422473907471,
-2.2149651050567627,
1.2397346496582031,
-1.1056222915649414,
0.39188018441200256,
1.288335919380188,
-0.9835394620895386,
0.39830535650253296,
-1.7396529912948608,
-0.14324133098125458,
0.6173078417778015,
-2.2340450286865234,
0.23024803400039673,
-1.3223220109939575,
-0.40636348724365234,
1.1043230295181274,
0.3487194776535034,
-1.287134051322937,
0.11618038266897202,
-0.47738322615623474,
0.9700223207473755,
0.5139471292495728,
1.1545965671539307,
-1.699381947517395,
-0.043846845626831055,
-0.28602346777915955,
0.13883964717388153,
-1.3111528158187866,
-1.4643311500549316,
0.5389389991760254,
0.6279016733169556,
0.574773907661438,
-0.055119700729846954,
0.9568387269973755,
-0.9790897965431213,
0.7972221374511719,
-0.9505749344825745,
-1.6929070949554443,
-1.442476511001587,
-2.286342144012451,
-2.3894362449645996,
0.768853485584259,
-0.3799962103366852,
-0.49909284710884094,
2.081744909286499,
-1.0387388467788696,
-1.7551227807998657,
1.2103877067565918,
0.20455507934093475,
-0.004798085428774357,
2.3350741863250732,
0.17600864171981812,
-0.6608258485794067,
0.4010653495788574,
-0.681771457195282,
0.7807995676994324,
-0.4426077902317047,
1.314761996269226,
0.4726605713367462,
-1.0071065425872803,
1.618956446647644,
-0.40251436829566956,
0.5295583009719849,
-0.6758207678794861,
-0.4507901668548584,
-0.8524488210678101,
0.32503020763397217,
1.9273717403411865,
-0.30501559376716614,
1.589442491531372,
-0.3885642886161804,
-1.6016674041748047,
-1.6013715267181396,
0.9347174763679504,
0.4591919481754303,
-0.7218208312988281,
0.07804394513368607,
-0.2682468295097351,
0.15302814543247223,
-0.06494743376970291,
1.1282082796096802,
1.1951837539672852,
0.7103005647659302,
-0.27591925859451294,
-0.9473188519477844,
0.27504047751426697,
-0.0920400619506836,
-0.727907121181488,
-1.6911625862121582,
-0.4098350405693054,
0.12820294499397278,
0.6763318777084351,
-1.2110172510147095,
1.7133738994598389,
0.8896383047103882,
1.835654854774475,
1.0331709384918213,
-0.2896983325481415,
1.5317646265029907,
0.09965233504772186,
1.9259403944015503,
-0.5139226913452148,
0.6472211480140686,
-0.349881649017334,
-1.150739073753357,
0.7213490605354309,
-0.35229170322418213,
-2.0636487007141113,
-0.7731326818466187,
-0.8828030824661255,
-0.14798645675182343,
-0.735535204410553,
0.9725812673568726,
-0.35751432180404663,
-1.4235516786575317,
0.2746024429798126,
-0.6976318359375,
0.03938504680991173,
-1.2584136724472046,
0.41009995341300964,
0.7255327701568604,
-0.6606845259666443,
0.10001900047063828,
-0.28652042150497437,
-1.3573658466339111,
-0.4136003255844116,
0.236423522233963,
1.9075207710266113,
-0.7845968008041382,
0.9820939302444458,
0.9416825771331787,
-0.6866204738616943,
-0.12173542380332947,
0.3146164119243622,
-0.2826613187789917,
0.8489688634872437,
-1.0170100927352905,
-0.3981028199195862,
1.2197948694229126,
-0.21678611636161804,
-0.6595437526702881,
1.451694130897522,
0.6597369909286499,
-0.9482839703559875,
-0.18035049736499786,
-0.17093463242053986,
-0.8232114911079407,
0.03660005331039429,
-1.6155763864517212,
-0.1040230393409729,
0.3713805675506592,
-1.5662356615066528,
-0.48166826367378235,
-0.13352563977241516,
1.2170658111572266,
-0.08409275859594345,
1.432902455329895,
-0.40749871730804443,
-0.27536246180534363,
-0.35421323776245117,
-0.4108578860759735,
0.20519950985908508,
-0.2129472941160202,
-0.6171031594276428,
0.17015352845191956,
-0.7518956661224365,
0.33049631118774414,
1.4281001091003418,
0.41436293721199036,
0.022452015429735184,
0.6397650241851807,
1.048747181892395,
0.3740200102329254,
-0.032014451920986176,
-0.875328540802002,
-1.5438683032989502,
2.0607798099517822,
-1.447960376739502,
1.9725570678710938,
0.6896418333053589,
-0.07690910995006561,
-1.745280146598816,
-1.826786756515503,
1.298401951789856,
1.1829588413238525,
2.273834705352783,
0.5246974229812622,
0.41942137479782104,
-0.8292598724365234,
-0.5650416016578674,
0.32479920983314514,
-1.0389504432678223,
-0.8464446067810059,
0.09702697396278381,
2.4360969066619873,
1.7401179075241089,
-0.5091763734817505,
-0.18856847286224365,
-1.1059062480926514,
1.3961979150772095,
-0.1931816041469574,
0.2365501970052719,
1.9509596824645996,
-0.2799919545650482,
-1.0907918214797974,
1.218552589416504,
-2.31210994720459,
0.11233591288328171,
1.9624890089035034,
0.26491960883140564,
0.034682027995586395,
-1.43758225440979,
-0.6372807621955872,
-0.21298684179782867,
-0.4055866003036499,
-1.199889063835144,
0.5678482055664062,
-0.30602383613586426,
-0.747463047504425,
-1.3979405164718628,
0.14234638214111328,
-1.1600184440612793,
-1.6687572002410889,
0.1612982600927353,
1.7593507766723633,
1.955231785774231,
-0.7251582741737366,
1.5388087034225464,
-0.27616778016090393,
0.3318798243999481,
1.1934962272644043,
1.2359302043914795,
3.1120831966400146,
2.0172650814056396,
-1.2560536861419678,
0.6573346853256226,
-0.0776452049612999,
-0.4737308919429779,
1.21030592918396,
-1.1425861120224,
1.2977542877197266,
-0.12223562598228455,
-1.2020666599273682,
-1.1880818605422974,
0.9832664132118225,
0.4642477035522461,
0.07091183215379715,
-0.42409420013427734,
1.2145029306411743,
0.01969931274652481,
1.288572072982788,
0.5983045101165771,
-0.44658133387565613,
0.6725450158119202,
-0.4522576928138733,
-0.47040632367134094,
1.5549850463867188,
0.178016796708107,
-1.43228018283844,
-2.2581429481506348,
-0.22843949496746063,
-0.8140292763710022,
0.01693917065858841,
-0.5615059733390808,
-0.9646979570388794,
1.656660795211792,
0.3805922865867615,
-1.2190295457839966,
-0.288289874792099,
-0.3885515034198761,
-0.7042199969291687,
2.7051844596862793,
-1.3411493301391602,
-0.3034573197364807,
-1.0071938037872314,
-0.7069708108901978,
1.6267305612564087,
-1.2386618852615356,
-0.21192775666713715,
-1.027549147605896,
-0.6594527959823608,
-1.355050802230835,
-0.5834232568740845,
-0.04214969277381897,
-0.9708644151687622,
0.7657963037490845,
0.1910812109708786,
-1.1672141551971436,
-0.2772033214569092,
-0.900320827960968,
0.7786812782287598,
-0.08885598927736282,
0.28232234716415405,
1.8884860277175903,
0.42877429723739624,
-0.3895009756088257,
0.6673572063446045,
1.1630187034606934,
0.631001889705658,
-0.64298415184021,
0.23546665906906128,
-0.7585795521736145,
0.22447209060192108,
-1.2443302869796753,
0.2508225440979004,
-2.8464572429656982,
0.6086457967758179,
-0.10676444321870804,
-0.04694793373346329,
-0.034992706030607224,
-1.1762560606002808,
1.0599644184112549,
2.627678155899048,
-1.1714110374450684,
0.47539830207824707,
0.32022181153297424,
1.2686680555343628,
-1.6599414348602295,
0.39290380477905273,
-0.39367836713790894,
2.15712833404541,
0.2976168692111969,
1.2119330167770386,
-0.4533248543739319,
-2.256786823272705,
0.6311231255531311,
-1.2797409296035767,
-1.3053971529006958,
0.7449460625648499,
-0.9100388884544373,
0.05856672301888466,
-1.3828858137130737,
-0.18020856380462646,
-0.7625026702880859,
-1.23467218875885,
0.766313910484314,
0.11210491508245468,
0.4795398712158203,
-0.5549922585487366,
0.31675127148628235,
-2.1693029403686523,
-1.3512957096099854,
-0.2609880566596985,
-0.9218863248825073,
0.43046000599861145,
-0.2991282641887665,
0.7501341104507446,
-0.29470694065093994,
0.0497739277780056,
0.25738951563835144,
1.4198135137557983,
3.4301395416259766,
0.29232656955718994,
0.38080456852912903,
-0.16614662110805511,
-0.9779081344604492,
1.480976939201355,
0.9479892253875732,
-0.25188833475112915,
-0.537399172782898,
-1.0213358402252197,
1.2641689777374268,
1.973286747932434,
1.0522193908691406,
0.10990813374519348,
-0.7262596487998962,
-0.5845288634300232,
-0.031833842396736145,
0.15540356934070587,
0.48622527718544006,
0.8965902328491211,
0.0558607243001461,
0.1437312364578247,
1.4650503396987915,
1.2281739711761475,
-0.3564041554927826,
0.3486486077308655,
-0.7846769094467163,
-0.46932899951934814,
0.5967949628829956,
0.29726096987724304,
-0.0653829500079155,
0.3651619255542755,
-1.0127660036087036,
-0.25256407260894775,
-0.40922510623931885,
-0.9728384613990784,
-0.6378026008605957,
-0.41656631231307983,
-0.35003092885017395,
1.7007111310958862,
0.1104513481259346,
-0.5508962273597717,
-0.045123372226953506,
-0.7794729471206665,
-0.062302909791469574,
-1.0703727006912231,
0.17727309465408325,
-0.12482760101556778,
-0.1273408830165863,
-0.04436387121677399,
1.850328803062439,
-0.9304710626602173,
-2.1318271160125732,
0.25172194838523865,
0.22799065709114075,
-0.3211645483970642,
0.24273227155208588,
1.5576246976852417,
0.5384015440940857,
1.4339487552642822,
1.4254318475723267,
0.9854000210762024,
-0.719836950302124,
-1.2923341989517212,
0.6941433548927307,
0.9889709949493408,
-1.4471778869628906,
0.7533308863639832,
0.06173652037978172,
-0.5482879877090454,
0.6773236989974976,
1.2008336782455444,
0.4287674129009247,
-2.010509967803955,
0.7876237630844116,
-0.8938088417053223,
0.685989499092102,
0.6817272901535034,
0.7285837531089783,
0.21279020607471466,
0.7563709616661072,
-1.2180836200714111,
-1.151461124420166,
-0.778582751750946,
-0.6157928705215454,
2.0367186069488525,
-0.16590118408203125,
0.613175630569458,
-0.15546844899654388,
-1.3530933856964111,
-0.046856775879859924,
0.6618888974189758,
0.32509079575538635,
-0.44987723231315613,
0.8446639776229858,
-0.6820120811462402,
-1.1293843984603882,
-1.4875715970993042,
-0.44835543632507324,
-1.0631362199783325,
-0.8997591137886047,
1.0902515649795532,
0.7726431488990784,
0.16832251846790314,
1.8169646263122559,
0.6365883350372314,
0.21214526891708374,
-2.702751636505127,
0.8556674718856812,
0.3179970979690552,
-0.11634555459022522,
0.7834898233413696,
0.25295722484588623,
1.0677827596664429,
-0.05930011719465256,
0.5768157243728638,
-2.450333833694458,
2.241769552230835,
-0.2754703462123871,
0.7121236324310303,
-0.006514525040984154,
-0.172459676861763,
1.0850560665130615,
0.6046713590621948,
0.6442585587501526,
-1.070063591003418,
0.6788286566734314,
-0.6362749338150024,
1.244476556777954,
0.9976301789283752,
-0.83806312084198,
-0.0921405702829361,
1.3938556909561157,
0.5039051175117493,
-0.5069893598556519,
-0.9833655953407288,
-0.961262047290802,
0.9369804859161377,
1.8042974472045898,
-0.07588472962379456,
-0.0010318402200937271,
0.8013702630996704,
0.6627404093742371,
-1.285392165184021,
0.05703895911574364,
-0.7994453310966492,
-0.7857586741447449,
1.6057802438735962,
2.114149570465088,
-0.10097686201334,
-0.2600035071372986,
-0.6973804235458374,
-1.2144012451171875,
0.7698996067047119,
-0.010475865565240383,
0.17254067957401276,
0.7668368220329285,
-0.6144125461578369,
1.0897798538208008,
0.9258295297622681,
0.9614471197128296,
0.21221104264259338,
0.21551449596881866,
0.2552734911441803,
-0.22964248061180115,
-1.1320297718048096,
-0.1453205645084381,
-1.0417743921279907,
-2.5252156257629395,
0.5232096314430237,
-0.2325197160243988,
-1.4094460010528564,
0.06958184391260147,
-0.9998112320899963,
0.9622488617897034,
-0.5587046146392822,
-1.1879254579544067,
-1.5023726224899292,
0.1349368542432785,
-0.10152732580900192,
0.8955335021018982,
-1.6078325510025024,
-0.04957999661564827,
1.257827639579773,
0.9298256635665894,
-0.6630051732063293,
1.073481798171997,
0.19613537192344666,
1.039284586906433,
0.8157084584236145,
-0.41640716791152954,
0.5496826767921448,
0.037016961723566055,
-1.3701622486114502,
0.5021001696586609,
1.0700170993804932,
0.17278507351875305,
1.450023889541626,
-0.6107977032661438,
0.04245094954967499,
0.4303323030471802,
-0.559386134147644,
-0.4643856883049011,
-0.6046757698059082,
0.7093007564544678,
0.019492600113153458,
-0.8430547118186951,
0.05864950641989708,
-0.10074243694543839,
-0.2913877069950104,
0.1734505444765091,
-1.4904348850250244,
-0.08766669780015945,
-0.3859517276287079,
-0.6672398447990417,
-1.204129695892334,
-0.06111438199877739,
1.4657586812973022,
-0.8219255208969116,
-0.19972681999206543,
0.5078384280204773,
0.40667736530303955,
0.5067236423492432,
0.5708075165748596,
-0.6199842691421509,
-0.3069074749946594,
-0.23433643579483032,
-0.34928423166275024,
0.32281821966171265,
1.3737975358963013,
-0.20141831040382385,
-1.0436094999313354,
0.7159470915794373,
-0.2667867839336395,
0.07891887426376343,
1.9031078815460205,
0.09098789095878601,
-0.7976071238517761,
0.3032395839691162,
-0.7525513172149658,
1.918137788772583,
1.648651123046875,
1.369653344154358,
-0.12079356610774994,
-0.9741588234901428,
0.5428429841995239,
-0.3309977054595947,
-0.4183986485004425,
0.8543789386749268,
0.4439091384410858,
-0.09775076061487198,
-1.3721128702163696,
0.6812731623649597,
1.2153878211975098,
-0.8254379630088806,
-0.8077300190925598,
0.07048822939395905,
-0.8283208012580872,
1.0492420196533203,
0.6037111282348633,
0.4769851863384247,
0.13091415166854858,
1.7057108879089355,
0.7702044248580933,
-0.5347721576690674,
0.5295276641845703,
0.5523317456245422,
-0.13796482980251312,
-2.0624966621398926,
-1.104429841041565,
0.26900044083595276,
-0.48534277081489563,
-1.6086784601211548,
1.3399109840393066,
-1.144445776939392,
-0.8707727193832397,
0.556494414806366,
0.09024593979120255,
1.4986602067947388,
0.39889833331108093,
1.5398037433624268,
2.058879852294922,
0.9079781174659729,
0.36505165696144104,
1.3028374910354614,
-0.07394341379404068,
-0.4124981462955475,
1.8336554765701294,
-0.3722628057003021,
0.44493091106414795,
1.1081241369247437,
-0.37274786829948425,
-0.9876148700714111,
-0.7164475917816162,
-1.2608373165130615,
-0.6251826882362366,
1.1135139465332031,
0.10100626945495605,
-1.102529764175415,
0.2623710632324219,
1.5586005449295044,
0.06566272675991058,
-0.4132983088493347,
0.6442309617996216,
0.34266990423202515,
-0.7198900580406189,
-0.01944265142083168,
-0.9351071119308472,
0.44092628359794617,
-0.200886070728302,
-0.33290207386016846,
0.37748202681541443,
0.43560412526130676,
1.3019465208053589,
-0.011237452737987041,
0.16015884280204773,
1.299164056777954,
-1.3489636182785034,
1.4587266445159912,
-0.6970346570014954,
0.2315496951341629,
-2.3734965324401855,
1.3827885389328003,
-0.8365792036056519,
1.8616982698440552,
-2.6029837131500244,
0.39330142736434937,
-0.6103469133377075,
-0.3997769057750702,
0.35662490129470825,
-0.3700914978981018,
0.10223697870969772,
-0.11981754750013351,
-1.1571863889694214,
-0.08332297950983047,
-0.6925227642059326,
0.5816953182220459,
1.1479007005691528,
1.3128795623779297,
-1.1360464096069336,
-0.2981560528278351,
-1.7973108291625977,
-0.09676599502563477,
-0.6616507172584534,
0.36035025119781494,
-2.015305280685425,
-0.2196570783853531,
-1.8701786994934082,
-2.390214681625366,
-1.315687656402588,
-0.8090381026268005,
1.1136794090270996,
0.14362989366054535,
-0.8847526907920837,
1.1596012115478516,
-0.2620493471622467,
-1.7809160947799683,
1.0755441188812256,
-2.2374114990234375
] |
https://github.com/huggingface/datasets/issues/5705 | Getting next item from IterableDataset took forever. | Thanks @mariosasko, I figured it was the filter operation. I'm closing this issue because it is not a bug, it is the expected beheaviour. | ### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".", streaming=True)
dataset = dataset.filter(lambda example: example['text'].startswith('Ar'))
print(next(iter(dataset)))
```
However, this function never finish. I waited ~10mins, the function was still running so I killed the process. I'm now using `line_profiler` to profile how long it would take to return one item. I'll be patient and wait for as long as it needs.
I suspect the filter operation is the reason why it took so long. Can I get some possible reasons behind this?
### Steps to reproduce the bug
Unfortunately without my data files, there is no way to reproduce this bug.
### Expected behavior
With `IteralbeDataset`, I expect the first item to be returned instantly.
### Environment info
- datasets version: 2.11.0
- python: 3.7.12 | 226 | 24 | Getting next item from IterableDataset took forever.
### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".", streaming=True)
dataset = dataset.filter(lambda example: example['text'].startswith('Ar'))
print(next(iter(dataset)))
```
However, this function never finish. I waited ~10mins, the function was still running so I killed the process. I'm now using `line_profiler` to profile how long it would take to return one item. I'll be patient and wait for as long as it needs.
I suspect the filter operation is the reason why it took so long. Can I get some possible reasons behind this?
### Steps to reproduce the bug
Unfortunately without my data files, there is no way to reproduce this bug.
### Expected behavior
With `IteralbeDataset`, I expect the first item to be returned instantly.
### Environment info
- datasets version: 2.11.0
- python: 3.7.12
Thanks @mariosasko, I figured it was the filter operation. I'm closing this issue because it is not a bug, it is the expected beheaviour. | [
-1.2147696018218994,
-0.9854798913002014,
-0.7982450127601624,
1.439611554145813,
-0.2106679230928421,
-1.193339228630066,
0.11479727923870087,
-1.0173276662826538,
1.745526909828186,
-0.833021342754364,
0.3113933503627777,
-1.7047041654586792,
0.0051466720178723335,
-0.5345142483711243,
-0.7602889537811279,
-0.9337989687919617,
-0.41620197892189026,
-0.7645675539970398,
1.0022648572921753,
2.528538227081299,
1.1477545499801636,
-1.4094327688217163,
2.6606874465942383,
0.6055129766464233,
-0.07306652516126633,
-1.1157759428024292,
0.5665263533592224,
-0.038982558995485306,
-1.2489356994628906,
-0.46089792251586914,
-1.0004487037658691,
-0.10485219955444336,
-0.5066113471984863,
-0.5574241280555725,
0.028252746909856796,
0.4283037781715393,
-0.2785300612449646,
-0.44511911273002625,
-0.4129638075828552,
-0.7835426926612854,
0.5413952469825745,
-0.4256400763988495,
1.0108281373977661,
-0.31797659397125244,
1.8871362209320068,
-0.5090537667274475,
0.5407260060310364,
0.7599873542785645,
1.3396552801132202,
0.23748470842838287,
-0.02822890877723694,
0.3422534167766571,
0.3978588879108429,
0.06752113997936249,
0.4452730715274811,
1.0657798051834106,
0.5845975279808044,
0.46455198526382446,
0.6993503570556641,
-2.2195770740509033,
1.2230863571166992,
-1.0646190643310547,
0.34231752157211304,
1.301687479019165,
-0.9721778035163879,
0.3762761056423187,
-1.7338628768920898,
-0.11700844764709473,
0.6401841640472412,
-2.2140376567840576,
0.23300519585609436,
-1.3173243999481201,
-0.3992465138435364,
1.120392084121704,
0.3542321026325226,
-1.3271422386169434,
0.08153283596038818,
-0.4638526141643524,
0.9686165452003479,
0.5000666975975037,
1.1476600170135498,
-1.6865458488464355,
-0.06368760019540787,
-0.3237747251987457,
0.1378910392522812,
-1.2754842042922974,
-1.490636944770813,
0.5391958355903625,
0.6324343681335449,
0.5990768074989319,
-0.06418978422880173,
0.9379852414131165,
-0.9794915914535522,
0.7842464447021484,
-0.9350487589836121,
-1.7341333627700806,
-1.4798017740249634,
-2.3010101318359375,
-2.3599295616149902,
0.78517746925354,
-0.38247278332710266,
-0.5120755434036255,
2.0706589221954346,
-1.0787068605422974,
-1.7780792713165283,
1.1974830627441406,
0.17292387783527374,
0.014439784921705723,
2.35196590423584,
0.1797293722629547,
-0.7032872438430786,
0.4144008159637451,
-0.708301842212677,
0.7478157877922058,
-0.4074844717979431,
1.3241888284683228,
0.46307677030563354,
-1.0058621168136597,
1.6500780582427979,
-0.40142130851745605,
0.529227614402771,
-0.6678066253662109,
-0.45994752645492554,
-0.8434757590293884,
0.27331000566482544,
1.9173579216003418,
-0.31860944628715515,
1.5853009223937988,
-0.4006190001964569,
-1.6097983121871948,
-1.6113877296447754,
0.9305429458618164,
0.4169824421405792,
-0.7323736548423767,
0.08814609795808792,
-0.29659387469291687,
0.13961780071258545,
-0.06414640694856644,
1.1376187801361084,
1.192131519317627,
0.7142054438591003,
-0.25034305453300476,
-0.9580804705619812,
0.3066105842590332,
-0.0725335031747818,
-0.7282639145851135,
-1.6584136486053467,
-0.4077186584472656,
0.12703777849674225,
0.6782408356666565,
-1.2011997699737549,
1.7401081323623657,
0.9002600908279419,
1.840704083442688,
1.0569278001785278,
-0.3025432229042053,
1.5030182600021362,
0.11351137608289719,
1.8984960317611694,
-0.5068894624710083,
0.6202037930488586,
-0.34689033031463623,
-1.1367111206054688,
0.7102022767066956,
-0.3489477038383484,
-2.0323281288146973,
-0.7939127087593079,
-0.8784815669059753,
-0.1395668387413025,
-0.7843453884124756,
1.0063899755477905,
-0.35704171657562256,
-1.4147268533706665,
0.3040972650051117,
-0.7182844877243042,
0.04565875232219696,
-1.2676717042922974,
0.4000440537929535,
0.7102978229522705,
-0.6549531817436218,
0.13781920075416565,
-0.2958122789859772,
-1.352447271347046,
-0.40775221586227417,
0.242929607629776,
1.9225451946258545,
-0.7766068577766418,
0.9748321175575256,
0.9264241456985474,
-0.6667917966842651,
-0.10924404114484787,
0.32422348856925964,
-0.2695024013519287,
0.8648899793624878,
-1.0187280178070068,
-0.39734551310539246,
1.218239188194275,
-0.23479445278644562,
-0.6600288152694702,
1.4576702117919922,
0.6721743941307068,
-0.9337202906608582,
-0.19569851458072662,
-0.19014638662338257,
-0.8182790279388428,
0.03150917589664459,
-1.622718334197998,
-0.11538617312908173,
0.386844277381897,
-1.5577589273452759,
-0.5041118860244751,
-0.11798452585935593,
1.1944265365600586,
-0.09379435330629349,
1.4248772859573364,
-0.39640524983406067,
-0.27402356266975403,
-0.33724361658096313,
-0.38382717967033386,
0.1819729059934616,
-0.18734009563922882,
-0.6506115794181824,
0.15355227887630463,
-0.7727277278900146,
0.3486037254333496,
1.4284652471542358,
0.4307017922401428,
-0.006640536244958639,
0.6394445896148682,
1.0725281238555908,
0.3478694260120392,
-0.045965325087308884,
-0.8855329155921936,
-1.5471919775009155,
2.0936203002929688,
-1.4373685121536255,
1.9576084613800049,
0.6916879415512085,
-0.10391277074813843,
-1.7418556213378906,
-1.8121562004089355,
1.2954142093658447,
1.1764243841171265,
2.2568891048431396,
0.5444092750549316,
0.4417078197002411,
-0.8165698647499084,
-0.5727507472038269,
0.30946052074432373,
-1.0543445348739624,
-0.8595060110092163,
0.1032966747879982,
2.4352028369903564,
1.7603652477264404,
-0.5040498971939087,
-0.19173668324947357,
-1.093033790588379,
1.3599191904067993,
-0.21099191904067993,
0.22336161136627197,
1.9356400966644287,
-0.27084726095199585,
-1.1061787605285645,
1.2298024892807007,
-2.2807273864746094,
0.1367167979478836,
1.970373272895813,
0.24476584792137146,
0.032646164298057556,
-1.4331169128417969,
-0.6310513615608215,
-0.2155171036720276,
-0.39269378781318665,
-1.228598713874817,
0.5618056654930115,
-0.313838928937912,
-0.7688990831375122,
-1.4042505025863647,
0.1454273760318756,
-1.126783847808838,
-1.665388822555542,
0.13798342645168304,
1.7725905179977417,
1.977911353111267,
-0.7349594831466675,
1.5244795083999634,
-0.2119777947664261,
0.36028218269348145,
1.2096706628799438,
1.2195038795471191,
3.095979690551758,
1.995384931564331,
-1.2438825368881226,
0.6877619624137878,
-0.08413014560937881,
-0.47865432500839233,
1.237692952156067,
-1.1612273454666138,
1.2840466499328613,
-0.16295091807842255,
-1.2184427976608276,
-1.2035573720932007,
0.951382040977478,
0.4668034017086029,
0.04434272646903992,
-0.42126891016960144,
1.2298736572265625,
-0.014339182525873184,
1.2764945030212402,
0.6022713780403137,
-0.42893916368484497,
0.6807475686073303,
-0.4376174509525299,
-0.4375651776790619,
1.541694164276123,
0.18527784943580627,
-1.4381489753723145,
-2.2492897510528564,
-0.23493200540542603,
-0.8351649045944214,
0.010542956180870533,
-0.5537411570549011,
-0.9572193026542664,
1.6740087270736694,
0.39480987191200256,
-1.215388298034668,
-0.30813512206077576,
-0.39872977137565613,
-0.724521815776825,
2.7248246669769287,
-1.3141933679580688,
-0.3062562644481659,
-1.0313924551010132,
-0.6875764727592468,
1.6441694498062134,
-1.2541751861572266,
-0.19116169214248657,
-1.03704833984375,
-0.6727761030197144,
-1.3767039775848389,
-0.5750426650047302,
-0.04587512090802193,
-0.989871084690094,
0.7623624801635742,
0.220794677734375,
-1.1608855724334717,
-0.2726297080516815,
-0.9002524614334106,
0.7678473591804504,
-0.11218643188476562,
0.2773658037185669,
1.8670270442962646,
0.4345131814479828,
-0.3866860568523407,
0.6577813625335693,
1.1544848680496216,
0.6445791721343994,
-0.6084350347518921,
0.21177929639816284,
-0.7580892443656921,
0.23827405273914337,
-1.2487653493881226,
0.2585859000682831,
-2.8411924839019775,
0.6170318722724915,
-0.10484079271554947,
-0.03318832442164421,
-0.050316229462623596,
-1.1868704557418823,
1.0870387554168701,
2.6165382862091064,
-1.1819674968719482,
0.48035815358161926,
0.31229960918426514,
1.2893823385238647,
-1.677150845527649,
0.3831463158130646,
-0.42392367124557495,
2.183607816696167,
0.28092947602272034,
1.1979751586914062,
-0.41519322991371155,
-2.2711117267608643,
0.6270925998687744,
-1.273524284362793,
-1.2910876274108887,
0.7602316737174988,
-0.903881847858429,
0.052581027150154114,
-1.397202491760254,
-0.18298907577991486,
-0.7978489995002747,
-1.2198995351791382,
0.7836631536483765,
0.11978715658187866,
0.4789103865623474,
-0.560165524482727,
0.32212820649147034,
-2.1954493522644043,
-1.3563117980957031,
-0.26818937063217163,
-0.907545268535614,
0.4187294840812683,
-0.31668534874916077,
0.761610746383667,
-0.28989845514297485,
0.02203746885061264,
0.28150132298469543,
1.4119031429290771,
3.4298691749572754,
0.31092050671577454,
0.39425331354141235,
-0.13313007354736328,
-0.9601824283599854,
1.482685923576355,
0.9358289837837219,
-0.25449931621551514,
-0.5275500416755676,
-1.0048285722732544,
1.2879716157913208,
1.964375376701355,
1.0048531293869019,
0.15089282393455505,
-0.7305561304092407,
-0.5744615793228149,
-0.04064029082655907,
0.16679470241069794,
0.4981500506401062,
0.8939147591590881,
0.07618924975395203,
0.12591923773288727,
1.4673362970352173,
1.1965053081512451,
-0.34788668155670166,
0.3786472678184509,
-0.7769626975059509,
-0.4543418884277344,
0.5973777174949646,
0.2668944299221039,
-0.05141402781009674,
0.38027822971343994,
-1.0160762071609497,
-0.2695801854133606,
-0.36701059341430664,
-0.969154953956604,
-0.6588716506958008,
-0.3902978003025055,
-0.30247482657432556,
1.6856892108917236,
0.10931188613176346,
-0.577516496181488,
-0.031016603112220764,
-0.8078033328056335,
-0.08354818820953369,
-1.0763925313949585,
0.1621290147304535,
-0.12688389420509338,
-0.1308976709842682,
-0.039966873824596405,
1.8231468200683594,
-0.9345409274101257,
-2.137024402618408,
0.2328941524028778,
0.2540898621082306,
-0.310818612575531,
0.22202187776565552,
1.573246717453003,
0.5364863276481628,
1.4406365156173706,
1.4013333320617676,
0.9777205586433411,
-0.7124807834625244,
-1.2931499481201172,
0.6955862045288086,
0.9640794992446899,
-1.4350301027297974,
0.7688306570053101,
0.05886143818497658,
-0.5664554238319397,
0.6336190104484558,
1.1900999546051025,
0.4143158793449402,
-1.9740842580795288,
0.7728127837181091,
-0.8952805995941162,
0.6851956248283386,
0.6923428177833557,
0.7567546367645264,
0.2266739308834076,
0.7888825535774231,
-1.1962732076644897,
-1.1554224491119385,
-0.7483115196228027,
-0.6211751103401184,
2.025757074356079,
-0.17623959481716156,
0.6004953980445862,
-0.14966672658920288,
-1.323447823524475,
-0.05388493090867996,
0.6425389051437378,
0.32290735840797424,
-0.4443448781967163,
0.8421333432197571,
-0.6706520318984985,
-1.1388576030731201,
-1.4648559093475342,
-0.4407701790332794,
-1.0419042110443115,
-0.9115357398986816,
1.0706231594085693,
0.7662730813026428,
0.1741759032011032,
1.8293368816375732,
0.6654455661773682,
0.2063748985528946,
-2.6978039741516113,
0.8706679344177246,
0.31848421692848206,
-0.09926913678646088,
0.790175199508667,
0.26281771063804626,
1.0645349025726318,
-0.06137315183877945,
0.5951435565948486,
-2.4411463737487793,
2.240182876586914,
-0.27898478507995605,
0.7154894471168518,
-0.028574135154485703,
-0.2039724588394165,
1.0803793668746948,
0.6003129482269287,
0.6403447985649109,
-1.0761586427688599,
0.6779168844223022,
-0.6181330680847168,
1.238154411315918,
0.998733639717102,
-0.8349443674087524,
-0.06472590565681458,
1.3812774419784546,
0.49807310104370117,
-0.52278733253479,
-0.9952223300933838,
-0.9145232439041138,
0.929893434047699,
1.7552706003189087,
-0.0568411685526371,
-0.007017582189291716,
0.8261174559593201,
0.6702841520309448,
-1.2803540229797363,
0.04728936403989792,
-0.7445700764656067,
-0.7910642623901367,
1.6409772634506226,
2.1445748805999756,
-0.08990275859832764,
-0.2672242224216461,
-0.7040985226631165,
-1.2360398769378662,
0.7833682298660278,
0.006380741484463215,
0.16262301802635193,
0.7777131795883179,
-0.6477610468864441,
1.0966275930404663,
0.9091254472732544,
0.9973547458648682,
0.20101448893547058,
0.22796694934368134,
0.26975297927856445,
-0.23488281667232513,
-1.1410902738571167,
-0.1497565656900406,
-1.0514460802078247,
-2.4930708408355713,
0.4976102113723755,
-0.24589376151561737,
-1.4105786085128784,
0.09502357244491577,
-1.0062426328659058,
0.9384629726409912,
-0.5544119477272034,
-1.1776779890060425,
-1.4830443859100342,
0.1390908658504486,
-0.0813489630818367,
0.883449912071228,
-1.6153192520141602,
-0.037762030959129333,
1.261507511138916,
0.9356741905212402,
-0.6612166166305542,
1.0545984506607056,
0.20674416422843933,
1.0736079216003418,
0.8266216516494751,
-0.4099392294883728,
0.5740933418273926,
0.023171260952949524,
-1.377623200416565,
0.4884801208972931,
1.0574203729629517,
0.15781499445438385,
1.4790802001953125,
-0.579804539680481,
0.0442051999270916,
0.4590091407299042,
-0.5506705045700073,
-0.47660398483276367,
-0.5820320844650269,
0.7093241214752197,
0.058714609593153,
-0.825480043888092,
0.0324447937309742,
-0.11083050817251205,
-0.25971177220344543,
0.18278390169143677,
-1.4809095859527588,
-0.09806119650602341,
-0.3689543306827545,
-0.7046850919723511,
-1.1887989044189453,
-0.08606727421283722,
1.4729167222976685,
-0.8285595178604126,
-0.22328653931617737,
0.509436309337616,
0.39120352268218994,
0.5182619690895081,
0.5559922456741333,
-0.6562719345092773,
-0.317624568939209,
-0.21099819242954254,
-0.3336421847343445,
0.33102157711982727,
1.3653727769851685,
-0.19764308631420135,
-1.0727595090866089,
0.7035102844238281,
-0.2702855169773102,
0.09094978123903275,
1.8998826742172241,
0.08934643864631653,
-0.8010673522949219,
0.26711365580558777,
-0.7488784790039062,
1.9421013593673706,
1.625516653060913,
1.3563227653503418,
-0.12104412168264389,
-0.9674098491668701,
0.5702623128890991,
-0.31119850277900696,
-0.4477284252643585,
0.8153874278068542,
0.4355272352695465,
-0.11655277013778687,
-1.3615182638168335,
0.6998102068901062,
1.2128264904022217,
-0.8497835993766785,
-0.8025580644607544,
0.054275136440992355,
-0.8467028737068176,
1.050135850906372,
0.6027128100395203,
0.455320805311203,
0.13083986937999725,
1.716683268547058,
0.77242511510849,
-0.5345372557640076,
0.5095303058624268,
0.5658714771270752,
-0.136789008975029,
-2.084658145904541,
-1.0951465368270874,
0.2702961266040802,
-0.48138105869293213,
-1.6051377058029175,
1.323418140411377,
-1.1484805345535278,
-0.875016450881958,
0.5463523268699646,
0.11722175776958466,
1.4808094501495361,
0.4144468307495117,
1.5443525314331055,
2.0493597984313965,
0.8925436735153198,
0.3670009970664978,
1.2785812616348267,
-0.09064424782991409,
-0.4149245619773865,
1.807968258857727,
-0.377895325422287,
0.4792061746120453,
1.1142898797988892,
-0.3957298994064331,
-1.0205192565917969,
-0.7344923615455627,
-1.2750509977340698,
-0.6129398345947266,
1.117993950843811,
0.09859520196914673,
-1.1024037599563599,
0.25906145572662354,
1.5433136224746704,
0.042670682072639465,
-0.40724897384643555,
0.6311958432197571,
0.3670279383659363,
-0.7185897827148438,
0.021660074591636658,
-0.9272478222846985,
0.4793899953365326,
-0.1839037984609604,
-0.35189375281333923,
0.37533339858055115,
0.44605234265327454,
1.3466026782989502,
0.001771979033946991,
0.16560932993888855,
1.3500577211380005,
-1.337157130241394,
1.4412174224853516,
-0.6984096169471741,
0.2130061239004135,
-2.3808984756469727,
1.3660690784454346,
-0.8408802151679993,
1.8795433044433594,
-2.611344575881958,
0.3815933167934418,
-0.6194411516189575,
-0.4075464904308319,
0.33459708094596863,
-0.37081825733184814,
0.1019626334309578,
-0.11704211682081223,
-1.1359807252883911,
-0.07266352325677872,
-0.6784151196479797,
0.5560870170593262,
1.1527199745178223,
1.3312928676605225,
-1.1034883260726929,
-0.26386797428131104,
-1.8034658432006836,
-0.09256603568792343,
-0.6715517044067383,
0.34260979294776917,
-2.0199661254882812,
-0.1992373764514923,
-1.9004026651382446,
-2.4030253887176514,
-1.2832047939300537,
-0.7681061625480652,
1.1042832136154175,
0.14530912041664124,
-0.8743898868560791,
1.1866670846939087,
-0.26010432839393616,
-1.7705111503601074,
1.074520468711853,
-2.2309112548828125
] |
https://github.com/huggingface/datasets/issues/5702 | Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None? | Hi ! `datasets` uses Apache Arrow as backend to store the data, and it requires each column to have a fixed type. Therefore a column can't have a mix of dicts/lists/strings.
Though it's possible to have one (nullable) field for each type:
```python
features = Features({
"text_alone": Value("string"),
"text_with_idxes": {
"text": Value("string"),
"idxes": Value("int64")
}
})
```
but you'd have to reformat your data fiels or define a [dataset loading script](https://huggingface.co/docs/datasets/dataset_script) to apply the appropriate parsing.
Alternatively we could explore supporting the Arrow [Union](https://arrow.apache.org/docs/python/generated/pyarrow.UnionType.html) type which could solve this issue, but I don't know if it's well supported in python and with the rest of the ecosystem like Parquet | ### Feature request
Hello! Apologies if my question sounds naive:
I was wondering if it’s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None?
Specifically, I’d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below:
```json
[
[
{"text":"老妇人","idxes":[0,1,2]},null,{"text":"跪","idxes":[3]},null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null],
[
{"text":"那些水","idxes":[13,14,15]},null,{"text":"舀","idxes":[11]},null,null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,{"text":"出","idxes":[12]},null,null,null,null,null,null,null],
[
{"text":"水","idxes":[38]},
null,
{"text":"舀","idxes":[40]},
"假", // note this is just a standalone string
null,null,null,{"text":"坑里","idxes":[35,36]},null,null,null,null,null,null,null,null,null,null]]
```
### Motivation
I'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features).
```json
{"qid":"3-train-1058","context":"桑桑害怕了。从玉米地里走到田埂上,他遥望着他家那幢草房子里的灯光,知道母亲没有让他回家的意思,很伤感,有点想哭。但没哭,转身朝阿恕家走去。","corefs":[[{"text":"桑桑","idxes":[0,1]},{"text":"他","idxes":[17]}]],"non_corefs":[],"outputs":[[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[11]},null,null,null,null,null,{"text":"从玉米地里","idxes":[6,7,8,9,10]},{"text":"到田埂上","idxes":[12,13,14,15]},null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[66]},null,null,null,null,null,null,null,{"text":"转身朝阿恕家去","idxes":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{"text":"灯光","idxes":[30,31]},null,null,null,null,null,null,{"text":"草房子里","idxes":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},{"text":"他家那幢草房子","idxes":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"远"],[{"text":"他","idxes":[17]},{"text":"阿恕家","idxes":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"变近"]]}
```
### Your contribution
I'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 . | 227 | 109 | Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None?
### Feature request
Hello! Apologies if my question sounds naive:
I was wondering if it’s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None?
Specifically, I’d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below:
```json
[
[
{"text":"老妇人","idxes":[0,1,2]},null,{"text":"跪","idxes":[3]},null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null],
[
{"text":"那些水","idxes":[13,14,15]},null,{"text":"舀","idxes":[11]},null,null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,{"text":"出","idxes":[12]},null,null,null,null,null,null,null],
[
{"text":"水","idxes":[38]},
null,
{"text":"舀","idxes":[40]},
"假", // note this is just a standalone string
null,null,null,{"text":"坑里","idxes":[35,36]},null,null,null,null,null,null,null,null,null,null]]
```
### Motivation
I'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features).
```json
{"qid":"3-train-1058","context":"桑桑害怕了。从玉米地里走到田埂上,他遥望着他家那幢草房子里的灯光,知道母亲没有让他回家的意思,很伤感,有点想哭。但没哭,转身朝阿恕家走去。","corefs":[[{"text":"桑桑","idxes":[0,1]},{"text":"他","idxes":[17]}]],"non_corefs":[],"outputs":[[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[11]},null,null,null,null,null,{"text":"从玉米地里","idxes":[6,7,8,9,10]},{"text":"到田埂上","idxes":[12,13,14,15]},null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[66]},null,null,null,null,null,null,null,{"text":"转身朝阿恕家去","idxes":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{"text":"灯光","idxes":[30,31]},null,null,null,null,null,null,{"text":"草房子里","idxes":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},{"text":"他家那幢草房子","idxes":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"远"],[{"text":"他","idxes":[17]},{"text":"阿恕家","idxes":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"变近"]]}
```
### Your contribution
I'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 .
Hi ! `datasets` uses Apache Arrow as backend to store the data, and it requires each column to have a fixed type. Therefore a column can't have a mix of dicts/lists/strings.
Though it's possible to have one (nullable) field for each type:
```python
features = Features({
"text_alone": Value("string"),
"text_with_idxes": {
"text": Value("string"),
"idxes": Value("int64")
}
})
```
but you'd have to reformat your data fiels or define a [dataset loading script](https://huggingface.co/docs/datasets/dataset_script) to apply the appropriate parsing.
Alternatively we could explore supporting the Arrow [Union](https://arrow.apache.org/docs/python/generated/pyarrow.UnionType.html) type which could solve this issue, but I don't know if it's well supported in python and with the rest of the ecosystem like Parquet | [
-1.0237053632736206,
-0.780731737613678,
-0.8739224672317505,
1.4091014862060547,
-0.3429599404335022,
-0.9813445806503296,
0.2079371064901352,
-1.3636884689331055,
1.5822197198867798,
-0.7283565998077393,
0.35450559854507446,
-1.6121089458465576,
0.05460144579410553,
-0.6801802515983582,
-0.7336546182632446,
-0.9616885781288147,
-0.33791404962539673,
-0.7622677683830261,
0.943121612071991,
2.6578290462493896,
1.2098463773727417,
-1.3876879215240479,
2.413327693939209,
0.7444000840187073,
-0.10142239928245544,
-0.8599492907524109,
0.6486847400665283,
-0.10269658267498016,
-1.0311195850372314,
-0.4848593473434448,
-0.9382537007331848,
-0.20505550503730774,
-0.5109292268753052,
-0.45636916160583496,
-0.17873989045619965,
0.5108582973480225,
-0.3536094129085541,
-0.3010038733482361,
-0.666124165058136,
-0.9589288234710693,
0.5597716569900513,
-0.5121389031410217,
1.1294382810592651,
-0.2791995406150818,
1.714605450630188,
-0.5311667323112488,
0.36822524666786194,
0.751789391040802,
1.286393165588379,
0.3482624292373657,
0.06837617605924606,
0.20135605335235596,
0.37422770261764526,
-0.2261449694633484,
0.44095954298973083,
0.998948335647583,
0.7555216550827026,
0.46585923433303833,
0.9501376748085022,
-2.1250710487365723,
1.1021071672439575,
-1.3246619701385498,
0.29548031091690063,
1.4776113033294678,
-0.6497563719749451,
0.39976856112480164,
-1.940110445022583,
-0.16397158801555634,
0.5256699323654175,
-2.135049343109131,
0.46494242548942566,
-1.3176600933074951,
-0.5751921534538269,
0.8647125363349915,
0.36249759793281555,
-1.223453164100647,
0.2186724990606308,
-0.33742180466651917,
0.8081257939338684,
0.3050299286842346,
1.024501919746399,
-1.8196709156036377,
-0.03694489225745201,
-0.46801620721817017,
0.20697863399982452,
-1.3086720705032349,
-1.4609262943267822,
0.5988879799842834,
0.41640570759773254,
0.4824635088443756,
-0.18252822756767273,
1.056219220161438,
-1.0783835649490356,
0.6689674258232117,
-1.2126473188400269,
-1.625083088874817,
-1.4093239307403564,
-2.189600944519043,
-2.154985189437866,
0.7920233607292175,
-0.5622314810752869,
-0.6497026681900024,
2.0281429290771484,
-0.7142782807350159,
-1.348912000656128,
1.220122218132019,
0.4912872016429901,
0.0017016353085637093,
2.734842538833618,
0.23156949877738953,
-0.6340922117233276,
0.5593481659889221,
-0.8332483172416687,
0.8519343137741089,
-0.4414047598838806,
1.4659205675125122,
0.39851194620132446,
-0.9932922720909119,
1.5933349132537842,
-0.45095154643058777,
0.5488918423652649,
-0.5898324251174927,
-0.44197049736976624,
-0.7985224723815918,
0.48352667689323425,
1.6433807611465454,
-0.2371034473180771,
1.3116402626037598,
-0.2993794083595276,
-1.4553472995758057,
-1.5911881923675537,
1.0784574747085571,
0.3931111693382263,
-0.9057198762893677,
0.20595741271972656,
-0.2754674255847931,
0.18622605502605438,
-0.3345149755477905,
1.1861010789871216,
1.333477258682251,
0.6933215260505676,
-0.3190320134162903,
-0.9356858730316162,
0.21878190338611603,
-0.2497689574956894,
-1.1074281930923462,
-1.7215925455093384,
-0.32265567779541016,
-0.014746172353625298,
0.6061357855796814,
-1.3239768743515015,
1.885071873664856,
0.9445932507514954,
1.9038169384002686,
0.8509995341300964,
-0.6903666257858276,
1.470235824584961,
0.13989682495594025,
1.6455535888671875,
-0.7293651103973389,
0.6156499981880188,
-0.5418612360954285,
-1.2140134572982788,
1.1312750577926636,
-0.11562027037143707,
-1.9044522047042847,
-0.7101300358772278,
-0.9238219857215881,
-0.24744921922683716,
-0.727006733417511,
0.9434235095977783,
-0.20325051248073578,
-1.351838231086731,
0.2260628491640091,
-0.6655918955802917,
-0.3035913109779358,
-1.2607988119125366,
0.34455108642578125,
0.4503610134124756,
-0.5181759595870972,
0.1129375547170639,
0.030030017718672752,
-1.2794216871261597,
-0.5095626711845398,
0.12939508259296417,
1.8999489545822144,
-0.6954243779182434,
0.7766499519348145,
1.1198577880859375,
-0.7551036477088928,
-0.07808817923069,
0.26452964544296265,
-0.4310256242752075,
0.6912551522254944,
-1.0416771173477173,
-0.7564067244529724,
1.1188441514968872,
-0.10590449720621109,
-0.4178147614002228,
1.3426743745803833,
0.6431400179862976,
-1.0244789123535156,
-0.2383599877357483,
-0.14961451292037964,
-0.7454330325126648,
0.20463484525680542,
-1.5083200931549072,
-0.09401319175958633,
0.5700939297676086,
-1.4888310432434082,
-0.4067423343658447,
-0.08924736082553864,
1.1681276559829712,
-0.3648841977119446,
1.2642202377319336,
-0.3824000954627991,
-0.2648827135562897,
-0.33622878789901733,
-0.2841700613498688,
0.06324617564678192,
-0.2530861794948578,
-0.6141355037689209,
0.2561434507369995,
-0.885171115398407,
0.3213801980018616,
1.2789040803909302,
0.38321465253829956,
0.09509258717298508,
0.28250831365585327,
0.890652596950531,
0.43738919496536255,
0.13126620650291443,
-1.0737290382385254,
-1.1297358274459839,
1.9878664016723633,
-1.5173015594482422,
1.9853211641311646,
0.7599162459373474,
0.10992246121168137,
-1.86262845993042,
-1.9185115098953247,
1.4391145706176758,
1.2921630144119263,
2.3718907833099365,
0.5288383364677429,
0.35249030590057373,
-0.6858730912208557,
-0.5122712254524231,
0.2765444219112396,
-1.152827501296997,
-0.6248421669006348,
0.33059123158454895,
2.4604697227478027,
1.7070741653442383,
-0.5956709384918213,
-0.22019797563552856,
-1.0109273195266724,
1.3778260946273804,
-0.16485033929347992,
0.18892455101013184,
2.223780393600464,
-0.28322920203208923,
-1.1146973371505737,
1.2595487833023071,
-2.3705484867095947,
0.05707938224077225,
1.8478374481201172,
0.4175609052181244,
0.1296515166759491,
-1.2062444686889648,
-0.6516469120979309,
-0.4742569923400879,
-0.6450387835502625,
-1.1973395347595215,
0.6015016436576843,
-0.131276473402977,
-0.7992242574691772,
-1.535184383392334,
0.23058296740055084,
-1.2593375444412231,
-1.4988747835159302,
0.14630283415317535,
1.850671648979187,
2.216524600982666,
-0.8831778764724731,
1.5514869689941406,
-0.3290152847766876,
-0.05736968666315079,
1.0956978797912598,
1.183039903640747,
2.9545793533325195,
1.825974941253662,
-1.1934975385665894,
0.45708921551704407,
-0.23554770648479462,
-0.5633119344711304,
1.1402037143707275,
-1.1427725553512573,
1.1901161670684814,
0.017113158479332924,
-1.0127605199813843,
-1.0200673341751099,
0.685856819152832,
0.2406909316778183,
0.029619107022881508,
-0.5082874894142151,
1.1093499660491943,
0.23498636484146118,
1.240241289138794,
0.7295942902565002,
-0.010943610221147537,
0.6145901083946228,
-0.5458569526672363,
-0.4302719235420227,
1.4946473836898804,
0.20117981731891632,
-1.5724784135818481,
-2.428459882736206,
-0.212712362408638,
-0.8727402687072754,
0.1612670123577118,
-0.5523873567581177,
-1.0889149904251099,
1.962677240371704,
0.032858774065971375,
-1.2227505445480347,
-0.26160016655921936,
-0.4119304120540619,
-0.4843319356441498,
2.8419392108917236,
-1.4294700622558594,
-0.14006413519382477,
-0.9375505447387695,
-0.6783268451690674,
1.620255947113037,
-1.1069891452789307,
-0.08983772993087769,
-1.1497247219085693,
-0.3586273491382599,
-1.3381586074829102,
-0.5286868214607239,
0.06104506552219391,
-0.9964444637298584,
0.9607572555541992,
0.4364524483680725,
-1.1696994304656982,
-0.5081835985183716,
-0.9081526398658752,
0.7105077505111694,
-0.12286709249019623,
0.2643031179904938,
1.9374756813049316,
0.4939785301685333,
-0.08161840587854385,
0.6799352765083313,
1.309945821762085,
0.7298666834831238,
-0.5168535113334656,
0.036321528255939484,
-0.6886337399482727,
0.2800961434841156,
-1.0883461236953735,
0.2524600028991699,
-2.628122329711914,
0.697226345539093,
-0.10371579229831696,
-0.10440387576818466,
-0.018126865848898888,
-1.2419416904449463,
1.2093772888183594,
2.6376938819885254,
-1.1462864875793457,
0.4177221655845642,
0.248820498585701,
1.2397840023040771,
-1.5784974098205566,
0.23821508884429932,
-0.2466902881860733,
2.130363941192627,
0.05493292957544327,
1.0097956657409668,
-0.5016562342643738,
-2.3793742656707764,
0.49516990780830383,
-1.3553805351257324,
-1.2666264772415161,
0.6683905720710754,
-0.8552274703979492,
0.16785672307014465,
-1.714041829109192,
-0.14715895056724548,
-0.8932830691337585,
-1.205909252166748,
0.8350200653076172,
0.03486078232526779,
0.4450001120567322,
-0.4071362018585205,
0.3703683614730835,
-2.1884143352508545,
-1.5897608995437622,
-0.4109429121017456,
-0.9493758678436279,
0.5658547878265381,
-0.3301164209842682,
0.948996901512146,
-0.2112174779176712,
-0.12000256031751633,
0.5400329828262329,
1.499732494354248,
3.4562814235687256,
0.21114934980869293,
0.5585626363754272,
-0.2867667078971863,
-1.1179890632629395,
1.411685585975647,
0.9448193907737732,
0.2491915374994278,
-0.47887295484542847,
-0.9925411939620972,
1.126530647277832,
2.073052167892456,
1.0674941539764404,
-0.0853344202041626,
-0.752416729927063,
-0.5683936476707458,
-0.015994856134057045,
0.27632370591163635,
0.2245723009109497,
0.8840125799179077,
-0.1258411556482315,
-0.1705019474029541,
1.5781928300857544,
1.1269029378890991,
-0.40947574377059937,
0.2995513379573822,
-0.7561257481575012,
-0.3980792462825775,
0.6873266696929932,
0.1013513132929802,
0.04565062373876572,
0.7099671363830566,
-0.8750848770141602,
-0.549414336681366,
-0.23995496332645416,
-0.9203011393547058,
-0.5441256761550903,
-0.5310254096984863,
-0.28968003392219543,
1.6872491836547852,
0.07776176184415817,
-0.47959089279174805,
0.13993561267852783,
-0.8160107135772705,
-0.05994571000337601,
-1.2062184810638428,
-0.08955605328083038,
-0.0746314525604248,
-0.22115612030029297,
-0.2204282134771347,
1.8566843271255493,
-0.7963223457336426,
-1.957541584968567,
0.0009647030383348465,
0.46565693616867065,
-0.22451308369636536,
0.2806330919265747,
1.5862938165664673,
0.5521219372749329,
1.6036076545715332,
0.9420796632766724,
0.9063416719436646,
-0.6633774638175964,
-1.3774244785308838,
0.7476268410682678,
1.1380831003189087,
-1.3544007539749146,
1.0000094175338745,
0.006935356184840202,
-0.30960628390312195,
0.4951176345348358,
1.1189814805984497,
0.38627707958221436,
-1.9312270879745483,
0.8139619827270508,
-0.9146497845649719,
0.9222025871276855,
0.5580055713653564,
0.5810673832893372,
0.23466253280639648,
0.6815446615219116,
-1.2192398309707642,
-0.9918795228004456,
-0.7430294752120972,
-0.37457311153411865,
2.092496871948242,
-0.2742360532283783,
0.8738365173339844,
-0.3089413642883301,
-1.2502764463424683,
0.03841305524110794,
0.6317412257194519,
0.5457729697227478,
-0.5350808501243591,
0.7544348835945129,
-0.5934950113296509,
-1.1136549711227417,
-1.3771387338638306,
-0.4268919825553894,
-1.1379228830337524,
-0.9210842847824097,
1.3428711891174316,
0.7177772521972656,
0.2818557322025299,
1.832584261894226,
0.9372020959854126,
0.1432575285434723,
-2.3123953342437744,
0.9935200214385986,
0.46535724401474,
-0.2025582194328308,
0.770850419998169,
0.5144168734550476,
0.9992485046386719,
-0.13790330290794373,
0.6417747735977173,
-2.530941963195801,
2.307774782180786,
-0.0792309045791626,
0.7944806814193726,
0.2222464233636856,
-0.21204793453216553,
0.9207054376602173,
0.5693585276603699,
0.36225324869155884,
-1.0961530208587646,
0.293344646692276,
-0.43855229020118713,
1.2879691123962402,
1.0215873718261719,
-0.632357656955719,
0.06668338179588318,
1.3401594161987305,
0.6196279525756836,
-0.5376738905906677,
-0.9972079396247864,
-0.6124434471130371,
0.9925171136856079,
1.5755270719528198,
-0.36219942569732666,
-0.10449206829071045,
0.8148907423019409,
0.49713751673698425,
-1.3224589824676514,
0.1094423159956932,
-0.8880977034568787,
-0.8708164095878601,
1.6209367513656616,
2.1832854747772217,
-0.3630804121494293,
-0.023231014609336853,
-0.6692898869514465,
-1.283970832824707,
0.8516054153442383,
-0.06631524860858917,
0.2737860381603241,
0.36372625827789307,
-0.6060671806335449,
1.015894889831543,
0.9182292819023132,
0.9300114512443542,
0.5784448385238647,
0.3752460479736328,
0.428488165140152,
-0.5660242438316345,
-0.8446511626243591,
-0.2748076319694519,
-1.187439203262329,
-2.6857495307922363,
0.5386486649513245,
-0.26595601439476013,
-1.2861533164978027,
-0.1500612497329712,
-0.8426544666290283,
1.1096919775009155,
-0.46495887637138367,
-0.8235081434249878,
-1.5650358200073242,
0.4489305913448334,
0.12472178786993027,
1.1579382419586182,
-1.7595785856246948,
-0.3883267641067505,
1.1652239561080933,
0.8599317669868469,
-0.8553951382637024,
0.6769396662712097,
0.15643450617790222,
1.3142952919006348,
0.769474983215332,
-0.3941535949707031,
0.5773390531539917,
-0.18034297227859497,
-1.2738616466522217,
0.43781155347824097,
1.1434354782104492,
0.035062842071056366,
1.2910091876983643,
-0.23653197288513184,
0.011715427041053772,
0.2338557243347168,
-0.5099981427192688,
-0.5225237011909485,
-0.40172335505485535,
0.5924028754234314,
0.17395798861980438,
-1.0250186920166016,
-0.14704188704490662,
0.04845487326383591,
-0.31711551547050476,
0.2808615267276764,
-1.3361232280731201,
-0.20448265969753265,
-0.5198367834091187,
-0.4355441629886627,
-1.2482757568359375,
-0.323915034532547,
1.2548608779907227,
-0.5044047236442566,
-0.15903040766716003,
0.398756206035614,
0.4604467451572418,
0.5062810778617859,
0.6526396870613098,
-0.7599976062774658,
-0.6117263436317444,
-0.28076374530792236,
-0.5682600736618042,
0.28515300154685974,
1.479868769645691,
-0.14898476004600525,
-0.98838871717453,
0.6657774448394775,
-0.17255161702632904,
-0.044541388750076294,
1.8455681800842285,
0.11139817535877228,
-0.8321215510368347,
0.42111364006996155,
-0.4742531478404999,
1.8531873226165771,
1.83128821849823,
1.1343342065811157,
-0.27440759539604187,
-0.8185808658599854,
0.8039049506187439,
-0.5704329609870911,
-0.5320774912834167,
0.7170118689537048,
0.0693955272436142,
-0.294240802526474,
-1.694796085357666,
0.7429884672164917,
1.5298148393630981,
-0.901275634765625,
-0.9745216965675354,
0.14923612773418427,
-0.8217955827713013,
1.0742847919464111,
0.6177322268486023,
0.4277617633342743,
0.5713223814964294,
1.7716948986053467,
0.932655394077301,
-0.5169231295585632,
0.4750632345676422,
0.6845247745513916,
-0.04205971956253052,
-2.1058051586151123,
-1.4641414880752563,
0.21769486367702484,
-0.5728738307952881,
-1.4100614786148071,
1.4422351121902466,
-0.9734560251235962,
-1.1375038623809814,
0.6719993352890015,
0.033724091947078705,
1.309421181678772,
0.49378451704978943,
1.381445288658142,
2.0294768810272217,
0.724682092666626,
0.38543713092803955,
1.1711986064910889,
-0.15872444212436676,
-0.4677883982658386,
1.9583967924118042,
-0.37535935640335083,
0.33875522017478943,
1.082969069480896,
-0.09645283222198486,
-1.1226186752319336,
-0.7628698348999023,
-1.252020001411438,
-0.748961865901947,
1.3662832975387573,
-0.04208219796419144,
-1.0160892009735107,
0.3551161289215088,
1.8380482196807861,
-0.1469486802816391,
-0.7371396422386169,
0.554749608039856,
0.5749960541725159,
-0.9376801252365112,
-0.1259215623140335,
-0.7936100363731384,
0.655112624168396,
-0.09998003393411636,
-0.18442270159721375,
0.4155273139476776,
0.5962246656417847,
1.5013786554336548,
-0.07750506699085236,
0.25519782304763794,
0.6187142133712769,
-1.4670804738998413,
1.465257167816162,
-0.6864330172538757,
0.12013759464025497,
-2.1520884037017822,
1.222872018814087,
-0.5705502033233643,
2.116407632827759,
-2.6215667724609375,
0.3279123902320862,
-0.37466058135032654,
-0.6365712285041809,
0.1223113015294075,
-0.4890262186527252,
0.3095012903213501,
-0.0700511485338211,
-1.0390174388885498,
0.11239602416753769,
-0.6071338653564453,
0.4663045406341553,
1.0707509517669678,
1.3945051431655884,
-0.9577890634536743,
-0.4458314776420593,
-1.603217363357544,
-0.06763510406017303,
-0.758898138999939,
-0.07424293458461761,
-1.9401623010635376,
-0.3090572655200958,
-1.8518015146255493,
-2.1291964054107666,
-1.5164625644683838,
-0.98609858751297,
1.284189224243164,
0.12405886501073837,
-1.09567129611969,
1.3735997676849365,
-0.28150683641433716,
-2.1456940174102783,
1.2141013145446777,
-2.0226259231567383
] |
https://github.com/huggingface/datasets/issues/5702 | Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None? | @lhoestq Thank you! I further wonder if it's possible to use list subscripts as keys of a feature? Like
```python
features = Features({
0: Value("string"),
1: {
"text": Value("string"),
"idxes": [Value("int64")]
},
2: Value("string"),
# ...
})
``` | ### Feature request
Hello! Apologies if my question sounds naive:
I was wondering if it’s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None?
Specifically, I’d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below:
```json
[
[
{"text":"老妇人","idxes":[0,1,2]},null,{"text":"跪","idxes":[3]},null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null],
[
{"text":"那些水","idxes":[13,14,15]},null,{"text":"舀","idxes":[11]},null,null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,{"text":"出","idxes":[12]},null,null,null,null,null,null,null],
[
{"text":"水","idxes":[38]},
null,
{"text":"舀","idxes":[40]},
"假", // note this is just a standalone string
null,null,null,{"text":"坑里","idxes":[35,36]},null,null,null,null,null,null,null,null,null,null]]
```
### Motivation
I'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features).
```json
{"qid":"3-train-1058","context":"桑桑害怕了。从玉米地里走到田埂上,他遥望着他家那幢草房子里的灯光,知道母亲没有让他回家的意思,很伤感,有点想哭。但没哭,转身朝阿恕家走去。","corefs":[[{"text":"桑桑","idxes":[0,1]},{"text":"他","idxes":[17]}]],"non_corefs":[],"outputs":[[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[11]},null,null,null,null,null,{"text":"从玉米地里","idxes":[6,7,8,9,10]},{"text":"到田埂上","idxes":[12,13,14,15]},null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[66]},null,null,null,null,null,null,null,{"text":"转身朝阿恕家去","idxes":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{"text":"灯光","idxes":[30,31]},null,null,null,null,null,null,{"text":"草房子里","idxes":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},{"text":"他家那幢草房子","idxes":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"远"],[{"text":"他","idxes":[17]},{"text":"阿恕家","idxes":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"变近"]]}
```
### Your contribution
I'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 . | 227 | 38 | Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None?
### Feature request
Hello! Apologies if my question sounds naive:
I was wondering if it’s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None?
Specifically, I’d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below:
```json
[
[
{"text":"老妇人","idxes":[0,1,2]},null,{"text":"跪","idxes":[3]},null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null],
[
{"text":"那些水","idxes":[13,14,15]},null,{"text":"舀","idxes":[11]},null,null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,{"text":"出","idxes":[12]},null,null,null,null,null,null,null],
[
{"text":"水","idxes":[38]},
null,
{"text":"舀","idxes":[40]},
"假", // note this is just a standalone string
null,null,null,{"text":"坑里","idxes":[35,36]},null,null,null,null,null,null,null,null,null,null]]
```
### Motivation
I'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features).
```json
{"qid":"3-train-1058","context":"桑桑害怕了。从玉米地里走到田埂上,他遥望着他家那幢草房子里的灯光,知道母亲没有让他回家的意思,很伤感,有点想哭。但没哭,转身朝阿恕家走去。","corefs":[[{"text":"桑桑","idxes":[0,1]},{"text":"他","idxes":[17]}]],"non_corefs":[],"outputs":[[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[11]},null,null,null,null,null,{"text":"从玉米地里","idxes":[6,7,8,9,10]},{"text":"到田埂上","idxes":[12,13,14,15]},null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[66]},null,null,null,null,null,null,null,{"text":"转身朝阿恕家去","idxes":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{"text":"灯光","idxes":[30,31]},null,null,null,null,null,null,{"text":"草房子里","idxes":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},{"text":"他家那幢草房子","idxes":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"远"],[{"text":"他","idxes":[17]},{"text":"阿恕家","idxes":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"变近"]]}
```
### Your contribution
I'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 .
@lhoestq Thank you! I further wonder if it's possible to use list subscripts as keys of a feature? Like
```python
features = Features({
0: Value("string"),
1: {
"text": Value("string"),
"idxes": [Value("int64")]
},
2: Value("string"),
# ...
})
``` | [
-1.0237053632736206,
-0.780731737613678,
-0.8739224672317505,
1.4091014862060547,
-0.3429599404335022,
-0.9813445806503296,
0.2079371064901352,
-1.3636884689331055,
1.5822197198867798,
-0.7283565998077393,
0.35450559854507446,
-1.6121089458465576,
0.05460144579410553,
-0.6801802515983582,
-0.7336546182632446,
-0.9616885781288147,
-0.33791404962539673,
-0.7622677683830261,
0.943121612071991,
2.6578290462493896,
1.2098463773727417,
-1.3876879215240479,
2.413327693939209,
0.7444000840187073,
-0.10142239928245544,
-0.8599492907524109,
0.6486847400665283,
-0.10269658267498016,
-1.0311195850372314,
-0.4848593473434448,
-0.9382537007331848,
-0.20505550503730774,
-0.5109292268753052,
-0.45636916160583496,
-0.17873989045619965,
0.5108582973480225,
-0.3536094129085541,
-0.3010038733482361,
-0.666124165058136,
-0.9589288234710693,
0.5597716569900513,
-0.5121389031410217,
1.1294382810592651,
-0.2791995406150818,
1.714605450630188,
-0.5311667323112488,
0.36822524666786194,
0.751789391040802,
1.286393165588379,
0.3482624292373657,
0.06837617605924606,
0.20135605335235596,
0.37422770261764526,
-0.2261449694633484,
0.44095954298973083,
0.998948335647583,
0.7555216550827026,
0.46585923433303833,
0.9501376748085022,
-2.1250710487365723,
1.1021071672439575,
-1.3246619701385498,
0.29548031091690063,
1.4776113033294678,
-0.6497563719749451,
0.39976856112480164,
-1.940110445022583,
-0.16397158801555634,
0.5256699323654175,
-2.135049343109131,
0.46494242548942566,
-1.3176600933074951,
-0.5751921534538269,
0.8647125363349915,
0.36249759793281555,
-1.223453164100647,
0.2186724990606308,
-0.33742180466651917,
0.8081257939338684,
0.3050299286842346,
1.024501919746399,
-1.8196709156036377,
-0.03694489225745201,
-0.46801620721817017,
0.20697863399982452,
-1.3086720705032349,
-1.4609262943267822,
0.5988879799842834,
0.41640570759773254,
0.4824635088443756,
-0.18252822756767273,
1.056219220161438,
-1.0783835649490356,
0.6689674258232117,
-1.2126473188400269,
-1.625083088874817,
-1.4093239307403564,
-2.189600944519043,
-2.154985189437866,
0.7920233607292175,
-0.5622314810752869,
-0.6497026681900024,
2.0281429290771484,
-0.7142782807350159,
-1.348912000656128,
1.220122218132019,
0.4912872016429901,
0.0017016353085637093,
2.734842538833618,
0.23156949877738953,
-0.6340922117233276,
0.5593481659889221,
-0.8332483172416687,
0.8519343137741089,
-0.4414047598838806,
1.4659205675125122,
0.39851194620132446,
-0.9932922720909119,
1.5933349132537842,
-0.45095154643058777,
0.5488918423652649,
-0.5898324251174927,
-0.44197049736976624,
-0.7985224723815918,
0.48352667689323425,
1.6433807611465454,
-0.2371034473180771,
1.3116402626037598,
-0.2993794083595276,
-1.4553472995758057,
-1.5911881923675537,
1.0784574747085571,
0.3931111693382263,
-0.9057198762893677,
0.20595741271972656,
-0.2754674255847931,
0.18622605502605438,
-0.3345149755477905,
1.1861010789871216,
1.333477258682251,
0.6933215260505676,
-0.3190320134162903,
-0.9356858730316162,
0.21878190338611603,
-0.2497689574956894,
-1.1074281930923462,
-1.7215925455093384,
-0.32265567779541016,
-0.014746172353625298,
0.6061357855796814,
-1.3239768743515015,
1.885071873664856,
0.9445932507514954,
1.9038169384002686,
0.8509995341300964,
-0.6903666257858276,
1.470235824584961,
0.13989682495594025,
1.6455535888671875,
-0.7293651103973389,
0.6156499981880188,
-0.5418612360954285,
-1.2140134572982788,
1.1312750577926636,
-0.11562027037143707,
-1.9044522047042847,
-0.7101300358772278,
-0.9238219857215881,
-0.24744921922683716,
-0.727006733417511,
0.9434235095977783,
-0.20325051248073578,
-1.351838231086731,
0.2260628491640091,
-0.6655918955802917,
-0.3035913109779358,
-1.2607988119125366,
0.34455108642578125,
0.4503610134124756,
-0.5181759595870972,
0.1129375547170639,
0.030030017718672752,
-1.2794216871261597,
-0.5095626711845398,
0.12939508259296417,
1.8999489545822144,
-0.6954243779182434,
0.7766499519348145,
1.1198577880859375,
-0.7551036477088928,
-0.07808817923069,
0.26452964544296265,
-0.4310256242752075,
0.6912551522254944,
-1.0416771173477173,
-0.7564067244529724,
1.1188441514968872,
-0.10590449720621109,
-0.4178147614002228,
1.3426743745803833,
0.6431400179862976,
-1.0244789123535156,
-0.2383599877357483,
-0.14961451292037964,
-0.7454330325126648,
0.20463484525680542,
-1.5083200931549072,
-0.09401319175958633,
0.5700939297676086,
-1.4888310432434082,
-0.4067423343658447,
-0.08924736082553864,
1.1681276559829712,
-0.3648841977119446,
1.2642202377319336,
-0.3824000954627991,
-0.2648827135562897,
-0.33622878789901733,
-0.2841700613498688,
0.06324617564678192,
-0.2530861794948578,
-0.6141355037689209,
0.2561434507369995,
-0.885171115398407,
0.3213801980018616,
1.2789040803909302,
0.38321465253829956,
0.09509258717298508,
0.28250831365585327,
0.890652596950531,
0.43738919496536255,
0.13126620650291443,
-1.0737290382385254,
-1.1297358274459839,
1.9878664016723633,
-1.5173015594482422,
1.9853211641311646,
0.7599162459373474,
0.10992246121168137,
-1.86262845993042,
-1.9185115098953247,
1.4391145706176758,
1.2921630144119263,
2.3718907833099365,
0.5288383364677429,
0.35249030590057373,
-0.6858730912208557,
-0.5122712254524231,
0.2765444219112396,
-1.152827501296997,
-0.6248421669006348,
0.33059123158454895,
2.4604697227478027,
1.7070741653442383,
-0.5956709384918213,
-0.22019797563552856,
-1.0109273195266724,
1.3778260946273804,
-0.16485033929347992,
0.18892455101013184,
2.223780393600464,
-0.28322920203208923,
-1.1146973371505737,
1.2595487833023071,
-2.3705484867095947,
0.05707938224077225,
1.8478374481201172,
0.4175609052181244,
0.1296515166759491,
-1.2062444686889648,
-0.6516469120979309,
-0.4742569923400879,
-0.6450387835502625,
-1.1973395347595215,
0.6015016436576843,
-0.131276473402977,
-0.7992242574691772,
-1.535184383392334,
0.23058296740055084,
-1.2593375444412231,
-1.4988747835159302,
0.14630283415317535,
1.850671648979187,
2.216524600982666,
-0.8831778764724731,
1.5514869689941406,
-0.3290152847766876,
-0.05736968666315079,
1.0956978797912598,
1.183039903640747,
2.9545793533325195,
1.825974941253662,
-1.1934975385665894,
0.45708921551704407,
-0.23554770648479462,
-0.5633119344711304,
1.1402037143707275,
-1.1427725553512573,
1.1901161670684814,
0.017113158479332924,
-1.0127605199813843,
-1.0200673341751099,
0.685856819152832,
0.2406909316778183,
0.029619107022881508,
-0.5082874894142151,
1.1093499660491943,
0.23498636484146118,
1.240241289138794,
0.7295942902565002,
-0.010943610221147537,
0.6145901083946228,
-0.5458569526672363,
-0.4302719235420227,
1.4946473836898804,
0.20117981731891632,
-1.5724784135818481,
-2.428459882736206,
-0.212712362408638,
-0.8727402687072754,
0.1612670123577118,
-0.5523873567581177,
-1.0889149904251099,
1.962677240371704,
0.032858774065971375,
-1.2227505445480347,
-0.26160016655921936,
-0.4119304120540619,
-0.4843319356441498,
2.8419392108917236,
-1.4294700622558594,
-0.14006413519382477,
-0.9375505447387695,
-0.6783268451690674,
1.620255947113037,
-1.1069891452789307,
-0.08983772993087769,
-1.1497247219085693,
-0.3586273491382599,
-1.3381586074829102,
-0.5286868214607239,
0.06104506552219391,
-0.9964444637298584,
0.9607572555541992,
0.4364524483680725,
-1.1696994304656982,
-0.5081835985183716,
-0.9081526398658752,
0.7105077505111694,
-0.12286709249019623,
0.2643031179904938,
1.9374756813049316,
0.4939785301685333,
-0.08161840587854385,
0.6799352765083313,
1.309945821762085,
0.7298666834831238,
-0.5168535113334656,
0.036321528255939484,
-0.6886337399482727,
0.2800961434841156,
-1.0883461236953735,
0.2524600028991699,
-2.628122329711914,
0.697226345539093,
-0.10371579229831696,
-0.10440387576818466,
-0.018126865848898888,
-1.2419416904449463,
1.2093772888183594,
2.6376938819885254,
-1.1462864875793457,
0.4177221655845642,
0.248820498585701,
1.2397840023040771,
-1.5784974098205566,
0.23821508884429932,
-0.2466902881860733,
2.130363941192627,
0.05493292957544327,
1.0097956657409668,
-0.5016562342643738,
-2.3793742656707764,
0.49516990780830383,
-1.3553805351257324,
-1.2666264772415161,
0.6683905720710754,
-0.8552274703979492,
0.16785672307014465,
-1.714041829109192,
-0.14715895056724548,
-0.8932830691337585,
-1.205909252166748,
0.8350200653076172,
0.03486078232526779,
0.4450001120567322,
-0.4071362018585205,
0.3703683614730835,
-2.1884143352508545,
-1.5897608995437622,
-0.4109429121017456,
-0.9493758678436279,
0.5658547878265381,
-0.3301164209842682,
0.948996901512146,
-0.2112174779176712,
-0.12000256031751633,
0.5400329828262329,
1.499732494354248,
3.4562814235687256,
0.21114934980869293,
0.5585626363754272,
-0.2867667078971863,
-1.1179890632629395,
1.411685585975647,
0.9448193907737732,
0.2491915374994278,
-0.47887295484542847,
-0.9925411939620972,
1.126530647277832,
2.073052167892456,
1.0674941539764404,
-0.0853344202041626,
-0.752416729927063,
-0.5683936476707458,
-0.015994856134057045,
0.27632370591163635,
0.2245723009109497,
0.8840125799179077,
-0.1258411556482315,
-0.1705019474029541,
1.5781928300857544,
1.1269029378890991,
-0.40947574377059937,
0.2995513379573822,
-0.7561257481575012,
-0.3980792462825775,
0.6873266696929932,
0.1013513132929802,
0.04565062373876572,
0.7099671363830566,
-0.8750848770141602,
-0.549414336681366,
-0.23995496332645416,
-0.9203011393547058,
-0.5441256761550903,
-0.5310254096984863,
-0.28968003392219543,
1.6872491836547852,
0.07776176184415817,
-0.47959089279174805,
0.13993561267852783,
-0.8160107135772705,
-0.05994571000337601,
-1.2062184810638428,
-0.08955605328083038,
-0.0746314525604248,
-0.22115612030029297,
-0.2204282134771347,
1.8566843271255493,
-0.7963223457336426,
-1.957541584968567,
0.0009647030383348465,
0.46565693616867065,
-0.22451308369636536,
0.2806330919265747,
1.5862938165664673,
0.5521219372749329,
1.6036076545715332,
0.9420796632766724,
0.9063416719436646,
-0.6633774638175964,
-1.3774244785308838,
0.7476268410682678,
1.1380831003189087,
-1.3544007539749146,
1.0000094175338745,
0.006935356184840202,
-0.30960628390312195,
0.4951176345348358,
1.1189814805984497,
0.38627707958221436,
-1.9312270879745483,
0.8139619827270508,
-0.9146497845649719,
0.9222025871276855,
0.5580055713653564,
0.5810673832893372,
0.23466253280639648,
0.6815446615219116,
-1.2192398309707642,
-0.9918795228004456,
-0.7430294752120972,
-0.37457311153411865,
2.092496871948242,
-0.2742360532283783,
0.8738365173339844,
-0.3089413642883301,
-1.2502764463424683,
0.03841305524110794,
0.6317412257194519,
0.5457729697227478,
-0.5350808501243591,
0.7544348835945129,
-0.5934950113296509,
-1.1136549711227417,
-1.3771387338638306,
-0.4268919825553894,
-1.1379228830337524,
-0.9210842847824097,
1.3428711891174316,
0.7177772521972656,
0.2818557322025299,
1.832584261894226,
0.9372020959854126,
0.1432575285434723,
-2.3123953342437744,
0.9935200214385986,
0.46535724401474,
-0.2025582194328308,
0.770850419998169,
0.5144168734550476,
0.9992485046386719,
-0.13790330290794373,
0.6417747735977173,
-2.530941963195801,
2.307774782180786,
-0.0792309045791626,
0.7944806814193726,
0.2222464233636856,
-0.21204793453216553,
0.9207054376602173,
0.5693585276603699,
0.36225324869155884,
-1.0961530208587646,
0.293344646692276,
-0.43855229020118713,
1.2879691123962402,
1.0215873718261719,
-0.632357656955719,
0.06668338179588318,
1.3401594161987305,
0.6196279525756836,
-0.5376738905906677,
-0.9972079396247864,
-0.6124434471130371,
0.9925171136856079,
1.5755270719528198,
-0.36219942569732666,
-0.10449206829071045,
0.8148907423019409,
0.49713751673698425,
-1.3224589824676514,
0.1094423159956932,
-0.8880977034568787,
-0.8708164095878601,
1.6209367513656616,
2.1832854747772217,
-0.3630804121494293,
-0.023231014609336853,
-0.6692898869514465,
-1.283970832824707,
0.8516054153442383,
-0.06631524860858917,
0.2737860381603241,
0.36372625827789307,
-0.6060671806335449,
1.015894889831543,
0.9182292819023132,
0.9300114512443542,
0.5784448385238647,
0.3752460479736328,
0.428488165140152,
-0.5660242438316345,
-0.8446511626243591,
-0.2748076319694519,
-1.187439203262329,
-2.6857495307922363,
0.5386486649513245,
-0.26595601439476013,
-1.2861533164978027,
-0.1500612497329712,
-0.8426544666290283,
1.1096919775009155,
-0.46495887637138367,
-0.8235081434249878,
-1.5650358200073242,
0.4489305913448334,
0.12472178786993027,
1.1579382419586182,
-1.7595785856246948,
-0.3883267641067505,
1.1652239561080933,
0.8599317669868469,
-0.8553951382637024,
0.6769396662712097,
0.15643450617790222,
1.3142952919006348,
0.769474983215332,
-0.3941535949707031,
0.5773390531539917,
-0.18034297227859497,
-1.2738616466522217,
0.43781155347824097,
1.1434354782104492,
0.035062842071056366,
1.2910091876983643,
-0.23653197288513184,
0.011715427041053772,
0.2338557243347168,
-0.5099981427192688,
-0.5225237011909485,
-0.40172335505485535,
0.5924028754234314,
0.17395798861980438,
-1.0250186920166016,
-0.14704188704490662,
0.04845487326383591,
-0.31711551547050476,
0.2808615267276764,
-1.3361232280731201,
-0.20448265969753265,
-0.5198367834091187,
-0.4355441629886627,
-1.2482757568359375,
-0.323915034532547,
1.2548608779907227,
-0.5044047236442566,
-0.15903040766716003,
0.398756206035614,
0.4604467451572418,
0.5062810778617859,
0.6526396870613098,
-0.7599976062774658,
-0.6117263436317444,
-0.28076374530792236,
-0.5682600736618042,
0.28515300154685974,
1.479868769645691,
-0.14898476004600525,
-0.98838871717453,
0.6657774448394775,
-0.17255161702632904,
-0.044541388750076294,
1.8455681800842285,
0.11139817535877228,
-0.8321215510368347,
0.42111364006996155,
-0.4742531478404999,
1.8531873226165771,
1.83128821849823,
1.1343342065811157,
-0.27440759539604187,
-0.8185808658599854,
0.8039049506187439,
-0.5704329609870911,
-0.5320774912834167,
0.7170118689537048,
0.0693955272436142,
-0.294240802526474,
-1.694796085357666,
0.7429884672164917,
1.5298148393630981,
-0.901275634765625,
-0.9745216965675354,
0.14923612773418427,
-0.8217955827713013,
1.0742847919464111,
0.6177322268486023,
0.4277617633342743,
0.5713223814964294,
1.7716948986053467,
0.932655394077301,
-0.5169231295585632,
0.4750632345676422,
0.6845247745513916,
-0.04205971956253052,
-2.1058051586151123,
-1.4641414880752563,
0.21769486367702484,
-0.5728738307952881,
-1.4100614786148071,
1.4422351121902466,
-0.9734560251235962,
-1.1375038623809814,
0.6719993352890015,
0.033724091947078705,
1.309421181678772,
0.49378451704978943,
1.381445288658142,
2.0294768810272217,
0.724682092666626,
0.38543713092803955,
1.1711986064910889,
-0.15872444212436676,
-0.4677883982658386,
1.9583967924118042,
-0.37535935640335083,
0.33875522017478943,
1.082969069480896,
-0.09645283222198486,
-1.1226186752319336,
-0.7628698348999023,
-1.252020001411438,
-0.748961865901947,
1.3662832975387573,
-0.04208219796419144,
-1.0160892009735107,
0.3551161289215088,
1.8380482196807861,
-0.1469486802816391,
-0.7371396422386169,
0.554749608039856,
0.5749960541725159,
-0.9376801252365112,
-0.1259215623140335,
-0.7936100363731384,
0.655112624168396,
-0.09998003393411636,
-0.18442270159721375,
0.4155273139476776,
0.5962246656417847,
1.5013786554336548,
-0.07750506699085236,
0.25519782304763794,
0.6187142133712769,
-1.4670804738998413,
1.465257167816162,
-0.6864330172538757,
0.12013759464025497,
-2.1520884037017822,
1.222872018814087,
-0.5705502033233643,
2.116407632827759,
-2.6215667724609375,
0.3279123902320862,
-0.37466058135032654,
-0.6365712285041809,
0.1223113015294075,
-0.4890262186527252,
0.3095012903213501,
-0.0700511485338211,
-1.0390174388885498,
0.11239602416753769,
-0.6071338653564453,
0.4663045406341553,
1.0707509517669678,
1.3945051431655884,
-0.9577890634536743,
-0.4458314776420593,
-1.603217363357544,
-0.06763510406017303,
-0.758898138999939,
-0.07424293458461761,
-1.9401623010635376,
-0.3090572655200958,
-1.8518015146255493,
-2.1291964054107666,
-1.5164625644683838,
-0.98609858751297,
1.284189224243164,
0.12405886501073837,
-1.09567129611969,
1.3735997676849365,
-0.28150683641433716,
-2.1456940174102783,
1.2141013145446777,
-2.0226259231567383
] |
https://github.com/huggingface/datasets/issues/5702 | Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None? | Column names need to be strings, so you could use "1", "2", etc. or give appropriate column names | ### Feature request
Hello! Apologies if my question sounds naive:
I was wondering if it’s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None?
Specifically, I’d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below:
```json
[
[
{"text":"老妇人","idxes":[0,1,2]},null,{"text":"跪","idxes":[3]},null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null],
[
{"text":"那些水","idxes":[13,14,15]},null,{"text":"舀","idxes":[11]},null,null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,{"text":"出","idxes":[12]},null,null,null,null,null,null,null],
[
{"text":"水","idxes":[38]},
null,
{"text":"舀","idxes":[40]},
"假", // note this is just a standalone string
null,null,null,{"text":"坑里","idxes":[35,36]},null,null,null,null,null,null,null,null,null,null]]
```
### Motivation
I'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features).
```json
{"qid":"3-train-1058","context":"桑桑害怕了。从玉米地里走到田埂上,他遥望着他家那幢草房子里的灯光,知道母亲没有让他回家的意思,很伤感,有点想哭。但没哭,转身朝阿恕家走去。","corefs":[[{"text":"桑桑","idxes":[0,1]},{"text":"他","idxes":[17]}]],"non_corefs":[],"outputs":[[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[11]},null,null,null,null,null,{"text":"从玉米地里","idxes":[6,7,8,9,10]},{"text":"到田埂上","idxes":[12,13,14,15]},null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[66]},null,null,null,null,null,null,null,{"text":"转身朝阿恕家去","idxes":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{"text":"灯光","idxes":[30,31]},null,null,null,null,null,null,{"text":"草房子里","idxes":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},{"text":"他家那幢草房子","idxes":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"远"],[{"text":"他","idxes":[17]},{"text":"阿恕家","idxes":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"变近"]]}
```
### Your contribution
I'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 . | 227 | 18 | Is it possible or how to define a `datasets.Sequence` that could potentially be either a dict, a str, or None?
### Feature request
Hello! Apologies if my question sounds naive:
I was wondering if it’s possible, or how one would go about defining a 'datasets.Sequence' element in datasets.Features that could potentially be either a dict, a str, or None?
Specifically, I’d like to define a feature for a list that contains 18 elements, each of which has been pre-defined as either a `dict or None` or `str or None` - as demonstrated in the slightly misaligned data provided below:
```json
[
[
{"text":"老妇人","idxes":[0,1,2]},null,{"text":"跪","idxes":[3]},null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,null,null,null,null,null,null,null,null,null],
[
{"text":"那些水","idxes":[13,14,15]},null,{"text":"舀","idxes":[11]},null,null,null,null,null,{"text":"在那坑里","idxes":[4,5,6,7]},null,{"text":"出","idxes":[12]},null,null,null,null,null,null,null],
[
{"text":"水","idxes":[38]},
null,
{"text":"舀","idxes":[40]},
"假", // note this is just a standalone string
null,null,null,{"text":"坑里","idxes":[35,36]},null,null,null,null,null,null,null,null,null,null]]
```
### Motivation
I'm currently working with a dataset of the following structure and I couldn't find a solution in the [documentation](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Features).
```json
{"qid":"3-train-1058","context":"桑桑害怕了。从玉米地里走到田埂上,他遥望着他家那幢草房子里的灯光,知道母亲没有让他回家的意思,很伤感,有点想哭。但没哭,转身朝阿恕家走去。","corefs":[[{"text":"桑桑","idxes":[0,1]},{"text":"他","idxes":[17]}]],"non_corefs":[],"outputs":[[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[11]},null,null,null,null,null,{"text":"从玉米地里","idxes":[6,7,8,9,10]},{"text":"到田埂上","idxes":[12,13,14,15]},null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},null,{"text":"走","idxes":[66]},null,null,null,null,null,null,null,{"text":"转身朝阿恕家去","idxes":[60,61,62,63,64,65,67]},null,null,null,null,null,null,null],[{"text":"灯光","idxes":[30,31]},null,null,null,null,null,null,{"text":"草房子里","idxes":[25,26,27,28]},null,null,null,null,null,null,null,null,null,null],[{"text":"他","idxes":[17]},{"text":"他家那幢草房子","idxes":[21,22,23,24,25,26,27]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"远"],[{"text":"他","idxes":[17]},{"text":"阿恕家","idxes":[63,64,65]},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"变近"]]}
```
### Your contribution
I'm going to provide the dataset at https://huggingface.co/datasets/2030NLP/SpaCE2022 .
Column names need to be strings, so you could use "1", "2", etc. or give appropriate column names | [
-1.0237053632736206,
-0.780731737613678,
-0.8739224672317505,
1.4091014862060547,
-0.3429599404335022,
-0.9813445806503296,
0.2079371064901352,
-1.3636884689331055,
1.5822197198867798,
-0.7283565998077393,
0.35450559854507446,
-1.6121089458465576,
0.05460144579410553,
-0.6801802515983582,
-0.7336546182632446,
-0.9616885781288147,
-0.33791404962539673,
-0.7622677683830261,
0.943121612071991,
2.6578290462493896,
1.2098463773727417,
-1.3876879215240479,
2.413327693939209,
0.7444000840187073,
-0.10142239928245544,
-0.8599492907524109,
0.6486847400665283,
-0.10269658267498016,
-1.0311195850372314,
-0.4848593473434448,
-0.9382537007331848,
-0.20505550503730774,
-0.5109292268753052,
-0.45636916160583496,
-0.17873989045619965,
0.5108582973480225,
-0.3536094129085541,
-0.3010038733482361,
-0.666124165058136,
-0.9589288234710693,
0.5597716569900513,
-0.5121389031410217,
1.1294382810592651,
-0.2791995406150818,
1.714605450630188,
-0.5311667323112488,
0.36822524666786194,
0.751789391040802,
1.286393165588379,
0.3482624292373657,
0.06837617605924606,
0.20135605335235596,
0.37422770261764526,
-0.2261449694633484,
0.44095954298973083,
0.998948335647583,
0.7555216550827026,
0.46585923433303833,
0.9501376748085022,
-2.1250710487365723,
1.1021071672439575,
-1.3246619701385498,
0.29548031091690063,
1.4776113033294678,
-0.6497563719749451,
0.39976856112480164,
-1.940110445022583,
-0.16397158801555634,
0.5256699323654175,
-2.135049343109131,
0.46494242548942566,
-1.3176600933074951,
-0.5751921534538269,
0.8647125363349915,
0.36249759793281555,
-1.223453164100647,
0.2186724990606308,
-0.33742180466651917,
0.8081257939338684,
0.3050299286842346,
1.024501919746399,
-1.8196709156036377,
-0.03694489225745201,
-0.46801620721817017,
0.20697863399982452,
-1.3086720705032349,
-1.4609262943267822,
0.5988879799842834,
0.41640570759773254,
0.4824635088443756,
-0.18252822756767273,
1.056219220161438,
-1.0783835649490356,
0.6689674258232117,
-1.2126473188400269,
-1.625083088874817,
-1.4093239307403564,
-2.189600944519043,
-2.154985189437866,
0.7920233607292175,
-0.5622314810752869,
-0.6497026681900024,
2.0281429290771484,
-0.7142782807350159,
-1.348912000656128,
1.220122218132019,
0.4912872016429901,
0.0017016353085637093,
2.734842538833618,
0.23156949877738953,
-0.6340922117233276,
0.5593481659889221,
-0.8332483172416687,
0.8519343137741089,
-0.4414047598838806,
1.4659205675125122,
0.39851194620132446,
-0.9932922720909119,
1.5933349132537842,
-0.45095154643058777,
0.5488918423652649,
-0.5898324251174927,
-0.44197049736976624,
-0.7985224723815918,
0.48352667689323425,
1.6433807611465454,
-0.2371034473180771,
1.3116402626037598,
-0.2993794083595276,
-1.4553472995758057,
-1.5911881923675537,
1.0784574747085571,
0.3931111693382263,
-0.9057198762893677,
0.20595741271972656,
-0.2754674255847931,
0.18622605502605438,
-0.3345149755477905,
1.1861010789871216,
1.333477258682251,
0.6933215260505676,
-0.3190320134162903,
-0.9356858730316162,
0.21878190338611603,
-0.2497689574956894,
-1.1074281930923462,
-1.7215925455093384,
-0.32265567779541016,
-0.014746172353625298,
0.6061357855796814,
-1.3239768743515015,
1.885071873664856,
0.9445932507514954,
1.9038169384002686,
0.8509995341300964,
-0.6903666257858276,
1.470235824584961,
0.13989682495594025,
1.6455535888671875,
-0.7293651103973389,
0.6156499981880188,
-0.5418612360954285,
-1.2140134572982788,
1.1312750577926636,
-0.11562027037143707,
-1.9044522047042847,
-0.7101300358772278,
-0.9238219857215881,
-0.24744921922683716,
-0.727006733417511,
0.9434235095977783,
-0.20325051248073578,
-1.351838231086731,
0.2260628491640091,
-0.6655918955802917,
-0.3035913109779358,
-1.2607988119125366,
0.34455108642578125,
0.4503610134124756,
-0.5181759595870972,
0.1129375547170639,
0.030030017718672752,
-1.2794216871261597,
-0.5095626711845398,
0.12939508259296417,
1.8999489545822144,
-0.6954243779182434,
0.7766499519348145,
1.1198577880859375,
-0.7551036477088928,
-0.07808817923069,
0.26452964544296265,
-0.4310256242752075,
0.6912551522254944,
-1.0416771173477173,
-0.7564067244529724,
1.1188441514968872,
-0.10590449720621109,
-0.4178147614002228,
1.3426743745803833,
0.6431400179862976,
-1.0244789123535156,
-0.2383599877357483,
-0.14961451292037964,
-0.7454330325126648,
0.20463484525680542,
-1.5083200931549072,
-0.09401319175958633,
0.5700939297676086,
-1.4888310432434082,
-0.4067423343658447,
-0.08924736082553864,
1.1681276559829712,
-0.3648841977119446,
1.2642202377319336,
-0.3824000954627991,
-0.2648827135562897,
-0.33622878789901733,
-0.2841700613498688,
0.06324617564678192,
-0.2530861794948578,
-0.6141355037689209,
0.2561434507369995,
-0.885171115398407,
0.3213801980018616,
1.2789040803909302,
0.38321465253829956,
0.09509258717298508,
0.28250831365585327,
0.890652596950531,
0.43738919496536255,
0.13126620650291443,
-1.0737290382385254,
-1.1297358274459839,
1.9878664016723633,
-1.5173015594482422,
1.9853211641311646,
0.7599162459373474,
0.10992246121168137,
-1.86262845993042,
-1.9185115098953247,
1.4391145706176758,
1.2921630144119263,
2.3718907833099365,
0.5288383364677429,
0.35249030590057373,
-0.6858730912208557,
-0.5122712254524231,
0.2765444219112396,
-1.152827501296997,
-0.6248421669006348,
0.33059123158454895,
2.4604697227478027,
1.7070741653442383,
-0.5956709384918213,
-0.22019797563552856,
-1.0109273195266724,
1.3778260946273804,
-0.16485033929347992,
0.18892455101013184,
2.223780393600464,
-0.28322920203208923,
-1.1146973371505737,
1.2595487833023071,
-2.3705484867095947,
0.05707938224077225,
1.8478374481201172,
0.4175609052181244,
0.1296515166759491,
-1.2062444686889648,
-0.6516469120979309,
-0.4742569923400879,
-0.6450387835502625,
-1.1973395347595215,
0.6015016436576843,
-0.131276473402977,
-0.7992242574691772,
-1.535184383392334,
0.23058296740055084,
-1.2593375444412231,
-1.4988747835159302,
0.14630283415317535,
1.850671648979187,
2.216524600982666,
-0.8831778764724731,
1.5514869689941406,
-0.3290152847766876,
-0.05736968666315079,
1.0956978797912598,
1.183039903640747,
2.9545793533325195,
1.825974941253662,
-1.1934975385665894,
0.45708921551704407,
-0.23554770648479462,
-0.5633119344711304,
1.1402037143707275,
-1.1427725553512573,
1.1901161670684814,
0.017113158479332924,
-1.0127605199813843,
-1.0200673341751099,
0.685856819152832,
0.2406909316778183,
0.029619107022881508,
-0.5082874894142151,
1.1093499660491943,
0.23498636484146118,
1.240241289138794,
0.7295942902565002,
-0.010943610221147537,
0.6145901083946228,
-0.5458569526672363,
-0.4302719235420227,
1.4946473836898804,
0.20117981731891632,
-1.5724784135818481,
-2.428459882736206,
-0.212712362408638,
-0.8727402687072754,
0.1612670123577118,
-0.5523873567581177,
-1.0889149904251099,
1.962677240371704,
0.032858774065971375,
-1.2227505445480347,
-0.26160016655921936,
-0.4119304120540619,
-0.4843319356441498,
2.8419392108917236,
-1.4294700622558594,
-0.14006413519382477,
-0.9375505447387695,
-0.6783268451690674,
1.620255947113037,
-1.1069891452789307,
-0.08983772993087769,
-1.1497247219085693,
-0.3586273491382599,
-1.3381586074829102,
-0.5286868214607239,
0.06104506552219391,
-0.9964444637298584,
0.9607572555541992,
0.4364524483680725,
-1.1696994304656982,
-0.5081835985183716,
-0.9081526398658752,
0.7105077505111694,
-0.12286709249019623,
0.2643031179904938,
1.9374756813049316,
0.4939785301685333,
-0.08161840587854385,
0.6799352765083313,
1.309945821762085,
0.7298666834831238,
-0.5168535113334656,
0.036321528255939484,
-0.6886337399482727,
0.2800961434841156,
-1.0883461236953735,
0.2524600028991699,
-2.628122329711914,
0.697226345539093,
-0.10371579229831696,
-0.10440387576818466,
-0.018126865848898888,
-1.2419416904449463,
1.2093772888183594,
2.6376938819885254,
-1.1462864875793457,
0.4177221655845642,
0.248820498585701,
1.2397840023040771,
-1.5784974098205566,
0.23821508884429932,
-0.2466902881860733,
2.130363941192627,
0.05493292957544327,
1.0097956657409668,
-0.5016562342643738,
-2.3793742656707764,
0.49516990780830383,
-1.3553805351257324,
-1.2666264772415161,
0.6683905720710754,
-0.8552274703979492,
0.16785672307014465,
-1.714041829109192,
-0.14715895056724548,
-0.8932830691337585,
-1.205909252166748,
0.8350200653076172,
0.03486078232526779,
0.4450001120567322,
-0.4071362018585205,
0.3703683614730835,
-2.1884143352508545,
-1.5897608995437622,
-0.4109429121017456,
-0.9493758678436279,
0.5658547878265381,
-0.3301164209842682,
0.948996901512146,
-0.2112174779176712,
-0.12000256031751633,
0.5400329828262329,
1.499732494354248,
3.4562814235687256,
0.21114934980869293,
0.5585626363754272,
-0.2867667078971863,
-1.1179890632629395,
1.411685585975647,
0.9448193907737732,
0.2491915374994278,
-0.47887295484542847,
-0.9925411939620972,
1.126530647277832,
2.073052167892456,
1.0674941539764404,
-0.0853344202041626,
-0.752416729927063,
-0.5683936476707458,
-0.015994856134057045,
0.27632370591163635,
0.2245723009109497,
0.8840125799179077,
-0.1258411556482315,
-0.1705019474029541,
1.5781928300857544,
1.1269029378890991,
-0.40947574377059937,
0.2995513379573822,
-0.7561257481575012,
-0.3980792462825775,
0.6873266696929932,
0.1013513132929802,
0.04565062373876572,
0.7099671363830566,
-0.8750848770141602,
-0.549414336681366,
-0.23995496332645416,
-0.9203011393547058,
-0.5441256761550903,
-0.5310254096984863,
-0.28968003392219543,
1.6872491836547852,
0.07776176184415817,
-0.47959089279174805,
0.13993561267852783,
-0.8160107135772705,
-0.05994571000337601,
-1.2062184810638428,
-0.08955605328083038,
-0.0746314525604248,
-0.22115612030029297,
-0.2204282134771347,
1.8566843271255493,
-0.7963223457336426,
-1.957541584968567,
0.0009647030383348465,
0.46565693616867065,
-0.22451308369636536,
0.2806330919265747,
1.5862938165664673,
0.5521219372749329,
1.6036076545715332,
0.9420796632766724,
0.9063416719436646,
-0.6633774638175964,
-1.3774244785308838,
0.7476268410682678,
1.1380831003189087,
-1.3544007539749146,
1.0000094175338745,
0.006935356184840202,
-0.30960628390312195,
0.4951176345348358,
1.1189814805984497,
0.38627707958221436,
-1.9312270879745483,
0.8139619827270508,
-0.9146497845649719,
0.9222025871276855,
0.5580055713653564,
0.5810673832893372,
0.23466253280639648,
0.6815446615219116,
-1.2192398309707642,
-0.9918795228004456,
-0.7430294752120972,
-0.37457311153411865,
2.092496871948242,
-0.2742360532283783,
0.8738365173339844,
-0.3089413642883301,
-1.2502764463424683,
0.03841305524110794,
0.6317412257194519,
0.5457729697227478,
-0.5350808501243591,
0.7544348835945129,
-0.5934950113296509,
-1.1136549711227417,
-1.3771387338638306,
-0.4268919825553894,
-1.1379228830337524,
-0.9210842847824097,
1.3428711891174316,
0.7177772521972656,
0.2818557322025299,
1.832584261894226,
0.9372020959854126,
0.1432575285434723,
-2.3123953342437744,
0.9935200214385986,
0.46535724401474,
-0.2025582194328308,
0.770850419998169,
0.5144168734550476,
0.9992485046386719,
-0.13790330290794373,
0.6417747735977173,
-2.530941963195801,
2.307774782180786,
-0.0792309045791626,
0.7944806814193726,
0.2222464233636856,
-0.21204793453216553,
0.9207054376602173,
0.5693585276603699,
0.36225324869155884,
-1.0961530208587646,
0.293344646692276,
-0.43855229020118713,
1.2879691123962402,
1.0215873718261719,
-0.632357656955719,
0.06668338179588318,
1.3401594161987305,
0.6196279525756836,
-0.5376738905906677,
-0.9972079396247864,
-0.6124434471130371,
0.9925171136856079,
1.5755270719528198,
-0.36219942569732666,
-0.10449206829071045,
0.8148907423019409,
0.49713751673698425,
-1.3224589824676514,
0.1094423159956932,
-0.8880977034568787,
-0.8708164095878601,
1.6209367513656616,
2.1832854747772217,
-0.3630804121494293,
-0.023231014609336853,
-0.6692898869514465,
-1.283970832824707,
0.8516054153442383,
-0.06631524860858917,
0.2737860381603241,
0.36372625827789307,
-0.6060671806335449,
1.015894889831543,
0.9182292819023132,
0.9300114512443542,
0.5784448385238647,
0.3752460479736328,
0.428488165140152,
-0.5660242438316345,
-0.8446511626243591,
-0.2748076319694519,
-1.187439203262329,
-2.6857495307922363,
0.5386486649513245,
-0.26595601439476013,
-1.2861533164978027,
-0.1500612497329712,
-0.8426544666290283,
1.1096919775009155,
-0.46495887637138367,
-0.8235081434249878,
-1.5650358200073242,
0.4489305913448334,
0.12472178786993027,
1.1579382419586182,
-1.7595785856246948,
-0.3883267641067505,
1.1652239561080933,
0.8599317669868469,
-0.8553951382637024,
0.6769396662712097,
0.15643450617790222,
1.3142952919006348,
0.769474983215332,
-0.3941535949707031,
0.5773390531539917,
-0.18034297227859497,
-1.2738616466522217,
0.43781155347824097,
1.1434354782104492,
0.035062842071056366,
1.2910091876983643,
-0.23653197288513184,
0.011715427041053772,
0.2338557243347168,
-0.5099981427192688,
-0.5225237011909485,
-0.40172335505485535,
0.5924028754234314,
0.17395798861980438,
-1.0250186920166016,
-0.14704188704490662,
0.04845487326383591,
-0.31711551547050476,
0.2808615267276764,
-1.3361232280731201,
-0.20448265969753265,
-0.5198367834091187,
-0.4355441629886627,
-1.2482757568359375,
-0.323915034532547,
1.2548608779907227,
-0.5044047236442566,
-0.15903040766716003,
0.398756206035614,
0.4604467451572418,
0.5062810778617859,
0.6526396870613098,
-0.7599976062774658,
-0.6117263436317444,
-0.28076374530792236,
-0.5682600736618042,
0.28515300154685974,
1.479868769645691,
-0.14898476004600525,
-0.98838871717453,
0.6657774448394775,
-0.17255161702632904,
-0.044541388750076294,
1.8455681800842285,
0.11139817535877228,
-0.8321215510368347,
0.42111364006996155,
-0.4742531478404999,
1.8531873226165771,
1.83128821849823,
1.1343342065811157,
-0.27440759539604187,
-0.8185808658599854,
0.8039049506187439,
-0.5704329609870911,
-0.5320774912834167,
0.7170118689537048,
0.0693955272436142,
-0.294240802526474,
-1.694796085357666,
0.7429884672164917,
1.5298148393630981,
-0.901275634765625,
-0.9745216965675354,
0.14923612773418427,
-0.8217955827713013,
1.0742847919464111,
0.6177322268486023,
0.4277617633342743,
0.5713223814964294,
1.7716948986053467,
0.932655394077301,
-0.5169231295585632,
0.4750632345676422,
0.6845247745513916,
-0.04205971956253052,
-2.1058051586151123,
-1.4641414880752563,
0.21769486367702484,
-0.5728738307952881,
-1.4100614786148071,
1.4422351121902466,
-0.9734560251235962,
-1.1375038623809814,
0.6719993352890015,
0.033724091947078705,
1.309421181678772,
0.49378451704978943,
1.381445288658142,
2.0294768810272217,
0.724682092666626,
0.38543713092803955,
1.1711986064910889,
-0.15872444212436676,
-0.4677883982658386,
1.9583967924118042,
-0.37535935640335083,
0.33875522017478943,
1.082969069480896,
-0.09645283222198486,
-1.1226186752319336,
-0.7628698348999023,
-1.252020001411438,
-0.748961865901947,
1.3662832975387573,
-0.04208219796419144,
-1.0160892009735107,
0.3551161289215088,
1.8380482196807861,
-0.1469486802816391,
-0.7371396422386169,
0.554749608039856,
0.5749960541725159,
-0.9376801252365112,
-0.1259215623140335,
-0.7936100363731384,
0.655112624168396,
-0.09998003393411636,
-0.18442270159721375,
0.4155273139476776,
0.5962246656417847,
1.5013786554336548,
-0.07750506699085236,
0.25519782304763794,
0.6187142133712769,
-1.4670804738998413,
1.465257167816162,
-0.6864330172538757,
0.12013759464025497,
-2.1520884037017822,
1.222872018814087,
-0.5705502033233643,
2.116407632827759,
-2.6215667724609375,
0.3279123902320862,
-0.37466058135032654,
-0.6365712285041809,
0.1223113015294075,
-0.4890262186527252,
0.3095012903213501,
-0.0700511485338211,
-1.0390174388885498,
0.11239602416753769,
-0.6071338653564453,
0.4663045406341553,
1.0707509517669678,
1.3945051431655884,
-0.9577890634536743,
-0.4458314776420593,
-1.603217363357544,
-0.06763510406017303,
-0.758898138999939,
-0.07424293458461761,
-1.9401623010635376,
-0.3090572655200958,
-1.8518015146255493,
-2.1291964054107666,
-1.5164625644683838,
-0.98609858751297,
1.284189224243164,
0.12405886501073837,
-1.09567129611969,
1.3735997676849365,
-0.28150683641433716,
-2.1456940174102783,
1.2141013145446777,
-2.0226259231567383
] |
https://github.com/huggingface/datasets/issues/5695 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError | Hi ! It looks like an issue with PyArrow: https://issues.apache.org/jira/browse/ARROW-5030
It appears it can happen when you have parquet files with row groups larger than 2GB.
I can see that your parquet files are around 10GB. It is usually advised to keep a value around the default value 500MB to avoid these issues.
Note that currently the row group size is simply defined by the number of rows `datasets.config.DEFAULT_MAX_BATCH_SIZE`, so reducing this value could let you have parquet files bigger than 2GB and with row groups lower than 2GB.
Would it be possible for you to re-upload the dataset with the default shard size 500MB ? | ### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 230 | 106 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError
### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Hi ! It looks like an issue with PyArrow: https://issues.apache.org/jira/browse/ARROW-5030
It appears it can happen when you have parquet files with row groups larger than 2GB.
I can see that your parquet files are around 10GB. It is usually advised to keep a value around the default value 500MB to avoid these issues.
Note that currently the row group size is simply defined by the number of rows `datasets.config.DEFAULT_MAX_BATCH_SIZE`, so reducing this value could let you have parquet files bigger than 2GB and with row groups lower than 2GB.
Would it be possible for you to re-upload the dataset with the default shard size 500MB ? | [
-1.1584420204162598,
-0.8912860751152039,
-0.7004311084747314,
1.4251720905303955,
-0.12030670046806335,
-1.3218984603881836,
0.1318410336971283,
-1.1046695709228516,
1.6368975639343262,
-0.734870195388794,
0.2892012596130371,
-1.6862632036209106,
0.002791421487927437,
-0.5048418045043945,
-0.7005982398986816,
-0.8801894187927246,
-0.4100920259952545,
-0.8641971945762634,
1.0118001699447632,
2.559230089187622,
1.2496337890625,
-1.3655211925506592,
2.7572028636932373,
0.6563696265220642,
-0.25937819480895996,
-0.967100977897644,
0.5628082752227783,
0.033216219395399094,
-1.28641676902771,
-0.44676393270492554,
-0.9187940955162048,
-0.026316218078136444,
-0.5711625218391418,
-0.48736581206321716,
0.08646433800458908,
0.4420551061630249,
-0.31736770272254944,
-0.35037821531295776,
-0.5560927391052246,
-0.7553178071975708,
0.4577527940273285,
-0.2971421480178833,
0.9734166860580444,
-0.3144895136356354,
1.7730730772018433,
-0.6072448492050171,
0.43617549538612366,
0.7563278675079346,
1.2732924222946167,
0.1360660195350647,
0.05363386869430542,
0.29288429021835327,
0.32130447030067444,
-0.013630987145006657,
0.45759326219558716,
1.2441037893295288,
0.5869547128677368,
0.43418318033218384,
0.6300895810127258,
-2.1854774951934814,
1.3160297870635986,
-0.8981088995933533,
0.3136797249317169,
1.2706271409988403,
-0.9013770818710327,
0.31665343046188354,
-1.761488914489746,
-0.06098407879471779,
0.5568838119506836,
-2.1685898303985596,
0.2534269392490387,
-1.3398077487945557,
-0.5034123659133911,
0.916298508644104,
0.26333603262901306,
-1.2064259052276611,
0.24743014574050903,
-0.5124821066856384,
1.0964651107788086,
0.487459659576416,
1.1317967176437378,
-1.692310094833374,
-0.027147747576236725,
-0.21166832745075226,
0.08767128735780716,
-1.2633733749389648,
-1.6173157691955566,
0.5222352147102356,
0.6002700924873352,
0.6705911159515381,
-0.03447858989238739,
1.0592310428619385,
-1.0448766946792603,
0.8063608407974243,
-1.021397590637207,
-1.6683777570724487,
-1.316583514213562,
-2.322575330734253,
-2.28189754486084,
0.8050827383995056,
-0.47864529490470886,
-0.46442723274230957,
2.0303256511688232,
-0.9784960150718689,
-1.806397557258606,
1.0636327266693115,
0.34501370787620544,
-0.023605383932590485,
2.290510654449463,
0.25051072239875793,
-0.7723171710968018,
0.4278845191001892,
-0.7305286526679993,
0.7530023455619812,
-0.28447964787483215,
1.3394320011138916,
0.5173555016517639,
-1.0134741067886353,
1.5661545991897583,
-0.40217992663383484,
0.603365421295166,
-0.7076766490936279,
-0.5216339230537415,
-0.820396363735199,
0.30493611097335815,
1.9233933687210083,
-0.41795846819877625,
1.5665972232818604,
-0.32535186409950256,
-1.612524151802063,
-1.539542317390442,
0.8723389506340027,
0.5708447098731995,
-0.850145161151886,
0.055726177990436554,
-0.41592660546302795,
0.07948222011327744,
-0.02494000270962715,
1.1144044399261475,
1.19475257396698,
0.7606111764907837,
-0.3641124665737152,
-0.8348156809806824,
0.17063458263874054,
-0.11760354787111282,
-0.6874507069587708,
-1.8554213047027588,
-0.3214758038520813,
0.2185743749141693,
0.646304726600647,
-1.2617422342300415,
1.744754672050476,
0.8987743258476257,
1.9950047731399536,
0.9435319304466248,
-0.3481111228466034,
1.522296667098999,
0.02758777141571045,
1.8872162103652954,
-0.4535648822784424,
0.6062034964561462,
-0.37436172366142273,
-1.1790525913238525,
0.9142457246780396,
-0.30384182929992676,
-2.0284759998321533,
-0.7897822260856628,
-0.8194487690925598,
-0.19210952520370483,
-0.7970402836799622,
0.8506245017051697,
-0.2876681983470917,
-1.5271644592285156,
0.19540609419345856,
-0.6748070120811462,
0.16178856790065765,
-1.2453441619873047,
0.22394490242004395,
0.7095369100570679,
-0.6577045321464539,
0.015259764157235622,
-0.2291834056377411,
-1.3044990301132202,
-0.4835032820701599,
0.3388691842556,
1.9008182287216187,
-0.6828242540359497,
1.0003936290740967,
1.0767406225204468,
-0.7053494453430176,
0.04773148149251938,
0.2859351634979248,
-0.3431723713874817,
0.8558443188667297,
-1.1513534784317017,
-0.3513624370098114,
1.1672794818878174,
-0.09636565297842026,
-0.6166493892669678,
1.3822835683822632,
0.7980219721794128,
-1.0448157787322998,
-0.24271202087402344,
-0.18524087965488434,
-0.8335813283920288,
0.0374394915997982,
-1.5698295831680298,
-0.13686032593250275,
0.3855557441711426,
-1.4715466499328613,
-0.40854528546333313,
-0.22884024679660797,
1.3492472171783447,
-0.19315406680107117,
1.4395865201950073,
-0.30618932843208313,
-0.22731143236160278,
-0.3667028844356537,
-0.4465672969818115,
0.12500602006912231,
-0.15644590556621552,
-0.6070396304130554,
0.20475171506404877,
-0.7765262126922607,
0.3028438687324524,
1.4819180965423584,
0.3335067927837372,
0.02615930140018463,
0.5184164047241211,
1.0946370363235474,
0.3358118534088135,
0.01473285723477602,
-0.8923898339271545,
-1.5565828084945679,
1.990200400352478,
-1.4948668479919434,
1.9561777114868164,
0.7811244130134583,
-0.006574148312211037,
-1.8612490892410278,
-1.8722968101501465,
1.357504963874817,
1.1392991542816162,
2.3641443252563477,
0.5224025845527649,
0.47658416628837585,
-0.7614096999168396,
-0.7210716009140015,
0.3659327030181885,
-1.0116102695465088,
-0.6936107873916626,
0.2306615114212036,
2.418210744857788,
1.7629142999649048,
-0.5131028890609741,
-0.28078222274780273,
-0.8756817579269409,
1.3391084671020508,
-0.1912681758403778,
0.18674036860466003,
2.0248703956604004,
-0.26894477009773254,
-1.0147007703781128,
1.2784755229949951,
-2.3434767723083496,
0.21553339064121246,
2.052333354949951,
0.27531880140304565,
0.12684457004070282,
-1.444473385810852,
-0.675831139087677,
-0.2578597962856293,
-0.48930078744888306,
-1.2574050426483154,
0.5506855845451355,
-0.28638678789138794,
-0.846836268901825,
-1.5048457384109497,
0.08681067824363708,
-1.1598119735717773,
-1.782096028327942,
0.3072095811367035,
1.960145354270935,
1.9860031604766846,
-0.7246497869491577,
1.495766282081604,
-0.3088911473751068,
0.15610367059707642,
1.2984005212783813,
1.286393165588379,
3.092874526977539,
1.8032641410827637,
-1.2950668334960938,
0.7068806290626526,
-0.17057721316814423,
-0.5163822770118713,
1.1283270120620728,
-1.1337475776672363,
1.157673954963684,
-0.19209063053131104,
-1.2466604709625244,
-1.2673470973968506,
1.0812344551086426,
0.48434847593307495,
0.09385403245687485,
-0.4704281687736511,
1.2510488033294678,
0.11095044761896133,
1.3256704807281494,
0.582831859588623,
-0.4214476943016052,
0.6207507252693176,
-0.37393054366111755,
-0.5221561193466187,
1.582440972328186,
0.20651590824127197,
-1.41183602809906,
-2.423480987548828,
-0.27281129360198975,
-0.9170238971710205,
-0.06768975406885147,
-0.5916945338249207,
-1.0581474304199219,
1.5464017391204834,
0.4775499403476715,
-1.226952314376831,
-0.21558067202568054,
-0.27427026629447937,
-0.5582973957061768,
2.6002354621887207,
-1.2757799625396729,
-0.11920396238565445,
-0.9005039930343628,
-0.5830767750740051,
1.5886914730072021,
-1.1908483505249023,
-0.23164840042591095,
-1.0427416563034058,
-0.5765376687049866,
-1.3200674057006836,
-0.552291989326477,
0.02920261025428772,
-0.9151005744934082,
0.7467665672302246,
0.11424274742603302,
-1.1443111896514893,
-0.28752419352531433,
-0.9331220984458923,
1.0188241004943848,
-0.08392824232578278,
0.2029861956834793,
1.8643949031829834,
0.43044212460517883,
-0.3998628258705139,
0.732067346572876,
1.1912411451339722,
0.5949237942695618,
-0.6795386672019958,
0.13239961862564087,
-0.7266748547554016,
0.27466490864753723,
-1.4145933389663696,
0.20932169258594513,
-2.943953037261963,
0.7162523865699768,
-0.11171484738588333,
-0.05280688777565956,
-0.08064969629049301,
-1.3794463872909546,
1.0897362232208252,
2.6290502548217773,
-1.1545379161834717,
0.49992915987968445,
0.4246937036514282,
1.14035165309906,
-1.5420615673065186,
0.29312074184417725,
-0.46872031688690186,
2.02581524848938,
0.11757972836494446,
1.2543514966964722,
-0.4891674816608429,
-2.1834969520568848,
0.5941333174705505,
-1.3215962648391724,
-1.163177251815796,
0.8093976378440857,
-0.8725244998931885,
0.20597058534622192,
-1.3925795555114746,
-0.20610564947128296,
-0.9324313998222351,
-1.2335968017578125,
0.6964347958564758,
0.10617506504058838,
0.42186710238456726,
-0.5302756428718567,
0.3542580306529999,
-2.2033541202545166,
-1.374290943145752,
-0.16930676996707916,
-0.9695870876312256,
0.4990784227848053,
-0.3003053367137909,
0.6088464856147766,
-0.10741691291332245,
0.09098310768604279,
0.299652099609375,
1.4092028141021729,
3.391024589538574,
0.1913328766822815,
0.2617091238498688,
-0.12747380137443542,
-1.0531423091888428,
1.4516069889068604,
0.91960209608078,
-0.1624244749546051,
-0.5802281498908997,
-0.9723947048187256,
1.2144639492034912,
2.0534253120422363,
1.1078158617019653,
0.027319051325321198,
-0.8278777599334717,
-0.7586079835891724,
0.03463833034038544,
0.13015496730804443,
0.5156508088111877,
0.8983733057975769,
0.037629712373018265,
0.09387064725160599,
1.3792532682418823,
1.1073073148727417,
-0.38381341099739075,
0.42423397302627563,
-0.8768362998962402,
-0.41092437505722046,
0.428305983543396,
0.26778340339660645,
0.07937821745872498,
0.43019428849220276,
-1.0534619092941284,
-0.3075699210166931,
-0.38354048132896423,
-0.9107404351234436,
-0.747949481010437,
-0.4770732522010803,
-0.39815467596054077,
1.6420501470565796,
0.07434330880641937,
-0.4935796558856964,
0.01848919689655304,
-0.7324572205543518,
-0.11627571284770966,
-1.0917197465896606,
0.25082066655158997,
-0.17428554594516754,
-0.033457376062870026,
-0.09927327185869217,
1.7165937423706055,
-1.0248970985412598,
-2.0840535163879395,
0.17687909305095673,
0.2402757704257965,
-0.3502139151096344,
0.21089671552181244,
1.6644400358200073,
0.5843873023986816,
1.3839318752288818,
1.3039336204528809,
1.0040698051452637,
-0.6768912672996521,
-1.2765392065048218,
0.7070828080177307,
0.9853059649467468,
-1.2976819276809692,
0.8299503326416016,
-0.04880322515964508,
-0.4977869987487793,
0.6488150954246521,
1.3358137607574463,
0.47305741906166077,
-2.028226613998413,
0.8090752959251404,
-0.8451061248779297,
0.6905303001403809,
0.6798875331878662,
0.7911319136619568,
0.2549084424972534,
0.8080633878707886,
-1.2454171180725098,
-1.1526590585708618,
-0.7090998291969299,
-0.624320387840271,
1.9075453281402588,
-0.22388695180416107,
0.5261162519454956,
-0.19710083305835724,
-1.270490288734436,
-0.06633823364973068,
0.8098951578140259,
0.45836931467056274,
-0.5051875710487366,
0.7544383406639099,
-0.6161383986473083,
-1.0447756052017212,
-1.3202991485595703,
-0.42956578731536865,
-1.0387096405029297,
-0.895171582698822,
0.9502424597740173,
0.7390768527984619,
0.410259485244751,
1.9424858093261719,
0.641340970993042,
0.27429062128067017,
-2.6736838817596436,
0.848546028137207,
0.27654409408569336,
-0.043671865016222,
0.8818790316581726,
0.2756211757659912,
1.0893793106079102,
-0.04824838414788246,
0.6756489276885986,
-2.3395533561706543,
2.261582136154175,
-0.20426835119724274,
0.6346262693405151,
0.00937968771904707,
-0.24215036630630493,
1.177962303161621,
0.49472078680992126,
0.5766185522079468,
-1.1240493059158325,
0.6441947221755981,
-0.6220946311950684,
1.1313345432281494,
0.8835169076919556,
-0.9200606942176819,
0.06332136690616608,
1.4021552801132202,
0.46878141164779663,
-0.4600552022457123,
-0.9375506639480591,
-0.9447667002677917,
0.9700790047645569,
1.6934840679168701,
-0.07590273767709732,
0.03344951197504997,
0.8918208479881287,
0.6271235346794128,
-1.3327559232711792,
0.06596595048904419,
-0.739592432975769,
-0.7336629629135132,
1.710216999053955,
2.024601459503174,
-0.11654571443796158,
-0.14677664637565613,
-0.803758442401886,
-1.2151066064834595,
0.8076859712600708,
-0.07791861891746521,
0.04411241412162781,
0.6352089047431946,
-0.5877286791801453,
1.1820710897445679,
0.7098457217216492,
1.0101348161697388,
0.08919965475797653,
0.3467700183391571,
0.32141831517219543,
-0.3639642894268036,
-1.1433998346328735,
-0.3385066092014313,
-1.0741806030273438,
-2.5300469398498535,
0.4311537742614746,
-0.2204267531633377,
-1.4559392929077148,
-0.0413244254887104,
-0.9870700240135193,
0.8428089022636414,
-0.58908611536026,
-1.1244381666183472,
-1.4435312747955322,
0.3024272918701172,
-0.15299196541309357,
0.9660939574241638,
-1.618360161781311,
-0.08569449186325073,
1.2440342903137207,
0.9353460669517517,
-0.641133189201355,
1.011824607849121,
0.2328508049249649,
0.9395701885223389,
0.8516103625297546,
-0.40304335951805115,
0.6067302823066711,
0.0811442956328392,
-1.326859474182129,
0.458716481924057,
1.1812617778778076,
0.20040827989578247,
1.4360297918319702,
-0.5110155344009399,
0.09338769316673279,
0.4786616563796997,
-0.5553287863731384,
-0.5051552653312683,
-0.5102450847625732,
0.6867582201957703,
0.10681676119565964,
-0.9930939078330994,
-0.05442339926958084,
-0.0675528421998024,
-0.23930931091308594,
0.20956860482692719,
-1.469774842262268,
-0.2418811321258545,
-0.31491169333457947,
-0.5633646845817566,
-1.2680584192276,
-0.02275320701301098,
1.3405544757843018,
-0.7896605134010315,
-0.24723432958126068,
0.415435791015625,
0.36970892548561096,
0.5921348333358765,
0.6228301525115967,
-0.6819429993629456,
-0.3591694235801697,
-0.3576444983482361,
-0.33485421538352966,
0.28497064113616943,
1.2995768785476685,
-0.055656589567661285,
-1.0070111751556396,
0.7427350282669067,
-0.40045449137687683,
0.0936032086610794,
2.0083625316619873,
0.030449427664279938,
-0.7332169413566589,
0.3738950490951538,
-0.6596298813819885,
1.8169503211975098,
1.7677916288375854,
1.2792062759399414,
-0.12691208720207214,
-0.873785138130188,
0.5953540205955505,
-0.3100694417953491,
-0.3506271243095398,
0.9624661803245544,
0.3954901695251465,
-0.18161070346832275,
-1.4151217937469482,
0.5798473358154297,
1.3601651191711426,
-0.7955924272537231,
-0.7823179960250854,
0.09541801363229752,
-0.9043639898300171,
1.1518930196762085,
0.6095991134643555,
0.3482995629310608,
0.2583821415901184,
1.5302271842956543,
0.7421630024909973,
-0.47715872526168823,
0.5447303652763367,
0.4325415790081024,
-0.15020416676998138,
-2.117934226989746,
-1.030137538909912,
0.333162397146225,
-0.4326396882534027,
-1.6449793577194214,
1.4005590677261353,
-1.128467082977295,
-0.9971754550933838,
0.5864149928092957,
0.09243639558553696,
1.3527590036392212,
0.3287372589111328,
1.6836531162261963,
2.1102700233459473,
0.9180022478103638,
0.346145898103714,
1.2833620309829712,
-0.05405261740088463,
-0.4206906259059906,
1.8402721881866455,
-0.4325857162475586,
0.49813857674598694,
1.01999032497406,
-0.3825380802154541,
-1.0635147094726562,
-0.845996618270874,
-1.248500108718872,
-0.6120140552520752,
1.1391412019729614,
0.12436266243457794,
-1.1628366708755493,
0.27583855390548706,
1.5926097631454468,
0.12599261105060577,
-0.2564067840576172,
0.7311051487922668,
0.37263166904449463,
-0.768201470375061,
-0.04920952767133713,
-0.9300780296325684,
0.5441156029701233,
-0.1633598506450653,
-0.307687371969223,
0.3098200261592865,
0.5396005511283875,
1.3042628765106201,
-0.04414007440209389,
0.10921963304281235,
1.1797857284545898,
-1.395154356956482,
1.4967219829559326,
-0.6204893589019775,
0.3148537874221802,
-2.4574356079101562,
1.3939447402954102,
-0.8044244050979614,
1.833728551864624,
-2.6135094165802,
0.4127892255783081,
-0.5373541712760925,
-0.42914465069770813,
0.26736345887184143,
-0.34241798520088196,
0.12569138407707214,
-0.16958047449588776,
-1.0290528535842896,
-0.10620482265949249,
-0.7142902612686157,
0.5892893671989441,
1.202710747718811,
1.3573328256607056,
-1.131962776184082,
-0.3017489016056061,
-1.7380865812301636,
-0.07096733897924423,
-0.6748672127723694,
0.3086008131504059,
-1.9743720293045044,
-0.1329527646303177,
-1.9607166051864624,
-2.3817532062530518,
-1.3671880960464478,
-0.8486241698265076,
1.0755555629730225,
0.15539491176605225,
-0.9496749043464661,
1.1200066804885864,
-0.37045973539352417,
-1.8011747598648071,
1.12873375415802,
-2.167217254638672
] |
https://github.com/huggingface/datasets/issues/5695 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError | Hey, thanks for the reply! I've since switched to working with the locally-saved dataset (which works).
Maybe it makes sense to show a warning for uploads with large shard sizes? Since the functionality completely breaks (due to the PyArrow bug). | ### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 230 | 40 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError
### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Hey, thanks for the reply! I've since switched to working with the locally-saved dataset (which works).
Maybe it makes sense to show a warning for uploads with large shard sizes? Since the functionality completely breaks (due to the PyArrow bug). | [
-1.1584420204162598,
-0.8912860751152039,
-0.7004311084747314,
1.4251720905303955,
-0.12030670046806335,
-1.3218984603881836,
0.1318410336971283,
-1.1046695709228516,
1.6368975639343262,
-0.734870195388794,
0.2892012596130371,
-1.6862632036209106,
0.002791421487927437,
-0.5048418045043945,
-0.7005982398986816,
-0.8801894187927246,
-0.4100920259952545,
-0.8641971945762634,
1.0118001699447632,
2.559230089187622,
1.2496337890625,
-1.3655211925506592,
2.7572028636932373,
0.6563696265220642,
-0.25937819480895996,
-0.967100977897644,
0.5628082752227783,
0.033216219395399094,
-1.28641676902771,
-0.44676393270492554,
-0.9187940955162048,
-0.026316218078136444,
-0.5711625218391418,
-0.48736581206321716,
0.08646433800458908,
0.4420551061630249,
-0.31736770272254944,
-0.35037821531295776,
-0.5560927391052246,
-0.7553178071975708,
0.4577527940273285,
-0.2971421480178833,
0.9734166860580444,
-0.3144895136356354,
1.7730730772018433,
-0.6072448492050171,
0.43617549538612366,
0.7563278675079346,
1.2732924222946167,
0.1360660195350647,
0.05363386869430542,
0.29288429021835327,
0.32130447030067444,
-0.013630987145006657,
0.45759326219558716,
1.2441037893295288,
0.5869547128677368,
0.43418318033218384,
0.6300895810127258,
-2.1854774951934814,
1.3160297870635986,
-0.8981088995933533,
0.3136797249317169,
1.2706271409988403,
-0.9013770818710327,
0.31665343046188354,
-1.761488914489746,
-0.06098407879471779,
0.5568838119506836,
-2.1685898303985596,
0.2534269392490387,
-1.3398077487945557,
-0.5034123659133911,
0.916298508644104,
0.26333603262901306,
-1.2064259052276611,
0.24743014574050903,
-0.5124821066856384,
1.0964651107788086,
0.487459659576416,
1.1317967176437378,
-1.692310094833374,
-0.027147747576236725,
-0.21166832745075226,
0.08767128735780716,
-1.2633733749389648,
-1.6173157691955566,
0.5222352147102356,
0.6002700924873352,
0.6705911159515381,
-0.03447858989238739,
1.0592310428619385,
-1.0448766946792603,
0.8063608407974243,
-1.021397590637207,
-1.6683777570724487,
-1.316583514213562,
-2.322575330734253,
-2.28189754486084,
0.8050827383995056,
-0.47864529490470886,
-0.46442723274230957,
2.0303256511688232,
-0.9784960150718689,
-1.806397557258606,
1.0636327266693115,
0.34501370787620544,
-0.023605383932590485,
2.290510654449463,
0.25051072239875793,
-0.7723171710968018,
0.4278845191001892,
-0.7305286526679993,
0.7530023455619812,
-0.28447964787483215,
1.3394320011138916,
0.5173555016517639,
-1.0134741067886353,
1.5661545991897583,
-0.40217992663383484,
0.603365421295166,
-0.7076766490936279,
-0.5216339230537415,
-0.820396363735199,
0.30493611097335815,
1.9233933687210083,
-0.41795846819877625,
1.5665972232818604,
-0.32535186409950256,
-1.612524151802063,
-1.539542317390442,
0.8723389506340027,
0.5708447098731995,
-0.850145161151886,
0.055726177990436554,
-0.41592660546302795,
0.07948222011327744,
-0.02494000270962715,
1.1144044399261475,
1.19475257396698,
0.7606111764907837,
-0.3641124665737152,
-0.8348156809806824,
0.17063458263874054,
-0.11760354787111282,
-0.6874507069587708,
-1.8554213047027588,
-0.3214758038520813,
0.2185743749141693,
0.646304726600647,
-1.2617422342300415,
1.744754672050476,
0.8987743258476257,
1.9950047731399536,
0.9435319304466248,
-0.3481111228466034,
1.522296667098999,
0.02758777141571045,
1.8872162103652954,
-0.4535648822784424,
0.6062034964561462,
-0.37436172366142273,
-1.1790525913238525,
0.9142457246780396,
-0.30384182929992676,
-2.0284759998321533,
-0.7897822260856628,
-0.8194487690925598,
-0.19210952520370483,
-0.7970402836799622,
0.8506245017051697,
-0.2876681983470917,
-1.5271644592285156,
0.19540609419345856,
-0.6748070120811462,
0.16178856790065765,
-1.2453441619873047,
0.22394490242004395,
0.7095369100570679,
-0.6577045321464539,
0.015259764157235622,
-0.2291834056377411,
-1.3044990301132202,
-0.4835032820701599,
0.3388691842556,
1.9008182287216187,
-0.6828242540359497,
1.0003936290740967,
1.0767406225204468,
-0.7053494453430176,
0.04773148149251938,
0.2859351634979248,
-0.3431723713874817,
0.8558443188667297,
-1.1513534784317017,
-0.3513624370098114,
1.1672794818878174,
-0.09636565297842026,
-0.6166493892669678,
1.3822835683822632,
0.7980219721794128,
-1.0448157787322998,
-0.24271202087402344,
-0.18524087965488434,
-0.8335813283920288,
0.0374394915997982,
-1.5698295831680298,
-0.13686032593250275,
0.3855557441711426,
-1.4715466499328613,
-0.40854528546333313,
-0.22884024679660797,
1.3492472171783447,
-0.19315406680107117,
1.4395865201950073,
-0.30618932843208313,
-0.22731143236160278,
-0.3667028844356537,
-0.4465672969818115,
0.12500602006912231,
-0.15644590556621552,
-0.6070396304130554,
0.20475171506404877,
-0.7765262126922607,
0.3028438687324524,
1.4819180965423584,
0.3335067927837372,
0.02615930140018463,
0.5184164047241211,
1.0946370363235474,
0.3358118534088135,
0.01473285723477602,
-0.8923898339271545,
-1.5565828084945679,
1.990200400352478,
-1.4948668479919434,
1.9561777114868164,
0.7811244130134583,
-0.006574148312211037,
-1.8612490892410278,
-1.8722968101501465,
1.357504963874817,
1.1392991542816162,
2.3641443252563477,
0.5224025845527649,
0.47658416628837585,
-0.7614096999168396,
-0.7210716009140015,
0.3659327030181885,
-1.0116102695465088,
-0.6936107873916626,
0.2306615114212036,
2.418210744857788,
1.7629142999649048,
-0.5131028890609741,
-0.28078222274780273,
-0.8756817579269409,
1.3391084671020508,
-0.1912681758403778,
0.18674036860466003,
2.0248703956604004,
-0.26894477009773254,
-1.0147007703781128,
1.2784755229949951,
-2.3434767723083496,
0.21553339064121246,
2.052333354949951,
0.27531880140304565,
0.12684457004070282,
-1.444473385810852,
-0.675831139087677,
-0.2578597962856293,
-0.48930078744888306,
-1.2574050426483154,
0.5506855845451355,
-0.28638678789138794,
-0.846836268901825,
-1.5048457384109497,
0.08681067824363708,
-1.1598119735717773,
-1.782096028327942,
0.3072095811367035,
1.960145354270935,
1.9860031604766846,
-0.7246497869491577,
1.495766282081604,
-0.3088911473751068,
0.15610367059707642,
1.2984005212783813,
1.286393165588379,
3.092874526977539,
1.8032641410827637,
-1.2950668334960938,
0.7068806290626526,
-0.17057721316814423,
-0.5163822770118713,
1.1283270120620728,
-1.1337475776672363,
1.157673954963684,
-0.19209063053131104,
-1.2466604709625244,
-1.2673470973968506,
1.0812344551086426,
0.48434847593307495,
0.09385403245687485,
-0.4704281687736511,
1.2510488033294678,
0.11095044761896133,
1.3256704807281494,
0.582831859588623,
-0.4214476943016052,
0.6207507252693176,
-0.37393054366111755,
-0.5221561193466187,
1.582440972328186,
0.20651590824127197,
-1.41183602809906,
-2.423480987548828,
-0.27281129360198975,
-0.9170238971710205,
-0.06768975406885147,
-0.5916945338249207,
-1.0581474304199219,
1.5464017391204834,
0.4775499403476715,
-1.226952314376831,
-0.21558067202568054,
-0.27427026629447937,
-0.5582973957061768,
2.6002354621887207,
-1.2757799625396729,
-0.11920396238565445,
-0.9005039930343628,
-0.5830767750740051,
1.5886914730072021,
-1.1908483505249023,
-0.23164840042591095,
-1.0427416563034058,
-0.5765376687049866,
-1.3200674057006836,
-0.552291989326477,
0.02920261025428772,
-0.9151005744934082,
0.7467665672302246,
0.11424274742603302,
-1.1443111896514893,
-0.28752419352531433,
-0.9331220984458923,
1.0188241004943848,
-0.08392824232578278,
0.2029861956834793,
1.8643949031829834,
0.43044212460517883,
-0.3998628258705139,
0.732067346572876,
1.1912411451339722,
0.5949237942695618,
-0.6795386672019958,
0.13239961862564087,
-0.7266748547554016,
0.27466490864753723,
-1.4145933389663696,
0.20932169258594513,
-2.943953037261963,
0.7162523865699768,
-0.11171484738588333,
-0.05280688777565956,
-0.08064969629049301,
-1.3794463872909546,
1.0897362232208252,
2.6290502548217773,
-1.1545379161834717,
0.49992915987968445,
0.4246937036514282,
1.14035165309906,
-1.5420615673065186,
0.29312074184417725,
-0.46872031688690186,
2.02581524848938,
0.11757972836494446,
1.2543514966964722,
-0.4891674816608429,
-2.1834969520568848,
0.5941333174705505,
-1.3215962648391724,
-1.163177251815796,
0.8093976378440857,
-0.8725244998931885,
0.20597058534622192,
-1.3925795555114746,
-0.20610564947128296,
-0.9324313998222351,
-1.2335968017578125,
0.6964347958564758,
0.10617506504058838,
0.42186710238456726,
-0.5302756428718567,
0.3542580306529999,
-2.2033541202545166,
-1.374290943145752,
-0.16930676996707916,
-0.9695870876312256,
0.4990784227848053,
-0.3003053367137909,
0.6088464856147766,
-0.10741691291332245,
0.09098310768604279,
0.299652099609375,
1.4092028141021729,
3.391024589538574,
0.1913328766822815,
0.2617091238498688,
-0.12747380137443542,
-1.0531423091888428,
1.4516069889068604,
0.91960209608078,
-0.1624244749546051,
-0.5802281498908997,
-0.9723947048187256,
1.2144639492034912,
2.0534253120422363,
1.1078158617019653,
0.027319051325321198,
-0.8278777599334717,
-0.7586079835891724,
0.03463833034038544,
0.13015496730804443,
0.5156508088111877,
0.8983733057975769,
0.037629712373018265,
0.09387064725160599,
1.3792532682418823,
1.1073073148727417,
-0.38381341099739075,
0.42423397302627563,
-0.8768362998962402,
-0.41092437505722046,
0.428305983543396,
0.26778340339660645,
0.07937821745872498,
0.43019428849220276,
-1.0534619092941284,
-0.3075699210166931,
-0.38354048132896423,
-0.9107404351234436,
-0.747949481010437,
-0.4770732522010803,
-0.39815467596054077,
1.6420501470565796,
0.07434330880641937,
-0.4935796558856964,
0.01848919689655304,
-0.7324572205543518,
-0.11627571284770966,
-1.0917197465896606,
0.25082066655158997,
-0.17428554594516754,
-0.033457376062870026,
-0.09927327185869217,
1.7165937423706055,
-1.0248970985412598,
-2.0840535163879395,
0.17687909305095673,
0.2402757704257965,
-0.3502139151096344,
0.21089671552181244,
1.6644400358200073,
0.5843873023986816,
1.3839318752288818,
1.3039336204528809,
1.0040698051452637,
-0.6768912672996521,
-1.2765392065048218,
0.7070828080177307,
0.9853059649467468,
-1.2976819276809692,
0.8299503326416016,
-0.04880322515964508,
-0.4977869987487793,
0.6488150954246521,
1.3358137607574463,
0.47305741906166077,
-2.028226613998413,
0.8090752959251404,
-0.8451061248779297,
0.6905303001403809,
0.6798875331878662,
0.7911319136619568,
0.2549084424972534,
0.8080633878707886,
-1.2454171180725098,
-1.1526590585708618,
-0.7090998291969299,
-0.624320387840271,
1.9075453281402588,
-0.22388695180416107,
0.5261162519454956,
-0.19710083305835724,
-1.270490288734436,
-0.06633823364973068,
0.8098951578140259,
0.45836931467056274,
-0.5051875710487366,
0.7544383406639099,
-0.6161383986473083,
-1.0447756052017212,
-1.3202991485595703,
-0.42956578731536865,
-1.0387096405029297,
-0.895171582698822,
0.9502424597740173,
0.7390768527984619,
0.410259485244751,
1.9424858093261719,
0.641340970993042,
0.27429062128067017,
-2.6736838817596436,
0.848546028137207,
0.27654409408569336,
-0.043671865016222,
0.8818790316581726,
0.2756211757659912,
1.0893793106079102,
-0.04824838414788246,
0.6756489276885986,
-2.3395533561706543,
2.261582136154175,
-0.20426835119724274,
0.6346262693405151,
0.00937968771904707,
-0.24215036630630493,
1.177962303161621,
0.49472078680992126,
0.5766185522079468,
-1.1240493059158325,
0.6441947221755981,
-0.6220946311950684,
1.1313345432281494,
0.8835169076919556,
-0.9200606942176819,
0.06332136690616608,
1.4021552801132202,
0.46878141164779663,
-0.4600552022457123,
-0.9375506639480591,
-0.9447667002677917,
0.9700790047645569,
1.6934840679168701,
-0.07590273767709732,
0.03344951197504997,
0.8918208479881287,
0.6271235346794128,
-1.3327559232711792,
0.06596595048904419,
-0.739592432975769,
-0.7336629629135132,
1.710216999053955,
2.024601459503174,
-0.11654571443796158,
-0.14677664637565613,
-0.803758442401886,
-1.2151066064834595,
0.8076859712600708,
-0.07791861891746521,
0.04411241412162781,
0.6352089047431946,
-0.5877286791801453,
1.1820710897445679,
0.7098457217216492,
1.0101348161697388,
0.08919965475797653,
0.3467700183391571,
0.32141831517219543,
-0.3639642894268036,
-1.1433998346328735,
-0.3385066092014313,
-1.0741806030273438,
-2.5300469398498535,
0.4311537742614746,
-0.2204267531633377,
-1.4559392929077148,
-0.0413244254887104,
-0.9870700240135193,
0.8428089022636414,
-0.58908611536026,
-1.1244381666183472,
-1.4435312747955322,
0.3024272918701172,
-0.15299196541309357,
0.9660939574241638,
-1.618360161781311,
-0.08569449186325073,
1.2440342903137207,
0.9353460669517517,
-0.641133189201355,
1.011824607849121,
0.2328508049249649,
0.9395701885223389,
0.8516103625297546,
-0.40304335951805115,
0.6067302823066711,
0.0811442956328392,
-1.326859474182129,
0.458716481924057,
1.1812617778778076,
0.20040827989578247,
1.4360297918319702,
-0.5110155344009399,
0.09338769316673279,
0.4786616563796997,
-0.5553287863731384,
-0.5051552653312683,
-0.5102450847625732,
0.6867582201957703,
0.10681676119565964,
-0.9930939078330994,
-0.05442339926958084,
-0.0675528421998024,
-0.23930931091308594,
0.20956860482692719,
-1.469774842262268,
-0.2418811321258545,
-0.31491169333457947,
-0.5633646845817566,
-1.2680584192276,
-0.02275320701301098,
1.3405544757843018,
-0.7896605134010315,
-0.24723432958126068,
0.415435791015625,
0.36970892548561096,
0.5921348333358765,
0.6228301525115967,
-0.6819429993629456,
-0.3591694235801697,
-0.3576444983482361,
-0.33485421538352966,
0.28497064113616943,
1.2995768785476685,
-0.055656589567661285,
-1.0070111751556396,
0.7427350282669067,
-0.40045449137687683,
0.0936032086610794,
2.0083625316619873,
0.030449427664279938,
-0.7332169413566589,
0.3738950490951538,
-0.6596298813819885,
1.8169503211975098,
1.7677916288375854,
1.2792062759399414,
-0.12691208720207214,
-0.873785138130188,
0.5953540205955505,
-0.3100694417953491,
-0.3506271243095398,
0.9624661803245544,
0.3954901695251465,
-0.18161070346832275,
-1.4151217937469482,
0.5798473358154297,
1.3601651191711426,
-0.7955924272537231,
-0.7823179960250854,
0.09541801363229752,
-0.9043639898300171,
1.1518930196762085,
0.6095991134643555,
0.3482995629310608,
0.2583821415901184,
1.5302271842956543,
0.7421630024909973,
-0.47715872526168823,
0.5447303652763367,
0.4325415790081024,
-0.15020416676998138,
-2.117934226989746,
-1.030137538909912,
0.333162397146225,
-0.4326396882534027,
-1.6449793577194214,
1.4005590677261353,
-1.128467082977295,
-0.9971754550933838,
0.5864149928092957,
0.09243639558553696,
1.3527590036392212,
0.3287372589111328,
1.6836531162261963,
2.1102700233459473,
0.9180022478103638,
0.346145898103714,
1.2833620309829712,
-0.05405261740088463,
-0.4206906259059906,
1.8402721881866455,
-0.4325857162475586,
0.49813857674598694,
1.01999032497406,
-0.3825380802154541,
-1.0635147094726562,
-0.845996618270874,
-1.248500108718872,
-0.6120140552520752,
1.1391412019729614,
0.12436266243457794,
-1.1628366708755493,
0.27583855390548706,
1.5926097631454468,
0.12599261105060577,
-0.2564067840576172,
0.7311051487922668,
0.37263166904449463,
-0.768201470375061,
-0.04920952767133713,
-0.9300780296325684,
0.5441156029701233,
-0.1633598506450653,
-0.307687371969223,
0.3098200261592865,
0.5396005511283875,
1.3042628765106201,
-0.04414007440209389,
0.10921963304281235,
1.1797857284545898,
-1.395154356956482,
1.4967219829559326,
-0.6204893589019775,
0.3148537874221802,
-2.4574356079101562,
1.3939447402954102,
-0.8044244050979614,
1.833728551864624,
-2.6135094165802,
0.4127892255783081,
-0.5373541712760925,
-0.42914465069770813,
0.26736345887184143,
-0.34241798520088196,
0.12569138407707214,
-0.16958047449588776,
-1.0290528535842896,
-0.10620482265949249,
-0.7142902612686157,
0.5892893671989441,
1.202710747718811,
1.3573328256607056,
-1.131962776184082,
-0.3017489016056061,
-1.7380865812301636,
-0.07096733897924423,
-0.6748672127723694,
0.3086008131504059,
-1.9743720293045044,
-0.1329527646303177,
-1.9607166051864624,
-2.3817532062530518,
-1.3671880960464478,
-0.8486241698265076,
1.0755555629730225,
0.15539491176605225,
-0.9496749043464661,
1.1200066804885864,
-0.37045973539352417,
-1.8011747598648071,
1.12873375415802,
-2.167217254638672
] |
https://github.com/huggingface/datasets/issues/5695 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError | Just tried uploading the same dataset with 500MB shards, I get an errors 4 hours in:
```
Pushing dataset shards to the dataset hub: 25%|██▍ | 358/1453 [4:40:31<14:18:00, 47.01s/it]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 344, in _inner_upload_lfs_object
return _upload_lfs_object(operation=operation, lfs_batch_action=batch_action, token=token)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 391, in _upload_lfs_object
lfs_upload(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 254, in lfs_upload
_upload_multi_part(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 374, in _upload_multi_part
hf_raise_for_status(part_upload_res)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 301, in hf_raise_for_status
raise HfHubHTTPError(str(e), response=response) from e
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 46, in __init__
server_data = response.json()
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/requests/models.py", line 899, in json
return complexjson.loads(
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "process_wit.py", line 146, in <module>
dataset.push_to_hub(FINAL_PATH, max_shard_size="500MB", private=False)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1534, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 4804, in _push_parquet_shards_to_hub
_retry(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 281, in _retry
return func(*func_args, **func_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2593, in upload_file
commit_info = self.create_commit(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2411, in create_commit
upload_lfs_files(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 351, in upload_lfs_files
thread_map(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
yield fs.pop().result()
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/_base.py", line 444, in result
return self.__get_result()
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 346, in _inner_upload_lfs_object
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'data/train-00358-of-01453-22a5cc8b3eb12be3.parquet' to the Hub.
```
Local saves do work, however. | ### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 230 | 336 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError
### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Just tried uploading the same dataset with 500MB shards, I get an errors 4 hours in:
```
Pushing dataset shards to the dataset hub: 25%|██▍ | 358/1453 [4:40:31<14:18:00, 47.01s/it]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 344, in _inner_upload_lfs_object
return _upload_lfs_object(operation=operation, lfs_batch_action=batch_action, token=token)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 391, in _upload_lfs_object
lfs_upload(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 254, in lfs_upload
_upload_multi_part(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 374, in _upload_multi_part
hf_raise_for_status(part_upload_res)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 301, in hf_raise_for_status
raise HfHubHTTPError(str(e), response=response) from e
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 46, in __init__
server_data = response.json()
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/requests/models.py", line 899, in json
return complexjson.loads(
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "process_wit.py", line 146, in <module>
dataset.push_to_hub(FINAL_PATH, max_shard_size="500MB", private=False)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1534, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 4804, in _push_parquet_shards_to_hub
_retry(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 281, in _retry
return func(*func_args, **func_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2593, in upload_file
commit_info = self.create_commit(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2411, in create_commit
upload_lfs_files(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 351, in upload_lfs_files
thread_map(
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
yield fs.pop().result()
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/_base.py", line 444, in result
return self.__get_result()
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/cluster/work/cotterell/tamariucai/miniconda3/envs/torch-multimodal/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 346, in _inner_upload_lfs_object
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'data/train-00358-of-01453-22a5cc8b3eb12be3.parquet' to the Hub.
```
Local saves do work, however. | [
-1.1584420204162598,
-0.8912860751152039,
-0.7004311084747314,
1.4251720905303955,
-0.12030670046806335,
-1.3218984603881836,
0.1318410336971283,
-1.1046695709228516,
1.6368975639343262,
-0.734870195388794,
0.2892012596130371,
-1.6862632036209106,
0.002791421487927437,
-0.5048418045043945,
-0.7005982398986816,
-0.8801894187927246,
-0.4100920259952545,
-0.8641971945762634,
1.0118001699447632,
2.559230089187622,
1.2496337890625,
-1.3655211925506592,
2.7572028636932373,
0.6563696265220642,
-0.25937819480895996,
-0.967100977897644,
0.5628082752227783,
0.033216219395399094,
-1.28641676902771,
-0.44676393270492554,
-0.9187940955162048,
-0.026316218078136444,
-0.5711625218391418,
-0.48736581206321716,
0.08646433800458908,
0.4420551061630249,
-0.31736770272254944,
-0.35037821531295776,
-0.5560927391052246,
-0.7553178071975708,
0.4577527940273285,
-0.2971421480178833,
0.9734166860580444,
-0.3144895136356354,
1.7730730772018433,
-0.6072448492050171,
0.43617549538612366,
0.7563278675079346,
1.2732924222946167,
0.1360660195350647,
0.05363386869430542,
0.29288429021835327,
0.32130447030067444,
-0.013630987145006657,
0.45759326219558716,
1.2441037893295288,
0.5869547128677368,
0.43418318033218384,
0.6300895810127258,
-2.1854774951934814,
1.3160297870635986,
-0.8981088995933533,
0.3136797249317169,
1.2706271409988403,
-0.9013770818710327,
0.31665343046188354,
-1.761488914489746,
-0.06098407879471779,
0.5568838119506836,
-2.1685898303985596,
0.2534269392490387,
-1.3398077487945557,
-0.5034123659133911,
0.916298508644104,
0.26333603262901306,
-1.2064259052276611,
0.24743014574050903,
-0.5124821066856384,
1.0964651107788086,
0.487459659576416,
1.1317967176437378,
-1.692310094833374,
-0.027147747576236725,
-0.21166832745075226,
0.08767128735780716,
-1.2633733749389648,
-1.6173157691955566,
0.5222352147102356,
0.6002700924873352,
0.6705911159515381,
-0.03447858989238739,
1.0592310428619385,
-1.0448766946792603,
0.8063608407974243,
-1.021397590637207,
-1.6683777570724487,
-1.316583514213562,
-2.322575330734253,
-2.28189754486084,
0.8050827383995056,
-0.47864529490470886,
-0.46442723274230957,
2.0303256511688232,
-0.9784960150718689,
-1.806397557258606,
1.0636327266693115,
0.34501370787620544,
-0.023605383932590485,
2.290510654449463,
0.25051072239875793,
-0.7723171710968018,
0.4278845191001892,
-0.7305286526679993,
0.7530023455619812,
-0.28447964787483215,
1.3394320011138916,
0.5173555016517639,
-1.0134741067886353,
1.5661545991897583,
-0.40217992663383484,
0.603365421295166,
-0.7076766490936279,
-0.5216339230537415,
-0.820396363735199,
0.30493611097335815,
1.9233933687210083,
-0.41795846819877625,
1.5665972232818604,
-0.32535186409950256,
-1.612524151802063,
-1.539542317390442,
0.8723389506340027,
0.5708447098731995,
-0.850145161151886,
0.055726177990436554,
-0.41592660546302795,
0.07948222011327744,
-0.02494000270962715,
1.1144044399261475,
1.19475257396698,
0.7606111764907837,
-0.3641124665737152,
-0.8348156809806824,
0.17063458263874054,
-0.11760354787111282,
-0.6874507069587708,
-1.8554213047027588,
-0.3214758038520813,
0.2185743749141693,
0.646304726600647,
-1.2617422342300415,
1.744754672050476,
0.8987743258476257,
1.9950047731399536,
0.9435319304466248,
-0.3481111228466034,
1.522296667098999,
0.02758777141571045,
1.8872162103652954,
-0.4535648822784424,
0.6062034964561462,
-0.37436172366142273,
-1.1790525913238525,
0.9142457246780396,
-0.30384182929992676,
-2.0284759998321533,
-0.7897822260856628,
-0.8194487690925598,
-0.19210952520370483,
-0.7970402836799622,
0.8506245017051697,
-0.2876681983470917,
-1.5271644592285156,
0.19540609419345856,
-0.6748070120811462,
0.16178856790065765,
-1.2453441619873047,
0.22394490242004395,
0.7095369100570679,
-0.6577045321464539,
0.015259764157235622,
-0.2291834056377411,
-1.3044990301132202,
-0.4835032820701599,
0.3388691842556,
1.9008182287216187,
-0.6828242540359497,
1.0003936290740967,
1.0767406225204468,
-0.7053494453430176,
0.04773148149251938,
0.2859351634979248,
-0.3431723713874817,
0.8558443188667297,
-1.1513534784317017,
-0.3513624370098114,
1.1672794818878174,
-0.09636565297842026,
-0.6166493892669678,
1.3822835683822632,
0.7980219721794128,
-1.0448157787322998,
-0.24271202087402344,
-0.18524087965488434,
-0.8335813283920288,
0.0374394915997982,
-1.5698295831680298,
-0.13686032593250275,
0.3855557441711426,
-1.4715466499328613,
-0.40854528546333313,
-0.22884024679660797,
1.3492472171783447,
-0.19315406680107117,
1.4395865201950073,
-0.30618932843208313,
-0.22731143236160278,
-0.3667028844356537,
-0.4465672969818115,
0.12500602006912231,
-0.15644590556621552,
-0.6070396304130554,
0.20475171506404877,
-0.7765262126922607,
0.3028438687324524,
1.4819180965423584,
0.3335067927837372,
0.02615930140018463,
0.5184164047241211,
1.0946370363235474,
0.3358118534088135,
0.01473285723477602,
-0.8923898339271545,
-1.5565828084945679,
1.990200400352478,
-1.4948668479919434,
1.9561777114868164,
0.7811244130134583,
-0.006574148312211037,
-1.8612490892410278,
-1.8722968101501465,
1.357504963874817,
1.1392991542816162,
2.3641443252563477,
0.5224025845527649,
0.47658416628837585,
-0.7614096999168396,
-0.7210716009140015,
0.3659327030181885,
-1.0116102695465088,
-0.6936107873916626,
0.2306615114212036,
2.418210744857788,
1.7629142999649048,
-0.5131028890609741,
-0.28078222274780273,
-0.8756817579269409,
1.3391084671020508,
-0.1912681758403778,
0.18674036860466003,
2.0248703956604004,
-0.26894477009773254,
-1.0147007703781128,
1.2784755229949951,
-2.3434767723083496,
0.21553339064121246,
2.052333354949951,
0.27531880140304565,
0.12684457004070282,
-1.444473385810852,
-0.675831139087677,
-0.2578597962856293,
-0.48930078744888306,
-1.2574050426483154,
0.5506855845451355,
-0.28638678789138794,
-0.846836268901825,
-1.5048457384109497,
0.08681067824363708,
-1.1598119735717773,
-1.782096028327942,
0.3072095811367035,
1.960145354270935,
1.9860031604766846,
-0.7246497869491577,
1.495766282081604,
-0.3088911473751068,
0.15610367059707642,
1.2984005212783813,
1.286393165588379,
3.092874526977539,
1.8032641410827637,
-1.2950668334960938,
0.7068806290626526,
-0.17057721316814423,
-0.5163822770118713,
1.1283270120620728,
-1.1337475776672363,
1.157673954963684,
-0.19209063053131104,
-1.2466604709625244,
-1.2673470973968506,
1.0812344551086426,
0.48434847593307495,
0.09385403245687485,
-0.4704281687736511,
1.2510488033294678,
0.11095044761896133,
1.3256704807281494,
0.582831859588623,
-0.4214476943016052,
0.6207507252693176,
-0.37393054366111755,
-0.5221561193466187,
1.582440972328186,
0.20651590824127197,
-1.41183602809906,
-2.423480987548828,
-0.27281129360198975,
-0.9170238971710205,
-0.06768975406885147,
-0.5916945338249207,
-1.0581474304199219,
1.5464017391204834,
0.4775499403476715,
-1.226952314376831,
-0.21558067202568054,
-0.27427026629447937,
-0.5582973957061768,
2.6002354621887207,
-1.2757799625396729,
-0.11920396238565445,
-0.9005039930343628,
-0.5830767750740051,
1.5886914730072021,
-1.1908483505249023,
-0.23164840042591095,
-1.0427416563034058,
-0.5765376687049866,
-1.3200674057006836,
-0.552291989326477,
0.02920261025428772,
-0.9151005744934082,
0.7467665672302246,
0.11424274742603302,
-1.1443111896514893,
-0.28752419352531433,
-0.9331220984458923,
1.0188241004943848,
-0.08392824232578278,
0.2029861956834793,
1.8643949031829834,
0.43044212460517883,
-0.3998628258705139,
0.732067346572876,
1.1912411451339722,
0.5949237942695618,
-0.6795386672019958,
0.13239961862564087,
-0.7266748547554016,
0.27466490864753723,
-1.4145933389663696,
0.20932169258594513,
-2.943953037261963,
0.7162523865699768,
-0.11171484738588333,
-0.05280688777565956,
-0.08064969629049301,
-1.3794463872909546,
1.0897362232208252,
2.6290502548217773,
-1.1545379161834717,
0.49992915987968445,
0.4246937036514282,
1.14035165309906,
-1.5420615673065186,
0.29312074184417725,
-0.46872031688690186,
2.02581524848938,
0.11757972836494446,
1.2543514966964722,
-0.4891674816608429,
-2.1834969520568848,
0.5941333174705505,
-1.3215962648391724,
-1.163177251815796,
0.8093976378440857,
-0.8725244998931885,
0.20597058534622192,
-1.3925795555114746,
-0.20610564947128296,
-0.9324313998222351,
-1.2335968017578125,
0.6964347958564758,
0.10617506504058838,
0.42186710238456726,
-0.5302756428718567,
0.3542580306529999,
-2.2033541202545166,
-1.374290943145752,
-0.16930676996707916,
-0.9695870876312256,
0.4990784227848053,
-0.3003053367137909,
0.6088464856147766,
-0.10741691291332245,
0.09098310768604279,
0.299652099609375,
1.4092028141021729,
3.391024589538574,
0.1913328766822815,
0.2617091238498688,
-0.12747380137443542,
-1.0531423091888428,
1.4516069889068604,
0.91960209608078,
-0.1624244749546051,
-0.5802281498908997,
-0.9723947048187256,
1.2144639492034912,
2.0534253120422363,
1.1078158617019653,
0.027319051325321198,
-0.8278777599334717,
-0.7586079835891724,
0.03463833034038544,
0.13015496730804443,
0.5156508088111877,
0.8983733057975769,
0.037629712373018265,
0.09387064725160599,
1.3792532682418823,
1.1073073148727417,
-0.38381341099739075,
0.42423397302627563,
-0.8768362998962402,
-0.41092437505722046,
0.428305983543396,
0.26778340339660645,
0.07937821745872498,
0.43019428849220276,
-1.0534619092941284,
-0.3075699210166931,
-0.38354048132896423,
-0.9107404351234436,
-0.747949481010437,
-0.4770732522010803,
-0.39815467596054077,
1.6420501470565796,
0.07434330880641937,
-0.4935796558856964,
0.01848919689655304,
-0.7324572205543518,
-0.11627571284770966,
-1.0917197465896606,
0.25082066655158997,
-0.17428554594516754,
-0.033457376062870026,
-0.09927327185869217,
1.7165937423706055,
-1.0248970985412598,
-2.0840535163879395,
0.17687909305095673,
0.2402757704257965,
-0.3502139151096344,
0.21089671552181244,
1.6644400358200073,
0.5843873023986816,
1.3839318752288818,
1.3039336204528809,
1.0040698051452637,
-0.6768912672996521,
-1.2765392065048218,
0.7070828080177307,
0.9853059649467468,
-1.2976819276809692,
0.8299503326416016,
-0.04880322515964508,
-0.4977869987487793,
0.6488150954246521,
1.3358137607574463,
0.47305741906166077,
-2.028226613998413,
0.8090752959251404,
-0.8451061248779297,
0.6905303001403809,
0.6798875331878662,
0.7911319136619568,
0.2549084424972534,
0.8080633878707886,
-1.2454171180725098,
-1.1526590585708618,
-0.7090998291969299,
-0.624320387840271,
1.9075453281402588,
-0.22388695180416107,
0.5261162519454956,
-0.19710083305835724,
-1.270490288734436,
-0.06633823364973068,
0.8098951578140259,
0.45836931467056274,
-0.5051875710487366,
0.7544383406639099,
-0.6161383986473083,
-1.0447756052017212,
-1.3202991485595703,
-0.42956578731536865,
-1.0387096405029297,
-0.895171582698822,
0.9502424597740173,
0.7390768527984619,
0.410259485244751,
1.9424858093261719,
0.641340970993042,
0.27429062128067017,
-2.6736838817596436,
0.848546028137207,
0.27654409408569336,
-0.043671865016222,
0.8818790316581726,
0.2756211757659912,
1.0893793106079102,
-0.04824838414788246,
0.6756489276885986,
-2.3395533561706543,
2.261582136154175,
-0.20426835119724274,
0.6346262693405151,
0.00937968771904707,
-0.24215036630630493,
1.177962303161621,
0.49472078680992126,
0.5766185522079468,
-1.1240493059158325,
0.6441947221755981,
-0.6220946311950684,
1.1313345432281494,
0.8835169076919556,
-0.9200606942176819,
0.06332136690616608,
1.4021552801132202,
0.46878141164779663,
-0.4600552022457123,
-0.9375506639480591,
-0.9447667002677917,
0.9700790047645569,
1.6934840679168701,
-0.07590273767709732,
0.03344951197504997,
0.8918208479881287,
0.6271235346794128,
-1.3327559232711792,
0.06596595048904419,
-0.739592432975769,
-0.7336629629135132,
1.710216999053955,
2.024601459503174,
-0.11654571443796158,
-0.14677664637565613,
-0.803758442401886,
-1.2151066064834595,
0.8076859712600708,
-0.07791861891746521,
0.04411241412162781,
0.6352089047431946,
-0.5877286791801453,
1.1820710897445679,
0.7098457217216492,
1.0101348161697388,
0.08919965475797653,
0.3467700183391571,
0.32141831517219543,
-0.3639642894268036,
-1.1433998346328735,
-0.3385066092014313,
-1.0741806030273438,
-2.5300469398498535,
0.4311537742614746,
-0.2204267531633377,
-1.4559392929077148,
-0.0413244254887104,
-0.9870700240135193,
0.8428089022636414,
-0.58908611536026,
-1.1244381666183472,
-1.4435312747955322,
0.3024272918701172,
-0.15299196541309357,
0.9660939574241638,
-1.618360161781311,
-0.08569449186325073,
1.2440342903137207,
0.9353460669517517,
-0.641133189201355,
1.011824607849121,
0.2328508049249649,
0.9395701885223389,
0.8516103625297546,
-0.40304335951805115,
0.6067302823066711,
0.0811442956328392,
-1.326859474182129,
0.458716481924057,
1.1812617778778076,
0.20040827989578247,
1.4360297918319702,
-0.5110155344009399,
0.09338769316673279,
0.4786616563796997,
-0.5553287863731384,
-0.5051552653312683,
-0.5102450847625732,
0.6867582201957703,
0.10681676119565964,
-0.9930939078330994,
-0.05442339926958084,
-0.0675528421998024,
-0.23930931091308594,
0.20956860482692719,
-1.469774842262268,
-0.2418811321258545,
-0.31491169333457947,
-0.5633646845817566,
-1.2680584192276,
-0.02275320701301098,
1.3405544757843018,
-0.7896605134010315,
-0.24723432958126068,
0.415435791015625,
0.36970892548561096,
0.5921348333358765,
0.6228301525115967,
-0.6819429993629456,
-0.3591694235801697,
-0.3576444983482361,
-0.33485421538352966,
0.28497064113616943,
1.2995768785476685,
-0.055656589567661285,
-1.0070111751556396,
0.7427350282669067,
-0.40045449137687683,
0.0936032086610794,
2.0083625316619873,
0.030449427664279938,
-0.7332169413566589,
0.3738950490951538,
-0.6596298813819885,
1.8169503211975098,
1.7677916288375854,
1.2792062759399414,
-0.12691208720207214,
-0.873785138130188,
0.5953540205955505,
-0.3100694417953491,
-0.3506271243095398,
0.9624661803245544,
0.3954901695251465,
-0.18161070346832275,
-1.4151217937469482,
0.5798473358154297,
1.3601651191711426,
-0.7955924272537231,
-0.7823179960250854,
0.09541801363229752,
-0.9043639898300171,
1.1518930196762085,
0.6095991134643555,
0.3482995629310608,
0.2583821415901184,
1.5302271842956543,
0.7421630024909973,
-0.47715872526168823,
0.5447303652763367,
0.4325415790081024,
-0.15020416676998138,
-2.117934226989746,
-1.030137538909912,
0.333162397146225,
-0.4326396882534027,
-1.6449793577194214,
1.4005590677261353,
-1.128467082977295,
-0.9971754550933838,
0.5864149928092957,
0.09243639558553696,
1.3527590036392212,
0.3287372589111328,
1.6836531162261963,
2.1102700233459473,
0.9180022478103638,
0.346145898103714,
1.2833620309829712,
-0.05405261740088463,
-0.4206906259059906,
1.8402721881866455,
-0.4325857162475586,
0.49813857674598694,
1.01999032497406,
-0.3825380802154541,
-1.0635147094726562,
-0.845996618270874,
-1.248500108718872,
-0.6120140552520752,
1.1391412019729614,
0.12436266243457794,
-1.1628366708755493,
0.27583855390548706,
1.5926097631454468,
0.12599261105060577,
-0.2564067840576172,
0.7311051487922668,
0.37263166904449463,
-0.768201470375061,
-0.04920952767133713,
-0.9300780296325684,
0.5441156029701233,
-0.1633598506450653,
-0.307687371969223,
0.3098200261592865,
0.5396005511283875,
1.3042628765106201,
-0.04414007440209389,
0.10921963304281235,
1.1797857284545898,
-1.395154356956482,
1.4967219829559326,
-0.6204893589019775,
0.3148537874221802,
-2.4574356079101562,
1.3939447402954102,
-0.8044244050979614,
1.833728551864624,
-2.6135094165802,
0.4127892255783081,
-0.5373541712760925,
-0.42914465069770813,
0.26736345887184143,
-0.34241798520088196,
0.12569138407707214,
-0.16958047449588776,
-1.0290528535842896,
-0.10620482265949249,
-0.7142902612686157,
0.5892893671989441,
1.202710747718811,
1.3573328256607056,
-1.131962776184082,
-0.3017489016056061,
-1.7380865812301636,
-0.07096733897924423,
-0.6748672127723694,
0.3086008131504059,
-1.9743720293045044,
-0.1329527646303177,
-1.9607166051864624,
-2.3817532062530518,
-1.3671880960464478,
-0.8486241698265076,
1.0755555629730225,
0.15539491176605225,
-0.9496749043464661,
1.1200066804885864,
-0.37045973539352417,
-1.8011747598648071,
1.12873375415802,
-2.167217254638672
] |
https://github.com/huggingface/datasets/issues/5695 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError | Leaving this other error here for the record, which occurs when I load the +700GB dataset from the hub with shard sizes of 500MB:
```
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 115, in pyarrow.lib.check_status
OSError: Corrupt snappy compressed data.
```
I will probably switch back to the local big dataset or shrink it. | ### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 230 | 83 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError
### Describe the bug
Calling `datasets.load_dataset` to load the (publicly available) dataset `theodor1289/wit` fails with `pyarrow.lib.ArrowNotImplementedError`.
### Steps to reproduce the bug
Steps to reproduce this behavior:
1. `!pip install datasets`
2. `!huggingface-cli login`
3. This step will throw the error (it might take a while as the dataset has ~170GB):
```python
from datasets import load_dataset
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
```
Stack trace:
```
(torch-multimodal) bash-4.2$ python test.py
Downloading and preparing dataset None/None to /cluster/work/cotterell/tamariucai/HuggingfaceDatasets/theodor1289___parquet/theodor1289--wit-7a3e984414a86a0f/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 491.68it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 16.93it/s]
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/work/cotterell/tamariucai/multimodal-mirror/examples/test.py", line 2, in <module>
dataset = load_dataset("theodor1289/wit", "train", use_auth_token=True)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1893, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Expected behavior
The dataset is loaded in variable `dataset`.
### Environment info
- `datasets` version: 2.11.0
- Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.4
- Huggingface_hub version: 0.13.3
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Leaving this other error here for the record, which occurs when I load the +700GB dataset from the hub with shard sizes of 500MB:
```
Traceback (most recent call last):
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/builder.py", line 1860, in _prepare_split_single
for _, table in generator:
File "/cluster/home/tamariucai/.local/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 115, in pyarrow.lib.check_status
OSError: Corrupt snappy compressed data.
```
I will probably switch back to the local big dataset or shrink it. | [
-1.1584420204162598,
-0.8912860751152039,
-0.7004311084747314,
1.4251720905303955,
-0.12030670046806335,
-1.3218984603881836,
0.1318410336971283,
-1.1046695709228516,
1.6368975639343262,
-0.734870195388794,
0.2892012596130371,
-1.6862632036209106,
0.002791421487927437,
-0.5048418045043945,
-0.7005982398986816,
-0.8801894187927246,
-0.4100920259952545,
-0.8641971945762634,
1.0118001699447632,
2.559230089187622,
1.2496337890625,
-1.3655211925506592,
2.7572028636932373,
0.6563696265220642,
-0.25937819480895996,
-0.967100977897644,
0.5628082752227783,
0.033216219395399094,
-1.28641676902771,
-0.44676393270492554,
-0.9187940955162048,
-0.026316218078136444,
-0.5711625218391418,
-0.48736581206321716,
0.08646433800458908,
0.4420551061630249,
-0.31736770272254944,
-0.35037821531295776,
-0.5560927391052246,
-0.7553178071975708,
0.4577527940273285,
-0.2971421480178833,
0.9734166860580444,
-0.3144895136356354,
1.7730730772018433,
-0.6072448492050171,
0.43617549538612366,
0.7563278675079346,
1.2732924222946167,
0.1360660195350647,
0.05363386869430542,
0.29288429021835327,
0.32130447030067444,
-0.013630987145006657,
0.45759326219558716,
1.2441037893295288,
0.5869547128677368,
0.43418318033218384,
0.6300895810127258,
-2.1854774951934814,
1.3160297870635986,
-0.8981088995933533,
0.3136797249317169,
1.2706271409988403,
-0.9013770818710327,
0.31665343046188354,
-1.761488914489746,
-0.06098407879471779,
0.5568838119506836,
-2.1685898303985596,
0.2534269392490387,
-1.3398077487945557,
-0.5034123659133911,
0.916298508644104,
0.26333603262901306,
-1.2064259052276611,
0.24743014574050903,
-0.5124821066856384,
1.0964651107788086,
0.487459659576416,
1.1317967176437378,
-1.692310094833374,
-0.027147747576236725,
-0.21166832745075226,
0.08767128735780716,
-1.2633733749389648,
-1.6173157691955566,
0.5222352147102356,
0.6002700924873352,
0.6705911159515381,
-0.03447858989238739,
1.0592310428619385,
-1.0448766946792603,
0.8063608407974243,
-1.021397590637207,
-1.6683777570724487,
-1.316583514213562,
-2.322575330734253,
-2.28189754486084,
0.8050827383995056,
-0.47864529490470886,
-0.46442723274230957,
2.0303256511688232,
-0.9784960150718689,
-1.806397557258606,
1.0636327266693115,
0.34501370787620544,
-0.023605383932590485,
2.290510654449463,
0.25051072239875793,
-0.7723171710968018,
0.4278845191001892,
-0.7305286526679993,
0.7530023455619812,
-0.28447964787483215,
1.3394320011138916,
0.5173555016517639,
-1.0134741067886353,
1.5661545991897583,
-0.40217992663383484,
0.603365421295166,
-0.7076766490936279,
-0.5216339230537415,
-0.820396363735199,
0.30493611097335815,
1.9233933687210083,
-0.41795846819877625,
1.5665972232818604,
-0.32535186409950256,
-1.612524151802063,
-1.539542317390442,
0.8723389506340027,
0.5708447098731995,
-0.850145161151886,
0.055726177990436554,
-0.41592660546302795,
0.07948222011327744,
-0.02494000270962715,
1.1144044399261475,
1.19475257396698,
0.7606111764907837,
-0.3641124665737152,
-0.8348156809806824,
0.17063458263874054,
-0.11760354787111282,
-0.6874507069587708,
-1.8554213047027588,
-0.3214758038520813,
0.2185743749141693,
0.646304726600647,
-1.2617422342300415,
1.744754672050476,
0.8987743258476257,
1.9950047731399536,
0.9435319304466248,
-0.3481111228466034,
1.522296667098999,
0.02758777141571045,
1.8872162103652954,
-0.4535648822784424,
0.6062034964561462,
-0.37436172366142273,
-1.1790525913238525,
0.9142457246780396,
-0.30384182929992676,
-2.0284759998321533,
-0.7897822260856628,
-0.8194487690925598,
-0.19210952520370483,
-0.7970402836799622,
0.8506245017051697,
-0.2876681983470917,
-1.5271644592285156,
0.19540609419345856,
-0.6748070120811462,
0.16178856790065765,
-1.2453441619873047,
0.22394490242004395,
0.7095369100570679,
-0.6577045321464539,
0.015259764157235622,
-0.2291834056377411,
-1.3044990301132202,
-0.4835032820701599,
0.3388691842556,
1.9008182287216187,
-0.6828242540359497,
1.0003936290740967,
1.0767406225204468,
-0.7053494453430176,
0.04773148149251938,
0.2859351634979248,
-0.3431723713874817,
0.8558443188667297,
-1.1513534784317017,
-0.3513624370098114,
1.1672794818878174,
-0.09636565297842026,
-0.6166493892669678,
1.3822835683822632,
0.7980219721794128,
-1.0448157787322998,
-0.24271202087402344,
-0.18524087965488434,
-0.8335813283920288,
0.0374394915997982,
-1.5698295831680298,
-0.13686032593250275,
0.3855557441711426,
-1.4715466499328613,
-0.40854528546333313,
-0.22884024679660797,
1.3492472171783447,
-0.19315406680107117,
1.4395865201950073,
-0.30618932843208313,
-0.22731143236160278,
-0.3667028844356537,
-0.4465672969818115,
0.12500602006912231,
-0.15644590556621552,
-0.6070396304130554,
0.20475171506404877,
-0.7765262126922607,
0.3028438687324524,
1.4819180965423584,
0.3335067927837372,
0.02615930140018463,
0.5184164047241211,
1.0946370363235474,
0.3358118534088135,
0.01473285723477602,
-0.8923898339271545,
-1.5565828084945679,
1.990200400352478,
-1.4948668479919434,
1.9561777114868164,
0.7811244130134583,
-0.006574148312211037,
-1.8612490892410278,
-1.8722968101501465,
1.357504963874817,
1.1392991542816162,
2.3641443252563477,
0.5224025845527649,
0.47658416628837585,
-0.7614096999168396,
-0.7210716009140015,
0.3659327030181885,
-1.0116102695465088,
-0.6936107873916626,
0.2306615114212036,
2.418210744857788,
1.7629142999649048,
-0.5131028890609741,
-0.28078222274780273,
-0.8756817579269409,
1.3391084671020508,
-0.1912681758403778,
0.18674036860466003,
2.0248703956604004,
-0.26894477009773254,
-1.0147007703781128,
1.2784755229949951,
-2.3434767723083496,
0.21553339064121246,
2.052333354949951,
0.27531880140304565,
0.12684457004070282,
-1.444473385810852,
-0.675831139087677,
-0.2578597962856293,
-0.48930078744888306,
-1.2574050426483154,
0.5506855845451355,
-0.28638678789138794,
-0.846836268901825,
-1.5048457384109497,
0.08681067824363708,
-1.1598119735717773,
-1.782096028327942,
0.3072095811367035,
1.960145354270935,
1.9860031604766846,
-0.7246497869491577,
1.495766282081604,
-0.3088911473751068,
0.15610367059707642,
1.2984005212783813,
1.286393165588379,
3.092874526977539,
1.8032641410827637,
-1.2950668334960938,
0.7068806290626526,
-0.17057721316814423,
-0.5163822770118713,
1.1283270120620728,
-1.1337475776672363,
1.157673954963684,
-0.19209063053131104,
-1.2466604709625244,
-1.2673470973968506,
1.0812344551086426,
0.48434847593307495,
0.09385403245687485,
-0.4704281687736511,
1.2510488033294678,
0.11095044761896133,
1.3256704807281494,
0.582831859588623,
-0.4214476943016052,
0.6207507252693176,
-0.37393054366111755,
-0.5221561193466187,
1.582440972328186,
0.20651590824127197,
-1.41183602809906,
-2.423480987548828,
-0.27281129360198975,
-0.9170238971710205,
-0.06768975406885147,
-0.5916945338249207,
-1.0581474304199219,
1.5464017391204834,
0.4775499403476715,
-1.226952314376831,
-0.21558067202568054,
-0.27427026629447937,
-0.5582973957061768,
2.6002354621887207,
-1.2757799625396729,
-0.11920396238565445,
-0.9005039930343628,
-0.5830767750740051,
1.5886914730072021,
-1.1908483505249023,
-0.23164840042591095,
-1.0427416563034058,
-0.5765376687049866,
-1.3200674057006836,
-0.552291989326477,
0.02920261025428772,
-0.9151005744934082,
0.7467665672302246,
0.11424274742603302,
-1.1443111896514893,
-0.28752419352531433,
-0.9331220984458923,
1.0188241004943848,
-0.08392824232578278,
0.2029861956834793,
1.8643949031829834,
0.43044212460517883,
-0.3998628258705139,
0.732067346572876,
1.1912411451339722,
0.5949237942695618,
-0.6795386672019958,
0.13239961862564087,
-0.7266748547554016,
0.27466490864753723,
-1.4145933389663696,
0.20932169258594513,
-2.943953037261963,
0.7162523865699768,
-0.11171484738588333,
-0.05280688777565956,
-0.08064969629049301,
-1.3794463872909546,
1.0897362232208252,
2.6290502548217773,
-1.1545379161834717,
0.49992915987968445,
0.4246937036514282,
1.14035165309906,
-1.5420615673065186,
0.29312074184417725,
-0.46872031688690186,
2.02581524848938,
0.11757972836494446,
1.2543514966964722,
-0.4891674816608429,
-2.1834969520568848,
0.5941333174705505,
-1.3215962648391724,
-1.163177251815796,
0.8093976378440857,
-0.8725244998931885,
0.20597058534622192,
-1.3925795555114746,
-0.20610564947128296,
-0.9324313998222351,
-1.2335968017578125,
0.6964347958564758,
0.10617506504058838,
0.42186710238456726,
-0.5302756428718567,
0.3542580306529999,
-2.2033541202545166,
-1.374290943145752,
-0.16930676996707916,
-0.9695870876312256,
0.4990784227848053,
-0.3003053367137909,
0.6088464856147766,
-0.10741691291332245,
0.09098310768604279,
0.299652099609375,
1.4092028141021729,
3.391024589538574,
0.1913328766822815,
0.2617091238498688,
-0.12747380137443542,
-1.0531423091888428,
1.4516069889068604,
0.91960209608078,
-0.1624244749546051,
-0.5802281498908997,
-0.9723947048187256,
1.2144639492034912,
2.0534253120422363,
1.1078158617019653,
0.027319051325321198,
-0.8278777599334717,
-0.7586079835891724,
0.03463833034038544,
0.13015496730804443,
0.5156508088111877,
0.8983733057975769,
0.037629712373018265,
0.09387064725160599,
1.3792532682418823,
1.1073073148727417,
-0.38381341099739075,
0.42423397302627563,
-0.8768362998962402,
-0.41092437505722046,
0.428305983543396,
0.26778340339660645,
0.07937821745872498,
0.43019428849220276,
-1.0534619092941284,
-0.3075699210166931,
-0.38354048132896423,
-0.9107404351234436,
-0.747949481010437,
-0.4770732522010803,
-0.39815467596054077,
1.6420501470565796,
0.07434330880641937,
-0.4935796558856964,
0.01848919689655304,
-0.7324572205543518,
-0.11627571284770966,
-1.0917197465896606,
0.25082066655158997,
-0.17428554594516754,
-0.033457376062870026,
-0.09927327185869217,
1.7165937423706055,
-1.0248970985412598,
-2.0840535163879395,
0.17687909305095673,
0.2402757704257965,
-0.3502139151096344,
0.21089671552181244,
1.6644400358200073,
0.5843873023986816,
1.3839318752288818,
1.3039336204528809,
1.0040698051452637,
-0.6768912672996521,
-1.2765392065048218,
0.7070828080177307,
0.9853059649467468,
-1.2976819276809692,
0.8299503326416016,
-0.04880322515964508,
-0.4977869987487793,
0.6488150954246521,
1.3358137607574463,
0.47305741906166077,
-2.028226613998413,
0.8090752959251404,
-0.8451061248779297,
0.6905303001403809,
0.6798875331878662,
0.7911319136619568,
0.2549084424972534,
0.8080633878707886,
-1.2454171180725098,
-1.1526590585708618,
-0.7090998291969299,
-0.624320387840271,
1.9075453281402588,
-0.22388695180416107,
0.5261162519454956,
-0.19710083305835724,
-1.270490288734436,
-0.06633823364973068,
0.8098951578140259,
0.45836931467056274,
-0.5051875710487366,
0.7544383406639099,
-0.6161383986473083,
-1.0447756052017212,
-1.3202991485595703,
-0.42956578731536865,
-1.0387096405029297,
-0.895171582698822,
0.9502424597740173,
0.7390768527984619,
0.410259485244751,
1.9424858093261719,
0.641340970993042,
0.27429062128067017,
-2.6736838817596436,
0.848546028137207,
0.27654409408569336,
-0.043671865016222,
0.8818790316581726,
0.2756211757659912,
1.0893793106079102,
-0.04824838414788246,
0.6756489276885986,
-2.3395533561706543,
2.261582136154175,
-0.20426835119724274,
0.6346262693405151,
0.00937968771904707,
-0.24215036630630493,
1.177962303161621,
0.49472078680992126,
0.5766185522079468,
-1.1240493059158325,
0.6441947221755981,
-0.6220946311950684,
1.1313345432281494,
0.8835169076919556,
-0.9200606942176819,
0.06332136690616608,
1.4021552801132202,
0.46878141164779663,
-0.4600552022457123,
-0.9375506639480591,
-0.9447667002677917,
0.9700790047645569,
1.6934840679168701,
-0.07590273767709732,
0.03344951197504997,
0.8918208479881287,
0.6271235346794128,
-1.3327559232711792,
0.06596595048904419,
-0.739592432975769,
-0.7336629629135132,
1.710216999053955,
2.024601459503174,
-0.11654571443796158,
-0.14677664637565613,
-0.803758442401886,
-1.2151066064834595,
0.8076859712600708,
-0.07791861891746521,
0.04411241412162781,
0.6352089047431946,
-0.5877286791801453,
1.1820710897445679,
0.7098457217216492,
1.0101348161697388,
0.08919965475797653,
0.3467700183391571,
0.32141831517219543,
-0.3639642894268036,
-1.1433998346328735,
-0.3385066092014313,
-1.0741806030273438,
-2.5300469398498535,
0.4311537742614746,
-0.2204267531633377,
-1.4559392929077148,
-0.0413244254887104,
-0.9870700240135193,
0.8428089022636414,
-0.58908611536026,
-1.1244381666183472,
-1.4435312747955322,
0.3024272918701172,
-0.15299196541309357,
0.9660939574241638,
-1.618360161781311,
-0.08569449186325073,
1.2440342903137207,
0.9353460669517517,
-0.641133189201355,
1.011824607849121,
0.2328508049249649,
0.9395701885223389,
0.8516103625297546,
-0.40304335951805115,
0.6067302823066711,
0.0811442956328392,
-1.326859474182129,
0.458716481924057,
1.1812617778778076,
0.20040827989578247,
1.4360297918319702,
-0.5110155344009399,
0.09338769316673279,
0.4786616563796997,
-0.5553287863731384,
-0.5051552653312683,
-0.5102450847625732,
0.6867582201957703,
0.10681676119565964,
-0.9930939078330994,
-0.05442339926958084,
-0.0675528421998024,
-0.23930931091308594,
0.20956860482692719,
-1.469774842262268,
-0.2418811321258545,
-0.31491169333457947,
-0.5633646845817566,
-1.2680584192276,
-0.02275320701301098,
1.3405544757843018,
-0.7896605134010315,
-0.24723432958126068,
0.415435791015625,
0.36970892548561096,
0.5921348333358765,
0.6228301525115967,
-0.6819429993629456,
-0.3591694235801697,
-0.3576444983482361,
-0.33485421538352966,
0.28497064113616943,
1.2995768785476685,
-0.055656589567661285,
-1.0070111751556396,
0.7427350282669067,
-0.40045449137687683,
0.0936032086610794,
2.0083625316619873,
0.030449427664279938,
-0.7332169413566589,
0.3738950490951538,
-0.6596298813819885,
1.8169503211975098,
1.7677916288375854,
1.2792062759399414,
-0.12691208720207214,
-0.873785138130188,
0.5953540205955505,
-0.3100694417953491,
-0.3506271243095398,
0.9624661803245544,
0.3954901695251465,
-0.18161070346832275,
-1.4151217937469482,
0.5798473358154297,
1.3601651191711426,
-0.7955924272537231,
-0.7823179960250854,
0.09541801363229752,
-0.9043639898300171,
1.1518930196762085,
0.6095991134643555,
0.3482995629310608,
0.2583821415901184,
1.5302271842956543,
0.7421630024909973,
-0.47715872526168823,
0.5447303652763367,
0.4325415790081024,
-0.15020416676998138,
-2.117934226989746,
-1.030137538909912,
0.333162397146225,
-0.4326396882534027,
-1.6449793577194214,
1.4005590677261353,
-1.128467082977295,
-0.9971754550933838,
0.5864149928092957,
0.09243639558553696,
1.3527590036392212,
0.3287372589111328,
1.6836531162261963,
2.1102700233459473,
0.9180022478103638,
0.346145898103714,
1.2833620309829712,
-0.05405261740088463,
-0.4206906259059906,
1.8402721881866455,
-0.4325857162475586,
0.49813857674598694,
1.01999032497406,
-0.3825380802154541,
-1.0635147094726562,
-0.845996618270874,
-1.248500108718872,
-0.6120140552520752,
1.1391412019729614,
0.12436266243457794,
-1.1628366708755493,
0.27583855390548706,
1.5926097631454468,
0.12599261105060577,
-0.2564067840576172,
0.7311051487922668,
0.37263166904449463,
-0.768201470375061,
-0.04920952767133713,
-0.9300780296325684,
0.5441156029701233,
-0.1633598506450653,
-0.307687371969223,
0.3098200261592865,
0.5396005511283875,
1.3042628765106201,
-0.04414007440209389,
0.10921963304281235,
1.1797857284545898,
-1.395154356956482,
1.4967219829559326,
-0.6204893589019775,
0.3148537874221802,
-2.4574356079101562,
1.3939447402954102,
-0.8044244050979614,
1.833728551864624,
-2.6135094165802,
0.4127892255783081,
-0.5373541712760925,
-0.42914465069770813,
0.26736345887184143,
-0.34241798520088196,
0.12569138407707214,
-0.16958047449588776,
-1.0290528535842896,
-0.10620482265949249,
-0.7142902612686157,
0.5892893671989441,
1.202710747718811,
1.3573328256607056,
-1.131962776184082,
-0.3017489016056061,
-1.7380865812301636,
-0.07096733897924423,
-0.6748672127723694,
0.3086008131504059,
-1.9743720293045044,
-0.1329527646303177,
-1.9607166051864624,
-2.3817532062530518,
-1.3671880960464478,
-0.8486241698265076,
1.0755555629730225,
0.15539491176605225,
-0.9496749043464661,
1.1200066804885864,
-0.37045973539352417,
-1.8011747598648071,
1.12873375415802,
-2.167217254638672
] |
https://github.com/huggingface/datasets/issues/5694 | Dataset configuration | Originally we also though about adding it to the YAML part of the README.md:
```yaml
builder_config:
data_dir: data
data_files:
- split: train
pattern: "train-[0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*"
```
Having it in the README.md could make it easier to modify it in the UI on HF, and for validation on commit | Following discussions from https://github.com/huggingface/datasets/pull/5331
We could have something like `config.json` to define the configuration of a dataset.
```json
{
"data_dir": "data"
"data_files": {
"train": "train-[0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*"
}
}
```
we could also support a list for several configs with a 'config_name' field.
The alternative was to use YAML in the README.md.
I think it could also support a `dataset_type` field to specify which dataset builder class to use, and the other parameters would be the builder's parameters. Some parameters exist for all builders like `data_files` and `data_dir`, but some parameters are builder specific like `sep` for csv.
This format would be used in `push_to_hub` to be able to push multiple configs.
cc @huggingface/datasets
EDIT: actually we're going for the YAML approach in README.md | 231 | 47 | Dataset configuration
Following discussions from https://github.com/huggingface/datasets/pull/5331
We could have something like `config.json` to define the configuration of a dataset.
```json
{
"data_dir": "data"
"data_files": {
"train": "train-[0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*"
}
}
```
we could also support a list for several configs with a 'config_name' field.
The alternative was to use YAML in the README.md.
I think it could also support a `dataset_type` field to specify which dataset builder class to use, and the other parameters would be the builder's parameters. Some parameters exist for all builders like `data_files` and `data_dir`, but some parameters are builder specific like `sep` for csv.
This format would be used in `push_to_hub` to be able to push multiple configs.
cc @huggingface/datasets
EDIT: actually we're going for the YAML approach in README.md
Originally we also though about adding it to the YAML part of the README.md:
```yaml
builder_config:
data_dir: data
data_files:
- split: train
pattern: "train-[0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*"
```
Having it in the README.md could make it easier to modify it in the UI on HF, and for validation on commit | [
-1.1921696662902832,
-0.7837827801704407,
-0.7670056223869324,
1.55270254611969,
-0.057489704340696335,
-1.223960041999817,
0.12963064014911652,
-1.1029037237167358,
1.7415627241134644,
-0.8073195219039917,
0.4433596432209015,
-1.7023444175720215,
0.07316572219133377,
-0.6808817982673645,
-0.8303601145744324,
-0.8104236125946045,
-0.4255613386631012,
-0.6558228135108948,
1.067467212677002,
2.40260648727417,
1.25872802734375,
-1.4531141519546509,
2.6620914936065674,
0.7248594164848328,
-0.17201699316501617,
-0.8889373540878296,
0.4691409468650818,
0.036048851907253265,
-1.3686230182647705,
-0.35025015473365784,
-0.9022870063781738,
-0.1049354076385498,
-0.6257524490356445,
-0.5135623216629028,
-0.057337868958711624,
0.38427379727363586,
-0.25957468152046204,
-0.4479522407054901,
-0.4608056843280792,
-0.8375577330589294,
0.3303510248661041,
-0.3589281141757965,
0.9913254380226135,
-0.29698124527931213,
1.860143780708313,
-0.6631819605827332,
0.3903186321258545,
0.6596216559410095,
1.2111979722976685,
0.19228646159172058,
0.012706232257187366,
0.331586092710495,
0.42220544815063477,
-0.09814122319221497,
0.6256152391433716,
1.2260957956314087,
0.6363584995269775,
0.5344229340553284,
0.8738352060317993,
-2.2481207847595215,
1.3217555284500122,
-1.0148746967315674,
0.15650206804275513,
1.3204371929168701,
-0.962917149066925,
0.38900354504585266,
-1.7728416919708252,
-0.10550886392593384,
0.5312401652336121,
-2.2960524559020996,
0.17243245244026184,
-1.3479307889938354,
-0.6226351857185364,
0.8971214294433594,
0.23673175275325775,
-1.2476168870925903,
0.15076352655887604,
-0.3006489872932434,
0.963421106338501,
0.3642064034938812,
1.1426929235458374,
-1.6961957216262817,
0.051886189728975296,
-0.3548901081085205,
0.1786513775587082,
-1.236732840538025,
-1.5370744466781616,
0.5559589862823486,
0.6702446937561035,
0.6133766770362854,
-0.12871308624744415,
1.086543321609497,
-1.0973119735717773,
0.8595167398452759,
-1.1273524761199951,
-1.7579272985458374,
-1.364990472793579,
-2.279144287109375,
-2.231069564819336,
0.7757411599159241,
-0.5639614462852478,
-0.632043719291687,
2.0572385787963867,
-1.059903621673584,
-1.6285228729248047,
1.093967080116272,
0.43366968631744385,
-0.02605607733130455,
2.475491523742676,
0.06666354835033417,
-0.7114747166633606,
0.5730010271072388,
-0.8111568093299866,
0.861825704574585,
-0.3369612395763397,
1.2945737838745117,
0.33425334095954895,
-1.1029654741287231,
1.5940028429031372,
-0.2676563858985901,
0.5896474123001099,
-0.7842317819595337,
-0.45284005999565125,
-0.7126963138580322,
0.223822683095932,
1.8759831190109253,
-0.2151896059513092,
1.527051568031311,
-0.25430983304977417,
-1.510940432548523,
-1.4775892496109009,
0.8474636077880859,
0.4645520746707916,
-0.8711732029914856,
0.08033869415521622,
-0.18261417746543884,
0.16488999128341675,
-0.03314723074436188,
1.2084687948226929,
1.1859514713287354,
0.708066463470459,
-0.23367652297019958,
-0.8099648356437683,
0.11739353835582733,
-0.052253831177949905,
-0.7874079942703247,
-1.703984022140503,
-0.28674712777137756,
0.27004921436309814,
0.5763497352600098,
-1.3219413757324219,
1.797179937362671,
0.8274333477020264,
1.9205498695373535,
1.1293166875839233,
-0.4366517663002014,
1.4865742921829224,
0.05209776386618614,
1.802944302558899,
-0.4543223977088928,
0.6173096895217896,
-0.3949887454509735,
-1.2352588176727295,
0.8613619804382324,
-0.3238352835178375,
-1.9901432991027832,
-0.6893107295036316,
-0.7174100279808044,
-0.13001933693885803,
-0.7636825442314148,
1.0286682844161987,
-0.2828553020954132,
-1.4057495594024658,
0.25057393312454224,
-0.6082797050476074,
0.09505951404571533,
-1.2472405433654785,
0.28001806139945984,
0.775433361530304,
-0.6770203113555908,
0.10050545632839203,
-0.3058565557003021,
-1.3202935457229614,
-0.5777279138565063,
0.38730666041374207,
1.7933250665664673,
-0.7173364758491516,
0.889859139919281,
1.0307327508926392,
-0.6583724021911621,
-0.07128577679395676,
0.2943020761013031,
-0.2992528975009918,
0.9015176892280579,
-1.02291738986969,
-0.5860742926597595,
1.1400550603866577,
-0.19014309346675873,
-0.6505967974662781,
1.4883748292922974,
0.7166681885719299,
-0.9646897315979004,
-0.25384119153022766,
-0.12626303732395172,
-0.8185144662857056,
0.044919975101947784,
-1.6272517442703247,
-0.20027846097946167,
0.30486005544662476,
-1.6149412393569946,
-0.4407026171684265,
-0.23377756774425507,
1.2389380931854248,
-0.253449022769928,
1.2979034185409546,
-0.21102862060070038,
-0.24828852713108063,
-0.4354035556316376,
-0.4554421007633209,
0.036892492324113846,
-0.09673555940389633,
-0.6299264430999756,
0.3550962805747986,
-0.6687183976173401,
0.32593873143196106,
1.3768552541732788,
0.33017224073410034,
0.1561536192893982,
0.43944913148880005,
1.1227606534957886,
0.39314892888069153,
-0.036132052540779114,
-0.909061849117279,
-1.5334519147872925,
2.072155475616455,
-1.4951441287994385,
1.9909173250198364,
0.8048824071884155,
0.02415398880839348,
-1.7667688131332397,
-1.9040212631225586,
1.5496889352798462,
1.1317429542541504,
2.3129711151123047,
0.5807876586914062,
0.37090831995010376,
-0.713057816028595,
-0.5893295407295227,
0.3717499375343323,
-0.9370620250701904,
-0.789700448513031,
0.24142904579639435,
2.4249446392059326,
1.7161369323730469,
-0.3825072944164276,
-0.21552009880542755,
-0.9864015579223633,
1.4513890743255615,
-0.11465220153331757,
0.2574719488620758,
1.9597700834274292,
-0.28276166319847107,
-1.1121238470077515,
1.2481155395507812,
-2.362771511077881,
0.050702184438705444,
1.9204994440078735,
0.2666529715061188,
-0.021978357806801796,
-1.2500180006027222,
-0.6985918283462524,
-0.30119889974594116,
-0.610637903213501,
-1.237329363822937,
0.521892786026001,
-0.2725367546081543,
-0.761651873588562,
-1.5129286050796509,
0.11590519547462463,
-1.2190887928009033,
-1.6072006225585938,
0.37042397260665894,
1.8590013980865479,
2.0093345642089844,
-0.7285268902778625,
1.6012871265411377,
-0.282909631729126,
0.14084243774414062,
1.143847107887268,
1.1955724954605103,
3.2325525283813477,
1.923262596130371,
-1.1784452199935913,
0.5492529273033142,
-0.1913503110408783,
-0.5350549817085266,
1.1914873123168945,
-1.1299368143081665,
1.31698739528656,
-0.2004362791776657,
-1.3245960474014282,
-1.3144608736038208,
0.9048934578895569,
0.3922671675682068,
0.12611548602581024,
-0.5583158731460571,
1.1337647438049316,
0.24920718371868134,
1.2146724462509155,
0.5498132705688477,
-0.12751652300357819,
0.48514020442962646,
-0.45353955030441284,
-0.5159693956375122,
1.6192834377288818,
0.07068583369255066,
-1.3962310552597046,
-2.4198594093322754,
-0.15929466485977173,
-0.8502607941627502,
0.05025990307331085,
-0.6685149073600769,
-1.070726990699768,
1.7088446617126465,
0.36072635650634766,
-1.3402962684631348,
-0.12258580327033997,
-0.40853267908096313,
-0.6547221541404724,
2.7024989128112793,
-1.3666343688964844,
-0.27007243037223816,
-1.001075029373169,
-0.6860294342041016,
1.6708362102508545,
-1.0730704069137573,
-0.11966881901025772,
-0.9721168279647827,
-0.4045872986316681,
-1.4170751571655273,
-0.4625186324119568,
-0.011989032849669456,
-0.9041739702224731,
0.8241443634033203,
0.10706546157598495,
-1.2072718143463135,
-0.3914299011230469,
-0.9550154805183411,
0.7234252691268921,
-0.20314009487628937,
0.24456025660037994,
1.944148063659668,
0.49150899052619934,
-0.3454681932926178,
0.8149381875991821,
1.1007848978042603,
0.8154695630073547,
-0.5974038243293762,
0.33698442578315735,
-0.5951975584030151,
0.3651418685913086,
-1.2357438802719116,
0.3105141222476959,
-2.7636301517486572,
0.6743818521499634,
0.006302415393292904,
-0.10855770856142044,
0.11596459150314331,
-1.3341034650802612,
1.0906293392181396,
2.5567471981048584,
-1.1459039449691772,
0.4514941871166229,
0.29670390486717224,
1.160524606704712,
-1.640189290046692,
0.2758878767490387,
-0.41784942150115967,
2.1188769340515137,
0.01329327467828989,
1.1101921796798706,
-0.4296794533729553,
-2.4102070331573486,
0.6779671311378479,
-1.2236300706863403,
-1.2251354455947876,
0.8660892248153687,
-0.9206797480583191,
0.15228059887886047,
-1.364224910736084,
-0.18963117897510529,
-0.9664291739463806,
-1.1888903379440308,
0.7201353907585144,
0.10476736724376678,
0.46758124232292175,
-0.6506741642951965,
0.3357487618923187,
-2.2771613597869873,
-1.4994293451309204,
-0.25067195296287537,
-0.9403567314147949,
0.5182148814201355,
-0.3915696144104004,
0.7270136475563049,
-0.1287611573934555,
-0.017513781785964966,
0.3006913661956787,
1.4309630393981934,
3.3629229068756104,
0.3356330096721649,
0.4382780194282532,
-0.19013981521129608,
-0.9331063628196716,
1.5257349014282227,
0.8830523490905762,
-0.06299696862697601,
-0.4748849868774414,
-1.008254051208496,
1.1992976665496826,
1.974123239517212,
0.9679301977157593,
-0.0010008551180362701,
-0.7616220712661743,
-0.7188006043434143,
-0.033520255237817764,
0.1838928461074829,
0.41384199261665344,
0.9349234104156494,
0.046712372452020645,
0.09031002968549728,
1.4242053031921387,
1.1457852125167847,
-0.4139750599861145,
0.4105159640312195,
-0.7460536956787109,
-0.5170108675956726,
0.520363986492157,
0.3597021698951721,
-0.04057576134800911,
0.349174439907074,
-1.0497627258300781,
-0.30177828669548035,
-0.4484989047050476,
-0.8690061569213867,
-0.6830032467842102,
-0.27757784724235535,
-0.39329543709754944,
1.6177977323532104,
-0.08082611858844757,
-0.5725378394126892,
0.023381289094686508,
-0.8207851052284241,
-0.06228965148329735,
-1.0497374534606934,
0.24670840799808502,
-0.12523798644542694,
-0.020022397860884666,
-0.1728065460920334,
1.897768259048462,
-1.0544377565383911,
-2.025744676589966,
0.2256949096918106,
0.22639250755310059,
-0.43420279026031494,
0.19314266741275787,
1.7065142393112183,
0.48488351702690125,
1.4293699264526367,
1.4051483869552612,
0.9354407787322998,
-0.6104167699813843,
-1.4355406761169434,
0.6092581152915955,
0.9474062919616699,
-1.2125746011734009,
0.896632730960846,
-0.03575824573636055,
-0.4890747666358948,
0.5835429430007935,
1.2079297304153442,
0.43195706605911255,
-2.0173821449279785,
0.7202844023704529,
-0.9585192799568176,
0.8518550395965576,
0.7377200126647949,
0.690341591835022,
0.16616259515285492,
0.7750880718231201,
-1.1572672128677368,
-1.089221477508545,
-0.6889984011650085,
-0.5955469608306885,
1.8651283979415894,
-0.2773433029651642,
0.6369600892066956,
-0.06074240058660507,
-1.3372825384140015,
0.027943827211856842,
0.6444373726844788,
0.41816332936286926,
-0.4523804783821106,
0.8078823685646057,
-0.644393801689148,
-1.0553009510040283,
-1.3848305940628052,
-0.4021531939506531,
-0.9595386981964111,
-0.8744368553161621,
1.0632474422454834,
0.8108648657798767,
0.32935425639152527,
1.936178207397461,
0.7029457092285156,
0.21235789358615875,
-2.5644736289978027,
0.9209325909614563,
0.2812225818634033,
-0.09297623485326767,
0.8435876369476318,
0.43759748339653015,
0.9560065269470215,
-0.15629242360591888,
0.531484067440033,
-2.2816824913024902,
2.329160690307617,
-0.2943277657032013,
0.7937349677085876,
-0.024225369095802307,
-0.08657484501600266,
1.0946714878082275,
0.5605123043060303,
0.5393639206886292,
-1.1032772064208984,
0.6466362476348877,
-0.5426202416419983,
1.2924562692642212,
0.8861492872238159,
-0.7603083848953247,
-0.0034296633675694466,
1.3151065111160278,
0.47671040892601013,
-0.5232112407684326,
-0.994229793548584,
-0.8462220430374146,
0.9049842953681946,
1.5971219539642334,
0.029265068471431732,
-0.01381433755159378,
0.9249436259269714,
0.6531841158866882,
-1.3182986974716187,
0.057463545352220535,
-0.6421743035316467,
-0.7982643842697144,
1.6775139570236206,
2.122260332107544,
-0.10103671997785568,
-0.15912914276123047,
-0.7553814053535461,
-1.1741262674331665,
0.8323144912719727,
0.05084804818034172,
0.09176928550004959,
0.6954485177993774,
-0.6917303800582886,
1.1663222312927246,
0.9343952536582947,
0.8494070768356323,
0.28779521584510803,
0.29616284370422363,
0.3379421532154083,
-0.273480087518692,
-1.1958101987838745,
-0.20544230937957764,
-1.0202966928482056,
-2.4373910427093506,
0.3339250683784485,
-0.26210764050483704,
-1.3921022415161133,
-0.03103490173816681,
-1.069286584854126,
0.7663977146148682,
-0.48614174127578735,
-1.0823661088943481,
-1.481579303741455,
0.24120022356510162,
-0.02681073546409607,
0.8985150456428528,
-1.515854001045227,
-0.12058981508016586,
1.1369718313217163,
0.9235026836395264,
-0.7551000118255615,
0.918883740901947,
0.14191895723342896,
1.069881558418274,
0.9336410760879517,
-0.3686997592449188,
0.4204605221748352,
0.09694046527147293,
-1.3672914505004883,
0.3279358446598053,
1.158916711807251,
0.11021600663661957,
1.4182960987091064,
-0.6322057843208313,
0.006221030838787556,
0.37121516466140747,
-0.421149879693985,
-0.4165644347667694,
-0.7297378778457642,
0.6067635416984558,
0.11414013057947159,
-0.8102156519889832,
0.006286493502557278,
-0.02615433558821678,
-0.16712895035743713,
0.19191022217273712,
-1.5162529945373535,
-0.02948269620537758,
-0.4002768397331238,
-0.589001476764679,
-1.2617727518081665,
0.007521883584558964,
1.3344942331314087,
-0.7836400270462036,
-0.13613887131214142,
0.4732840359210968,
0.23985029757022858,
0.468911737203598,
0.6827003359794617,
-0.6521467566490173,
-0.39411917328834534,
-0.3314949572086334,
-0.3405439853668213,
0.3698001205921173,
1.368111252784729,
-0.12935489416122437,
-0.9279773235321045,
0.6485902667045593,
-0.2718949317932129,
-0.01246765349060297,
2.0006892681121826,
0.020546596497297287,
-0.8518908619880676,
0.352914422750473,
-0.6889167428016663,
1.8775759935379028,
1.7323373556137085,
1.373494029045105,
-0.15919283032417297,
-1.0313695669174194,
0.7131173014640808,
-0.38385772705078125,
-0.4640868008136749,
0.9126854538917542,
0.2059943825006485,
-0.1711219698190689,
-1.38789963722229,
0.624731183052063,
1.2611744403839111,
-0.8795434832572937,
-0.7729493379592896,
0.19071882963180542,
-0.8494753241539001,
1.0526387691497803,
0.6051804423332214,
0.48541298508644104,
0.3769938349723816,
1.5703821182250977,
0.8201167583465576,
-0.46401748061180115,
0.45274588465690613,
0.5853155255317688,
-0.06634040921926498,
-2.1010591983795166,
-1.2195191383361816,
0.28531011939048767,
-0.4295468330383301,
-1.5961875915527344,
1.4064788818359375,
-1.2832210063934326,
-0.9499049186706543,
0.6095798015594482,
0.00343178678303957,
1.4257959127426147,
0.29438701272010803,
1.6274619102478027,
2.089034080505371,
0.8213416337966919,
0.46413347125053406,
1.2774978876113892,
-0.21381701529026031,
-0.5243384838104248,
1.736057996749878,
-0.5987144708633423,
0.5621071457862854,
1.1089181900024414,
-0.19186823070049286,
-1.0792243480682373,
-0.7575307488441467,
-1.2469913959503174,
-0.6718165874481201,
1.194628119468689,
0.05510076507925987,
-1.2118066549301147,
0.3228328227996826,
1.5468617677688599,
0.028841760009527206,
-0.3688662350177765,
0.5603067874908447,
0.343278706073761,
-0.8311634063720703,
-0.12847468256950378,
-0.8909459710121155,
0.6435525417327881,
-0.20798540115356445,
-0.2593594193458557,
0.31184476613998413,
0.40906429290771484,
1.312326192855835,
0.03625406697392464,
0.16471824049949646,
1.2166675329208374,
-1.489597201347351,
1.4024629592895508,
-0.8340771794319153,
0.2772725522518158,
-2.355231523513794,
1.4963346719741821,
-0.797014057636261,
1.9019883871078491,
-2.7700862884521484,
0.3521115481853485,
-0.5005382895469666,
-0.5841950178146362,
0.34054020047187805,
-0.2817575931549072,
0.18290770053863525,
-0.17457430064678192,
-1.0539255142211914,
-0.059583552181720734,
-0.8055150508880615,
0.48247021436691284,
1.1309752464294434,
1.3747621774673462,
-0.9812647104263306,
-0.4447837173938751,
-1.7710576057434082,
-0.12912599742412567,
-0.6241852641105652,
0.3330845534801483,
-1.8706690073013306,
-0.16787301003932953,
-1.8846246004104614,
-2.503659725189209,
-1.3913668394088745,
-0.8211117386817932,
1.0594141483306885,
0.06363576650619507,
-0.8657098412513733,
1.1745392084121704,
-0.38440728187561035,
-1.827337384223938,
1.2099608182907104,
-2.049510955810547
] |
https://github.com/huggingface/datasets/issues/5694 | Dataset configuration | From internal discussions we agreed to go with the YAML approach, since it's the one that seems more appropriate to be modified by a human on the Hub or locally (while JSON e.g. for models are usually created programmatically). | Following discussions from https://github.com/huggingface/datasets/pull/5331
We could have something like `config.json` to define the configuration of a dataset.
```json
{
"data_dir": "data"
"data_files": {
"train": "train-[0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*"
}
}
```
we could also support a list for several configs with a 'config_name' field.
The alternative was to use YAML in the README.md.
I think it could also support a `dataset_type` field to specify which dataset builder class to use, and the other parameters would be the builder's parameters. Some parameters exist for all builders like `data_files` and `data_dir`, but some parameters are builder specific like `sep` for csv.
This format would be used in `push_to_hub` to be able to push multiple configs.
cc @huggingface/datasets
EDIT: actually we're going for the YAML approach in README.md | 231 | 39 | Dataset configuration
Following discussions from https://github.com/huggingface/datasets/pull/5331
We could have something like `config.json` to define the configuration of a dataset.
```json
{
"data_dir": "data"
"data_files": {
"train": "train-[0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*"
}
}
```
we could also support a list for several configs with a 'config_name' field.
The alternative was to use YAML in the README.md.
I think it could also support a `dataset_type` field to specify which dataset builder class to use, and the other parameters would be the builder's parameters. Some parameters exist for all builders like `data_files` and `data_dir`, but some parameters are builder specific like `sep` for csv.
This format would be used in `push_to_hub` to be able to push multiple configs.
cc @huggingface/datasets
EDIT: actually we're going for the YAML approach in README.md
From internal discussions we agreed to go with the YAML approach, since it's the one that seems more appropriate to be modified by a human on the Hub or locally (while JSON e.g. for models are usually created programmatically). | [
-1.2052114009857178,
-0.8363281488418579,
-0.803094744682312,
1.5179924964904785,
-0.08147076517343521,
-1.2205276489257812,
0.11603321135044098,
-1.129167914390564,
1.6954588890075684,
-0.8164837956428528,
0.431588739156723,
-1.6850544214248657,
0.07388978451490402,
-0.652693510055542,
-0.8240253329277039,
-0.8380566239356995,
-0.44250836968421936,
-0.6415896415710449,
1.0057204961776733,
2.433718204498291,
1.1946295499801636,
-1.431044340133667,
2.635422706604004,
0.7156071066856384,
-0.14305076003074646,
-0.9950053691864014,
0.5194970369338989,
0.018375858664512634,
-1.2826731204986572,
-0.41050708293914795,
-0.8775505423545837,
-0.1187552809715271,
-0.6151461601257324,
-0.5305795073509216,
-0.004670046269893646,
0.35863155126571655,
-0.2837068736553192,
-0.4283585250377655,
-0.5437557697296143,
-0.8188055157661438,
0.3838443458080292,
-0.40073320269584656,
1.014656662940979,
-0.33434662222862244,
1.8652055263519287,
-0.638687789440155,
0.4347993731498718,
0.7241682410240173,
1.29496169090271,
0.2030026614665985,
0.033866457641124725,
0.3241824507713318,
0.4303007423877716,
-0.035274527966976166,
0.610093891620636,
1.1694086790084839,
0.6261723637580872,
0.5177702903747559,
0.8223402500152588,
-2.2562506198883057,
1.3025426864624023,
-1.0412787199020386,
0.18080675601959229,
1.342516303062439,
-0.9132804274559021,
0.4232371151447296,
-1.792236328125,
-0.06853694468736649,
0.5542328953742981,
-2.286428213119507,
0.16366077959537506,
-1.3079768419265747,
-0.5342206358909607,
0.9414010047912598,
0.24617719650268555,
-1.2646600008010864,
0.1625688374042511,
-0.33127671480178833,
0.949226438999176,
0.4512685537338257,
1.1265541315078735,
-1.6664655208587646,
0.0177520252764225,
-0.3660692572593689,
0.1554652750492096,
-1.2781155109405518,
-1.4788388013839722,
0.5227439403533936,
0.6708598732948303,
0.5661604404449463,
-0.10204798728227615,
1.0406967401504517,
-1.0601004362106323,
0.8536252975463867,
-1.1099587678909302,
-1.702066421508789,
-1.4086518287658691,
-2.233487367630005,
-2.2495498657226562,
0.7932470440864563,
-0.5065550208091736,
-0.6050030589103699,
2.0264785289764404,
-1.0514914989471436,
-1.7016099691390991,
1.103213906288147,
0.3515464961528778,
0.02275679260492325,
2.458688497543335,
0.05212205648422241,
-0.6807174682617188,
0.5012758374214172,
-0.7361125349998474,
0.805844783782959,
-0.37719443440437317,
1.316961407661438,
0.3841853141784668,
-1.078399419784546,
1.6335927248001099,
-0.331805020570755,
0.5782487988471985,
-0.731013834476471,
-0.4616699516773224,
-0.7762026190757751,
0.28836119174957275,
1.8717344999313354,
-0.24054643511772156,
1.5276418924331665,
-0.3060896396636963,
-1.5511740446090698,
-1.5397861003875732,
0.8624446392059326,
0.4092200696468353,
-0.8448671102523804,
0.10302948951721191,
-0.21450453996658325,
0.1620599776506424,
-0.05191359668970108,
1.1967085599899292,
1.196420431137085,
0.7390775084495544,
-0.26958853006362915,
-0.8081358671188354,
0.1914045214653015,
-0.0487503707408905,
-0.8030067086219788,
-1.7573131322860718,
-0.35296088457107544,
0.2619112730026245,
0.609958291053772,
-1.2809126377105713,
1.8138360977172852,
0.8685405254364014,
1.9058903455734253,
1.1075453758239746,
-0.3925357162952423,
1.4901386499404907,
0.005574007518589497,
1.8413418531417847,
-0.48401835560798645,
0.6395918130874634,
-0.36634910106658936,
-1.1933125257492065,
0.825623631477356,
-0.2986128032207489,
-2.0282461643218994,
-0.7576375603675842,
-0.7721682190895081,
-0.14298824965953827,
-0.7345802783966064,
1.0098910331726074,
-0.2825174629688263,
-1.3869811296463013,
0.23408107459545135,
-0.6347805857658386,
0.09423767030239105,
-1.241928219795227,
0.2804088890552521,
0.7530549764633179,
-0.6983653903007507,
0.08590622246265411,
-0.274029403924942,
-1.319318175315857,
-0.5254067182540894,
0.32208436727523804,
1.8083659410476685,
-0.7645896077156067,
0.8393679261207581,
0.9625889658927917,
-0.687495768070221,
-0.02313287928700447,
0.3361741602420807,
-0.2692258954048157,
0.8359819054603577,
-1.0010051727294922,
-0.5347939729690552,
1.1910582780838013,
-0.19554895162582397,
-0.679831326007843,
1.501064419746399,
0.7413961291313171,
-0.957221269607544,
-0.20166870951652527,
-0.21435821056365967,
-0.8513941168785095,
0.03932277113199234,
-1.5957030057907104,
-0.166208878159523,
0.2960568368434906,
-1.5891329050064087,
-0.4453210234642029,
-0.228700652718544,
1.2397319078445435,
-0.21674515306949615,
1.3488889932632446,
-0.27519482374191284,
-0.2665523588657379,
-0.39109963178634644,
-0.45905306935310364,
0.07800676673650742,
-0.12806785106658936,
-0.6597757339477539,
0.305618554353714,
-0.724041223526001,
0.35478439927101135,
1.3857157230377197,
0.4017578363418579,
0.11930844187736511,
0.49313050508499146,
1.0954186916351318,
0.3497397303581238,
-0.03362022340297699,
-0.9306724667549133,
-1.5001076459884644,
2.063927173614502,
-1.5127991437911987,
1.9783246517181396,
0.7541789412498474,
-0.007676356937736273,
-1.7570016384124756,
-1.8859128952026367,
1.4748142957687378,
1.1369737386703491,
2.306271553039551,
0.5711778402328491,
0.38259515166282654,
-0.7915806770324707,
-0.6157081127166748,
0.3608155846595764,
-0.9905071258544922,
-0.7708978652954102,
0.18265080451965332,
2.3923096656799316,
1.7711986303329468,
-0.46841976046562195,
-0.20613886415958405,
-1.0209040641784668,
1.4222196340560913,
-0.11961506307125092,
0.26408594846725464,
2.047480344772339,
-0.28040531277656555,
-1.1015573740005493,
1.3018368482589722,
-2.3925774097442627,
0.104853056371212,
1.9129271507263184,
0.2584233283996582,
0.012961533851921558,
-1.3058050870895386,
-0.6813454627990723,
-0.31369537115097046,
-0.5207472443580627,
-1.2377508878707886,
0.53068608045578,
-0.24886980652809143,
-0.7763980031013489,
-1.4536758661270142,
0.10707120597362518,
-1.2228577136993408,
-1.5912401676177979,
0.38751256465911865,
1.8036619424819946,
1.9765090942382812,
-0.7215496897697449,
1.5824387073516846,
-0.2709014415740967,
0.1588389128446579,
1.2000246047973633,
1.1722252368927002,
3.197329521179199,
1.9412065744400024,
-1.241715431213379,
0.5695989727973938,
-0.21675342321395874,
-0.5359678268432617,
1.1589840650558472,
-1.1596506834030151,
1.2847625017166138,
-0.18041840195655823,
-1.237463116645813,
-1.2753894329071045,
0.9327619075775146,
0.3969669044017792,
0.10240088403224945,
-0.5324069857597351,
1.1984868049621582,
0.19566181302070618,
1.280287742614746,
0.5524218678474426,
-0.24742566049098969,
0.5295125246047974,
-0.41641196608543396,
-0.5161935091018677,
1.6038792133331299,
0.1228141188621521,
-1.3962913751602173,
-2.361521005630493,
-0.18115486204624176,
-0.8630845546722412,
0.0017554806545376778,
-0.6132861375808716,
-0.9994667172431946,
1.7259284257888794,
0.3554033041000366,
-1.3536220788955688,
-0.19142623245716095,
-0.37411144375801086,
-0.6239126920700073,
2.759517192840576,
-1.4006046056747437,
-0.26758578419685364,
-1.0032806396484375,
-0.66568922996521,
1.673123836517334,
-1.1099109649658203,
-0.15423032641410828,
-1.0169414281845093,
-0.46095189452171326,
-1.4348303079605103,
-0.48737671971321106,
-0.0293721966445446,
-0.9080875515937805,
0.8148307800292969,
0.16809120774269104,
-1.1533411741256714,
-0.43532517552375793,
-0.9100543856620789,
0.7537505626678467,
-0.13929137587547302,
0.2943091094493866,
1.915891170501709,
0.47605228424072266,
-0.3300584554672241,
0.7837651968002319,
1.0894112586975098,
0.7704082727432251,
-0.5744360685348511,
0.30034157633781433,
-0.6272196769714355,
0.3243967890739441,
-1.264074444770813,
0.29527950286865234,
-2.8160645961761475,
0.6815006136894226,
-0.07576581835746765,
-0.11637184768915176,
0.032389894127845764,
-1.3280655145645142,
1.0895755290985107,
2.6043524742126465,
-1.129503607749939,
0.4239564538002014,
0.3020046055316925,
1.1751823425292969,
-1.6140562295913696,
0.3456873595714569,
-0.3822520077228546,
2.115774154663086,
0.05853550508618355,
1.152403712272644,
-0.4551524817943573,
-2.3364901542663574,
0.6693287491798401,
-1.2221786975860596,
-1.2374751567840576,
0.882568895816803,
-0.8731693625450134,
0.1267888993024826,
-1.4117069244384766,
-0.16675186157226562,
-0.9515279531478882,
-1.2133342027664185,
0.7638180255889893,
0.16086429357528687,
0.4653535783290863,
-0.6221279501914978,
0.36191487312316895,
-2.26753306388855,
-1.4619711637496948,
-0.25453469157218933,
-0.8868999481201172,
0.5040857195854187,
-0.34020283818244934,
0.7067334055900574,
-0.12087252736091614,
0.013396506197750568,
0.2950513958930969,
1.464119553565979,
3.3629307746887207,
0.3238413333892822,
0.47160235047340393,
-0.18862788379192352,
-0.9427110552787781,
1.4907530546188354,
0.8660610914230347,
-0.1008341982960701,
-0.4841313064098358,
-1.000969409942627,
1.2111527919769287,
1.959320306777954,
0.9760370254516602,
-0.008070778101682663,
-0.7565093636512756,
-0.6885583996772766,
-0.05741890147328377,
0.1665215790271759,
0.4387732744216919,
0.9378965497016907,
0.018228083848953247,
0.07777898013591766,
1.4412808418273926,
1.233167052268982,
-0.3870342969894409,
0.35531702637672424,
-0.774145245552063,
-0.5062308311462402,
0.5349408388137817,
0.3594709038734436,
-0.022911833599209785,
0.348505437374115,
-1.0178539752960205,
-0.26586011052131653,
-0.40106201171875,
-0.9044800400733948,
-0.6990606188774109,
-0.37870657444000244,
-0.3969043791294098,
1.6362484693527222,
-0.02456098422408104,
-0.5440627336502075,
-0.014333748258650303,
-0.8000964522361755,
-0.12132737040519714,
-1.0314664840698242,
0.20025259256362915,
-0.07422477006912231,
-0.08119846135377884,
-0.1587691307067871,
1.8309204578399658,
-1.0445820093154907,
-2.0505223274230957,
0.25778403878211975,
0.2719510495662689,
-0.40233197808265686,
0.2300434708595276,
1.6372554302215576,
0.45958733558654785,
1.4469026327133179,
1.3942807912826538,
0.9117856025695801,
-0.6424753665924072,
-1.3639001846313477,
0.6082852482795715,
0.9524285793304443,
-1.312354326248169,
0.8456775546073914,
0.008428397588431835,
-0.5064699649810791,
0.5949287414550781,
1.2032874822616577,
0.40317782759666443,
-2.0250449180603027,
0.7593842148780823,
-0.894902229309082,
0.7623087167739868,
0.7098910808563232,
0.6864143013954163,
0.17080296576023102,
0.7756429314613342,
-1.1623257398605347,
-1.1175541877746582,
-0.7380837798118591,
-0.5969246625900269,
1.9036096334457397,
-0.26281529664993286,
0.6469920873641968,
-0.02384587749838829,
-1.3285155296325684,
-0.04594983533024788,
0.680503249168396,
0.4086407721042633,
-0.48606356978416443,
0.827419638633728,
-0.6560802459716797,
-1.0642622709274292,
-1.3945307731628418,
-0.3970107138156891,
-1.0017515420913696,
-0.8865204453468323,
1.0655910968780518,
0.8435094952583313,
0.25561365485191345,
1.928452491760254,
0.645496666431427,
0.24320176243782043,
-2.6393680572509766,
0.8993602395057678,
0.2553127408027649,
-0.060943253338336945,
0.8566769361495972,
0.4029770791530609,
0.9783119559288025,
-0.15226924419403076,
0.542948842048645,
-2.3282763957977295,
2.322453022003174,
-0.2880811393260956,
0.755598247051239,
-0.08550608158111572,
-0.14679086208343506,
1.0822291374206543,
0.5582906007766724,
0.555978000164032,
-1.0937803983688354,
0.6391140818595886,
-0.567641019821167,
1.2528578042984009,
0.9530612230300903,
-0.7712344527244568,
-0.0002343449741601944,
1.295194387435913,
0.5100463628768921,
-0.5201923251152039,
-0.9975011944770813,
-0.8508786559104919,
0.9047590494155884,
1.6573560237884521,
-0.0188674908131361,
-0.05551843345165253,
0.8869330883026123,
0.652495801448822,
-1.2811185121536255,
0.0979447066783905,
-0.7284446358680725,
-0.783981442451477,
1.6497106552124023,
2.1187074184417725,
-0.11422421038150787,
-0.16857858002185822,
-0.8174360990524292,
-1.1700836420059204,
0.7854283452033997,
0.05911032482981682,
0.1176028847694397,
0.705981433391571,
-0.7110259532928467,
1.1734185218811035,
0.9435312151908875,
0.9084315299987793,
0.26848626136779785,
0.32491835951805115,
0.31510740518569946,
-0.24263282120227814,
-1.1744694709777832,
-0.22227726876735687,
-1.0829143524169922,
-2.4891767501831055,
0.40950754284858704,
-0.26495808362960815,
-1.3979240655899048,
-0.015180584043264389,
-1.0545891523361206,
0.8460273742675781,
-0.5124640464782715,
-1.0762343406677246,
-1.4749315977096558,
0.25273680686950684,
-0.029313936829566956,
0.8470653891563416,
-1.5565974712371826,
-0.07523778080940247,
1.1545161008834839,
0.9225482940673828,
-0.6915273666381836,
0.9378380179405212,
0.214109867811203,
1.0705654621124268,
0.892063558101654,
-0.36165913939476013,
0.4626343250274658,
0.04680119454860687,
-1.361811876296997,
0.36720141768455505,
1.1233011484146118,
0.18676269054412842,
1.4102977514266968,
-0.6238415241241455,
0.08299204707145691,
0.37386101484298706,
-0.504155158996582,
-0.4214935004711151,
-0.6722068786621094,
0.6806005835533142,
0.11477838456630707,
-0.8462953567504883,
-0.020144999027252197,
-0.07595667243003845,
-0.17425954341888428,
0.1425871104001999,
-1.4912590980529785,
-0.10088387131690979,
-0.3509158492088318,
-0.5723881721496582,
-1.2201322317123413,
0.005535691976547241,
1.3363254070281982,
-0.7868918776512146,
-0.14625121653079987,
0.5030398368835449,
0.2942591607570648,
0.532859206199646,
0.674327552318573,
-0.6687170267105103,
-0.3939351737499237,
-0.3149067759513855,
-0.2891978323459625,
0.37855520844459534,
1.3542438745498657,
-0.1259630024433136,
-0.9529590010643005,
0.7103768587112427,
-0.3086892366409302,
-0.011852235533297062,
1.9681601524353027,
0.04109637811779976,
-0.8274713158607483,
0.3373609185218811,
-0.6907361745834351,
1.8677622079849243,
1.7650411128997803,
1.3291388750076294,
-0.1465797871351242,
-1.0102542638778687,
0.7215556502342224,
-0.40735355019569397,
-0.40468645095825195,
0.8837253451347351,
0.2917253375053406,
-0.13732300698757172,
-1.3846688270568848,
0.6234203577041626,
1.2613853216171265,
-0.8422213792800903,
-0.7874663472175598,
0.1385837197303772,
-0.8603166937828064,
1.057039499282837,
0.670655369758606,
0.5041985511779785,
0.2961103320121765,
1.5666433572769165,
0.815933883190155,
-0.4298904240131378,
0.4615802764892578,
0.5768222212791443,
-0.14513419568538666,
-2.084718704223633,
-1.2070260047912598,
0.290326863527298,
-0.44532179832458496,
-1.6012353897094727,
1.3987972736358643,
-1.2738752365112305,
-0.881904661655426,
0.5692580342292786,
0.054394450038671494,
1.4505383968353271,
0.35498273372650146,
1.5742958784103394,
2.083747148513794,
0.8468832969665527,
0.39670583605766296,
1.3093377351760864,
-0.14872807264328003,
-0.4939662516117096,
1.781840205192566,
-0.5271094441413879,
0.534715473651886,
1.1177780628204346,
-0.2430659532546997,
-1.0163122415542603,
-0.791420578956604,
-1.2231886386871338,
-0.6580947041511536,
1.214733362197876,
0.0559111125767231,
-1.1839410066604614,
0.30940544605255127,
1.5605298280715942,
0.04206674173474312,
-0.3888639807701111,
0.558140754699707,
0.34246817231178284,
-0.7813867330551147,
-0.10598615556955338,
-0.8693333864212036,
0.5859639644622803,
-0.2503087818622589,
-0.2642102539539337,
0.315238893032074,
0.38037315011024475,
1.321828842163086,
0.002247239463031292,
0.17138497531414032,
1.1909154653549194,
-1.454364538192749,
1.4522356986999512,
-0.7750756144523621,
0.2764925956726074,
-2.396336793899536,
1.5167057514190674,
-0.816228449344635,
1.9052729606628418,
-2.6944470405578613,
0.38539108633995056,
-0.5351957082748413,
-0.5439691543579102,
0.36051926016807556,
-0.3576608896255493,
0.14280493557453156,
-0.1282614916563034,
-1.0871487855911255,
-0.056527551263570786,
-0.7664774060249329,
0.5183471441268921,
1.0876879692077637,
1.3493595123291016,
-1.0285547971725464,
-0.4105282723903656,
-1.7941381931304932,
-0.15903224050998688,
-0.6610051989555359,
0.3819361925125122,
-1.9340425729751587,
-0.1554417759180069,
-1.9023385047912598,
-2.4567954540252686,
-1.3987716436386108,
-0.7634662389755249,
1.1006317138671875,
0.08816097676753998,
-0.8384882807731628,
1.151842474937439,
-0.36529579758644104,
-1.8759773969650269,
1.1802253723144531,
-2.0968263149261475
] |
https://github.com/huggingface/datasets/issues/5692 | pyarrow.lib.ArrowInvalid: Unable to merge: Field <field> has incompatible types | Hi! The link pointing to the code that generated the dataset is broken. Can you please fix it to make debugging easier? | ### Describe the bug
When loading the dataset [wikianc-en](https://huggingface.co/datasets/cyanic-selkie/wikianc-en) which I created using [this](https://github.com/cyanic-selkie/wikianc) code, I get the following error:
```
Traceback (most recent call last):
File "/home/sven/code/rector/answer-detection/train.py", line 106, in <module>
(dataset, weights) = get_dataset(args.dataset, tokenizer, labels, args.padding)
File "/home/sven/code/rector/answer-detection/dataset.py", line 106, in get_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en")
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/load.py", line 1794, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1106, in as_dataset
datasets = map_nested(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 443, in map_nested
mapped = [
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 444, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 346, in _single_map_nested
return function(data_struct)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1136, in _build_single_dataset
ds = self._as_dataset(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1207, in _as_dataset
dataset_kwargs = ArrowReader(cache_dir, self.info).read(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 239, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 260, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 203, in _read_files
pa_table = concat_tables(pa_tables) if len(pa_tables) != 1 else pa_tables[0]
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1808, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1514, in from_tables
return cls.from_blocks(blocks)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1427, in from_blocks
table = cls._concat_blocks(blocks, axis=0)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1373, in _concat_blocks
return pa.concat_tables(pa_tables, promote=True)
File "pyarrow/table.pxi", line 5224, in pyarrow.lib.concat_tables
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Unable to merge: Field paragraph_anchors has incompatible types: list<: struct<start: uint32 not null, end: uint32 not null, qid: uint32, pageid: uint32, title: string not null> not null> vs list<item: struct<start: uint32, end: uint32, qid: uint32, pageid: uint32, title: string>>
```
This only happens when I load the `train` split, indicating that the size of the dataset is the deciding factor.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en", split="train")
```
### Expected behavior
The dataset should load normally without any errors.
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-6.2.8-arch1-1-x86_64-with-glibc2.37
- Python version: 3.10.10
- PyArrow version: 11.0.0
- Pandas version: 1.5.3 | 232 | 22 | pyarrow.lib.ArrowInvalid: Unable to merge: Field <field> has incompatible types
### Describe the bug
When loading the dataset [wikianc-en](https://huggingface.co/datasets/cyanic-selkie/wikianc-en) which I created using [this](https://github.com/cyanic-selkie/wikianc) code, I get the following error:
```
Traceback (most recent call last):
File "/home/sven/code/rector/answer-detection/train.py", line 106, in <module>
(dataset, weights) = get_dataset(args.dataset, tokenizer, labels, args.padding)
File "/home/sven/code/rector/answer-detection/dataset.py", line 106, in get_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en")
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/load.py", line 1794, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1106, in as_dataset
datasets = map_nested(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 443, in map_nested
mapped = [
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 444, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 346, in _single_map_nested
return function(data_struct)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1136, in _build_single_dataset
ds = self._as_dataset(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1207, in _as_dataset
dataset_kwargs = ArrowReader(cache_dir, self.info).read(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 239, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 260, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 203, in _read_files
pa_table = concat_tables(pa_tables) if len(pa_tables) != 1 else pa_tables[0]
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1808, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1514, in from_tables
return cls.from_blocks(blocks)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1427, in from_blocks
table = cls._concat_blocks(blocks, axis=0)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1373, in _concat_blocks
return pa.concat_tables(pa_tables, promote=True)
File "pyarrow/table.pxi", line 5224, in pyarrow.lib.concat_tables
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Unable to merge: Field paragraph_anchors has incompatible types: list<: struct<start: uint32 not null, end: uint32 not null, qid: uint32, pageid: uint32, title: string not null> not null> vs list<item: struct<start: uint32, end: uint32, qid: uint32, pageid: uint32, title: string>>
```
This only happens when I load the `train` split, indicating that the size of the dataset is the deciding factor.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en", split="train")
```
### Expected behavior
The dataset should load normally without any errors.
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-6.2.8-arch1-1-x86_64-with-glibc2.37
- Python version: 3.10.10
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Hi! The link pointing to the code that generated the dataset is broken. Can you please fix it to make debugging easier? | [
-1.2276617288589478,
-0.8785539865493774,
-0.6519924998283386,
1.384544849395752,
-0.11811170727014542,
-1.2848223447799683,
0.06846287101507187,
-0.9979684948921204,
1.5190311670303345,
-0.7045060992240906,
0.21946072578430176,
-1.6712772846221924,
-0.13910403847694397,
-0.4442007541656494,
-0.6359556913375854,
-0.8783712983131409,
-0.4234541654586792,
-0.9308441877365112,
1.06832754611969,
2.507939338684082,
1.3319802284240723,
-1.2837512493133545,
2.831524133682251,
0.6411899924278259,
-0.2885868549346924,
-1.070131540298462,
0.5732387900352478,
0.00893100444227457,
-1.2764102220535278,
-0.3925836384296417,
-0.9202941656112671,
-0.013124741613864899,
-0.5857182741165161,
-0.4127766788005829,
0.14335384964942932,
0.482296884059906,
-0.2450818568468094,
-0.21034064888954163,
-0.5565400719642639,
-0.6909601092338562,
0.6001860499382019,
-0.38658416271209717,
0.8952490091323853,
-0.3331820070743561,
1.6967827081680298,
-0.6052690148353577,
0.4385928511619568,
0.6752001047134399,
1.2694780826568604,
0.12067413330078125,
0.0454825758934021,
0.23232637345790863,
0.30403339862823486,
0.060454752296209335,
0.6286742091178894,
1.3247363567352295,
0.6250435709953308,
0.49586308002471924,
0.602832555770874,
-2.189699411392212,
1.3111255168914795,
-0.7615494132041931,
0.2705492079257965,
1.2993226051330566,
-0.8554421663284302,
0.43534159660339355,
-1.837838888168335,
-0.15228652954101562,
0.5342181921005249,
-2.3189501762390137,
0.21522022783756256,
-1.287143349647522,
-0.6001686453819275,
0.8851262927055359,
0.33157098293304443,
-1.2320315837860107,
0.1597585529088974,
-0.5856606364250183,
1.056146264076233,
0.4761580228805542,
1.1335933208465576,
-1.6818841695785522,
-0.05456060916185379,
-0.14995801448822021,
0.12535901367664337,
-1.3007478713989258,
-1.6261380910873413,
0.5898165702819824,
0.5460767149925232,
0.7735130786895752,
-0.09354948252439499,
1.0021244287490845,
-1.0864546298980713,
0.8350366950035095,
-0.9091792106628418,
-1.5853650569915771,
-1.3568497896194458,
-2.4472780227661133,
-2.2957746982574463,
0.826878011226654,
-0.48627734184265137,
-0.491928368806839,
2.016401529312134,
-0.9885232448577881,
-1.8191860914230347,
0.9946159720420837,
0.3229338228702545,
0.08333433419466019,
2.399675130844116,
0.24619488418102264,
-0.8873644471168518,
0.4540840685367584,
-0.6907894611358643,
0.8347252011299133,
-0.2942044138908386,
1.3134756088256836,
0.5414537787437439,
-0.9448146820068359,
1.5969666242599487,
-0.44711244106292725,
0.549597978591919,
-0.701492428779602,
-0.44250619411468506,
-0.7594166994094849,
0.18860575556755066,
1.8921644687652588,
-0.38608527183532715,
1.5868734121322632,
-0.2821449935436249,
-1.512840986251831,
-1.470387578010559,
0.761417031288147,
0.4966835379600525,
-0.8485685586929321,
0.06967104226350784,
-0.4443397521972656,
0.14971446990966797,
0.04602804407477379,
1.0357927083969116,
1.1826672554016113,
0.710301399230957,
-0.30011996626853943,
-0.893473207950592,
0.2587795555591583,
-0.2208792269229889,
-0.598055899143219,
-1.8590970039367676,
-0.31442463397979736,
0.2475556880235672,
0.6519888043403625,
-1.2544960975646973,
1.8936586380004883,
0.9158070087432861,
2.0546844005584717,
0.906566858291626,
-0.41261565685272217,
1.4543896913528442,
-0.0035935272462666035,
1.8189146518707275,
-0.42207959294319153,
0.581633985042572,
-0.3613099753856659,
-1.188093662261963,
0.8563029766082764,
-0.3675812780857086,
-1.9491900205612183,
-0.8158420920372009,
-0.8482792973518372,
-0.18393637239933014,
-0.8011677861213684,
0.8483744263648987,
-0.2643357813358307,
-1.5012339353561401,
0.10171981155872345,
-0.6921491622924805,
0.15731295943260193,
-1.3272080421447754,
0.10785052925348282,
0.6751410961151123,
-0.7263553142547607,
-0.09617509692907333,
-0.32886776328086853,
-1.3200868368148804,
-0.5752094984054565,
0.23646514117717743,
1.9530811309814453,
-0.5575006604194641,
0.986029863357544,
1.0156258344650269,
-0.7218371629714966,
0.07660368084907532,
0.26107266545295715,
-0.3244384825229645,
0.8262669444084167,
-1.1160998344421387,
-0.351979523897171,
1.1346262693405151,
-0.16152308881282806,
-0.7753431797027588,
1.4197860956192017,
0.8247997164726257,
-1.077294945716858,
-0.30268484354019165,
-0.2404521256685257,
-0.8079292178153992,
0.004936578683555126,
-1.5034009218215942,
-0.2659194767475128,
0.3514498174190521,
-1.4232527017593384,
-0.3494456708431244,
-0.1677141934633255,
1.2863401174545288,
-0.1932443082332611,
1.459548830986023,
-0.30583456158638,
-0.15020523965358734,
-0.2977517247200012,
-0.5435755252838135,
0.15504805743694305,
-0.151900976896286,
-0.6270370483398438,
0.2609069049358368,
-0.9304438233375549,
0.20548386871814728,
1.512441873550415,
0.4103548526763916,
0.08547527343034744,
0.4707576036453247,
1.124127984046936,
0.37192025780677795,
-0.08562134951353073,
-0.8761361241340637,
-1.533180832862854,
1.9821237325668335,
-1.4663007259368896,
1.8591190576553345,
0.8277991414070129,
-0.08727271854877472,
-1.8473197221755981,
-1.814111590385437,
1.260021448135376,
1.1503742933273315,
2.450208902359009,
0.5374765396118164,
0.44882628321647644,
-0.7613561749458313,
-0.8628840446472168,
0.27930814027786255,
-0.9459657073020935,
-0.7215610146522522,
0.22906987369060516,
2.3974947929382324,
1.8024179935455322,
-0.5613489151000977,
-0.2521541714668274,
-0.8500487804412842,
1.2082418203353882,
-0.27629342675209045,
0.25406283140182495,
2.105290412902832,
-0.3356500267982483,
-0.9708592295646667,
1.2982044219970703,
-2.414355993270874,
0.31732943654060364,
2.0159051418304443,
0.3422307074069977,
0.1548326313495636,
-1.3877800703048706,
-0.7621614933013916,
-0.2745474874973297,
-0.5201002359390259,
-1.2533061504364014,
0.5523948073387146,
-0.33428123593330383,
-0.9380281567573547,
-1.3751944303512573,
-0.0340423509478569,
-1.1849185228347778,
-1.7850104570388794,
0.38794100284576416,
1.9472310543060303,
2.1219215393066406,
-0.7875193357467651,
1.2661230564117432,
-0.2398720681667328,
-0.013871528208255768,
1.2807525396347046,
1.3335832357406616,
3.0830001831054688,
1.9010953903198242,
-1.2078593969345093,
0.7782984972000122,
-0.20977656543254852,
-0.49342232942581177,
1.1843384504318237,
-1.1164530515670776,
1.0194261074066162,
-0.20114918053150177,
-1.3036597967147827,
-1.166710615158081,
1.1251240968704224,
0.4526832401752472,
-0.0002616019919514656,
-0.5246788263320923,
1.267950415611267,
0.17787916958332062,
1.378483772277832,
0.6001380085945129,
-0.3666119873523712,
0.5089882016181946,
-0.30376312136650085,
-0.5680716037750244,
1.6397589445114136,
0.1123618483543396,
-1.584672451019287,
-2.361544609069824,
-0.2642468810081482,
-0.9784883260726929,
-0.055982235819101334,
-0.6544376611709595,
-1.0823261737823486,
1.5155460834503174,
0.4630075991153717,
-1.1766352653503418,
-0.17018145322799683,
-0.30289557576179504,
-0.5620217323303223,
2.636702060699463,
-1.2573633193969727,
-0.13588468730449677,
-0.9977851510047913,
-0.5108920931816101,
1.638590693473816,
-1.1851117610931396,
-0.21471425890922546,
-0.9857324361801147,
-0.6404594779014587,
-1.3299156427383423,
-0.435697466135025,
-0.010597937740385532,
-0.9383935332298279,
0.7178764939308167,
0.1275252401828766,
-1.0627057552337646,
-0.27048277854919434,
-0.8447374701499939,
1.069606065750122,
-0.0688166618347168,
0.16975127160549164,
1.9084173440933228,
0.3178200125694275,
-0.41555339097976685,
0.698852002620697,
1.2094660997390747,
0.5403407216072083,
-0.6451762914657593,
0.060640040785074234,
-0.7235735058784485,
0.37648317217826843,
-1.41771399974823,
0.18389788269996643,
-2.9295952320098877,
0.8201139569282532,
-0.15137434005737305,
-0.1322454959154129,
-0.07212642580270767,
-1.303734302520752,
1.0491617918014526,
2.5769715309143066,
-1.1176319122314453,
0.47428828477859497,
0.5028478503227234,
1.1054356098175049,
-1.5782350301742554,
0.19227679073810577,
-0.5688579678535461,
2.00809645652771,
0.1162065714597702,
1.2133737802505493,
-0.5868064761161804,
-2.197577953338623,
0.6155632734298706,
-1.2395318746566772,
-1.0023442506790161,
0.8046705722808838,
-0.8485759496688843,
0.357515424489975,
-1.4029455184936523,
-0.09373286366462708,
-0.9731699824333191,
-1.2510725259780884,
0.7418195009231567,
0.10925357043743134,
0.4116053283214569,
-0.5159578919410706,
0.3582324981689453,
-2.1694483757019043,
-1.3749977350234985,
-0.2207885980606079,
-0.9664574265480042,
0.5919310450553894,
-0.356037974357605,
0.5682467818260193,
0.004834861494600773,
0.12021905183792114,
0.283724844455719,
1.4165005683898926,
3.3653182983398438,
0.15129530429840088,
0.13879767060279846,
-0.06800265610218048,
-1.1183652877807617,
1.425134301185608,
0.9237070679664612,
-0.17861561477184296,
-0.6003351807594299,
-0.9894046783447266,
1.341560959815979,
2.0108869075775146,
1.1724214553833008,
0.2072731852531433,
-0.8177338242530823,
-0.7504225969314575,
0.10243750363588333,
0.1994827687740326,
0.46150481700897217,
0.9879319071769714,
-0.014033705927431583,
0.14888432621955872,
1.3884512186050415,
1.166621208190918,
-0.2958316504955292,
0.3863028287887573,
-1.0175095796585083,
-0.37685659527778625,
0.41242825984954834,
0.17791776359081268,
0.11229819059371948,
0.5154052972793579,
-1.084223985671997,
-0.27470889687538147,
-0.19946596026420593,
-0.9262109398841858,
-0.7828293442726135,
-0.3822869062423706,
-0.37129533290863037,
1.6228010654449463,
-0.01722363382577896,
-0.4930543899536133,
0.10888958722352982,
-0.7129418253898621,
-0.1712092012166977,
-1.1702114343643188,
0.1603371500968933,
-0.0901825875043869,
-0.03010423481464386,
-0.10533826053142548,
1.6762900352478027,
-0.9113250374794006,
-2.1931729316711426,
0.19523613154888153,
0.39510786533355713,
-0.3001008927822113,
0.08052743226289749,
1.7616209983825684,
0.52633136510849,
1.3455018997192383,
1.2665084600448608,
1.0011485815048218,
-0.4729929566383362,
-1.2129182815551758,
0.7761650681495667,
0.9663484692573547,
-1.3035995960235596,
0.9901430010795593,
-0.2202770859003067,
-0.5192244648933411,
0.6652096509933472,
1.357456088066101,
0.4002821445465088,
-2.061415433883667,
0.9448357224464417,
-0.9261401295661926,
0.7643723487854004,
0.6732775568962097,
0.878288984298706,
0.2241971641778946,
0.8683643937110901,
-1.30287766456604,
-1.1193153858184814,
-0.6764525175094604,
-0.5807511806488037,
1.8524683713912964,
-0.19576306641101837,
0.5477787256240845,
-0.2780996859073639,
-1.1707074642181396,
-0.02912815660238266,
0.7848218083381653,
0.337574303150177,
-0.43476060032844543,
0.9066311717033386,
-0.6232370734214783,
-1.006050705909729,
-1.3570116758346558,
-0.40886253118515015,
-1.032710075378418,
-0.8572628498077393,
0.9944297671318054,
0.7445897459983826,
0.4704376459121704,
1.962753176689148,
0.5915236473083496,
0.2765202522277832,
-2.676950454711914,
0.8940182328224182,
0.2970544397830963,
-0.01666133850812912,
0.9184749126434326,
0.23747065663337708,
1.122666835784912,
-0.02121933177113533,
0.5895401239395142,
-2.2972798347473145,
2.1822872161865234,
-0.17360404133796692,
0.6091027855873108,
0.0740932896733284,
-0.10903085023164749,
1.1048967838287354,
0.6002514958381653,
0.6403904557228088,
-1.1741710901260376,
0.7758550643920898,
-0.5670682787895203,
1.0726041793823242,
0.9918656945228577,
-0.9385440945625305,
0.18057292699813843,
1.3848093748092651,
0.4684162139892578,
-0.3802058696746826,
-0.9660593867301941,
-0.7586436867713928,
1.009850025177002,
1.7624778747558594,
-0.02138710580766201,
0.012520418502390385,
0.8993484973907471,
0.5912371873855591,
-1.2546751499176025,
0.0050658537074923515,
-0.695306658744812,
-0.660309374332428,
1.7810204029083252,
2.033252000808716,
-0.08420152962207794,
-0.21413554251194,
-0.6959604620933533,
-1.3356506824493408,
0.74842768907547,
-0.08111518621444702,
0.07586406916379929,
0.7880885601043701,
-0.7191994786262512,
1.0919630527496338,
0.5940701961517334,
1.024754285812378,
0.0053136879578232765,
0.25264617800712585,
0.2610584497451782,
-0.34886986017227173,
-1.173993706703186,
-0.31755152344703674,
-1.0433259010314941,
-2.6862149238586426,
0.3932185471057892,
-0.24711818993091583,
-1.5483579635620117,
0.12402023375034332,
-1.0389342308044434,
0.8770366311073303,
-0.5951252579689026,
-1.1010875701904297,
-1.3582501411437988,
0.35669848322868347,
-0.17931169271469116,
0.8956043720245361,
-1.680936336517334,
-0.19315937161445618,
1.2577543258666992,
0.9254834055900574,
-0.5874305963516235,
0.9586381912231445,
0.24275989830493927,
0.9467616677284241,
0.784481406211853,
-0.41617485880851746,
0.6014711856842041,
0.035812124609947205,
-1.3747859001159668,
0.3931373357772827,
1.276642918586731,
0.1846703290939331,
1.2452832460403442,
-0.418117493391037,
0.16770502924919128,
0.4126781225204468,
-0.6403480172157288,
-0.5684767365455627,
-0.44179651141166687,
0.7189593315124512,
-0.008645676076412201,
-1.085876226425171,
-0.17501874268054962,
-0.08926534652709961,
-0.25976359844207764,
0.26178160309791565,
-1.3899208307266235,
-0.31829437613487244,
-0.3709545433521271,
-0.46588411927223206,
-1.3478392362594604,
0.08835898339748383,
1.29677152633667,
-0.845348596572876,
-0.2613750994205475,
0.38110244274139404,
0.3117627203464508,
0.6063161492347717,
0.5840729475021362,
-0.7987208962440491,
-0.27526843547821045,
-0.2858048975467682,
-0.24406029284000397,
0.25612446665763855,
1.2122018337249756,
-0.09564919024705887,
-1.0478572845458984,
0.6874288320541382,
-0.323060542345047,
0.23253166675567627,
2.0464723110198975,
-0.0047091348096728325,
-0.6713269352912903,
0.3135188817977905,
-0.7390087246894836,
1.687040090560913,
1.6796237230300903,
1.259024977684021,
-0.09196034073829651,
-0.754014790058136,
0.5397639870643616,
-0.22155874967575073,
-0.3486633002758026,
0.855046808719635,
0.38651567697525024,
-0.21488255262374878,
-1.4279534816741943,
0.6131465435028076,
1.2561964988708496,
-0.6950686573982239,
-0.7074776887893677,
0.03494920954108238,
-0.8757326602935791,
1.2462852001190186,
0.5659285187721252,
0.2954896092414856,
0.24170778691768646,
1.559685468673706,
0.7465556859970093,
-0.5430083870887756,
0.4648120403289795,
0.4847774803638458,
-0.15141813457012177,
-2.0887622833251953,
-0.9372032284736633,
0.2290467470884323,
-0.42775458097457886,
-1.6095986366271973,
1.3455864191055298,
-1.1480270624160767,
-0.9930195212364197,
0.5706474184989929,
0.15635566413402557,
1.2475905418395996,
0.34091833233833313,
1.7335854768753052,
2.081669569015503,
0.9125127792358398,
0.28899285197257996,
1.18462073802948,
0.009016049094498158,
-0.3539142906665802,
1.8223414421081543,
-0.39452672004699707,
0.5854142308235168,
0.9583740830421448,
-0.39692074060440063,
-1.0997358560562134,
-0.7937329411506653,
-1.1942874193191528,
-0.6374365091323853,
1.213516116142273,
0.11052151769399643,
-1.0217727422714233,
0.21776749193668365,
1.604120135307312,
0.08087574690580368,
-0.14613528549671173,
0.6930590271949768,
0.37674248218536377,
-0.6554070115089417,
-0.04510604962706566,
-0.8593587279319763,
0.45124632120132446,
-0.08009318262338638,
-0.28959691524505615,
0.18044374883174896,
0.5533655881881714,
1.295409917831421,
0.0038078539073467255,
0.12038205564022064,
1.2253727912902832,
-1.3174338340759277,
1.5553064346313477,
-0.6866055727005005,
0.30521196126937866,
-2.4777956008911133,
1.41913640499115,
-0.814172625541687,
1.8655391931533813,
-2.514986991882324,
0.39598822593688965,
-0.5102494955062866,
-0.4980432093143463,
0.20345674455165863,
-0.4673832654953003,
0.11005638539791107,
-0.06417732685804367,
-0.9079286456108093,
-0.002860305830836296,
-0.7720916271209717,
0.5772972702980042,
1.2208917140960693,
1.4600188732147217,
-1.1729776859283447,
-0.30200254917144775,
-1.7700518369674683,
-0.18295089900493622,
-0.8140578866004944,
0.3694797456264496,
-1.941785216331482,
-0.14816047251224518,
-2.05828857421875,
-2.4192252159118652,
-1.3898013830184937,
-0.9340271353721619,
1.1206918954849243,
0.20932160317897797,
-0.9899163842201233,
1.1330785751342773,
-0.42441901564598083,
-1.8179644346237183,
1.1377859115600586,
-2.192578077316284
] |
https://github.com/huggingface/datasets/issues/5692 | pyarrow.lib.ArrowInvalid: Unable to merge: Field <field> has incompatible types | > Hi! The link pointing to the code that generated the dataset is broken. Can you please fix it to make debugging easier?
Sorry about that, it's fixed now.
| ### Describe the bug
When loading the dataset [wikianc-en](https://huggingface.co/datasets/cyanic-selkie/wikianc-en) which I created using [this](https://github.com/cyanic-selkie/wikianc) code, I get the following error:
```
Traceback (most recent call last):
File "/home/sven/code/rector/answer-detection/train.py", line 106, in <module>
(dataset, weights) = get_dataset(args.dataset, tokenizer, labels, args.padding)
File "/home/sven/code/rector/answer-detection/dataset.py", line 106, in get_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en")
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/load.py", line 1794, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1106, in as_dataset
datasets = map_nested(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 443, in map_nested
mapped = [
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 444, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 346, in _single_map_nested
return function(data_struct)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1136, in _build_single_dataset
ds = self._as_dataset(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1207, in _as_dataset
dataset_kwargs = ArrowReader(cache_dir, self.info).read(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 239, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 260, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 203, in _read_files
pa_table = concat_tables(pa_tables) if len(pa_tables) != 1 else pa_tables[0]
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1808, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1514, in from_tables
return cls.from_blocks(blocks)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1427, in from_blocks
table = cls._concat_blocks(blocks, axis=0)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1373, in _concat_blocks
return pa.concat_tables(pa_tables, promote=True)
File "pyarrow/table.pxi", line 5224, in pyarrow.lib.concat_tables
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Unable to merge: Field paragraph_anchors has incompatible types: list<: struct<start: uint32 not null, end: uint32 not null, qid: uint32, pageid: uint32, title: string not null> not null> vs list<item: struct<start: uint32, end: uint32, qid: uint32, pageid: uint32, title: string>>
```
This only happens when I load the `train` split, indicating that the size of the dataset is the deciding factor.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en", split="train")
```
### Expected behavior
The dataset should load normally without any errors.
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-6.2.8-arch1-1-x86_64-with-glibc2.37
- Python version: 3.10.10
- PyArrow version: 11.0.0
- Pandas version: 1.5.3 | 232 | 29 | pyarrow.lib.ArrowInvalid: Unable to merge: Field <field> has incompatible types
### Describe the bug
When loading the dataset [wikianc-en](https://huggingface.co/datasets/cyanic-selkie/wikianc-en) which I created using [this](https://github.com/cyanic-selkie/wikianc) code, I get the following error:
```
Traceback (most recent call last):
File "/home/sven/code/rector/answer-detection/train.py", line 106, in <module>
(dataset, weights) = get_dataset(args.dataset, tokenizer, labels, args.padding)
File "/home/sven/code/rector/answer-detection/dataset.py", line 106, in get_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en")
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/load.py", line 1794, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1106, in as_dataset
datasets = map_nested(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 443, in map_nested
mapped = [
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 444, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 346, in _single_map_nested
return function(data_struct)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1136, in _build_single_dataset
ds = self._as_dataset(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/builder.py", line 1207, in _as_dataset
dataset_kwargs = ArrowReader(cache_dir, self.info).read(
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 239, in read
return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 260, in read_files
pa_table = self._read_files(files, in_memory=in_memory)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 203, in _read_files
pa_table = concat_tables(pa_tables) if len(pa_tables) != 1 else pa_tables[0]
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1808, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1514, in from_tables
return cls.from_blocks(blocks)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1427, in from_blocks
table = cls._concat_blocks(blocks, axis=0)
File "/home/sven/.cache/pypoetry/virtualenvs/rector-Z2mdKRnn-py3.10/lib/python3.10/site-packages/datasets/table.py", line 1373, in _concat_blocks
return pa.concat_tables(pa_tables, promote=True)
File "pyarrow/table.pxi", line 5224, in pyarrow.lib.concat_tables
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Unable to merge: Field paragraph_anchors has incompatible types: list<: struct<start: uint32 not null, end: uint32 not null, qid: uint32, pageid: uint32, title: string not null> not null> vs list<item: struct<start: uint32, end: uint32, qid: uint32, pageid: uint32, title: string>>
```
This only happens when I load the `train` split, indicating that the size of the dataset is the deciding factor.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("cyanic-selkie/wikianc-en", split="train")
```
### Expected behavior
The dataset should load normally without any errors.
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-6.2.8-arch1-1-x86_64-with-glibc2.37
- Python version: 3.10.10
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
> Hi! The link pointing to the code that generated the dataset is broken. Can you please fix it to make debugging easier?
Sorry about that, it's fixed now.
| [
-1.2276617288589478,
-0.8785539865493774,
-0.6519924998283386,
1.384544849395752,
-0.11811170727014542,
-1.2848223447799683,
0.06846287101507187,
-0.9979684948921204,
1.5190311670303345,
-0.7045060992240906,
0.21946072578430176,
-1.6712772846221924,
-0.13910403847694397,
-0.4442007541656494,
-0.6359556913375854,
-0.8783712983131409,
-0.4234541654586792,
-0.9308441877365112,
1.06832754611969,
2.507939338684082,
1.3319802284240723,
-1.2837512493133545,
2.831524133682251,
0.6411899924278259,
-0.2885868549346924,
-1.070131540298462,
0.5732387900352478,
0.00893100444227457,
-1.2764102220535278,
-0.3925836384296417,
-0.9202941656112671,
-0.013124741613864899,
-0.5857182741165161,
-0.4127766788005829,
0.14335384964942932,
0.482296884059906,
-0.2450818568468094,
-0.21034064888954163,
-0.5565400719642639,
-0.6909601092338562,
0.6001860499382019,
-0.38658416271209717,
0.8952490091323853,
-0.3331820070743561,
1.6967827081680298,
-0.6052690148353577,
0.4385928511619568,
0.6752001047134399,
1.2694780826568604,
0.12067413330078125,
0.0454825758934021,
0.23232637345790863,
0.30403339862823486,
0.060454752296209335,
0.6286742091178894,
1.3247363567352295,
0.6250435709953308,
0.49586308002471924,
0.602832555770874,
-2.189699411392212,
1.3111255168914795,
-0.7615494132041931,
0.2705492079257965,
1.2993226051330566,
-0.8554421663284302,
0.43534159660339355,
-1.837838888168335,
-0.15228652954101562,
0.5342181921005249,
-2.3189501762390137,
0.21522022783756256,
-1.287143349647522,
-0.6001686453819275,
0.8851262927055359,
0.33157098293304443,
-1.2320315837860107,
0.1597585529088974,
-0.5856606364250183,
1.056146264076233,
0.4761580228805542,
1.1335933208465576,
-1.6818841695785522,
-0.05456060916185379,
-0.14995801448822021,
0.12535901367664337,
-1.3007478713989258,
-1.6261380910873413,
0.5898165702819824,
0.5460767149925232,
0.7735130786895752,
-0.09354948252439499,
1.0021244287490845,
-1.0864546298980713,
0.8350366950035095,
-0.9091792106628418,
-1.5853650569915771,
-1.3568497896194458,
-2.4472780227661133,
-2.2957746982574463,
0.826878011226654,
-0.48627734184265137,
-0.491928368806839,
2.016401529312134,
-0.9885232448577881,
-1.8191860914230347,
0.9946159720420837,
0.3229338228702545,
0.08333433419466019,
2.399675130844116,
0.24619488418102264,
-0.8873644471168518,
0.4540840685367584,
-0.6907894611358643,
0.8347252011299133,
-0.2942044138908386,
1.3134756088256836,
0.5414537787437439,
-0.9448146820068359,
1.5969666242599487,
-0.44711244106292725,
0.549597978591919,
-0.701492428779602,
-0.44250619411468506,
-0.7594166994094849,
0.18860575556755066,
1.8921644687652588,
-0.38608527183532715,
1.5868734121322632,
-0.2821449935436249,
-1.512840986251831,
-1.470387578010559,
0.761417031288147,
0.4966835379600525,
-0.8485685586929321,
0.06967104226350784,
-0.4443397521972656,
0.14971446990966797,
0.04602804407477379,
1.0357927083969116,
1.1826672554016113,
0.710301399230957,
-0.30011996626853943,
-0.893473207950592,
0.2587795555591583,
-0.2208792269229889,
-0.598055899143219,
-1.8590970039367676,
-0.31442463397979736,
0.2475556880235672,
0.6519888043403625,
-1.2544960975646973,
1.8936586380004883,
0.9158070087432861,
2.0546844005584717,
0.906566858291626,
-0.41261565685272217,
1.4543896913528442,
-0.0035935272462666035,
1.8189146518707275,
-0.42207959294319153,
0.581633985042572,
-0.3613099753856659,
-1.188093662261963,
0.8563029766082764,
-0.3675812780857086,
-1.9491900205612183,
-0.8158420920372009,
-0.8482792973518372,
-0.18393637239933014,
-0.8011677861213684,
0.8483744263648987,
-0.2643357813358307,
-1.5012339353561401,
0.10171981155872345,
-0.6921491622924805,
0.15731295943260193,
-1.3272080421447754,
0.10785052925348282,
0.6751410961151123,
-0.7263553142547607,
-0.09617509692907333,
-0.32886776328086853,
-1.3200868368148804,
-0.5752094984054565,
0.23646514117717743,
1.9530811309814453,
-0.5575006604194641,
0.986029863357544,
1.0156258344650269,
-0.7218371629714966,
0.07660368084907532,
0.26107266545295715,
-0.3244384825229645,
0.8262669444084167,
-1.1160998344421387,
-0.351979523897171,
1.1346262693405151,
-0.16152308881282806,
-0.7753431797027588,
1.4197860956192017,
0.8247997164726257,
-1.077294945716858,
-0.30268484354019165,
-0.2404521256685257,
-0.8079292178153992,
0.004936578683555126,
-1.5034009218215942,
-0.2659194767475128,
0.3514498174190521,
-1.4232527017593384,
-0.3494456708431244,
-0.1677141934633255,
1.2863401174545288,
-0.1932443082332611,
1.459548830986023,
-0.30583456158638,
-0.15020523965358734,
-0.2977517247200012,
-0.5435755252838135,
0.15504805743694305,
-0.151900976896286,
-0.6270370483398438,
0.2609069049358368,
-0.9304438233375549,
0.20548386871814728,
1.512441873550415,
0.4103548526763916,
0.08547527343034744,
0.4707576036453247,
1.124127984046936,
0.37192025780677795,
-0.08562134951353073,
-0.8761361241340637,
-1.533180832862854,
1.9821237325668335,
-1.4663007259368896,
1.8591190576553345,
0.8277991414070129,
-0.08727271854877472,
-1.8473197221755981,
-1.814111590385437,
1.260021448135376,
1.1503742933273315,
2.450208902359009,
0.5374765396118164,
0.44882628321647644,
-0.7613561749458313,
-0.8628840446472168,
0.27930814027786255,
-0.9459657073020935,
-0.7215610146522522,
0.22906987369060516,
2.3974947929382324,
1.8024179935455322,
-0.5613489151000977,
-0.2521541714668274,
-0.8500487804412842,
1.2082418203353882,
-0.27629342675209045,
0.25406283140182495,
2.105290412902832,
-0.3356500267982483,
-0.9708592295646667,
1.2982044219970703,
-2.414355993270874,
0.31732943654060364,
2.0159051418304443,
0.3422307074069977,
0.1548326313495636,
-1.3877800703048706,
-0.7621614933013916,
-0.2745474874973297,
-0.5201002359390259,
-1.2533061504364014,
0.5523948073387146,
-0.33428123593330383,
-0.9380281567573547,
-1.3751944303512573,
-0.0340423509478569,
-1.1849185228347778,
-1.7850104570388794,
0.38794100284576416,
1.9472310543060303,
2.1219215393066406,
-0.7875193357467651,
1.2661230564117432,
-0.2398720681667328,
-0.013871528208255768,
1.2807525396347046,
1.3335832357406616,
3.0830001831054688,
1.9010953903198242,
-1.2078593969345093,
0.7782984972000122,
-0.20977656543254852,
-0.49342232942581177,
1.1843384504318237,
-1.1164530515670776,
1.0194261074066162,
-0.20114918053150177,
-1.3036597967147827,
-1.166710615158081,
1.1251240968704224,
0.4526832401752472,
-0.0002616019919514656,
-0.5246788263320923,
1.267950415611267,
0.17787916958332062,
1.378483772277832,
0.6001380085945129,
-0.3666119873523712,
0.5089882016181946,
-0.30376312136650085,
-0.5680716037750244,
1.6397589445114136,
0.1123618483543396,
-1.584672451019287,
-2.361544609069824,
-0.2642468810081482,
-0.9784883260726929,
-0.055982235819101334,
-0.6544376611709595,
-1.0823261737823486,
1.5155460834503174,
0.4630075991153717,
-1.1766352653503418,
-0.17018145322799683,
-0.30289557576179504,
-0.5620217323303223,
2.636702060699463,
-1.2573633193969727,
-0.13588468730449677,
-0.9977851510047913,
-0.5108920931816101,
1.638590693473816,
-1.1851117610931396,
-0.21471425890922546,
-0.9857324361801147,
-0.6404594779014587,
-1.3299156427383423,
-0.435697466135025,
-0.010597937740385532,
-0.9383935332298279,
0.7178764939308167,
0.1275252401828766,
-1.0627057552337646,
-0.27048277854919434,
-0.8447374701499939,
1.069606065750122,
-0.0688166618347168,
0.16975127160549164,
1.9084173440933228,
0.3178200125694275,
-0.41555339097976685,
0.698852002620697,
1.2094660997390747,
0.5403407216072083,
-0.6451762914657593,
0.060640040785074234,
-0.7235735058784485,
0.37648317217826843,
-1.41771399974823,
0.18389788269996643,
-2.9295952320098877,
0.8201139569282532,
-0.15137434005737305,
-0.1322454959154129,
-0.07212642580270767,
-1.303734302520752,
1.0491617918014526,
2.5769715309143066,
-1.1176319122314453,
0.47428828477859497,
0.5028478503227234,
1.1054356098175049,
-1.5782350301742554,
0.19227679073810577,
-0.5688579678535461,
2.00809645652771,
0.1162065714597702,
1.2133737802505493,
-0.5868064761161804,
-2.197577953338623,
0.6155632734298706,
-1.2395318746566772,
-1.0023442506790161,
0.8046705722808838,
-0.8485759496688843,
0.357515424489975,
-1.4029455184936523,
-0.09373286366462708,
-0.9731699824333191,
-1.2510725259780884,
0.7418195009231567,
0.10925357043743134,
0.4116053283214569,
-0.5159578919410706,
0.3582324981689453,
-2.1694483757019043,
-1.3749977350234985,
-0.2207885980606079,
-0.9664574265480042,
0.5919310450553894,
-0.356037974357605,
0.5682467818260193,
0.004834861494600773,
0.12021905183792114,
0.283724844455719,
1.4165005683898926,
3.3653182983398438,
0.15129530429840088,
0.13879767060279846,
-0.06800265610218048,
-1.1183652877807617,
1.425134301185608,
0.9237070679664612,
-0.17861561477184296,
-0.6003351807594299,
-0.9894046783447266,
1.341560959815979,
2.0108869075775146,
1.1724214553833008,
0.2072731852531433,
-0.8177338242530823,
-0.7504225969314575,
0.10243750363588333,
0.1994827687740326,
0.46150481700897217,
0.9879319071769714,
-0.014033705927431583,
0.14888432621955872,
1.3884512186050415,
1.166621208190918,
-0.2958316504955292,
0.3863028287887573,
-1.0175095796585083,
-0.37685659527778625,
0.41242825984954834,
0.17791776359081268,
0.11229819059371948,
0.5154052972793579,
-1.084223985671997,
-0.27470889687538147,
-0.19946596026420593,
-0.9262109398841858,
-0.7828293442726135,
-0.3822869062423706,
-0.37129533290863037,
1.6228010654449463,
-0.01722363382577896,
-0.4930543899536133,
0.10888958722352982,
-0.7129418253898621,
-0.1712092012166977,
-1.1702114343643188,
0.1603371500968933,
-0.0901825875043869,
-0.03010423481464386,
-0.10533826053142548,
1.6762900352478027,
-0.9113250374794006,
-2.1931729316711426,
0.19523613154888153,
0.39510786533355713,
-0.3001008927822113,
0.08052743226289749,
1.7616209983825684,
0.52633136510849,
1.3455018997192383,
1.2665084600448608,
1.0011485815048218,
-0.4729929566383362,
-1.2129182815551758,
0.7761650681495667,
0.9663484692573547,
-1.3035995960235596,
0.9901430010795593,
-0.2202770859003067,
-0.5192244648933411,
0.6652096509933472,
1.357456088066101,
0.4002821445465088,
-2.061415433883667,
0.9448357224464417,
-0.9261401295661926,
0.7643723487854004,
0.6732775568962097,
0.878288984298706,
0.2241971641778946,
0.8683643937110901,
-1.30287766456604,
-1.1193153858184814,
-0.6764525175094604,
-0.5807511806488037,
1.8524683713912964,
-0.19576306641101837,
0.5477787256240845,
-0.2780996859073639,
-1.1707074642181396,
-0.02912815660238266,
0.7848218083381653,
0.337574303150177,
-0.43476060032844543,
0.9066311717033386,
-0.6232370734214783,
-1.006050705909729,
-1.3570116758346558,
-0.40886253118515015,
-1.032710075378418,
-0.8572628498077393,
0.9944297671318054,
0.7445897459983826,
0.4704376459121704,
1.962753176689148,
0.5915236473083496,
0.2765202522277832,
-2.676950454711914,
0.8940182328224182,
0.2970544397830963,
-0.01666133850812912,
0.9184749126434326,
0.23747065663337708,
1.122666835784912,
-0.02121933177113533,
0.5895401239395142,
-2.2972798347473145,
2.1822872161865234,
-0.17360404133796692,
0.6091027855873108,
0.0740932896733284,
-0.10903085023164749,
1.1048967838287354,
0.6002514958381653,
0.6403904557228088,
-1.1741710901260376,
0.7758550643920898,
-0.5670682787895203,
1.0726041793823242,
0.9918656945228577,
-0.9385440945625305,
0.18057292699813843,
1.3848093748092651,
0.4684162139892578,
-0.3802058696746826,
-0.9660593867301941,
-0.7586436867713928,
1.009850025177002,
1.7624778747558594,
-0.02138710580766201,
0.012520418502390385,
0.8993484973907471,
0.5912371873855591,
-1.2546751499176025,
0.0050658537074923515,
-0.695306658744812,
-0.660309374332428,
1.7810204029083252,
2.033252000808716,
-0.08420152962207794,
-0.21413554251194,
-0.6959604620933533,
-1.3356506824493408,
0.74842768907547,
-0.08111518621444702,
0.07586406916379929,
0.7880885601043701,
-0.7191994786262512,
1.0919630527496338,
0.5940701961517334,
1.024754285812378,
0.0053136879578232765,
0.25264617800712585,
0.2610584497451782,
-0.34886986017227173,
-1.173993706703186,
-0.31755152344703674,
-1.0433259010314941,
-2.6862149238586426,
0.3932185471057892,
-0.24711818993091583,
-1.5483579635620117,
0.12402023375034332,
-1.0389342308044434,
0.8770366311073303,
-0.5951252579689026,
-1.1010875701904297,
-1.3582501411437988,
0.35669848322868347,
-0.17931169271469116,
0.8956043720245361,
-1.680936336517334,
-0.19315937161445618,
1.2577543258666992,
0.9254834055900574,
-0.5874305963516235,
0.9586381912231445,
0.24275989830493927,
0.9467616677284241,
0.784481406211853,
-0.41617485880851746,
0.6014711856842041,
0.035812124609947205,
-1.3747859001159668,
0.3931373357772827,
1.276642918586731,
0.1846703290939331,
1.2452832460403442,
-0.418117493391037,
0.16770502924919128,
0.4126781225204468,
-0.6403480172157288,
-0.5684767365455627,
-0.44179651141166687,
0.7189593315124512,
-0.008645676076412201,
-1.085876226425171,
-0.17501874268054962,
-0.08926534652709961,
-0.25976359844207764,
0.26178160309791565,
-1.3899208307266235,
-0.31829437613487244,
-0.3709545433521271,
-0.46588411927223206,
-1.3478392362594604,
0.08835898339748383,
1.29677152633667,
-0.845348596572876,
-0.2613750994205475,
0.38110244274139404,
0.3117627203464508,
0.6063161492347717,
0.5840729475021362,
-0.7987208962440491,
-0.27526843547821045,
-0.2858048975467682,
-0.24406029284000397,
0.25612446665763855,
1.2122018337249756,
-0.09564919024705887,
-1.0478572845458984,
0.6874288320541382,
-0.323060542345047,
0.23253166675567627,
2.0464723110198975,
-0.0047091348096728325,
-0.6713269352912903,
0.3135188817977905,
-0.7390087246894836,
1.687040090560913,
1.6796237230300903,
1.259024977684021,
-0.09196034073829651,
-0.754014790058136,
0.5397639870643616,
-0.22155874967575073,
-0.3486633002758026,
0.855046808719635,
0.38651567697525024,
-0.21488255262374878,
-1.4279534816741943,
0.6131465435028076,
1.2561964988708496,
-0.6950686573982239,
-0.7074776887893677,
0.03494920954108238,
-0.8757326602935791,
1.2462852001190186,
0.5659285187721252,
0.2954896092414856,
0.24170778691768646,
1.559685468673706,
0.7465556859970093,
-0.5430083870887756,
0.4648120403289795,
0.4847774803638458,
-0.15141813457012177,
-2.0887622833251953,
-0.9372032284736633,
0.2290467470884323,
-0.42775458097457886,
-1.6095986366271973,
1.3455864191055298,
-1.1480270624160767,
-0.9930195212364197,
0.5706474184989929,
0.15635566413402557,
1.2475905418395996,
0.34091833233833313,
1.7335854768753052,
2.081669569015503,
0.9125127792358398,
0.28899285197257996,
1.18462073802948,
0.009016049094498158,
-0.3539142906665802,
1.8223414421081543,
-0.39452672004699707,
0.5854142308235168,
0.9583740830421448,
-0.39692074060440063,
-1.0997358560562134,
-0.7937329411506653,
-1.1942874193191528,
-0.6374365091323853,
1.213516116142273,
0.11052151769399643,
-1.0217727422714233,
0.21776749193668365,
1.604120135307312,
0.08087574690580368,
-0.14613528549671173,
0.6930590271949768,
0.37674248218536377,
-0.6554070115089417,
-0.04510604962706566,
-0.8593587279319763,
0.45124632120132446,
-0.08009318262338638,
-0.28959691524505615,
0.18044374883174896,
0.5533655881881714,
1.295409917831421,
0.0038078539073467255,
0.12038205564022064,
1.2253727912902832,
-1.3174338340759277,
1.5553064346313477,
-0.6866055727005005,
0.30521196126937866,
-2.4777956008911133,
1.41913640499115,
-0.814172625541687,
1.8655391931533813,
-2.514986991882324,
0.39598822593688965,
-0.5102494955062866,
-0.4980432093143463,
0.20345674455165863,
-0.4673832654953003,
0.11005638539791107,
-0.06417732685804367,
-0.9079286456108093,
-0.002860305830836296,
-0.7720916271209717,
0.5772972702980042,
1.2208917140960693,
1.4600188732147217,
-1.1729776859283447,
-0.30200254917144775,
-1.7700518369674683,
-0.18295089900493622,
-0.8140578866004944,
0.3694797456264496,
-1.941785216331482,
-0.14816047251224518,
-2.05828857421875,
-2.4192252159118652,
-1.3898013830184937,
-0.9340271353721619,
1.1206918954849243,
0.20932160317897797,
-0.9899163842201233,
1.1330785751342773,
-0.42441901564598083,
-1.8179644346237183,
1.1377859115600586,
-2.192578077316284
] |
https://github.com/huggingface/datasets/issues/5690 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api | Hi @wccccp, thanks for reporting.
That's weird since `huggingface_hub` _has_ a module called `hf_api` and you are using a recent version of it.
Which version of `datasets` are you using? And is it a bug that you experienced only recently? (cc @lhoestq can it be somehow related to the recent release of `datasets`?)
~@wccccp what I can suggest you is to uninstall and reinstall completely huggingface_hub and datasets? My first guess is that there is a discrepancy somewhere in your setup 😕~ | ### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
| 233 | 82 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api
### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
Hi @wccccp, thanks for reporting.
That's weird since `huggingface_hub` _has_ a module called `hf_api` and you are using a recent version of it.
Which version of `datasets` are you using? And is it a bug that you experienced only recently? (cc @lhoestq can it be somehow related to the recent release of `datasets`?)
~@wccccp what I can suggest you is to uninstall and reinstall completely huggingface_hub and datasets? My first guess is that there is a discrepancy somewhere in your setup 😕~ | [
-1.184387445449829,
-0.8902541399002075,
-0.6576993465423584,
1.4401789903640747,
-0.11721622198820114,
-1.22817862033844,
0.17622846364974976,
-1.0548419952392578,
1.4780069589614868,
-0.6604586839675903,
0.16666510701179504,
-1.625349521636963,
-0.10590142756700516,
-0.4272765517234802,
-0.6431736350059509,
-0.9335398077964783,
-0.3627670407295227,
-0.8886592388153076,
1.0737158060073853,
2.595414400100708,
1.4032080173492432,
-1.318393588066101,
2.798151969909668,
0.6619731783866882,
-0.2573065757751465,
-1.0421886444091797,
0.6007253527641296,
-0.017090193927288055,
-1.1557379961013794,
-0.5363174080848694,
-0.8238031268119812,
-0.013999590650200844,
-0.5457156300544739,
-0.339550256729126,
0.00938856229186058,
0.4949297308921814,
-0.3304768204689026,
-0.29121553897857666,
-0.6616178750991821,
-0.7828761339187622,
0.5022542476654053,
-0.31142473220825195,
0.9802065491676331,
-0.3031827211380005,
1.7108749151229858,
-0.6158055067062378,
0.46980762481689453,
0.7370410561561584,
1.229660153388977,
0.22525116801261902,
0.006489135324954987,
0.27447569370269775,
0.31158989667892456,
-0.03685909882187843,
0.6018559336662292,
1.2138744592666626,
0.5948905348777771,
0.5378655791282654,
0.7038148641586304,
-2.1784071922302246,
1.2228636741638184,
-0.878930926322937,
0.24196134507656097,
1.2838889360427856,
-0.7628843188285828,
0.3050398826599121,
-1.837654709815979,
-0.09631506353616714,
0.6295349597930908,
-2.2423477172851562,
0.29225480556488037,
-1.3028981685638428,
-0.5528914332389832,
0.864953875541687,
0.30160272121429443,
-1.2654376029968262,
0.1520506590604782,
-0.5490651726722717,
1.107470154762268,
0.4715801477432251,
1.200380802154541,
-1.6610888242721558,
-0.013268107548356056,
-0.18552447855472565,
0.12488183379173279,
-1.285405158996582,
-1.6786445379257202,
0.5785094499588013,
0.49259811639785767,
0.7105013132095337,
-0.015845926478505135,
1.0476248264312744,
-1.0922620296478271,
0.7581338882446289,
-1.1024820804595947,
-1.650373935699463,
-1.382988452911377,
-2.450629234313965,
-2.3261964321136475,
0.6755014657974243,
-0.570734977722168,
-0.561074435710907,
2.0756947994232178,
-0.9477190971374512,
-1.7111581563949585,
1.0834356546401978,
0.34472745656967163,
0.1757754385471344,
2.4432270526885986,
0.22400684654712677,
-0.7580931782722473,
0.4829567074775696,
-0.7103393077850342,
0.7996528148651123,
-0.30361634492874146,
1.3318113088607788,
0.48402678966522217,
-1.0007092952728271,
1.656723141670227,
-0.48461973667144775,
0.6622375249862671,
-0.6345028877258301,
-0.5162056684494019,
-0.7930361032485962,
0.20400285720825195,
1.852010726928711,
-0.3173176050186157,
1.5529218912124634,
-0.30451178550720215,
-1.5820379257202148,
-1.5067787170410156,
0.8703303337097168,
0.4534091353416443,
-0.9754423499107361,
0.04951338469982147,
-0.5038887858390808,
0.15234246850013733,
-0.01017174031585455,
1.1123348474502563,
1.2323994636535645,
0.7041144371032715,
-0.3510977029800415,
-0.8722761273384094,
0.18791793286800385,
-0.23986242711544037,
-0.7449755668640137,
-1.7796964645385742,
-0.20632627606391907,
0.14327441155910492,
0.6428999900817871,
-1.2164558172225952,
1.7575244903564453,
0.878834068775177,
2.0405874252319336,
0.8953882455825806,
-0.36953437328338623,
1.4350128173828125,
-0.0017367769032716751,
1.7895886898040771,
-0.5372644662857056,
0.5613082051277161,
-0.41215580701828003,
-1.1043503284454346,
0.9504114985466003,
-0.37099534273147583,
-2.03706431388855,
-0.7987946271896362,
-0.6956154704093933,
-0.19597719609737396,
-0.7748247385025024,
0.8571979999542236,
-0.2292957752943039,
-1.4403672218322754,
0.17361727356910706,
-0.724101185798645,
0.18746091425418854,
-1.3733899593353271,
0.2161322832107544,
0.7109824419021606,
-0.6615123748779297,
-0.06347031891345978,
-0.2686707377433777,
-1.240450382232666,
-0.5611828565597534,
0.3344835638999939,
1.9360063076019287,
-0.527682900428772,
0.8821529150009155,
1.02438485622406,
-0.7222326397895813,
0.14434562623500824,
0.13147161900997162,
-0.3112759590148926,
0.7716042399406433,
-1.1116604804992676,
-0.3971971869468689,
1.1963083744049072,
-0.2874612808227539,
-0.6996248364448547,
1.4161765575408936,
0.7641517519950867,
-1.1823811531066895,
-0.32461047172546387,
-0.17594768106937408,
-0.9120860695838928,
0.016135718673467636,
-1.4661076068878174,
-0.13626502454280853,
0.4173600673675537,
-1.5268359184265137,
-0.2977412939071655,
-0.1985618770122528,
1.3868772983551025,
-0.2811279892921448,
1.482213020324707,
-0.39562153816223145,
-0.19027236104011536,
-0.24144640564918518,
-0.46986305713653564,
0.17106489837169647,
-0.23608624935150146,
-0.5875479578971863,
0.12176720798015594,
-0.8003026247024536,
0.3107982873916626,
1.4555197954177856,
0.3010096549987793,
0.06443461775779724,
0.34572869539260864,
1.1063727140426636,
0.37313032150268555,
-0.07022462785243988,
-0.8527640700340271,
-1.5145243406295776,
1.9368613958358765,
-1.4050990343093872,
1.9374456405639648,
0.8588210344314575,
-0.03781979903578758,
-1.8289297819137573,
-1.8721392154693604,
1.2261170148849487,
1.0844050645828247,
2.379450798034668,
0.5150165557861328,
0.46237385272979736,
-0.7631298303604126,
-0.751793384552002,
0.24978356063365936,
-1.0027544498443604,
-0.6535916924476624,
0.1759556531906128,
2.3455898761749268,
1.7705907821655273,
-0.5242282748222351,
-0.22635531425476074,
-0.8354099988937378,
1.3350783586502075,
-0.23542416095733643,
0.2894609570503235,
2.0775840282440186,
-0.23591768741607666,
-0.9918940663337708,
1.300152063369751,
-2.387331962585449,
0.3175773620605469,
2.191851854324341,
0.24261070787906647,
0.15470872819423676,
-1.4012058973312378,
-0.6952682733535767,
-0.35922104120254517,
-0.48576658964157104,
-1.2271987199783325,
0.5775212645530701,
-0.2632220387458801,
-0.8099445700645447,
-1.5013599395751953,
0.08467604219913483,
-1.160519003868103,
-1.7166105508804321,
0.2403814047574997,
1.9613434076309204,
2.1099860668182373,
-0.8333926796913147,
1.4119608402252197,
-0.2744802236557007,
-0.0034593003802001476,
1.2600069046020508,
1.3441482782363892,
3.02059006690979,
1.8690636157989502,
-1.3084955215454102,
0.7423938512802124,
-0.18665920197963715,
-0.5113562941551208,
1.1596896648406982,
-1.1573735475540161,
1.1368014812469482,
-0.16368204355239868,
-1.2406779527664185,
-1.2870843410491943,
1.0361707210540771,
0.4492805600166321,
-0.009912458248436451,
-0.4786646366119385,
1.2455618381500244,
0.08015508949756622,
1.3564451932907104,
0.5981221795082092,
-0.36491185426712036,
0.5788688063621521,
-0.3198745846748352,
-0.5716056227684021,
1.6534581184387207,
0.15381817519664764,
-1.56501305103302,
-2.368825912475586,
-0.2954134941101074,
-0.9418781399726868,
-0.019764650613069534,
-0.617584764957428,
-1.0631916522979736,
1.7151050567626953,
0.37907254695892334,
-1.1621654033660889,
-0.31577831506729126,
-0.22436316311359406,
-0.43059802055358887,
2.697981834411621,
-1.289886236190796,
-0.10772892087697983,
-0.9525693655014038,
-0.5870707631111145,
1.6604958772659302,
-1.2588531970977783,
-0.26837360858917236,
-0.9726777672767639,
-0.6723763346672058,
-1.2358015775680542,
-0.45707398653030396,
0.037206146866083145,
-0.9576476216316223,
0.7627192735671997,
0.3082164525985718,
-1.15610671043396,
-0.31069451570510864,
-0.9473441243171692,
1.0778740644454956,
-0.13715079426765442,
0.2401210218667984,
1.830836296081543,
0.32215696573257446,
-0.38538825511932373,
0.7464660406112671,
1.2283095121383667,
0.5829247832298279,
-0.6269721984863281,
-0.059259455651044846,
-0.7183321714401245,
0.3660176396369934,
-1.379668116569519,
0.20712557435035706,
-2.950317859649658,
0.6663995385169983,
-0.2051781713962555,
-0.17480376362800598,
-0.08060882985591888,
-1.3325103521347046,
1.117037057876587,
2.5787718296051025,
-1.1619813442230225,
0.4794793725013733,
0.4453967809677124,
1.1301829814910889,
-1.6949982643127441,
0.3010406494140625,
-0.47160208225250244,
2.0693655014038086,
0.1667395383119583,
1.2255001068115234,
-0.4964457154273987,
-2.257408857345581,
0.6129791140556335,
-1.191890835762024,
-1.0290710926055908,
0.8115509152412415,
-0.9644235372543335,
0.3253886103630066,
-1.531355619430542,
-0.1761893779039383,
-0.9518261551856995,
-1.239338994026184,
0.6895550489425659,
0.04713189974427223,
0.386349618434906,
-0.5002741813659668,
0.2781127691268921,
-2.199526786804199,
-1.4404090642929077,
-0.1947094351053238,
-1.0700347423553467,
0.5120280385017395,
-0.481601357460022,
0.5724713802337646,
-0.07723803073167801,
0.06301148235797882,
0.27169275283813477,
1.5182478427886963,
3.4245107173919678,
0.1993105411529541,
0.23225700855255127,
-0.1047786995768547,
-1.0897061824798584,
1.5052589178085327,
0.8107334971427917,
-0.10889549553394318,
-0.5831210017204285,
-0.987662136554718,
1.2699697017669678,
2.0422310829162598,
1.087374210357666,
0.12692104279994965,
-0.8636347055435181,
-0.6960218548774719,
-0.02836228720843792,
0.19098268449306488,
0.5733726620674133,
1.0516126155853271,
-0.018497280776500702,
-0.03784482181072235,
1.381757140159607,
1.1257601976394653,
-0.2862868309020996,
0.3910831809043884,
-0.9387003183364868,
-0.39818763732910156,
0.41077929735183716,
0.13554291427135468,
0.08698541671037674,
0.5482405424118042,
-1.0390840768814087,
-0.36651110649108887,
-0.37200433015823364,
-0.8326625823974609,
-0.741222083568573,
-0.4375620484352112,
-0.36444032192230225,
1.5917792320251465,
0.0997614935040474,
-0.4929288625717163,
0.1571381688117981,
-0.5720999836921692,
-0.12069236487150192,
-1.127708911895752,
0.16329284012317657,
-0.14699894189834595,
-0.1162753477692604,
-0.13689091801643372,
1.6106812953948975,
-0.9261226058006287,
-2.1530208587646484,
0.12124957144260406,
0.3787083625793457,
-0.271719753742218,
0.24671168625354767,
1.6246936321258545,
0.4361324906349182,
1.4191399812698364,
1.2287129163742065,
0.9456260204315186,
-0.7279950976371765,
-1.2680622339248657,
0.7974762320518494,
0.9795358777046204,
-1.3032631874084473,
0.9452601671218872,
-0.2300318330526352,
-0.5377469658851624,
0.6451342105865479,
1.342375636100769,
0.48409348726272583,
-1.9811840057373047,
0.9917008280754089,
-0.9383674263954163,
0.7162028551101685,
0.7391189336776733,
0.7231365442276001,
0.2738885283470154,
0.8554881811141968,
-1.2625318765640259,
-1.1115285158157349,
-0.7017225027084351,
-0.6460793018341064,
1.84071946144104,
-0.372265100479126,
0.6601712703704834,
-0.1665773242712021,
-1.1639822721481323,
-0.09770558029413223,
0.7810733914375305,
0.39054882526397705,
-0.3983916640281677,
0.8640981912612915,
-0.5390162467956543,
-0.9577677845954895,
-1.2110615968704224,
-0.3687134385108948,
-1.0652053356170654,
-0.9136586785316467,
1.0167644023895264,
0.6851215362548828,
0.41740429401397705,
1.9455286264419556,
0.6700457334518433,
0.3159441351890564,
-2.596524715423584,
0.8727034330368042,
0.28382766246795654,
0.012721644714474678,
0.8829960227012634,
0.2548310160636902,
1.1668652296066284,
0.033618099987506866,
0.6070414185523987,
-2.352814197540283,
2.228147268295288,
-0.18634937703609467,
0.6391612887382507,
0.0011861389502882957,
-0.25635066628456116,
1.094642162322998,
0.5535268187522888,
0.514868438243866,
-1.1466484069824219,
0.6813246011734009,
-0.5572836995124817,
1.0322325229644775,
0.858507513999939,
-0.8588212728500366,
0.10901175439357758,
1.435534119606018,
0.4771471619606018,
-0.4477354884147644,
-0.9636142253875732,
-0.7772796154022217,
0.9552372097969055,
1.6376781463623047,
-0.04323339834809303,
-0.013148776255548,
0.8504971265792847,
0.7089790105819702,
-1.268256664276123,
0.0374874621629715,
-0.6837963461875916,
-0.7010798454284668,
1.7186033725738525,
2.009652853012085,
-0.10196425765752792,
-0.21139033138751984,
-0.7705975770950317,
-1.3621265888214111,
0.7933244705200195,
-0.15630485117435455,
0.032430242747068405,
0.6407338976860046,
-0.6505933403968811,
1.0485459566116333,
0.5441420674324036,
1.1106470823287964,
0.12364016473293304,
0.32052725553512573,
0.40721601247787476,
-0.41394883394241333,
-1.149781346321106,
-0.33334100246429443,
-1.086198091506958,
-2.504650592803955,
0.3765738606452942,
-0.2869689464569092,
-1.4739524126052856,
0.09670723974704742,
-1.0170011520385742,
0.9413270950317383,
-0.549559473991394,
-1.103764533996582,
-1.4714536666870117,
0.3508954644203186,
-0.16869190335273743,
0.9375196099281311,
-1.5816155672073364,
-0.2638033628463745,
1.2648471593856812,
0.8136558532714844,
-0.6422273516654968,
0.9544225931167603,
0.26568734645843506,
0.984443724155426,
0.7283389568328857,
-0.35211652517318726,
0.6515236496925354,
-0.013791380450129509,
-1.2851327657699585,
0.4164466857910156,
1.21095609664917,
0.2274305820465088,
1.4245390892028809,
-0.4012486934661865,
0.08687462657690048,
0.38325977325439453,
-0.6194257140159607,
-0.5329276919364929,
-0.3791999816894531,
0.6929598450660706,
-0.004365203902125359,
-1.0540077686309814,
-0.17453376948833466,
-0.22256097197532654,
-0.2899776101112366,
0.20801784098148346,
-1.486101508140564,
-0.24233175814151764,
-0.4214259386062622,
-0.47423046827316284,
-1.354996681213379,
0.04182715713977814,
1.3314419984817505,
-0.7537164688110352,
-0.20843788981437683,
0.4424620270729065,
0.3748512268066406,
0.5828069448471069,
0.5582385063171387,
-0.7717162370681763,
-0.24138018488883972,
-0.3874896168708801,
-0.2725154161453247,
0.2890373468399048,
1.1986128091812134,
0.00813429057598114,
-1.0025720596313477,
0.6826043725013733,
-0.3051760792732239,
0.17286796867847443,
2.0308778285980225,
0.023347720503807068,
-0.7441971302032471,
0.398919939994812,
-0.682775616645813,
1.7688785791397095,
1.8004196882247925,
1.3025301694869995,
-0.11124574393033981,
-0.8338850140571594,
0.590496301651001,
-0.304692804813385,
-0.2868637442588806,
0.9159212112426758,
0.3942721486091614,
-0.28596794605255127,
-1.4249389171600342,
0.6818408966064453,
1.3136714696884155,
-0.773171603679657,
-0.781918466091156,
0.12784945964813232,
-0.9019090533256531,
1.2763527631759644,
0.5435048341751099,
0.3005807399749756,
0.28540492057800293,
1.5174510478973389,
0.7599617838859558,
-0.42283934354782104,
0.5227349996566772,
0.6117871999740601,
-0.1899610161781311,
-2.04841947555542,
-1.0756900310516357,
0.33059871196746826,
-0.3484255075454712,
-1.5528039932250977,
1.4096221923828125,
-1.1213372945785522,
-1.0362968444824219,
0.5622017979621887,
0.06957082450389862,
1.293575406074524,
0.41793614625930786,
1.6654285192489624,
2.172518491744995,
0.8821576833724976,
0.41443443298339844,
1.1728053092956543,
-0.11086992174386978,
-0.5133596658706665,
1.8821897506713867,
-0.33014339208602905,
0.5433850288391113,
1.0581670999526978,
-0.4044402837753296,
-1.149670958518982,
-0.9084031581878662,
-1.1313203573226929,
-0.6668220162391663,
1.2370789051055908,
0.0509999580681324,
-1.0809507369995117,
0.24779297411441803,
1.5867292881011963,
0.16048192977905273,
-0.23169831931591034,
0.6616777777671814,
0.3580811023712158,
-0.8104752898216248,
-0.13517755270004272,
-0.8344941735267639,
0.49779778718948364,
-0.16889306902885437,
-0.32192546129226685,
0.2881203889846802,
0.6386854648590088,
1.334646463394165,
-0.06190986558794975,
0.11051712185144424,
1.0574859380722046,
-1.4172080755233765,
1.4910223484039307,
-0.5540390610694885,
0.23379476368427277,
-2.3666787147521973,
1.3490417003631592,
-0.6884695887565613,
1.983859658241272,
-2.5748796463012695,
0.4519701600074768,
-0.5117361545562744,
-0.48514455556869507,
0.2440856546163559,
-0.47057127952575684,
0.1259075552225113,
-0.10551256686449051,
-0.9142553210258484,
-0.07479316741228104,
-0.7281102538108826,
0.6254639625549316,
1.110579490661621,
1.4584274291992188,
-1.062696099281311,
-0.3046797513961792,
-1.6817296743392944,
-0.21180634200572968,
-0.7825753688812256,
0.29985612630844116,
-1.9457321166992188,
-0.22017847001552582,
-2.020678758621216,
-2.3392298221588135,
-1.2710577249526978,
-0.8325334787368774,
0.983736515045166,
0.21316146850585938,
-0.9163294434547424,
1.2953286170959473,
-0.3186185956001282,
-1.7909178733825684,
1.182681918144226,
-2.1366775035858154
] |
https://github.com/huggingface/datasets/issues/5690 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api | @wccccp Actually I have also been able to reproduce the error so it's not an issue with your setup.
@huggingface/datasets I found this issue quite weird. Is this a module that is not used very often?
The problematic line is [this one](https://github.com/huggingface/datasets/blame/c33e8ce68b5000988bf6b2e4bca27ffaa469acea/src/datasets/data_files.py#L476) where `huggingface_hub.hf_api.DatasetInfo` is used. `huggingface_hub` is imported [here](https://github.com/huggingface/datasets/blame/c33e8ce68b5000988bf6b2e4bca27ffaa469acea/src/datasets/data_files.py#L6) as `import huggingface_hub`. However since modules are lazy-loaded in `hfh` you need to explicitly import them (i.e. `import huggingface_hub.hf_api`).
What's weird is that nothing has changed for months. Datasets code seems that it didn't change for 2 years when I git-blame this part. And lazy-loading was introduced 1 year ago in `huggingface_hub`. Could it be that `data_files.py` is a file almost never used?
| ### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
| 233 | 113 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api
### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
@wccccp Actually I have also been able to reproduce the error so it's not an issue with your setup.
@huggingface/datasets I found this issue quite weird. Is this a module that is not used very often?
The problematic line is [this one](https://github.com/huggingface/datasets/blame/c33e8ce68b5000988bf6b2e4bca27ffaa469acea/src/datasets/data_files.py#L476) where `huggingface_hub.hf_api.DatasetInfo` is used. `huggingface_hub` is imported [here](https://github.com/huggingface/datasets/blame/c33e8ce68b5000988bf6b2e4bca27ffaa469acea/src/datasets/data_files.py#L6) as `import huggingface_hub`. However since modules are lazy-loaded in `hfh` you need to explicitly import them (i.e. `import huggingface_hub.hf_api`).
What's weird is that nothing has changed for months. Datasets code seems that it didn't change for 2 years when I git-blame this part. And lazy-loading was introduced 1 year ago in `huggingface_hub`. Could it be that `data_files.py` is a file almost never used?
| [
-1.184387445449829,
-0.8902541399002075,
-0.6576993465423584,
1.4401789903640747,
-0.11721622198820114,
-1.22817862033844,
0.17622846364974976,
-1.0548419952392578,
1.4780069589614868,
-0.6604586839675903,
0.16666510701179504,
-1.625349521636963,
-0.10590142756700516,
-0.4272765517234802,
-0.6431736350059509,
-0.9335398077964783,
-0.3627670407295227,
-0.8886592388153076,
1.0737158060073853,
2.595414400100708,
1.4032080173492432,
-1.318393588066101,
2.798151969909668,
0.6619731783866882,
-0.2573065757751465,
-1.0421886444091797,
0.6007253527641296,
-0.017090193927288055,
-1.1557379961013794,
-0.5363174080848694,
-0.8238031268119812,
-0.013999590650200844,
-0.5457156300544739,
-0.339550256729126,
0.00938856229186058,
0.4949297308921814,
-0.3304768204689026,
-0.29121553897857666,
-0.6616178750991821,
-0.7828761339187622,
0.5022542476654053,
-0.31142473220825195,
0.9802065491676331,
-0.3031827211380005,
1.7108749151229858,
-0.6158055067062378,
0.46980762481689453,
0.7370410561561584,
1.229660153388977,
0.22525116801261902,
0.006489135324954987,
0.27447569370269775,
0.31158989667892456,
-0.03685909882187843,
0.6018559336662292,
1.2138744592666626,
0.5948905348777771,
0.5378655791282654,
0.7038148641586304,
-2.1784071922302246,
1.2228636741638184,
-0.878930926322937,
0.24196134507656097,
1.2838889360427856,
-0.7628843188285828,
0.3050398826599121,
-1.837654709815979,
-0.09631506353616714,
0.6295349597930908,
-2.2423477172851562,
0.29225480556488037,
-1.3028981685638428,
-0.5528914332389832,
0.864953875541687,
0.30160272121429443,
-1.2654376029968262,
0.1520506590604782,
-0.5490651726722717,
1.107470154762268,
0.4715801477432251,
1.200380802154541,
-1.6610888242721558,
-0.013268107548356056,
-0.18552447855472565,
0.12488183379173279,
-1.285405158996582,
-1.6786445379257202,
0.5785094499588013,
0.49259811639785767,
0.7105013132095337,
-0.015845926478505135,
1.0476248264312744,
-1.0922620296478271,
0.7581338882446289,
-1.1024820804595947,
-1.650373935699463,
-1.382988452911377,
-2.450629234313965,
-2.3261964321136475,
0.6755014657974243,
-0.570734977722168,
-0.561074435710907,
2.0756947994232178,
-0.9477190971374512,
-1.7111581563949585,
1.0834356546401978,
0.34472745656967163,
0.1757754385471344,
2.4432270526885986,
0.22400684654712677,
-0.7580931782722473,
0.4829567074775696,
-0.7103393077850342,
0.7996528148651123,
-0.30361634492874146,
1.3318113088607788,
0.48402678966522217,
-1.0007092952728271,
1.656723141670227,
-0.48461973667144775,
0.6622375249862671,
-0.6345028877258301,
-0.5162056684494019,
-0.7930361032485962,
0.20400285720825195,
1.852010726928711,
-0.3173176050186157,
1.5529218912124634,
-0.30451178550720215,
-1.5820379257202148,
-1.5067787170410156,
0.8703303337097168,
0.4534091353416443,
-0.9754423499107361,
0.04951338469982147,
-0.5038887858390808,
0.15234246850013733,
-0.01017174031585455,
1.1123348474502563,
1.2323994636535645,
0.7041144371032715,
-0.3510977029800415,
-0.8722761273384094,
0.18791793286800385,
-0.23986242711544037,
-0.7449755668640137,
-1.7796964645385742,
-0.20632627606391907,
0.14327441155910492,
0.6428999900817871,
-1.2164558172225952,
1.7575244903564453,
0.878834068775177,
2.0405874252319336,
0.8953882455825806,
-0.36953437328338623,
1.4350128173828125,
-0.0017367769032716751,
1.7895886898040771,
-0.5372644662857056,
0.5613082051277161,
-0.41215580701828003,
-1.1043503284454346,
0.9504114985466003,
-0.37099534273147583,
-2.03706431388855,
-0.7987946271896362,
-0.6956154704093933,
-0.19597719609737396,
-0.7748247385025024,
0.8571979999542236,
-0.2292957752943039,
-1.4403672218322754,
0.17361727356910706,
-0.724101185798645,
0.18746091425418854,
-1.3733899593353271,
0.2161322832107544,
0.7109824419021606,
-0.6615123748779297,
-0.06347031891345978,
-0.2686707377433777,
-1.240450382232666,
-0.5611828565597534,
0.3344835638999939,
1.9360063076019287,
-0.527682900428772,
0.8821529150009155,
1.02438485622406,
-0.7222326397895813,
0.14434562623500824,
0.13147161900997162,
-0.3112759590148926,
0.7716042399406433,
-1.1116604804992676,
-0.3971971869468689,
1.1963083744049072,
-0.2874612808227539,
-0.6996248364448547,
1.4161765575408936,
0.7641517519950867,
-1.1823811531066895,
-0.32461047172546387,
-0.17594768106937408,
-0.9120860695838928,
0.016135718673467636,
-1.4661076068878174,
-0.13626502454280853,
0.4173600673675537,
-1.5268359184265137,
-0.2977412939071655,
-0.1985618770122528,
1.3868772983551025,
-0.2811279892921448,
1.482213020324707,
-0.39562153816223145,
-0.19027236104011536,
-0.24144640564918518,
-0.46986305713653564,
0.17106489837169647,
-0.23608624935150146,
-0.5875479578971863,
0.12176720798015594,
-0.8003026247024536,
0.3107982873916626,
1.4555197954177856,
0.3010096549987793,
0.06443461775779724,
0.34572869539260864,
1.1063727140426636,
0.37313032150268555,
-0.07022462785243988,
-0.8527640700340271,
-1.5145243406295776,
1.9368613958358765,
-1.4050990343093872,
1.9374456405639648,
0.8588210344314575,
-0.03781979903578758,
-1.8289297819137573,
-1.8721392154693604,
1.2261170148849487,
1.0844050645828247,
2.379450798034668,
0.5150165557861328,
0.46237385272979736,
-0.7631298303604126,
-0.751793384552002,
0.24978356063365936,
-1.0027544498443604,
-0.6535916924476624,
0.1759556531906128,
2.3455898761749268,
1.7705907821655273,
-0.5242282748222351,
-0.22635531425476074,
-0.8354099988937378,
1.3350783586502075,
-0.23542416095733643,
0.2894609570503235,
2.0775840282440186,
-0.23591768741607666,
-0.9918940663337708,
1.300152063369751,
-2.387331962585449,
0.3175773620605469,
2.191851854324341,
0.24261070787906647,
0.15470872819423676,
-1.4012058973312378,
-0.6952682733535767,
-0.35922104120254517,
-0.48576658964157104,
-1.2271987199783325,
0.5775212645530701,
-0.2632220387458801,
-0.8099445700645447,
-1.5013599395751953,
0.08467604219913483,
-1.160519003868103,
-1.7166105508804321,
0.2403814047574997,
1.9613434076309204,
2.1099860668182373,
-0.8333926796913147,
1.4119608402252197,
-0.2744802236557007,
-0.0034593003802001476,
1.2600069046020508,
1.3441482782363892,
3.02059006690979,
1.8690636157989502,
-1.3084955215454102,
0.7423938512802124,
-0.18665920197963715,
-0.5113562941551208,
1.1596896648406982,
-1.1573735475540161,
1.1368014812469482,
-0.16368204355239868,
-1.2406779527664185,
-1.2870843410491943,
1.0361707210540771,
0.4492805600166321,
-0.009912458248436451,
-0.4786646366119385,
1.2455618381500244,
0.08015508949756622,
1.3564451932907104,
0.5981221795082092,
-0.36491185426712036,
0.5788688063621521,
-0.3198745846748352,
-0.5716056227684021,
1.6534581184387207,
0.15381817519664764,
-1.56501305103302,
-2.368825912475586,
-0.2954134941101074,
-0.9418781399726868,
-0.019764650613069534,
-0.617584764957428,
-1.0631916522979736,
1.7151050567626953,
0.37907254695892334,
-1.1621654033660889,
-0.31577831506729126,
-0.22436316311359406,
-0.43059802055358887,
2.697981834411621,
-1.289886236190796,
-0.10772892087697983,
-0.9525693655014038,
-0.5870707631111145,
1.6604958772659302,
-1.2588531970977783,
-0.26837360858917236,
-0.9726777672767639,
-0.6723763346672058,
-1.2358015775680542,
-0.45707398653030396,
0.037206146866083145,
-0.9576476216316223,
0.7627192735671997,
0.3082164525985718,
-1.15610671043396,
-0.31069451570510864,
-0.9473441243171692,
1.0778740644454956,
-0.13715079426765442,
0.2401210218667984,
1.830836296081543,
0.32215696573257446,
-0.38538825511932373,
0.7464660406112671,
1.2283095121383667,
0.5829247832298279,
-0.6269721984863281,
-0.059259455651044846,
-0.7183321714401245,
0.3660176396369934,
-1.379668116569519,
0.20712557435035706,
-2.950317859649658,
0.6663995385169983,
-0.2051781713962555,
-0.17480376362800598,
-0.08060882985591888,
-1.3325103521347046,
1.117037057876587,
2.5787718296051025,
-1.1619813442230225,
0.4794793725013733,
0.4453967809677124,
1.1301829814910889,
-1.6949982643127441,
0.3010406494140625,
-0.47160208225250244,
2.0693655014038086,
0.1667395383119583,
1.2255001068115234,
-0.4964457154273987,
-2.257408857345581,
0.6129791140556335,
-1.191890835762024,
-1.0290710926055908,
0.8115509152412415,
-0.9644235372543335,
0.3253886103630066,
-1.531355619430542,
-0.1761893779039383,
-0.9518261551856995,
-1.239338994026184,
0.6895550489425659,
0.04713189974427223,
0.386349618434906,
-0.5002741813659668,
0.2781127691268921,
-2.199526786804199,
-1.4404090642929077,
-0.1947094351053238,
-1.0700347423553467,
0.5120280385017395,
-0.481601357460022,
0.5724713802337646,
-0.07723803073167801,
0.06301148235797882,
0.27169275283813477,
1.5182478427886963,
3.4245107173919678,
0.1993105411529541,
0.23225700855255127,
-0.1047786995768547,
-1.0897061824798584,
1.5052589178085327,
0.8107334971427917,
-0.10889549553394318,
-0.5831210017204285,
-0.987662136554718,
1.2699697017669678,
2.0422310829162598,
1.087374210357666,
0.12692104279994965,
-0.8636347055435181,
-0.6960218548774719,
-0.02836228720843792,
0.19098268449306488,
0.5733726620674133,
1.0516126155853271,
-0.018497280776500702,
-0.03784482181072235,
1.381757140159607,
1.1257601976394653,
-0.2862868309020996,
0.3910831809043884,
-0.9387003183364868,
-0.39818763732910156,
0.41077929735183716,
0.13554291427135468,
0.08698541671037674,
0.5482405424118042,
-1.0390840768814087,
-0.36651110649108887,
-0.37200433015823364,
-0.8326625823974609,
-0.741222083568573,
-0.4375620484352112,
-0.36444032192230225,
1.5917792320251465,
0.0997614935040474,
-0.4929288625717163,
0.1571381688117981,
-0.5720999836921692,
-0.12069236487150192,
-1.127708911895752,
0.16329284012317657,
-0.14699894189834595,
-0.1162753477692604,
-0.13689091801643372,
1.6106812953948975,
-0.9261226058006287,
-2.1530208587646484,
0.12124957144260406,
0.3787083625793457,
-0.271719753742218,
0.24671168625354767,
1.6246936321258545,
0.4361324906349182,
1.4191399812698364,
1.2287129163742065,
0.9456260204315186,
-0.7279950976371765,
-1.2680622339248657,
0.7974762320518494,
0.9795358777046204,
-1.3032631874084473,
0.9452601671218872,
-0.2300318330526352,
-0.5377469658851624,
0.6451342105865479,
1.342375636100769,
0.48409348726272583,
-1.9811840057373047,
0.9917008280754089,
-0.9383674263954163,
0.7162028551101685,
0.7391189336776733,
0.7231365442276001,
0.2738885283470154,
0.8554881811141968,
-1.2625318765640259,
-1.1115285158157349,
-0.7017225027084351,
-0.6460793018341064,
1.84071946144104,
-0.372265100479126,
0.6601712703704834,
-0.1665773242712021,
-1.1639822721481323,
-0.09770558029413223,
0.7810733914375305,
0.39054882526397705,
-0.3983916640281677,
0.8640981912612915,
-0.5390162467956543,
-0.9577677845954895,
-1.2110615968704224,
-0.3687134385108948,
-1.0652053356170654,
-0.9136586785316467,
1.0167644023895264,
0.6851215362548828,
0.41740429401397705,
1.9455286264419556,
0.6700457334518433,
0.3159441351890564,
-2.596524715423584,
0.8727034330368042,
0.28382766246795654,
0.012721644714474678,
0.8829960227012634,
0.2548310160636902,
1.1668652296066284,
0.033618099987506866,
0.6070414185523987,
-2.352814197540283,
2.228147268295288,
-0.18634937703609467,
0.6391612887382507,
0.0011861389502882957,
-0.25635066628456116,
1.094642162322998,
0.5535268187522888,
0.514868438243866,
-1.1466484069824219,
0.6813246011734009,
-0.5572836995124817,
1.0322325229644775,
0.858507513999939,
-0.8588212728500366,
0.10901175439357758,
1.435534119606018,
0.4771471619606018,
-0.4477354884147644,
-0.9636142253875732,
-0.7772796154022217,
0.9552372097969055,
1.6376781463623047,
-0.04323339834809303,
-0.013148776255548,
0.8504971265792847,
0.7089790105819702,
-1.268256664276123,
0.0374874621629715,
-0.6837963461875916,
-0.7010798454284668,
1.7186033725738525,
2.009652853012085,
-0.10196425765752792,
-0.21139033138751984,
-0.7705975770950317,
-1.3621265888214111,
0.7933244705200195,
-0.15630485117435455,
0.032430242747068405,
0.6407338976860046,
-0.6505933403968811,
1.0485459566116333,
0.5441420674324036,
1.1106470823287964,
0.12364016473293304,
0.32052725553512573,
0.40721601247787476,
-0.41394883394241333,
-1.149781346321106,
-0.33334100246429443,
-1.086198091506958,
-2.504650592803955,
0.3765738606452942,
-0.2869689464569092,
-1.4739524126052856,
0.09670723974704742,
-1.0170011520385742,
0.9413270950317383,
-0.549559473991394,
-1.103764533996582,
-1.4714536666870117,
0.3508954644203186,
-0.16869190335273743,
0.9375196099281311,
-1.5816155672073364,
-0.2638033628463745,
1.2648471593856812,
0.8136558532714844,
-0.6422273516654968,
0.9544225931167603,
0.26568734645843506,
0.984443724155426,
0.7283389568328857,
-0.35211652517318726,
0.6515236496925354,
-0.013791380450129509,
-1.2851327657699585,
0.4164466857910156,
1.21095609664917,
0.2274305820465088,
1.4245390892028809,
-0.4012486934661865,
0.08687462657690048,
0.38325977325439453,
-0.6194257140159607,
-0.5329276919364929,
-0.3791999816894531,
0.6929598450660706,
-0.004365203902125359,
-1.0540077686309814,
-0.17453376948833466,
-0.22256097197532654,
-0.2899776101112366,
0.20801784098148346,
-1.486101508140564,
-0.24233175814151764,
-0.4214259386062622,
-0.47423046827316284,
-1.354996681213379,
0.04182715713977814,
1.3314419984817505,
-0.7537164688110352,
-0.20843788981437683,
0.4424620270729065,
0.3748512268066406,
0.5828069448471069,
0.5582385063171387,
-0.7717162370681763,
-0.24138018488883972,
-0.3874896168708801,
-0.2725154161453247,
0.2890373468399048,
1.1986128091812134,
0.00813429057598114,
-1.0025720596313477,
0.6826043725013733,
-0.3051760792732239,
0.17286796867847443,
2.0308778285980225,
0.023347720503807068,
-0.7441971302032471,
0.398919939994812,
-0.682775616645813,
1.7688785791397095,
1.8004196882247925,
1.3025301694869995,
-0.11124574393033981,
-0.8338850140571594,
0.590496301651001,
-0.304692804813385,
-0.2868637442588806,
0.9159212112426758,
0.3942721486091614,
-0.28596794605255127,
-1.4249389171600342,
0.6818408966064453,
1.3136714696884155,
-0.773171603679657,
-0.781918466091156,
0.12784945964813232,
-0.9019090533256531,
1.2763527631759644,
0.5435048341751099,
0.3005807399749756,
0.28540492057800293,
1.5174510478973389,
0.7599617838859558,
-0.42283934354782104,
0.5227349996566772,
0.6117871999740601,
-0.1899610161781311,
-2.04841947555542,
-1.0756900310516357,
0.33059871196746826,
-0.3484255075454712,
-1.5528039932250977,
1.4096221923828125,
-1.1213372945785522,
-1.0362968444824219,
0.5622017979621887,
0.06957082450389862,
1.293575406074524,
0.41793614625930786,
1.6654285192489624,
2.172518491744995,
0.8821576833724976,
0.41443443298339844,
1.1728053092956543,
-0.11086992174386978,
-0.5133596658706665,
1.8821897506713867,
-0.33014339208602905,
0.5433850288391113,
1.0581670999526978,
-0.4044402837753296,
-1.149670958518982,
-0.9084031581878662,
-1.1313203573226929,
-0.6668220162391663,
1.2370789051055908,
0.0509999580681324,
-1.0809507369995117,
0.24779297411441803,
1.5867292881011963,
0.16048192977905273,
-0.23169831931591034,
0.6616777777671814,
0.3580811023712158,
-0.8104752898216248,
-0.13517755270004272,
-0.8344941735267639,
0.49779778718948364,
-0.16889306902885437,
-0.32192546129226685,
0.2881203889846802,
0.6386854648590088,
1.334646463394165,
-0.06190986558794975,
0.11051712185144424,
1.0574859380722046,
-1.4172080755233765,
1.4910223484039307,
-0.5540390610694885,
0.23379476368427277,
-2.3666787147521973,
1.3490417003631592,
-0.6884695887565613,
1.983859658241272,
-2.5748796463012695,
0.4519701600074768,
-0.5117361545562744,
-0.48514455556869507,
0.2440856546163559,
-0.47057127952575684,
0.1259075552225113,
-0.10551256686449051,
-0.9142553210258484,
-0.07479316741228104,
-0.7281102538108826,
0.6254639625549316,
1.110579490661621,
1.4584274291992188,
-1.062696099281311,
-0.3046797513961792,
-1.6817296743392944,
-0.21180634200572968,
-0.7825753688812256,
0.29985612630844116,
-1.9457321166992188,
-0.22017847001552582,
-2.020678758621216,
-2.3392298221588135,
-1.2710577249526978,
-0.8325334787368774,
0.983736515045166,
0.21316146850585938,
-0.9163294434547424,
1.2953286170959473,
-0.3186185956001282,
-1.7909178733825684,
1.182681918144226,
-2.1366775035858154
] |
https://github.com/huggingface/datasets/issues/5690 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api | For context, I tried to run `import huggingface_hub; huggingface_hub.hf_api.DatasetInfo` in the terminal with different versions of `hfh` and I need to go back to `huggingface_hub==0.7.0` to make it work (latest is 0.13.3). | ### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
| 233 | 32 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api
### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
For context, I tried to run `import huggingface_hub; huggingface_hub.hf_api.DatasetInfo` in the terminal with different versions of `hfh` and I need to go back to `huggingface_hub==0.7.0` to make it work (latest is 0.13.3). | [
-1.184387445449829,
-0.8902541399002075,
-0.6576993465423584,
1.4401789903640747,
-0.11721622198820114,
-1.22817862033844,
0.17622846364974976,
-1.0548419952392578,
1.4780069589614868,
-0.6604586839675903,
0.16666510701179504,
-1.625349521636963,
-0.10590142756700516,
-0.4272765517234802,
-0.6431736350059509,
-0.9335398077964783,
-0.3627670407295227,
-0.8886592388153076,
1.0737158060073853,
2.595414400100708,
1.4032080173492432,
-1.318393588066101,
2.798151969909668,
0.6619731783866882,
-0.2573065757751465,
-1.0421886444091797,
0.6007253527641296,
-0.017090193927288055,
-1.1557379961013794,
-0.5363174080848694,
-0.8238031268119812,
-0.013999590650200844,
-0.5457156300544739,
-0.339550256729126,
0.00938856229186058,
0.4949297308921814,
-0.3304768204689026,
-0.29121553897857666,
-0.6616178750991821,
-0.7828761339187622,
0.5022542476654053,
-0.31142473220825195,
0.9802065491676331,
-0.3031827211380005,
1.7108749151229858,
-0.6158055067062378,
0.46980762481689453,
0.7370410561561584,
1.229660153388977,
0.22525116801261902,
0.006489135324954987,
0.27447569370269775,
0.31158989667892456,
-0.03685909882187843,
0.6018559336662292,
1.2138744592666626,
0.5948905348777771,
0.5378655791282654,
0.7038148641586304,
-2.1784071922302246,
1.2228636741638184,
-0.878930926322937,
0.24196134507656097,
1.2838889360427856,
-0.7628843188285828,
0.3050398826599121,
-1.837654709815979,
-0.09631506353616714,
0.6295349597930908,
-2.2423477172851562,
0.29225480556488037,
-1.3028981685638428,
-0.5528914332389832,
0.864953875541687,
0.30160272121429443,
-1.2654376029968262,
0.1520506590604782,
-0.5490651726722717,
1.107470154762268,
0.4715801477432251,
1.200380802154541,
-1.6610888242721558,
-0.013268107548356056,
-0.18552447855472565,
0.12488183379173279,
-1.285405158996582,
-1.6786445379257202,
0.5785094499588013,
0.49259811639785767,
0.7105013132095337,
-0.015845926478505135,
1.0476248264312744,
-1.0922620296478271,
0.7581338882446289,
-1.1024820804595947,
-1.650373935699463,
-1.382988452911377,
-2.450629234313965,
-2.3261964321136475,
0.6755014657974243,
-0.570734977722168,
-0.561074435710907,
2.0756947994232178,
-0.9477190971374512,
-1.7111581563949585,
1.0834356546401978,
0.34472745656967163,
0.1757754385471344,
2.4432270526885986,
0.22400684654712677,
-0.7580931782722473,
0.4829567074775696,
-0.7103393077850342,
0.7996528148651123,
-0.30361634492874146,
1.3318113088607788,
0.48402678966522217,
-1.0007092952728271,
1.656723141670227,
-0.48461973667144775,
0.6622375249862671,
-0.6345028877258301,
-0.5162056684494019,
-0.7930361032485962,
0.20400285720825195,
1.852010726928711,
-0.3173176050186157,
1.5529218912124634,
-0.30451178550720215,
-1.5820379257202148,
-1.5067787170410156,
0.8703303337097168,
0.4534091353416443,
-0.9754423499107361,
0.04951338469982147,
-0.5038887858390808,
0.15234246850013733,
-0.01017174031585455,
1.1123348474502563,
1.2323994636535645,
0.7041144371032715,
-0.3510977029800415,
-0.8722761273384094,
0.18791793286800385,
-0.23986242711544037,
-0.7449755668640137,
-1.7796964645385742,
-0.20632627606391907,
0.14327441155910492,
0.6428999900817871,
-1.2164558172225952,
1.7575244903564453,
0.878834068775177,
2.0405874252319336,
0.8953882455825806,
-0.36953437328338623,
1.4350128173828125,
-0.0017367769032716751,
1.7895886898040771,
-0.5372644662857056,
0.5613082051277161,
-0.41215580701828003,
-1.1043503284454346,
0.9504114985466003,
-0.37099534273147583,
-2.03706431388855,
-0.7987946271896362,
-0.6956154704093933,
-0.19597719609737396,
-0.7748247385025024,
0.8571979999542236,
-0.2292957752943039,
-1.4403672218322754,
0.17361727356910706,
-0.724101185798645,
0.18746091425418854,
-1.3733899593353271,
0.2161322832107544,
0.7109824419021606,
-0.6615123748779297,
-0.06347031891345978,
-0.2686707377433777,
-1.240450382232666,
-0.5611828565597534,
0.3344835638999939,
1.9360063076019287,
-0.527682900428772,
0.8821529150009155,
1.02438485622406,
-0.7222326397895813,
0.14434562623500824,
0.13147161900997162,
-0.3112759590148926,
0.7716042399406433,
-1.1116604804992676,
-0.3971971869468689,
1.1963083744049072,
-0.2874612808227539,
-0.6996248364448547,
1.4161765575408936,
0.7641517519950867,
-1.1823811531066895,
-0.32461047172546387,
-0.17594768106937408,
-0.9120860695838928,
0.016135718673467636,
-1.4661076068878174,
-0.13626502454280853,
0.4173600673675537,
-1.5268359184265137,
-0.2977412939071655,
-0.1985618770122528,
1.3868772983551025,
-0.2811279892921448,
1.482213020324707,
-0.39562153816223145,
-0.19027236104011536,
-0.24144640564918518,
-0.46986305713653564,
0.17106489837169647,
-0.23608624935150146,
-0.5875479578971863,
0.12176720798015594,
-0.8003026247024536,
0.3107982873916626,
1.4555197954177856,
0.3010096549987793,
0.06443461775779724,
0.34572869539260864,
1.1063727140426636,
0.37313032150268555,
-0.07022462785243988,
-0.8527640700340271,
-1.5145243406295776,
1.9368613958358765,
-1.4050990343093872,
1.9374456405639648,
0.8588210344314575,
-0.03781979903578758,
-1.8289297819137573,
-1.8721392154693604,
1.2261170148849487,
1.0844050645828247,
2.379450798034668,
0.5150165557861328,
0.46237385272979736,
-0.7631298303604126,
-0.751793384552002,
0.24978356063365936,
-1.0027544498443604,
-0.6535916924476624,
0.1759556531906128,
2.3455898761749268,
1.7705907821655273,
-0.5242282748222351,
-0.22635531425476074,
-0.8354099988937378,
1.3350783586502075,
-0.23542416095733643,
0.2894609570503235,
2.0775840282440186,
-0.23591768741607666,
-0.9918940663337708,
1.300152063369751,
-2.387331962585449,
0.3175773620605469,
2.191851854324341,
0.24261070787906647,
0.15470872819423676,
-1.4012058973312378,
-0.6952682733535767,
-0.35922104120254517,
-0.48576658964157104,
-1.2271987199783325,
0.5775212645530701,
-0.2632220387458801,
-0.8099445700645447,
-1.5013599395751953,
0.08467604219913483,
-1.160519003868103,
-1.7166105508804321,
0.2403814047574997,
1.9613434076309204,
2.1099860668182373,
-0.8333926796913147,
1.4119608402252197,
-0.2744802236557007,
-0.0034593003802001476,
1.2600069046020508,
1.3441482782363892,
3.02059006690979,
1.8690636157989502,
-1.3084955215454102,
0.7423938512802124,
-0.18665920197963715,
-0.5113562941551208,
1.1596896648406982,
-1.1573735475540161,
1.1368014812469482,
-0.16368204355239868,
-1.2406779527664185,
-1.2870843410491943,
1.0361707210540771,
0.4492805600166321,
-0.009912458248436451,
-0.4786646366119385,
1.2455618381500244,
0.08015508949756622,
1.3564451932907104,
0.5981221795082092,
-0.36491185426712036,
0.5788688063621521,
-0.3198745846748352,
-0.5716056227684021,
1.6534581184387207,
0.15381817519664764,
-1.56501305103302,
-2.368825912475586,
-0.2954134941101074,
-0.9418781399726868,
-0.019764650613069534,
-0.617584764957428,
-1.0631916522979736,
1.7151050567626953,
0.37907254695892334,
-1.1621654033660889,
-0.31577831506729126,
-0.22436316311359406,
-0.43059802055358887,
2.697981834411621,
-1.289886236190796,
-0.10772892087697983,
-0.9525693655014038,
-0.5870707631111145,
1.6604958772659302,
-1.2588531970977783,
-0.26837360858917236,
-0.9726777672767639,
-0.6723763346672058,
-1.2358015775680542,
-0.45707398653030396,
0.037206146866083145,
-0.9576476216316223,
0.7627192735671997,
0.3082164525985718,
-1.15610671043396,
-0.31069451570510864,
-0.9473441243171692,
1.0778740644454956,
-0.13715079426765442,
0.2401210218667984,
1.830836296081543,
0.32215696573257446,
-0.38538825511932373,
0.7464660406112671,
1.2283095121383667,
0.5829247832298279,
-0.6269721984863281,
-0.059259455651044846,
-0.7183321714401245,
0.3660176396369934,
-1.379668116569519,
0.20712557435035706,
-2.950317859649658,
0.6663995385169983,
-0.2051781713962555,
-0.17480376362800598,
-0.08060882985591888,
-1.3325103521347046,
1.117037057876587,
2.5787718296051025,
-1.1619813442230225,
0.4794793725013733,
0.4453967809677124,
1.1301829814910889,
-1.6949982643127441,
0.3010406494140625,
-0.47160208225250244,
2.0693655014038086,
0.1667395383119583,
1.2255001068115234,
-0.4964457154273987,
-2.257408857345581,
0.6129791140556335,
-1.191890835762024,
-1.0290710926055908,
0.8115509152412415,
-0.9644235372543335,
0.3253886103630066,
-1.531355619430542,
-0.1761893779039383,
-0.9518261551856995,
-1.239338994026184,
0.6895550489425659,
0.04713189974427223,
0.386349618434906,
-0.5002741813659668,
0.2781127691268921,
-2.199526786804199,
-1.4404090642929077,
-0.1947094351053238,
-1.0700347423553467,
0.5120280385017395,
-0.481601357460022,
0.5724713802337646,
-0.07723803073167801,
0.06301148235797882,
0.27169275283813477,
1.5182478427886963,
3.4245107173919678,
0.1993105411529541,
0.23225700855255127,
-0.1047786995768547,
-1.0897061824798584,
1.5052589178085327,
0.8107334971427917,
-0.10889549553394318,
-0.5831210017204285,
-0.987662136554718,
1.2699697017669678,
2.0422310829162598,
1.087374210357666,
0.12692104279994965,
-0.8636347055435181,
-0.6960218548774719,
-0.02836228720843792,
0.19098268449306488,
0.5733726620674133,
1.0516126155853271,
-0.018497280776500702,
-0.03784482181072235,
1.381757140159607,
1.1257601976394653,
-0.2862868309020996,
0.3910831809043884,
-0.9387003183364868,
-0.39818763732910156,
0.41077929735183716,
0.13554291427135468,
0.08698541671037674,
0.5482405424118042,
-1.0390840768814087,
-0.36651110649108887,
-0.37200433015823364,
-0.8326625823974609,
-0.741222083568573,
-0.4375620484352112,
-0.36444032192230225,
1.5917792320251465,
0.0997614935040474,
-0.4929288625717163,
0.1571381688117981,
-0.5720999836921692,
-0.12069236487150192,
-1.127708911895752,
0.16329284012317657,
-0.14699894189834595,
-0.1162753477692604,
-0.13689091801643372,
1.6106812953948975,
-0.9261226058006287,
-2.1530208587646484,
0.12124957144260406,
0.3787083625793457,
-0.271719753742218,
0.24671168625354767,
1.6246936321258545,
0.4361324906349182,
1.4191399812698364,
1.2287129163742065,
0.9456260204315186,
-0.7279950976371765,
-1.2680622339248657,
0.7974762320518494,
0.9795358777046204,
-1.3032631874084473,
0.9452601671218872,
-0.2300318330526352,
-0.5377469658851624,
0.6451342105865479,
1.342375636100769,
0.48409348726272583,
-1.9811840057373047,
0.9917008280754089,
-0.9383674263954163,
0.7162028551101685,
0.7391189336776733,
0.7231365442276001,
0.2738885283470154,
0.8554881811141968,
-1.2625318765640259,
-1.1115285158157349,
-0.7017225027084351,
-0.6460793018341064,
1.84071946144104,
-0.372265100479126,
0.6601712703704834,
-0.1665773242712021,
-1.1639822721481323,
-0.09770558029413223,
0.7810733914375305,
0.39054882526397705,
-0.3983916640281677,
0.8640981912612915,
-0.5390162467956543,
-0.9577677845954895,
-1.2110615968704224,
-0.3687134385108948,
-1.0652053356170654,
-0.9136586785316467,
1.0167644023895264,
0.6851215362548828,
0.41740429401397705,
1.9455286264419556,
0.6700457334518433,
0.3159441351890564,
-2.596524715423584,
0.8727034330368042,
0.28382766246795654,
0.012721644714474678,
0.8829960227012634,
0.2548310160636902,
1.1668652296066284,
0.033618099987506866,
0.6070414185523987,
-2.352814197540283,
2.228147268295288,
-0.18634937703609467,
0.6391612887382507,
0.0011861389502882957,
-0.25635066628456116,
1.094642162322998,
0.5535268187522888,
0.514868438243866,
-1.1466484069824219,
0.6813246011734009,
-0.5572836995124817,
1.0322325229644775,
0.858507513999939,
-0.8588212728500366,
0.10901175439357758,
1.435534119606018,
0.4771471619606018,
-0.4477354884147644,
-0.9636142253875732,
-0.7772796154022217,
0.9552372097969055,
1.6376781463623047,
-0.04323339834809303,
-0.013148776255548,
0.8504971265792847,
0.7089790105819702,
-1.268256664276123,
0.0374874621629715,
-0.6837963461875916,
-0.7010798454284668,
1.7186033725738525,
2.009652853012085,
-0.10196425765752792,
-0.21139033138751984,
-0.7705975770950317,
-1.3621265888214111,
0.7933244705200195,
-0.15630485117435455,
0.032430242747068405,
0.6407338976860046,
-0.6505933403968811,
1.0485459566116333,
0.5441420674324036,
1.1106470823287964,
0.12364016473293304,
0.32052725553512573,
0.40721601247787476,
-0.41394883394241333,
-1.149781346321106,
-0.33334100246429443,
-1.086198091506958,
-2.504650592803955,
0.3765738606452942,
-0.2869689464569092,
-1.4739524126052856,
0.09670723974704742,
-1.0170011520385742,
0.9413270950317383,
-0.549559473991394,
-1.103764533996582,
-1.4714536666870117,
0.3508954644203186,
-0.16869190335273743,
0.9375196099281311,
-1.5816155672073364,
-0.2638033628463745,
1.2648471593856812,
0.8136558532714844,
-0.6422273516654968,
0.9544225931167603,
0.26568734645843506,
0.984443724155426,
0.7283389568328857,
-0.35211652517318726,
0.6515236496925354,
-0.013791380450129509,
-1.2851327657699585,
0.4164466857910156,
1.21095609664917,
0.2274305820465088,
1.4245390892028809,
-0.4012486934661865,
0.08687462657690048,
0.38325977325439453,
-0.6194257140159607,
-0.5329276919364929,
-0.3791999816894531,
0.6929598450660706,
-0.004365203902125359,
-1.0540077686309814,
-0.17453376948833466,
-0.22256097197532654,
-0.2899776101112366,
0.20801784098148346,
-1.486101508140564,
-0.24233175814151764,
-0.4214259386062622,
-0.47423046827316284,
-1.354996681213379,
0.04182715713977814,
1.3314419984817505,
-0.7537164688110352,
-0.20843788981437683,
0.4424620270729065,
0.3748512268066406,
0.5828069448471069,
0.5582385063171387,
-0.7717162370681763,
-0.24138018488883972,
-0.3874896168708801,
-0.2725154161453247,
0.2890373468399048,
1.1986128091812134,
0.00813429057598114,
-1.0025720596313477,
0.6826043725013733,
-0.3051760792732239,
0.17286796867847443,
2.0308778285980225,
0.023347720503807068,
-0.7441971302032471,
0.398919939994812,
-0.682775616645813,
1.7688785791397095,
1.8004196882247925,
1.3025301694869995,
-0.11124574393033981,
-0.8338850140571594,
0.590496301651001,
-0.304692804813385,
-0.2868637442588806,
0.9159212112426758,
0.3942721486091614,
-0.28596794605255127,
-1.4249389171600342,
0.6818408966064453,
1.3136714696884155,
-0.773171603679657,
-0.781918466091156,
0.12784945964813232,
-0.9019090533256531,
1.2763527631759644,
0.5435048341751099,
0.3005807399749756,
0.28540492057800293,
1.5174510478973389,
0.7599617838859558,
-0.42283934354782104,
0.5227349996566772,
0.6117871999740601,
-0.1899610161781311,
-2.04841947555542,
-1.0756900310516357,
0.33059871196746826,
-0.3484255075454712,
-1.5528039932250977,
1.4096221923828125,
-1.1213372945785522,
-1.0362968444824219,
0.5622017979621887,
0.06957082450389862,
1.293575406074524,
0.41793614625930786,
1.6654285192489624,
2.172518491744995,
0.8821576833724976,
0.41443443298339844,
1.1728053092956543,
-0.11086992174386978,
-0.5133596658706665,
1.8821897506713867,
-0.33014339208602905,
0.5433850288391113,
1.0581670999526978,
-0.4044402837753296,
-1.149670958518982,
-0.9084031581878662,
-1.1313203573226929,
-0.6668220162391663,
1.2370789051055908,
0.0509999580681324,
-1.0809507369995117,
0.24779297411441803,
1.5867292881011963,
0.16048192977905273,
-0.23169831931591034,
0.6616777777671814,
0.3580811023712158,
-0.8104752898216248,
-0.13517755270004272,
-0.8344941735267639,
0.49779778718948364,
-0.16889306902885437,
-0.32192546129226685,
0.2881203889846802,
0.6386854648590088,
1.334646463394165,
-0.06190986558794975,
0.11051712185144424,
1.0574859380722046,
-1.4172080755233765,
1.4910223484039307,
-0.5540390610694885,
0.23379476368427277,
-2.3666787147521973,
1.3490417003631592,
-0.6884695887565613,
1.983859658241272,
-2.5748796463012695,
0.4519701600074768,
-0.5117361545562744,
-0.48514455556869507,
0.2440856546163559,
-0.47057127952575684,
0.1259075552225113,
-0.10551256686449051,
-0.9142553210258484,
-0.07479316741228104,
-0.7281102538108826,
0.6254639625549316,
1.110579490661621,
1.4584274291992188,
-1.062696099281311,
-0.3046797513961792,
-1.6817296743392944,
-0.21180634200572968,
-0.7825753688812256,
0.29985612630844116,
-1.9457321166992188,
-0.22017847001552582,
-2.020678758621216,
-2.3392298221588135,
-1.2710577249526978,
-0.8325334787368774,
0.983736515045166,
0.21316146850585938,
-0.9163294434547424,
1.2953286170959473,
-0.3186185956001282,
-1.7909178733825684,
1.182681918144226,
-2.1366775035858154
] |
https://github.com/huggingface/datasets/issues/5690 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api | Before the error happens at line 120 in `data_files.py`, `datasets.filesystems.hffilesystem` is imported at the top of `data_files.py` and this file does `from huggingface_hub.hf_api import DatasetInfo` - so `huggingface_hub.hf_api` is imported. Not sure how the error could happen, what version of `datasets` are you using @wccccp ? | ### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
| 233 | 46 | raise AttributeError(f"No {package_name} attribute {name}") AttributeError: No huggingface_hub attribute hf_api
### Describe the bug
rta.sh
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
### Reproduction
_No response_
### Logs
```shell
Traceback (most recent call last):
File "run.py", line 7, in <module>
import datasets
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/datasets/data_files.py", line 120, in <module>
dataset_info: huggingface_hub.hf_api.DatasetInfo,
File "/home/appuser/miniconda3/envs/pt2/lib/python3.8/site-packages/huggingface_hub/__init__.py", line 290, in __getattr__
raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No huggingface_hub attribute hf_api
```
### System info
```shell
- huggingface_hub version: 0.13.2
- Platform: Linux-5.4.0-144-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/appuser/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.7.1
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: 9.3.0
- hf_transfer: N/A
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/appuser/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/appuser/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/appuser/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
```
Before the error happens at line 120 in `data_files.py`, `datasets.filesystems.hffilesystem` is imported at the top of `data_files.py` and this file does `from huggingface_hub.hf_api import DatasetInfo` - so `huggingface_hub.hf_api` is imported. Not sure how the error could happen, what version of `datasets` are you using @wccccp ? | [
-1.184387445449829,
-0.8902541399002075,
-0.6576993465423584,
1.4401789903640747,
-0.11721622198820114,
-1.22817862033844,
0.17622846364974976,
-1.0548419952392578,
1.4780069589614868,
-0.6604586839675903,
0.16666510701179504,
-1.625349521636963,
-0.10590142756700516,
-0.4272765517234802,
-0.6431736350059509,
-0.9335398077964783,
-0.3627670407295227,
-0.8886592388153076,
1.0737158060073853,
2.595414400100708,
1.4032080173492432,
-1.318393588066101,
2.798151969909668,
0.6619731783866882,
-0.2573065757751465,
-1.0421886444091797,
0.6007253527641296,
-0.017090193927288055,
-1.1557379961013794,
-0.5363174080848694,
-0.8238031268119812,
-0.013999590650200844,
-0.5457156300544739,
-0.339550256729126,
0.00938856229186058,
0.4949297308921814,
-0.3304768204689026,
-0.29121553897857666,
-0.6616178750991821,
-0.7828761339187622,
0.5022542476654053,
-0.31142473220825195,
0.9802065491676331,
-0.3031827211380005,
1.7108749151229858,
-0.6158055067062378,
0.46980762481689453,
0.7370410561561584,
1.229660153388977,
0.22525116801261902,
0.006489135324954987,
0.27447569370269775,
0.31158989667892456,
-0.03685909882187843,
0.6018559336662292,
1.2138744592666626,
0.5948905348777771,
0.5378655791282654,
0.7038148641586304,
-2.1784071922302246,
1.2228636741638184,
-0.878930926322937,
0.24196134507656097,
1.2838889360427856,
-0.7628843188285828,
0.3050398826599121,
-1.837654709815979,
-0.09631506353616714,
0.6295349597930908,
-2.2423477172851562,
0.29225480556488037,
-1.3028981685638428,
-0.5528914332389832,
0.864953875541687,
0.30160272121429443,
-1.2654376029968262,
0.1520506590604782,
-0.5490651726722717,
1.107470154762268,
0.4715801477432251,
1.200380802154541,
-1.6610888242721558,
-0.013268107548356056,
-0.18552447855472565,
0.12488183379173279,
-1.285405158996582,
-1.6786445379257202,
0.5785094499588013,
0.49259811639785767,
0.7105013132095337,
-0.015845926478505135,
1.0476248264312744,
-1.0922620296478271,
0.7581338882446289,
-1.1024820804595947,
-1.650373935699463,
-1.382988452911377,
-2.450629234313965,
-2.3261964321136475,
0.6755014657974243,
-0.570734977722168,
-0.561074435710907,
2.0756947994232178,
-0.9477190971374512,
-1.7111581563949585,
1.0834356546401978,
0.34472745656967163,
0.1757754385471344,
2.4432270526885986,
0.22400684654712677,
-0.7580931782722473,
0.4829567074775696,
-0.7103393077850342,
0.7996528148651123,
-0.30361634492874146,
1.3318113088607788,
0.48402678966522217,
-1.0007092952728271,
1.656723141670227,
-0.48461973667144775,
0.6622375249862671,
-0.6345028877258301,
-0.5162056684494019,
-0.7930361032485962,
0.20400285720825195,
1.852010726928711,
-0.3173176050186157,
1.5529218912124634,
-0.30451178550720215,
-1.5820379257202148,
-1.5067787170410156,
0.8703303337097168,
0.4534091353416443,
-0.9754423499107361,
0.04951338469982147,
-0.5038887858390808,
0.15234246850013733,
-0.01017174031585455,
1.1123348474502563,
1.2323994636535645,
0.7041144371032715,
-0.3510977029800415,
-0.8722761273384094,
0.18791793286800385,
-0.23986242711544037,
-0.7449755668640137,
-1.7796964645385742,
-0.20632627606391907,
0.14327441155910492,
0.6428999900817871,
-1.2164558172225952,
1.7575244903564453,
0.878834068775177,
2.0405874252319336,
0.8953882455825806,
-0.36953437328338623,
1.4350128173828125,
-0.0017367769032716751,
1.7895886898040771,
-0.5372644662857056,
0.5613082051277161,
-0.41215580701828003,
-1.1043503284454346,
0.9504114985466003,
-0.37099534273147583,
-2.03706431388855,
-0.7987946271896362,
-0.6956154704093933,
-0.19597719609737396,
-0.7748247385025024,
0.8571979999542236,
-0.2292957752943039,
-1.4403672218322754,
0.17361727356910706,
-0.724101185798645,
0.18746091425418854,
-1.3733899593353271,
0.2161322832107544,
0.7109824419021606,
-0.6615123748779297,
-0.06347031891345978,
-0.2686707377433777,
-1.240450382232666,
-0.5611828565597534,
0.3344835638999939,
1.9360063076019287,
-0.527682900428772,
0.8821529150009155,
1.02438485622406,
-0.7222326397895813,
0.14434562623500824,
0.13147161900997162,
-0.3112759590148926,
0.7716042399406433,
-1.1116604804992676,
-0.3971971869468689,
1.1963083744049072,
-0.2874612808227539,
-0.6996248364448547,
1.4161765575408936,
0.7641517519950867,
-1.1823811531066895,
-0.32461047172546387,
-0.17594768106937408,
-0.9120860695838928,
0.016135718673467636,
-1.4661076068878174,
-0.13626502454280853,
0.4173600673675537,
-1.5268359184265137,
-0.2977412939071655,
-0.1985618770122528,
1.3868772983551025,
-0.2811279892921448,
1.482213020324707,
-0.39562153816223145,
-0.19027236104011536,
-0.24144640564918518,
-0.46986305713653564,
0.17106489837169647,
-0.23608624935150146,
-0.5875479578971863,
0.12176720798015594,
-0.8003026247024536,
0.3107982873916626,
1.4555197954177856,
0.3010096549987793,
0.06443461775779724,
0.34572869539260864,
1.1063727140426636,
0.37313032150268555,
-0.07022462785243988,
-0.8527640700340271,
-1.5145243406295776,
1.9368613958358765,
-1.4050990343093872,
1.9374456405639648,
0.8588210344314575,
-0.03781979903578758,
-1.8289297819137573,
-1.8721392154693604,
1.2261170148849487,
1.0844050645828247,
2.379450798034668,
0.5150165557861328,
0.46237385272979736,
-0.7631298303604126,
-0.751793384552002,
0.24978356063365936,
-1.0027544498443604,
-0.6535916924476624,
0.1759556531906128,
2.3455898761749268,
1.7705907821655273,
-0.5242282748222351,
-0.22635531425476074,
-0.8354099988937378,
1.3350783586502075,
-0.23542416095733643,
0.2894609570503235,
2.0775840282440186,
-0.23591768741607666,
-0.9918940663337708,
1.300152063369751,
-2.387331962585449,
0.3175773620605469,
2.191851854324341,
0.24261070787906647,
0.15470872819423676,
-1.4012058973312378,
-0.6952682733535767,
-0.35922104120254517,
-0.48576658964157104,
-1.2271987199783325,
0.5775212645530701,
-0.2632220387458801,
-0.8099445700645447,
-1.5013599395751953,
0.08467604219913483,
-1.160519003868103,
-1.7166105508804321,
0.2403814047574997,
1.9613434076309204,
2.1099860668182373,
-0.8333926796913147,
1.4119608402252197,
-0.2744802236557007,
-0.0034593003802001476,
1.2600069046020508,
1.3441482782363892,
3.02059006690979,
1.8690636157989502,
-1.3084955215454102,
0.7423938512802124,
-0.18665920197963715,
-0.5113562941551208,
1.1596896648406982,
-1.1573735475540161,
1.1368014812469482,
-0.16368204355239868,
-1.2406779527664185,
-1.2870843410491943,
1.0361707210540771,
0.4492805600166321,
-0.009912458248436451,
-0.4786646366119385,
1.2455618381500244,
0.08015508949756622,
1.3564451932907104,
0.5981221795082092,
-0.36491185426712036,
0.5788688063621521,
-0.3198745846748352,
-0.5716056227684021,
1.6534581184387207,
0.15381817519664764,
-1.56501305103302,
-2.368825912475586,
-0.2954134941101074,
-0.9418781399726868,
-0.019764650613069534,
-0.617584764957428,
-1.0631916522979736,
1.7151050567626953,
0.37907254695892334,
-1.1621654033660889,
-0.31577831506729126,
-0.22436316311359406,
-0.43059802055358887,
2.697981834411621,
-1.289886236190796,
-0.10772892087697983,
-0.9525693655014038,
-0.5870707631111145,
1.6604958772659302,
-1.2588531970977783,
-0.26837360858917236,
-0.9726777672767639,
-0.6723763346672058,
-1.2358015775680542,
-0.45707398653030396,
0.037206146866083145,
-0.9576476216316223,
0.7627192735671997,
0.3082164525985718,
-1.15610671043396,
-0.31069451570510864,
-0.9473441243171692,
1.0778740644454956,
-0.13715079426765442,
0.2401210218667984,
1.830836296081543,
0.32215696573257446,
-0.38538825511932373,
0.7464660406112671,
1.2283095121383667,
0.5829247832298279,
-0.6269721984863281,
-0.059259455651044846,
-0.7183321714401245,
0.3660176396369934,
-1.379668116569519,
0.20712557435035706,
-2.950317859649658,
0.6663995385169983,
-0.2051781713962555,
-0.17480376362800598,
-0.08060882985591888,
-1.3325103521347046,
1.117037057876587,
2.5787718296051025,
-1.1619813442230225,
0.4794793725013733,
0.4453967809677124,
1.1301829814910889,
-1.6949982643127441,
0.3010406494140625,
-0.47160208225250244,
2.0693655014038086,
0.1667395383119583,
1.2255001068115234,
-0.4964457154273987,
-2.257408857345581,
0.6129791140556335,
-1.191890835762024,
-1.0290710926055908,
0.8115509152412415,
-0.9644235372543335,
0.3253886103630066,
-1.531355619430542,
-0.1761893779039383,
-0.9518261551856995,
-1.239338994026184,
0.6895550489425659,
0.04713189974427223,
0.386349618434906,
-0.5002741813659668,
0.2781127691268921,
-2.199526786804199,
-1.4404090642929077,
-0.1947094351053238,
-1.0700347423553467,
0.5120280385017395,
-0.481601357460022,
0.5724713802337646,
-0.07723803073167801,
0.06301148235797882,
0.27169275283813477,
1.5182478427886963,
3.4245107173919678,
0.1993105411529541,
0.23225700855255127,
-0.1047786995768547,
-1.0897061824798584,
1.5052589178085327,
0.8107334971427917,
-0.10889549553394318,
-0.5831210017204285,
-0.987662136554718,
1.2699697017669678,
2.0422310829162598,
1.087374210357666,
0.12692104279994965,
-0.8636347055435181,
-0.6960218548774719,
-0.02836228720843792,
0.19098268449306488,
0.5733726620674133,
1.0516126155853271,
-0.018497280776500702,
-0.03784482181072235,
1.381757140159607,
1.1257601976394653,
-0.2862868309020996,
0.3910831809043884,
-0.9387003183364868,
-0.39818763732910156,
0.41077929735183716,
0.13554291427135468,
0.08698541671037674,
0.5482405424118042,
-1.0390840768814087,
-0.36651110649108887,
-0.37200433015823364,
-0.8326625823974609,
-0.741222083568573,
-0.4375620484352112,
-0.36444032192230225,
1.5917792320251465,
0.0997614935040474,
-0.4929288625717163,
0.1571381688117981,
-0.5720999836921692,
-0.12069236487150192,
-1.127708911895752,
0.16329284012317657,
-0.14699894189834595,
-0.1162753477692604,
-0.13689091801643372,
1.6106812953948975,
-0.9261226058006287,
-2.1530208587646484,
0.12124957144260406,
0.3787083625793457,
-0.271719753742218,
0.24671168625354767,
1.6246936321258545,
0.4361324906349182,
1.4191399812698364,
1.2287129163742065,
0.9456260204315186,
-0.7279950976371765,
-1.2680622339248657,
0.7974762320518494,
0.9795358777046204,
-1.3032631874084473,
0.9452601671218872,
-0.2300318330526352,
-0.5377469658851624,
0.6451342105865479,
1.342375636100769,
0.48409348726272583,
-1.9811840057373047,
0.9917008280754089,
-0.9383674263954163,
0.7162028551101685,
0.7391189336776733,
0.7231365442276001,
0.2738885283470154,
0.8554881811141968,
-1.2625318765640259,
-1.1115285158157349,
-0.7017225027084351,
-0.6460793018341064,
1.84071946144104,
-0.372265100479126,
0.6601712703704834,
-0.1665773242712021,
-1.1639822721481323,
-0.09770558029413223,
0.7810733914375305,
0.39054882526397705,
-0.3983916640281677,
0.8640981912612915,
-0.5390162467956543,
-0.9577677845954895,
-1.2110615968704224,
-0.3687134385108948,
-1.0652053356170654,
-0.9136586785316467,
1.0167644023895264,
0.6851215362548828,
0.41740429401397705,
1.9455286264419556,
0.6700457334518433,
0.3159441351890564,
-2.596524715423584,
0.8727034330368042,
0.28382766246795654,
0.012721644714474678,
0.8829960227012634,
0.2548310160636902,
1.1668652296066284,
0.033618099987506866,
0.6070414185523987,
-2.352814197540283,
2.228147268295288,
-0.18634937703609467,
0.6391612887382507,
0.0011861389502882957,
-0.25635066628456116,
1.094642162322998,
0.5535268187522888,
0.514868438243866,
-1.1466484069824219,
0.6813246011734009,
-0.5572836995124817,
1.0322325229644775,
0.858507513999939,
-0.8588212728500366,
0.10901175439357758,
1.435534119606018,
0.4771471619606018,
-0.4477354884147644,
-0.9636142253875732,
-0.7772796154022217,
0.9552372097969055,
1.6376781463623047,
-0.04323339834809303,
-0.013148776255548,
0.8504971265792847,
0.7089790105819702,
-1.268256664276123,
0.0374874621629715,
-0.6837963461875916,
-0.7010798454284668,
1.7186033725738525,
2.009652853012085,
-0.10196425765752792,
-0.21139033138751984,
-0.7705975770950317,
-1.3621265888214111,
0.7933244705200195,
-0.15630485117435455,
0.032430242747068405,
0.6407338976860046,
-0.6505933403968811,
1.0485459566116333,
0.5441420674324036,
1.1106470823287964,
0.12364016473293304,
0.32052725553512573,
0.40721601247787476,
-0.41394883394241333,
-1.149781346321106,
-0.33334100246429443,
-1.086198091506958,
-2.504650592803955,
0.3765738606452942,
-0.2869689464569092,
-1.4739524126052856,
0.09670723974704742,
-1.0170011520385742,
0.9413270950317383,
-0.549559473991394,
-1.103764533996582,
-1.4714536666870117,
0.3508954644203186,
-0.16869190335273743,
0.9375196099281311,
-1.5816155672073364,
-0.2638033628463745,
1.2648471593856812,
0.8136558532714844,
-0.6422273516654968,
0.9544225931167603,
0.26568734645843506,
0.984443724155426,
0.7283389568328857,
-0.35211652517318726,
0.6515236496925354,
-0.013791380450129509,
-1.2851327657699585,
0.4164466857910156,
1.21095609664917,
0.2274305820465088,
1.4245390892028809,
-0.4012486934661865,
0.08687462657690048,
0.38325977325439453,
-0.6194257140159607,
-0.5329276919364929,
-0.3791999816894531,
0.6929598450660706,
-0.004365203902125359,
-1.0540077686309814,
-0.17453376948833466,
-0.22256097197532654,
-0.2899776101112366,
0.20801784098148346,
-1.486101508140564,
-0.24233175814151764,
-0.4214259386062622,
-0.47423046827316284,
-1.354996681213379,
0.04182715713977814,
1.3314419984817505,
-0.7537164688110352,
-0.20843788981437683,
0.4424620270729065,
0.3748512268066406,
0.5828069448471069,
0.5582385063171387,
-0.7717162370681763,
-0.24138018488883972,
-0.3874896168708801,
-0.2725154161453247,
0.2890373468399048,
1.1986128091812134,
0.00813429057598114,
-1.0025720596313477,
0.6826043725013733,
-0.3051760792732239,
0.17286796867847443,
2.0308778285980225,
0.023347720503807068,
-0.7441971302032471,
0.398919939994812,
-0.682775616645813,
1.7688785791397095,
1.8004196882247925,
1.3025301694869995,
-0.11124574393033981,
-0.8338850140571594,
0.590496301651001,
-0.304692804813385,
-0.2868637442588806,
0.9159212112426758,
0.3942721486091614,
-0.28596794605255127,
-1.4249389171600342,
0.6818408966064453,
1.3136714696884155,
-0.773171603679657,
-0.781918466091156,
0.12784945964813232,
-0.9019090533256531,
1.2763527631759644,
0.5435048341751099,
0.3005807399749756,
0.28540492057800293,
1.5174510478973389,
0.7599617838859558,
-0.42283934354782104,
0.5227349996566772,
0.6117871999740601,
-0.1899610161781311,
-2.04841947555542,
-1.0756900310516357,
0.33059871196746826,
-0.3484255075454712,
-1.5528039932250977,
1.4096221923828125,
-1.1213372945785522,
-1.0362968444824219,
0.5622017979621887,
0.06957082450389862,
1.293575406074524,
0.41793614625930786,
1.6654285192489624,
2.172518491744995,
0.8821576833724976,
0.41443443298339844,
1.1728053092956543,
-0.11086992174386978,
-0.5133596658706665,
1.8821897506713867,
-0.33014339208602905,
0.5433850288391113,
1.0581670999526978,
-0.4044402837753296,
-1.149670958518982,
-0.9084031581878662,
-1.1313203573226929,
-0.6668220162391663,
1.2370789051055908,
0.0509999580681324,
-1.0809507369995117,
0.24779297411441803,
1.5867292881011963,
0.16048192977905273,
-0.23169831931591034,
0.6616777777671814,
0.3580811023712158,
-0.8104752898216248,
-0.13517755270004272,
-0.8344941735267639,
0.49779778718948364,
-0.16889306902885437,
-0.32192546129226685,
0.2881203889846802,
0.6386854648590088,
1.334646463394165,
-0.06190986558794975,
0.11051712185144424,
1.0574859380722046,
-1.4172080755233765,
1.4910223484039307,
-0.5540390610694885,
0.23379476368427277,
-2.3666787147521973,
1.3490417003631592,
-0.6884695887565613,
1.983859658241272,
-2.5748796463012695,
0.4519701600074768,
-0.5117361545562744,
-0.48514455556869507,
0.2440856546163559,
-0.47057127952575684,
0.1259075552225113,
-0.10551256686449051,
-0.9142553210258484,
-0.07479316741228104,
-0.7281102538108826,
0.6254639625549316,
1.110579490661621,
1.4584274291992188,
-1.062696099281311,
-0.3046797513961792,
-1.6817296743392944,
-0.21180634200572968,
-0.7825753688812256,
0.29985612630844116,
-1.9457321166992188,
-0.22017847001552582,
-2.020678758621216,
-2.3392298221588135,
-1.2710577249526978,
-0.8325334787368774,
0.983736515045166,
0.21316146850585938,
-0.9163294434547424,
1.2953286170959473,
-0.3186185956001282,
-1.7909178733825684,
1.182681918144226,
-2.1366775035858154
] |
https://github.com/huggingface/datasets/issues/5688 | Wikipedia download_and_prepare for GCS | Hi @adrianfagerland, thanks for reporting.
Please note that "wikipedia" is a special dataset, with an Apache Beam builder: https://beam.apache.org/
You can find more info about Beam datasets in our docs: https://huggingface.co/docs/datasets/beam
It was implemented to be run in parallel processing, using one of the distributed back-ends supported by Apache Beam: https://beam.apache.org/get-started/beam-overview/#apache-beam-pipeline-runners
That is, you are trying to process the source wikipedia data on your machine (not distributed) when passing `beam_runner="DirectRunner"`.
As documented in the wikipedia dataset page (https://huggingface.co/datasets/wikipedia):
Some subsets of Wikipedia have already been processed by HuggingFace, and you can load them just with:
from datasets import load_dataset
load_dataset("wikipedia", "20220301.en")
The list of pre-processed subsets is:
- "20220301.de"
- "20220301.en"
- "20220301.fr"
- "20220301.frr"
- "20220301.it"
- "20220301.simple"
To download the available processed data (in Arrow format):
```python
builder = datasets.load_dataset_builder("wikipedia", "20220301.en")
builder.download_and_prepare(your_path)
``` | ### Describe the bug
I am unable to download the wikipedia dataset onto GCS.
When I run the script provided the memory firstly gets eaten up, then it crashes.
I tried running this on a VM with 128GB RAM and all I got was a two empty files: _data_builder.lock_, _data.incomplete/beam-temp-wikipedia-train-1ab2039acf3611ed87a9893475de0093_
I have troubleshot this for two straight days now, but I am just unable to get the dataset into storage.
### Steps to reproduce the bug
Run this and insert a path:
```
import datasets
builder = datasets.load_dataset_builder(
"wikipedia", language="en", date="20230320", beam_runner="DirectRunner")
builder.download_and_prepare({path}, file_format="parquet")
```
This is where the problem of it eating RAM occurs.
I have also tried several versions of this, based on the docs:
```
import gcsfs
import datasets
storage_options = {"project": "tdt4310", "token": "cloud"}
fs = gcsfs.GCSFileSystem(**storage_options)
output_dir = "gcs://wikipediadata/"
builder = datasets.load_dataset_builder(
"wikipedia", date="20230320", language="en", beam_runner="DirectRunner")
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
The error message that is received here is:
> ValueError: Unable to get filesystem from specified path, please use the correct path or ensure the required dependency is installed, e.g., pip install apache-beam[gcp]. Path specified: gcs://wikipediadata/wikipedia-train [while running 'train/Save to parquet/Write/WriteImpl/InitializeWrite']
I have ran `pip install apache-beam[gcp]`
### Expected behavior
The wikipedia data loaded into GCS
Everything worked when testing with a smaller demo dataset found somewhere in the docs
### Environment info
Newest published version of datasets. Python 3.9. Also tested with Python 3.7. 128GB RAM Google Cloud VM instance. | 234 | 135 | Wikipedia download_and_prepare for GCS
### Describe the bug
I am unable to download the wikipedia dataset onto GCS.
When I run the script provided the memory firstly gets eaten up, then it crashes.
I tried running this on a VM with 128GB RAM and all I got was a two empty files: _data_builder.lock_, _data.incomplete/beam-temp-wikipedia-train-1ab2039acf3611ed87a9893475de0093_
I have troubleshot this for two straight days now, but I am just unable to get the dataset into storage.
### Steps to reproduce the bug
Run this and insert a path:
```
import datasets
builder = datasets.load_dataset_builder(
"wikipedia", language="en", date="20230320", beam_runner="DirectRunner")
builder.download_and_prepare({path}, file_format="parquet")
```
This is where the problem of it eating RAM occurs.
I have also tried several versions of this, based on the docs:
```
import gcsfs
import datasets
storage_options = {"project": "tdt4310", "token": "cloud"}
fs = gcsfs.GCSFileSystem(**storage_options)
output_dir = "gcs://wikipediadata/"
builder = datasets.load_dataset_builder(
"wikipedia", date="20230320", language="en", beam_runner="DirectRunner")
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
The error message that is received here is:
> ValueError: Unable to get filesystem from specified path, please use the correct path or ensure the required dependency is installed, e.g., pip install apache-beam[gcp]. Path specified: gcs://wikipediadata/wikipedia-train [while running 'train/Save to parquet/Write/WriteImpl/InitializeWrite']
I have ran `pip install apache-beam[gcp]`
### Expected behavior
The wikipedia data loaded into GCS
Everything worked when testing with a smaller demo dataset found somewhere in the docs
### Environment info
Newest published version of datasets. Python 3.9. Also tested with Python 3.7. 128GB RAM Google Cloud VM instance.
Hi @adrianfagerland, thanks for reporting.
Please note that "wikipedia" is a special dataset, with an Apache Beam builder: https://beam.apache.org/
You can find more info about Beam datasets in our docs: https://huggingface.co/docs/datasets/beam
It was implemented to be run in parallel processing, using one of the distributed back-ends supported by Apache Beam: https://beam.apache.org/get-started/beam-overview/#apache-beam-pipeline-runners
That is, you are trying to process the source wikipedia data on your machine (not distributed) when passing `beam_runner="DirectRunner"`.
As documented in the wikipedia dataset page (https://huggingface.co/datasets/wikipedia):
Some subsets of Wikipedia have already been processed by HuggingFace, and you can load them just with:
from datasets import load_dataset
load_dataset("wikipedia", "20220301.en")
The list of pre-processed subsets is:
- "20220301.de"
- "20220301.en"
- "20220301.fr"
- "20220301.frr"
- "20220301.it"
- "20220301.simple"
To download the available processed data (in Arrow format):
```python
builder = datasets.load_dataset_builder("wikipedia", "20220301.en")
builder.download_and_prepare(your_path)
``` | [
-1.2485368251800537,
-0.9129008054733276,
-0.6920938491821289,
1.4310672283172607,
-0.20769672095775604,
-1.2755827903747559,
0.12672162055969238,
-1.11542546749115,
1.6435272693634033,
-0.7804843187332153,
0.23500017821788788,
-1.6283763647079468,
0.04880886152386665,
-0.5575374960899353,
-0.7836310863494873,
-0.8777708411216736,
-0.3945397138595581,
-0.7932089567184448,
1.1048662662506104,
2.430436611175537,
1.2879712581634521,
-1.438944697380066,
2.7122039794921875,
0.7216622233390808,
-0.12997248768806458,
-0.9365943074226379,
0.5246363878250122,
-0.0022595422342419624,
-1.2659626007080078,
-0.43604472279548645,
-0.9766148924827576,
-0.11817126721143723,
-0.5263414978981018,
-0.4707356095314026,
-0.08700800687074661,
0.44397902488708496,
-0.36201849579811096,
-0.4357815086841583,
-0.6337878108024597,
-0.7671850919723511,
0.4649120271205902,
-0.33380362391471863,
0.9998376965522766,
-0.33394062519073486,
1.815819501876831,
-0.5843212604522705,
0.49912503361701965,
0.7429274320602417,
1.2254277467727661,
0.2511439919471741,
0.05208209156990051,
0.3505651354789734,
0.34938594698905945,
-0.05615151673555374,
0.5615847706794739,
1.1963300704956055,
0.6562756299972534,
0.5332004427909851,
0.7699845433235168,
-2.189753770828247,
1.2644456624984741,
-1.0642367601394653,
0.2205464094877243,
1.4089583158493042,
-0.9314549565315247,
0.34886083006858826,
-1.805485725402832,
0.0011189058423042297,
0.597507119178772,
-2.2326600551605225,
0.32739341259002686,
-1.3102877140045166,
-0.5911113023757935,
1.0464657545089722,
0.32677724957466125,
-1.2112960815429688,
0.16318443417549133,
-0.5001760721206665,
1.0332670211791992,
0.46660396456718445,
1.0800598859786987,
-1.6879905462265015,
-0.0878746509552002,
-0.2797110974788666,
0.1573132872581482,
-1.3309062719345093,
-1.6030226945877075,
0.569521427154541,
0.5829768180847168,
0.5602617263793945,
-0.10558348894119263,
1.1095478534698486,
-1.090673565864563,
0.8057494163513184,
-1.0015206336975098,
-1.6243059635162354,
-1.508522391319275,
-2.3090362548828125,
-2.20691180229187,
0.75860196352005,
-0.557173490524292,
-0.5039019584655762,
2.049835681915283,
-0.9840931296348572,
-1.6726709604263306,
1.1632217168807983,
0.28395867347717285,
0.02988354116678238,
2.3479371070861816,
0.20564663410186768,
-0.7231345176696777,
0.49795201420783997,
-0.7894660234451294,
0.7521233558654785,
-0.3163537085056305,
1.300879716873169,
0.41650110483169556,
-1.0530046224594116,
1.5952832698822021,
-0.3392898142337799,
0.6554769277572632,
-0.6866121888160706,
-0.5116154551506042,
-0.700466513633728,
0.3503410518169403,
1.8379089832305908,
-0.3149060904979706,
1.537522792816162,
-0.3124196529388428,
-1.5709627866744995,
-1.6742867231369019,
0.9632092714309692,
0.4759361445903778,
-0.7857515811920166,
0.13076308369636536,
-0.35535991191864014,
0.15246258676052094,
-0.13348627090454102,
1.1169328689575195,
1.3334412574768066,
0.7562422156333923,
-0.30422407388687134,
-0.7851620316505432,
0.12023799121379852,
-0.10174710303544998,
-0.7715792655944824,
-1.687740683555603,
-0.3815523386001587,
0.13765034079551697,
0.5657194256782532,
-1.2164020538330078,
1.7914458513259888,
0.9266246557235718,
1.8941813707351685,
1.0066038370132446,
-0.39591720700263977,
1.4712755680084229,
0.14416319131851196,
1.8021240234375,
-0.5938917994499207,
0.5665075778961182,
-0.3110959827899933,
-1.157149076461792,
0.924968957901001,
-0.3167210817337036,
-2.0812950134277344,
-0.7983651757240295,
-0.7343642711639404,
-0.24251241981983185,
-0.7284283638000488,
0.8830484747886658,
-0.3332196772098541,
-1.4012519121170044,
0.22637343406677246,
-0.7064869403839111,
0.0676216259598732,
-1.1826121807098389,
0.35643470287323,
0.674961507320404,
-0.6645821332931519,
0.10015305876731873,
-0.17603065073490143,
-1.2143394947052002,
-0.4560804069042206,
0.37512826919555664,
1.883262038230896,
-0.6824586987495422,
0.8834415674209595,
1.0572731494903564,
-0.7489351630210876,
0.02384871244430542,
0.3063689172267914,
-0.268826425075531,
0.8205541968345642,
-1.0598784685134888,
-0.5048438906669617,
1.18290376663208,
-0.2821800112724304,
-0.5995230674743652,
1.4033409357070923,
0.6978602409362793,
-0.9947197437286377,
-0.20868684351444244,
-0.12646599113941193,
-0.8704974055290222,
0.023759931325912476,
-1.502530574798584,
-0.1278809756040573,
0.414689302444458,
-1.5877983570098877,
-0.4133007526397705,
-0.1323668360710144,
1.3173468112945557,
-0.2291511446237564,
1.431505560874939,
-0.390746146440506,
-0.1376098394393921,
-0.28570547699928284,
-0.44934216141700745,
0.1845221072435379,
-0.23197884857654572,
-0.5557368993759155,
0.12931719422340393,
-0.7500944137573242,
0.2914615273475647,
1.41374933719635,
0.33543726801872253,
-0.04079195484519005,
0.4293811023235321,
1.113501787185669,
0.4250544607639313,
-0.010364584624767303,
-0.9601694345474243,
-1.4397172927856445,
1.9664753675460815,
-1.4935237169265747,
2.0053200721740723,
0.7449535131454468,
-0.01355031132698059,
-1.7621575593948364,
-1.9109231233596802,
1.3442455530166626,
1.1221649646759033,
2.37143611907959,
0.5234837532043457,
0.38530147075653076,
-0.8652163743972778,
-0.6447240114212036,
0.4066372513771057,
-1.060328483581543,
-0.6734675765037537,
0.17329634726047516,
2.376338005065918,
1.799607515335083,
-0.4181242883205414,
-0.26305925846099854,
-0.9143576622009277,
1.3853849172592163,
-0.18554134666919708,
0.22345593571662903,
1.9931426048278809,
-0.27622294425964355,
-1.0068148374557495,
1.3230534791946411,
-2.3388397693634033,
0.16652555763721466,
1.9759600162506104,
0.3008292615413666,
0.09132463485002518,
-1.3577351570129395,
-0.6308327913284302,
-0.2652897238731384,
-0.5227270126342773,
-1.1942909955978394,
0.4966026246547699,
-0.2851305902004242,
-0.7141013145446777,
-1.3885716199874878,
0.12587542831897736,
-1.2141634225845337,
-1.683715581893921,
0.18513134121894836,
1.9200631380081177,
2.0341296195983887,
-0.8422532081604004,
1.582926869392395,
-0.34596121311187744,
0.09480926394462585,
1.283667802810669,
1.3639863729476929,
3.118687629699707,
1.8480359315872192,
-1.268424153327942,
0.590701162815094,
-0.17112840712070465,
-0.4806089699268341,
1.1367628574371338,
-1.2099438905715942,
1.2871590852737427,
-0.08960136026144028,
-1.1091378927230835,
-1.194836974143982,
0.9672540426254272,
0.442610502243042,
0.07588592916727066,
-0.482166588306427,
1.1474182605743408,
0.20179066061973572,
1.3160864114761353,
0.5786939263343811,
-0.39560502767562866,
0.5802925229072571,
-0.33641281723976135,
-0.5110921263694763,
1.5472948551177979,
0.18767109513282776,
-1.4425816535949707,
-2.244201898574829,
-0.19315479695796967,
-0.870635986328125,
0.04077720269560814,
-0.5550369024276733,
-1.0488958358764648,
1.729034185409546,
0.31010252237319946,
-1.23533034324646,
-0.24081943929195404,
-0.353026419878006,
-0.6102029085159302,
2.748039484024048,
-1.2603944540023804,
-0.20113417506217957,
-0.942062497138977,
-0.6446279287338257,
1.6122608184814453,
-1.195389986038208,
-0.2472892850637436,
-1.0195764303207397,
-0.5467321872711182,
-1.2824199199676514,
-0.5205087661743164,
0.028782859444618225,
-0.954860508441925,
0.8548849821090698,
0.20609231293201447,
-1.1947956085205078,
-0.34298592805862427,
-0.8619089722633362,
0.9141817688941956,
-0.15943767130374908,
0.28301212191581726,
1.9443833827972412,
0.3497066795825958,
-0.34209468960762024,
0.7597606182098389,
1.2067794799804688,
0.6397004723548889,
-0.6007186770439148,
0.22093810141086578,
-0.6209142804145813,
0.3834016025066376,
-1.3055328130722046,
0.2306600958108902,
-2.8757736682891846,
0.584378182888031,
-0.09808585792779922,
-0.05656687170267105,
-0.051035959273576736,
-1.2656822204589844,
1.0672153234481812,
2.5676164627075195,
-1.1609834432601929,
0.4152931571006775,
0.47411802411079407,
1.1848716735839844,
-1.6542893648147583,
0.3648037612438202,
-0.4149063527584076,
2.0991764068603516,
0.21592415869235992,
1.2091996669769287,
-0.4887627065181732,
-2.3674843311309814,
0.5839714407920837,
-1.2893949747085571,
-1.2500041723251343,
0.7732807993888855,
-0.885617733001709,
0.2613527774810791,
-1.465071439743042,
-0.2549976110458374,
-0.8353695273399353,
-1.2427786588668823,
0.7213561534881592,
0.10923338681459427,
0.35563719272613525,
-0.525848925113678,
0.36367902159690857,
-2.1481709480285645,
-1.350369930267334,
-0.2662055492401123,
-0.925144374370575,
0.5029202103614807,
-0.4281785488128662,
0.718725860118866,
-0.1710430085659027,
0.0417964905500412,
0.29165300726890564,
1.5785813331604004,
3.394361972808838,
0.2275266796350479,
0.24066145718097687,
-0.21944858133792877,
-0.9357242584228516,
1.5243735313415527,
0.9673815965652466,
-0.13132840394973755,
-0.5871438384056091,
-1.0297256708145142,
1.2610418796539307,
2.025859832763672,
1.0867170095443726,
0.03361956775188446,
-0.854217529296875,
-0.7662560343742371,
-0.06089150905609131,
0.09876380860805511,
0.4481860399246216,
0.9686973094940186,
0.06757581233978271,
0.014456943608820438,
1.4551838636398315,
1.1462677717208862,
-0.37942227721214294,
0.2614632844924927,
-0.8326547145843506,
-0.4832419753074646,
0.47450944781303406,
0.25713810324668884,
0.04090215638279915,
0.4360964894294739,
-1.0187840461730957,
-0.25248268246650696,
-0.45322445034980774,
-0.8763960599899292,
-0.6037758588790894,
-0.4433281719684601,
-0.38153743743896484,
1.638168215751648,
0.18351155519485474,
-0.545666515827179,
-0.008310862816870213,
-0.7994700074195862,
-0.1388528198003769,
-1.1293681859970093,
0.2171354591846466,
-0.11655516177415848,
-0.1388673335313797,
-0.09656421095132828,
1.740271806716919,
-0.9537524580955505,
-2.0427932739257812,
0.1400580257177353,
0.240717813372612,
-0.22508279979228973,
0.1943684071302414,
1.6217397451400757,
0.5571495890617371,
1.3878971338272095,
1.2539688348770142,
0.9254000186920166,
-0.673348605632782,
-1.329481601715088,
0.6925113797187805,
1.0106760263442993,
-1.3845487833023071,
0.8861694931983948,
-0.07461996376514435,
-0.5173803567886353,
0.5836482048034668,
1.277228832244873,
0.47579294443130493,
-1.9821208715438843,
0.8539170622825623,
-0.9663131237030029,
0.8084926605224609,
0.6658368110656738,
0.6939297318458557,
0.228583425283432,
0.8594499826431274,
-1.1510303020477295,
-1.1147129535675049,
-0.7348175644874573,
-0.714367151260376,
1.9603017568588257,
-0.3360465466976166,
0.5808727145195007,
-0.18893863260746002,
-1.2812044620513916,
-0.04122236743569374,
0.7111058235168457,
0.3823517858982086,
-0.48662570118904114,
0.7844022512435913,
-0.6743420958518982,
-1.0026110410690308,
-1.3605467081069946,
-0.452919602394104,
-1.0260748863220215,
-0.9873802065849304,
1.042925238609314,
0.7592275738716125,
0.2877102494239807,
1.8942114114761353,
0.7098328471183777,
0.3430308699607849,
-2.6006338596343994,
0.9137886166572571,
0.27564138174057007,
-0.03400670364499092,
0.900577962398529,
0.3175339996814728,
1.0351336002349854,
0.022861458361148834,
0.5770124793052673,
-2.4829492568969727,
2.288309097290039,
-0.25657978653907776,
0.6585372090339661,
0.006543521769344807,
-0.24357286095619202,
1.2070292234420776,
0.5522085428237915,
0.4922963082790375,
-1.0689457654953003,
0.6231794357299805,
-0.48220178484916687,
1.1425551176071167,
0.8901665806770325,
-0.8108336925506592,
0.039228420704603195,
1.3851068019866943,
0.5127302408218384,
-0.5421674847602844,
-0.9991186261177063,
-0.9581401348114014,
0.9874419569969177,
1.6953622102737427,
0.003814396448433399,
0.022904355078935623,
0.8621729016304016,
0.6470609903335571,
-1.2747697830200195,
0.060993533581495285,
-0.7211095690727234,
-0.7602018117904663,
1.6365900039672852,
2.1252200603485107,
-0.11302238702774048,
-0.27787619829177856,
-0.6652172803878784,
-1.2965892553329468,
0.7843739986419678,
-0.10919500887393951,
0.20738309621810913,
0.5857478976249695,
-0.6543827652931213,
1.010703444480896,
0.8246459364891052,
0.9493383765220642,
0.21957537531852722,
0.2771230638027191,
0.4433028995990753,
-0.3431044816970825,
-1.0946282148361206,
-0.22985588014125824,
-0.995553731918335,
-2.58156418800354,
0.46429407596588135,
-0.14216302335262299,
-1.3852930068969727,
-0.02906113862991333,
-1.0352119207382202,
0.927807629108429,
-0.5337687134742737,
-1.0852034091949463,
-1.521009087562561,
0.17385999858379364,
-0.06420503556728363,
0.932040274143219,
-1.5657702684402466,
-0.292351096868515,
1.195127248764038,
0.8509999513626099,
-0.7121371626853943,
0.951803982257843,
0.12232650816440582,
1.0479505062103271,
0.8383146524429321,
-0.41870659589767456,
0.5334144830703735,
-0.0317242331802845,
-1.3713163137435913,
0.3944641947746277,
1.204007625579834,
0.09120067954063416,
1.5651448965072632,
-0.47579818964004517,
0.07945297658443451,
0.40039125084877014,
-0.5654597878456116,
-0.5450365543365479,
-0.4986001253128052,
0.6341311931610107,
0.006825292482972145,
-0.9051703214645386,
-0.09503396600484848,
-0.04776795580983162,
-0.32285407185554504,
0.12457312643527985,
-1.4785465002059937,
-0.1349477767944336,
-0.40989503264427185,
-0.6290634870529175,
-1.212616205215454,
-0.06184999644756317,
1.3792078495025635,
-0.7552607655525208,
-0.22381706535816193,
0.4754214882850647,
0.335979163646698,
0.5185726284980774,
0.6182149052619934,
-0.7190380096435547,
-0.27562013268470764,
-0.21824315190315247,
-0.3869449496269226,
0.37864619493484497,
1.336838960647583,
-0.07480588555335999,
-0.9844109416007996,
0.6506471037864685,
-0.2288084626197815,
0.045769449323415756,
1.9930803775787354,
0.06162119284272194,
-0.7242894172668457,
0.35097041726112366,
-0.7040561437606812,
1.8838655948638916,
1.6762688159942627,
1.3506426811218262,
-0.21563291549682617,
-0.9081137776374817,
0.6780619025230408,
-0.2860490679740906,
-0.4088706076145172,
0.8459993600845337,
0.2974853813648224,
-0.26886245608329773,
-1.4745614528656006,
0.7058674693107605,
1.2504531145095825,
-0.8699814081192017,
-0.7520217895507812,
0.14391368627548218,
-0.7973276972770691,
1.1029939651489258,
0.5290372371673584,
0.3418619930744171,
0.32016780972480774,
1.6754220724105835,
0.8115978837013245,
-0.4736882448196411,
0.5497026443481445,
0.6289005875587463,
-0.16318823397159576,
-2.116884231567383,
-1.171907663345337,
0.3407800495624542,
-0.6407866477966309,
-1.583382248878479,
1.3676421642303467,
-1.1178265810012817,
-1.0576139688491821,
0.6172271370887756,
0.03159094974398613,
1.3732802867889404,
0.3154853582382202,
1.6182615756988525,
2.107063055038452,
0.8044575452804565,
0.4381943941116333,
1.1737910509109497,
-0.1381499320268631,
-0.4788995385169983,
1.84758722782135,
-0.4503948390483856,
0.435723215341568,
1.100746750831604,
-0.28556886315345764,
-1.1355016231536865,
-0.755272388458252,
-1.2593119144439697,
-0.7049202919006348,
1.1337782144546509,
0.045118071138858795,
-1.0631896257400513,
0.25590986013412476,
1.5849758386611938,
0.13243332505226135,
-0.40519365668296814,
0.6232337355613708,
0.45435836911201477,
-0.8386369943618774,
-0.09191539883613586,
-0.8641401529312134,
0.5533140301704407,
-0.1584012359380722,
-0.4086131453514099,
0.28008148074150085,
0.46288686990737915,
1.381414771080017,
-0.12095773220062256,
0.1881769746541977,
1.0792064666748047,
-1.495675802230835,
1.5365735292434692,
-0.7219278216362,
0.22254489362239838,
-2.34258770942688,
1.3665869235992432,
-0.7568826675415039,
1.9979872703552246,
-2.570021867752075,
0.38960161805152893,
-0.564145565032959,
-0.4398946762084961,
0.3055703043937683,
-0.3642246127128601,
0.1031254380941391,
-0.078046515583992,
-1.103572964668274,
-0.07383687049150467,
-0.6518227458000183,
0.6481623649597168,
1.1344678401947021,
1.3772605657577515,
-1.0721180438995361,
-0.29685071110725403,
-1.6816225051879883,
-0.15123935043811798,
-0.7509328722953796,
0.27158522605895996,
-1.9780333042144775,
-0.13873551785945892,
-1.9409538507461548,
-2.3869128227233887,
-1.311151385307312,
-0.837371289730072,
1.1418406963348389,
0.17055772244930267,
-0.9747713208198547,
1.298484444618225,
-0.38080033659935,
-1.7831476926803589,
1.1905620098114014,
-2.1439878940582275
] |
https://github.com/huggingface/datasets/issues/5688 | Wikipedia download_and_prepare for GCS | When running this using :
```
import datasets
from apache_beam.options.pipeline_options import PipelineOptions
from gcsfs import GCSFileSystem
storage_options = {"project":"tdt4310", "token":"cloud"}
fs = GCSFileSystem(**storage_options)
output_dir = "gcs://quiz_transformer/"
beam_options = PipelineOptions(
region="europe-west4",
project="tdt4310",
temp_location=output_dir+"tmp/")
builder = datasets.load_dataset_builder("wikipedia", "20220301.en", beam_runner="dataflow", beam_options=beam_options)
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
I now get this error:
```
raise FileNotFoundError(f"Couldn't find file at {url}")
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json
Downloading data files: 0%| | 0/1 [00:00<?, ?it/s]
```
I get the same error for this:
```
import datasets
from gcsfs import GCSFileSystem
storage_options = {"project":"tdt4310", "token":"cloud"}
fs = GCSFileSystem(**storage_options)
output_dir = "gcs://quiz_transformer/"
builder = datasets.load_dataset_builder("wikipedia", "20220301.en")
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
| ### Describe the bug
I am unable to download the wikipedia dataset onto GCS.
When I run the script provided the memory firstly gets eaten up, then it crashes.
I tried running this on a VM with 128GB RAM and all I got was a two empty files: _data_builder.lock_, _data.incomplete/beam-temp-wikipedia-train-1ab2039acf3611ed87a9893475de0093_
I have troubleshot this for two straight days now, but I am just unable to get the dataset into storage.
### Steps to reproduce the bug
Run this and insert a path:
```
import datasets
builder = datasets.load_dataset_builder(
"wikipedia", language="en", date="20230320", beam_runner="DirectRunner")
builder.download_and_prepare({path}, file_format="parquet")
```
This is where the problem of it eating RAM occurs.
I have also tried several versions of this, based on the docs:
```
import gcsfs
import datasets
storage_options = {"project": "tdt4310", "token": "cloud"}
fs = gcsfs.GCSFileSystem(**storage_options)
output_dir = "gcs://wikipediadata/"
builder = datasets.load_dataset_builder(
"wikipedia", date="20230320", language="en", beam_runner="DirectRunner")
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
The error message that is received here is:
> ValueError: Unable to get filesystem from specified path, please use the correct path or ensure the required dependency is installed, e.g., pip install apache-beam[gcp]. Path specified: gcs://wikipediadata/wikipedia-train [while running 'train/Save to parquet/Write/WriteImpl/InitializeWrite']
I have ran `pip install apache-beam[gcp]`
### Expected behavior
The wikipedia data loaded into GCS
Everything worked when testing with a smaller demo dataset found somewhere in the docs
### Environment info
Newest published version of datasets. Python 3.9. Also tested with Python 3.7. 128GB RAM Google Cloud VM instance. | 234 | 103 | Wikipedia download_and_prepare for GCS
### Describe the bug
I am unable to download the wikipedia dataset onto GCS.
When I run the script provided the memory firstly gets eaten up, then it crashes.
I tried running this on a VM with 128GB RAM and all I got was a two empty files: _data_builder.lock_, _data.incomplete/beam-temp-wikipedia-train-1ab2039acf3611ed87a9893475de0093_
I have troubleshot this for two straight days now, but I am just unable to get the dataset into storage.
### Steps to reproduce the bug
Run this and insert a path:
```
import datasets
builder = datasets.load_dataset_builder(
"wikipedia", language="en", date="20230320", beam_runner="DirectRunner")
builder.download_and_prepare({path}, file_format="parquet")
```
This is where the problem of it eating RAM occurs.
I have also tried several versions of this, based on the docs:
```
import gcsfs
import datasets
storage_options = {"project": "tdt4310", "token": "cloud"}
fs = gcsfs.GCSFileSystem(**storage_options)
output_dir = "gcs://wikipediadata/"
builder = datasets.load_dataset_builder(
"wikipedia", date="20230320", language="en", beam_runner="DirectRunner")
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
The error message that is received here is:
> ValueError: Unable to get filesystem from specified path, please use the correct path or ensure the required dependency is installed, e.g., pip install apache-beam[gcp]. Path specified: gcs://wikipediadata/wikipedia-train [while running 'train/Save to parquet/Write/WriteImpl/InitializeWrite']
I have ran `pip install apache-beam[gcp]`
### Expected behavior
The wikipedia data loaded into GCS
Everything worked when testing with a smaller demo dataset found somewhere in the docs
### Environment info
Newest published version of datasets. Python 3.9. Also tested with Python 3.7. 128GB RAM Google Cloud VM instance.
When running this using :
```
import datasets
from apache_beam.options.pipeline_options import PipelineOptions
from gcsfs import GCSFileSystem
storage_options = {"project":"tdt4310", "token":"cloud"}
fs = GCSFileSystem(**storage_options)
output_dir = "gcs://quiz_transformer/"
beam_options = PipelineOptions(
region="europe-west4",
project="tdt4310",
temp_location=output_dir+"tmp/")
builder = datasets.load_dataset_builder("wikipedia", "20220301.en", beam_runner="dataflow", beam_options=beam_options)
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
I now get this error:
```
raise FileNotFoundError(f"Couldn't find file at {url}")
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json
Downloading data files: 0%| | 0/1 [00:00<?, ?it/s]
```
I get the same error for this:
```
import datasets
from gcsfs import GCSFileSystem
storage_options = {"project":"tdt4310", "token":"cloud"}
fs = GCSFileSystem(**storage_options)
output_dir = "gcs://quiz_transformer/"
builder = datasets.load_dataset_builder("wikipedia", "20220301.en")
builder.download_and_prepare(
output_dir, storage_options=storage_options, file_format="parquet")
```
| [
-1.2485368251800537,
-0.9129008054733276,
-0.6920938491821289,
1.4310672283172607,
-0.20769672095775604,
-1.2755827903747559,
0.12672162055969238,
-1.11542546749115,
1.6435272693634033,
-0.7804843187332153,
0.23500017821788788,
-1.6283763647079468,
0.04880886152386665,
-0.5575374960899353,
-0.7836310863494873,
-0.8777708411216736,
-0.3945397138595581,
-0.7932089567184448,
1.1048662662506104,
2.430436611175537,
1.2879712581634521,
-1.438944697380066,
2.7122039794921875,
0.7216622233390808,
-0.12997248768806458,
-0.9365943074226379,
0.5246363878250122,
-0.0022595422342419624,
-1.2659626007080078,
-0.43604472279548645,
-0.9766148924827576,
-0.11817126721143723,
-0.5263414978981018,
-0.4707356095314026,
-0.08700800687074661,
0.44397902488708496,
-0.36201849579811096,
-0.4357815086841583,
-0.6337878108024597,
-0.7671850919723511,
0.4649120271205902,
-0.33380362391471863,
0.9998376965522766,
-0.33394062519073486,
1.815819501876831,
-0.5843212604522705,
0.49912503361701965,
0.7429274320602417,
1.2254277467727661,
0.2511439919471741,
0.05208209156990051,
0.3505651354789734,
0.34938594698905945,
-0.05615151673555374,
0.5615847706794739,
1.1963300704956055,
0.6562756299972534,
0.5332004427909851,
0.7699845433235168,
-2.189753770828247,
1.2644456624984741,
-1.0642367601394653,
0.2205464094877243,
1.4089583158493042,
-0.9314549565315247,
0.34886083006858826,
-1.805485725402832,
0.0011189058423042297,
0.597507119178772,
-2.2326600551605225,
0.32739341259002686,
-1.3102877140045166,
-0.5911113023757935,
1.0464657545089722,
0.32677724957466125,
-1.2112960815429688,
0.16318443417549133,
-0.5001760721206665,
1.0332670211791992,
0.46660396456718445,
1.0800598859786987,
-1.6879905462265015,
-0.0878746509552002,
-0.2797110974788666,
0.1573132872581482,
-1.3309062719345093,
-1.6030226945877075,
0.569521427154541,
0.5829768180847168,
0.5602617263793945,
-0.10558348894119263,
1.1095478534698486,
-1.090673565864563,
0.8057494163513184,
-1.0015206336975098,
-1.6243059635162354,
-1.508522391319275,
-2.3090362548828125,
-2.20691180229187,
0.75860196352005,
-0.557173490524292,
-0.5039019584655762,
2.049835681915283,
-0.9840931296348572,
-1.6726709604263306,
1.1632217168807983,
0.28395867347717285,
0.02988354116678238,
2.3479371070861816,
0.20564663410186768,
-0.7231345176696777,
0.49795201420783997,
-0.7894660234451294,
0.7521233558654785,
-0.3163537085056305,
1.300879716873169,
0.41650110483169556,
-1.0530046224594116,
1.5952832698822021,
-0.3392898142337799,
0.6554769277572632,
-0.6866121888160706,
-0.5116154551506042,
-0.700466513633728,
0.3503410518169403,
1.8379089832305908,
-0.3149060904979706,
1.537522792816162,
-0.3124196529388428,
-1.5709627866744995,
-1.6742867231369019,
0.9632092714309692,
0.4759361445903778,
-0.7857515811920166,
0.13076308369636536,
-0.35535991191864014,
0.15246258676052094,
-0.13348627090454102,
1.1169328689575195,
1.3334412574768066,
0.7562422156333923,
-0.30422407388687134,
-0.7851620316505432,
0.12023799121379852,
-0.10174710303544998,
-0.7715792655944824,
-1.687740683555603,
-0.3815523386001587,
0.13765034079551697,
0.5657194256782532,
-1.2164020538330078,
1.7914458513259888,
0.9266246557235718,
1.8941813707351685,
1.0066038370132446,
-0.39591720700263977,
1.4712755680084229,
0.14416319131851196,
1.8021240234375,
-0.5938917994499207,
0.5665075778961182,
-0.3110959827899933,
-1.157149076461792,
0.924968957901001,
-0.3167210817337036,
-2.0812950134277344,
-0.7983651757240295,
-0.7343642711639404,
-0.24251241981983185,
-0.7284283638000488,
0.8830484747886658,
-0.3332196772098541,
-1.4012519121170044,
0.22637343406677246,
-0.7064869403839111,
0.0676216259598732,
-1.1826121807098389,
0.35643470287323,
0.674961507320404,
-0.6645821332931519,
0.10015305876731873,
-0.17603065073490143,
-1.2143394947052002,
-0.4560804069042206,
0.37512826919555664,
1.883262038230896,
-0.6824586987495422,
0.8834415674209595,
1.0572731494903564,
-0.7489351630210876,
0.02384871244430542,
0.3063689172267914,
-0.268826425075531,
0.8205541968345642,
-1.0598784685134888,
-0.5048438906669617,
1.18290376663208,
-0.2821800112724304,
-0.5995230674743652,
1.4033409357070923,
0.6978602409362793,
-0.9947197437286377,
-0.20868684351444244,
-0.12646599113941193,
-0.8704974055290222,
0.023759931325912476,
-1.502530574798584,
-0.1278809756040573,
0.414689302444458,
-1.5877983570098877,
-0.4133007526397705,
-0.1323668360710144,
1.3173468112945557,
-0.2291511446237564,
1.431505560874939,
-0.390746146440506,
-0.1376098394393921,
-0.28570547699928284,
-0.44934216141700745,
0.1845221072435379,
-0.23197884857654572,
-0.5557368993759155,
0.12931719422340393,
-0.7500944137573242,
0.2914615273475647,
1.41374933719635,
0.33543726801872253,
-0.04079195484519005,
0.4293811023235321,
1.113501787185669,
0.4250544607639313,
-0.010364584624767303,
-0.9601694345474243,
-1.4397172927856445,
1.9664753675460815,
-1.4935237169265747,
2.0053200721740723,
0.7449535131454468,
-0.01355031132698059,
-1.7621575593948364,
-1.9109231233596802,
1.3442455530166626,
1.1221649646759033,
2.37143611907959,
0.5234837532043457,
0.38530147075653076,
-0.8652163743972778,
-0.6447240114212036,
0.4066372513771057,
-1.060328483581543,
-0.6734675765037537,
0.17329634726047516,
2.376338005065918,
1.799607515335083,
-0.4181242883205414,
-0.26305925846099854,
-0.9143576622009277,
1.3853849172592163,
-0.18554134666919708,
0.22345593571662903,
1.9931426048278809,
-0.27622294425964355,
-1.0068148374557495,
1.3230534791946411,
-2.3388397693634033,
0.16652555763721466,
1.9759600162506104,
0.3008292615413666,
0.09132463485002518,
-1.3577351570129395,
-0.6308327913284302,
-0.2652897238731384,
-0.5227270126342773,
-1.1942909955978394,
0.4966026246547699,
-0.2851305902004242,
-0.7141013145446777,
-1.3885716199874878,
0.12587542831897736,
-1.2141634225845337,
-1.683715581893921,
0.18513134121894836,
1.9200631380081177,
2.0341296195983887,
-0.8422532081604004,
1.582926869392395,
-0.34596121311187744,
0.09480926394462585,
1.283667802810669,
1.3639863729476929,
3.118687629699707,
1.8480359315872192,
-1.268424153327942,
0.590701162815094,
-0.17112840712070465,
-0.4806089699268341,
1.1367628574371338,
-1.2099438905715942,
1.2871590852737427,
-0.08960136026144028,
-1.1091378927230835,
-1.194836974143982,
0.9672540426254272,
0.442610502243042,
0.07588592916727066,
-0.482166588306427,
1.1474182605743408,
0.20179066061973572,
1.3160864114761353,
0.5786939263343811,
-0.39560502767562866,
0.5802925229072571,
-0.33641281723976135,
-0.5110921263694763,
1.5472948551177979,
0.18767109513282776,
-1.4425816535949707,
-2.244201898574829,
-0.19315479695796967,
-0.870635986328125,
0.04077720269560814,
-0.5550369024276733,
-1.0488958358764648,
1.729034185409546,
0.31010252237319946,
-1.23533034324646,
-0.24081943929195404,
-0.353026419878006,
-0.6102029085159302,
2.748039484024048,
-1.2603944540023804,
-0.20113417506217957,
-0.942062497138977,
-0.6446279287338257,
1.6122608184814453,
-1.195389986038208,
-0.2472892850637436,
-1.0195764303207397,
-0.5467321872711182,
-1.2824199199676514,
-0.5205087661743164,
0.028782859444618225,
-0.954860508441925,
0.8548849821090698,
0.20609231293201447,
-1.1947956085205078,
-0.34298592805862427,
-0.8619089722633362,
0.9141817688941956,
-0.15943767130374908,
0.28301212191581726,
1.9443833827972412,
0.3497066795825958,
-0.34209468960762024,
0.7597606182098389,
1.2067794799804688,
0.6397004723548889,
-0.6007186770439148,
0.22093810141086578,
-0.6209142804145813,
0.3834016025066376,
-1.3055328130722046,
0.2306600958108902,
-2.8757736682891846,
0.584378182888031,
-0.09808585792779922,
-0.05656687170267105,
-0.051035959273576736,
-1.2656822204589844,
1.0672153234481812,
2.5676164627075195,
-1.1609834432601929,
0.4152931571006775,
0.47411802411079407,
1.1848716735839844,
-1.6542893648147583,
0.3648037612438202,
-0.4149063527584076,
2.0991764068603516,
0.21592415869235992,
1.2091996669769287,
-0.4887627065181732,
-2.3674843311309814,
0.5839714407920837,
-1.2893949747085571,
-1.2500041723251343,
0.7732807993888855,
-0.885617733001709,
0.2613527774810791,
-1.465071439743042,
-0.2549976110458374,
-0.8353695273399353,
-1.2427786588668823,
0.7213561534881592,
0.10923338681459427,
0.35563719272613525,
-0.525848925113678,
0.36367902159690857,
-2.1481709480285645,
-1.350369930267334,
-0.2662055492401123,
-0.925144374370575,
0.5029202103614807,
-0.4281785488128662,
0.718725860118866,
-0.1710430085659027,
0.0417964905500412,
0.29165300726890564,
1.5785813331604004,
3.394361972808838,
0.2275266796350479,
0.24066145718097687,
-0.21944858133792877,
-0.9357242584228516,
1.5243735313415527,
0.9673815965652466,
-0.13132840394973755,
-0.5871438384056091,
-1.0297256708145142,
1.2610418796539307,
2.025859832763672,
1.0867170095443726,
0.03361956775188446,
-0.854217529296875,
-0.7662560343742371,
-0.06089150905609131,
0.09876380860805511,
0.4481860399246216,
0.9686973094940186,
0.06757581233978271,
0.014456943608820438,
1.4551838636398315,
1.1462677717208862,
-0.37942227721214294,
0.2614632844924927,
-0.8326547145843506,
-0.4832419753074646,
0.47450944781303406,
0.25713810324668884,
0.04090215638279915,
0.4360964894294739,
-1.0187840461730957,
-0.25248268246650696,
-0.45322445034980774,
-0.8763960599899292,
-0.6037758588790894,
-0.4433281719684601,
-0.38153743743896484,
1.638168215751648,
0.18351155519485474,
-0.545666515827179,
-0.008310862816870213,
-0.7994700074195862,
-0.1388528198003769,
-1.1293681859970093,
0.2171354591846466,
-0.11655516177415848,
-0.1388673335313797,
-0.09656421095132828,
1.740271806716919,
-0.9537524580955505,
-2.0427932739257812,
0.1400580257177353,
0.240717813372612,
-0.22508279979228973,
0.1943684071302414,
1.6217397451400757,
0.5571495890617371,
1.3878971338272095,
1.2539688348770142,
0.9254000186920166,
-0.673348605632782,
-1.329481601715088,
0.6925113797187805,
1.0106760263442993,
-1.3845487833023071,
0.8861694931983948,
-0.07461996376514435,
-0.5173803567886353,
0.5836482048034668,
1.277228832244873,
0.47579294443130493,
-1.9821208715438843,
0.8539170622825623,
-0.9663131237030029,
0.8084926605224609,
0.6658368110656738,
0.6939297318458557,
0.228583425283432,
0.8594499826431274,
-1.1510303020477295,
-1.1147129535675049,
-0.7348175644874573,
-0.714367151260376,
1.9603017568588257,
-0.3360465466976166,
0.5808727145195007,
-0.18893863260746002,
-1.2812044620513916,
-0.04122236743569374,
0.7111058235168457,
0.3823517858982086,
-0.48662570118904114,
0.7844022512435913,
-0.6743420958518982,
-1.0026110410690308,
-1.3605467081069946,
-0.452919602394104,
-1.0260748863220215,
-0.9873802065849304,
1.042925238609314,
0.7592275738716125,
0.2877102494239807,
1.8942114114761353,
0.7098328471183777,
0.3430308699607849,
-2.6006338596343994,
0.9137886166572571,
0.27564138174057007,
-0.03400670364499092,
0.900577962398529,
0.3175339996814728,
1.0351336002349854,
0.022861458361148834,
0.5770124793052673,
-2.4829492568969727,
2.288309097290039,
-0.25657978653907776,
0.6585372090339661,
0.006543521769344807,
-0.24357286095619202,
1.2070292234420776,
0.5522085428237915,
0.4922963082790375,
-1.0689457654953003,
0.6231794357299805,
-0.48220178484916687,
1.1425551176071167,
0.8901665806770325,
-0.8108336925506592,
0.039228420704603195,
1.3851068019866943,
0.5127302408218384,
-0.5421674847602844,
-0.9991186261177063,
-0.9581401348114014,
0.9874419569969177,
1.6953622102737427,
0.003814396448433399,
0.022904355078935623,
0.8621729016304016,
0.6470609903335571,
-1.2747697830200195,
0.060993533581495285,
-0.7211095690727234,
-0.7602018117904663,
1.6365900039672852,
2.1252200603485107,
-0.11302238702774048,
-0.27787619829177856,
-0.6652172803878784,
-1.2965892553329468,
0.7843739986419678,
-0.10919500887393951,
0.20738309621810913,
0.5857478976249695,
-0.6543827652931213,
1.010703444480896,
0.8246459364891052,
0.9493383765220642,
0.21957537531852722,
0.2771230638027191,
0.4433028995990753,
-0.3431044816970825,
-1.0946282148361206,
-0.22985588014125824,
-0.995553731918335,
-2.58156418800354,
0.46429407596588135,
-0.14216302335262299,
-1.3852930068969727,
-0.02906113862991333,
-1.0352119207382202,
0.927807629108429,
-0.5337687134742737,
-1.0852034091949463,
-1.521009087562561,
0.17385999858379364,
-0.06420503556728363,
0.932040274143219,
-1.5657702684402466,
-0.292351096868515,
1.195127248764038,
0.8509999513626099,
-0.7121371626853943,
0.951803982257843,
0.12232650816440582,
1.0479505062103271,
0.8383146524429321,
-0.41870659589767456,
0.5334144830703735,
-0.0317242331802845,
-1.3713163137435913,
0.3944641947746277,
1.204007625579834,
0.09120067954063416,
1.5651448965072632,
-0.47579818964004517,
0.07945297658443451,
0.40039125084877014,
-0.5654597878456116,
-0.5450365543365479,
-0.4986001253128052,
0.6341311931610107,
0.006825292482972145,
-0.9051703214645386,
-0.09503396600484848,
-0.04776795580983162,
-0.32285407185554504,
0.12457312643527985,
-1.4785465002059937,
-0.1349477767944336,
-0.40989503264427185,
-0.6290634870529175,
-1.212616205215454,
-0.06184999644756317,
1.3792078495025635,
-0.7552607655525208,
-0.22381706535816193,
0.4754214882850647,
0.335979163646698,
0.5185726284980774,
0.6182149052619934,
-0.7190380096435547,
-0.27562013268470764,
-0.21824315190315247,
-0.3869449496269226,
0.37864619493484497,
1.336838960647583,
-0.07480588555335999,
-0.9844109416007996,
0.6506471037864685,
-0.2288084626197815,
0.045769449323415756,
1.9930803775787354,
0.06162119284272194,
-0.7242894172668457,
0.35097041726112366,
-0.7040561437606812,
1.8838655948638916,
1.6762688159942627,
1.3506426811218262,
-0.21563291549682617,
-0.9081137776374817,
0.6780619025230408,
-0.2860490679740906,
-0.4088706076145172,
0.8459993600845337,
0.2974853813648224,
-0.26886245608329773,
-1.4745614528656006,
0.7058674693107605,
1.2504531145095825,
-0.8699814081192017,
-0.7520217895507812,
0.14391368627548218,
-0.7973276972770691,
1.1029939651489258,
0.5290372371673584,
0.3418619930744171,
0.32016780972480774,
1.6754220724105835,
0.8115978837013245,
-0.4736882448196411,
0.5497026443481445,
0.6289005875587463,
-0.16318823397159576,
-2.116884231567383,
-1.171907663345337,
0.3407800495624542,
-0.6407866477966309,
-1.583382248878479,
1.3676421642303467,
-1.1178265810012817,
-1.0576139688491821,
0.6172271370887756,
0.03159094974398613,
1.3732802867889404,
0.3154853582382202,
1.6182615756988525,
2.107063055038452,
0.8044575452804565,
0.4381943941116333,
1.1737910509109497,
-0.1381499320268631,
-0.4788995385169983,
1.84758722782135,
-0.4503948390483856,
0.435723215341568,
1.100746750831604,
-0.28556886315345764,
-1.1355016231536865,
-0.755272388458252,
-1.2593119144439697,
-0.7049202919006348,
1.1337782144546509,
0.045118071138858795,
-1.0631896257400513,
0.25590986013412476,
1.5849758386611938,
0.13243332505226135,
-0.40519365668296814,
0.6232337355613708,
0.45435836911201477,
-0.8386369943618774,
-0.09191539883613586,
-0.8641401529312134,
0.5533140301704407,
-0.1584012359380722,
-0.4086131453514099,
0.28008148074150085,
0.46288686990737915,
1.381414771080017,
-0.12095773220062256,
0.1881769746541977,
1.0792064666748047,
-1.495675802230835,
1.5365735292434692,
-0.7219278216362,
0.22254489362239838,
-2.34258770942688,
1.3665869235992432,
-0.7568826675415039,
1.9979872703552246,
-2.570021867752075,
0.38960161805152893,
-0.564145565032959,
-0.4398946762084961,
0.3055703043937683,
-0.3642246127128601,
0.1031254380941391,
-0.078046515583992,
-1.103572964668274,
-0.07383687049150467,
-0.6518227458000183,
0.6481623649597168,
1.1344678401947021,
1.3772605657577515,
-1.0721180438995361,
-0.29685071110725403,
-1.6816225051879883,
-0.15123935043811798,
-0.7509328722953796,
0.27158522605895996,
-1.9780333042144775,
-0.13873551785945892,
-1.9409538507461548,
-2.3869128227233887,
-1.311151385307312,
-0.837371289730072,
1.1418406963348389,
0.17055772244930267,
-0.9747713208198547,
1.298484444618225,
-0.38080033659935,
-1.7831476926803589,
1.1905620098114014,
-2.1439878940582275
] |
https://github.com/huggingface/datasets/issues/5687 | Document to compress data files before uploading | Great idea!
Should we also take this opportunity to include some audio/image file formats? Currently, it still reads very text heavy. Something like:
> We support many text, audio, and image data extensions such as `.zip`, `.rar`, `.mp3`, and `.jpg` among many others. For data extensions like `.csv`, `.json`, `.jsonl`, and `txt`, we recommend compressing them before uploading to the Hub. These file extensions are not tracked by Git LFS by default, and if they're too large, they will not be committed and uploaded. Take a look at the `.gitattributes` file in your repository for a complete list of supported file extensions. | In our docs to [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset), we tell users to upload directly their data files, like CSV, JSON, JSON-Lines, text,... However, these extensions are not tracked by Git LFS by default, as they are not in the `.giattributes` file. Therefore, if they are too large, Git will fail to commit/upload them.
I think for those file extensions (.csv, .json, .jsonl, .txt), we should better recommend to **compress** their data files (using ZIP for example) before uploading them to the Hub.
- Compressed files are tracked by Git LFS in our default `.gitattributes` file
What do you think?
CC: @stevhliu
See related issue:
- https://huggingface.co/datasets/tcor0005/langchain-docs-400-chunksize/discussions/1 | 235 | 102 | Document to compress data files before uploading
In our docs to [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset), we tell users to upload directly their data files, like CSV, JSON, JSON-Lines, text,... However, these extensions are not tracked by Git LFS by default, as they are not in the `.giattributes` file. Therefore, if they are too large, Git will fail to commit/upload them.
I think for those file extensions (.csv, .json, .jsonl, .txt), we should better recommend to **compress** their data files (using ZIP for example) before uploading them to the Hub.
- Compressed files are tracked by Git LFS in our default `.gitattributes` file
What do you think?
CC: @stevhliu
See related issue:
- https://huggingface.co/datasets/tcor0005/langchain-docs-400-chunksize/discussions/1
Great idea!
Should we also take this opportunity to include some audio/image file formats? Currently, it still reads very text heavy. Something like:
> We support many text, audio, and image data extensions such as `.zip`, `.rar`, `.mp3`, and `.jpg` among many others. For data extensions like `.csv`, `.json`, `.jsonl`, and `txt`, we recommend compressing them before uploading to the Hub. These file extensions are not tracked by Git LFS by default, and if they're too large, they will not be committed and uploaded. Take a look at the `.gitattributes` file in your repository for a complete list of supported file extensions. | [
-1.168235182762146,
-0.9314780831336975,
-0.7953200340270996,
1.4800595045089722,
-0.22146853804588318,
-1.2642711400985718,
0.13227075338363647,
-1.1017248630523682,
1.7470126152038574,
-0.7224206328392029,
0.33438771963119507,
-1.642283320426941,
0.027734234929084778,
-0.7073696255683899,
-0.8039183020591736,
-0.885410726070404,
-0.46399611234664917,
-0.8337435126304626,
0.960089921951294,
2.5208139419555664,
1.1925593614578247,
-1.383068561553955,
2.561354160308838,
0.6943440437316895,
-0.224953293800354,
-1.066028356552124,
0.5766781568527222,
0.016296036541461945,
-1.2332292795181274,
-0.4652946889400482,
-0.887870192527771,
-0.08961104601621628,
-0.7694580554962158,
-0.5390285849571228,
0.06285735964775085,
0.3992116153240204,
-0.2367522418498993,
-0.33185917139053345,
-0.5691606402397156,
-0.7710700631141663,
0.6023404002189636,
-0.3905232846736908,
1.0345770120620728,
-0.33932337164878845,
1.796775460243225,
-0.6095674633979797,
0.4773876368999481,
0.7059348225593567,
1.4040586948394775,
0.23201081156730652,
-0.01703350804746151,
0.19536468386650085,
0.42154547572135925,
0.09720472991466522,
0.4969872832298279,
1.0786285400390625,
0.6710545420646667,
0.4600759744644165,
0.6936975717544556,
-2.168628692626953,
1.2657063007354736,
-1.0936877727508545,
0.26702287793159485,
1.3892379999160767,
-0.8913497924804688,
0.3344969153404236,
-1.8601206541061401,
-0.11043980717658997,
0.5630257725715637,
-2.2380309104919434,
0.19328317046165466,
-1.3143627643585205,
-0.42931845784187317,
1.0191136598587036,
0.34856197237968445,
-1.3137255907058716,
0.2069753110408783,
-0.43933960795402527,
0.9449658989906311,
0.4566043019294739,
1.120316743850708,
-1.8513767719268799,
-0.06993576884269714,
-0.4351014494895935,
0.1815676987171173,
-1.2218376398086548,
-1.3943524360656738,
0.4845338463783264,
0.7080702781677246,
0.5175480842590332,
-0.2028273046016693,
0.9994837045669556,
-1.0633434057235718,
0.829872727394104,
-0.9799902439117432,
-1.717217206954956,
-1.3930635452270508,
-2.1778032779693604,
-2.397921085357666,
0.8114754557609558,
-0.5170120000839233,
-0.49071067571640015,
2.0179412364959717,
-0.9369025230407715,
-1.660252332687378,
1.184122920036316,
0.2904834747314453,
0.021302901208400726,
2.4229111671447754,
0.1444285809993744,
-0.7164469361305237,
0.4272139072418213,
-0.7489460110664368,
0.8033235669136047,
-0.3596995174884796,
1.3772367238998413,
0.4387338161468506,
-1.0894047021865845,
1.594220519065857,
-0.47299715876579285,
0.5289124846458435,
-0.6443513035774231,
-0.5269600749015808,
-0.8021389842033386,
0.35868480801582336,
1.9249459505081177,
-0.3012060821056366,
1.5135232210159302,
-0.27943164110183716,
-1.5821533203125,
-1.5895153284072876,
0.9748718738555908,
0.49292975664138794,
-0.8007351160049438,
-0.014141065999865532,
-0.3271406292915344,
0.18098950386047363,
-0.002068697940558195,
1.0718713998794556,
1.275177001953125,
0.8379884958267212,
-0.3332374691963196,
-0.8260237574577332,
0.26116445660591125,
-0.13508102297782898,
-0.8094939589500427,
-1.7989931106567383,
-0.4365284740924835,
0.07824339717626572,
0.6718606352806091,
-1.2205392122268677,
1.7873727083206177,
0.9101649522781372,
1.9807103872299194,
0.9322606325149536,
-0.4602602422237396,
1.4470971822738647,
-0.0211712084710598,
1.9946708679199219,
-0.5638867616653442,
0.7264001369476318,
-0.45237866044044495,
-1.1964197158813477,
0.8781874775886536,
-0.2700607478618622,
-2.0274016857147217,
-0.7173436880111694,
-0.770663857460022,
-0.25013527274131775,
-0.7309644222259521,
0.9190496206283569,
-0.3041817545890808,
-1.3965473175048828,
0.24330607056617737,
-0.6669724583625793,
0.07903637737035751,
-1.2919636964797974,
0.29368773102760315,
0.7412137389183044,
-0.6575129628181458,
0.06616417318582535,
-0.26978135108947754,
-1.198024034500122,
-0.5441513061523438,
0.14545094966888428,
1.8837045431137085,
-0.7953149080276489,
1.0198147296905518,
0.9875861406326294,
-0.7841817736625671,
-0.039395060390233994,
0.44045326113700867,
-0.2968554198741913,
0.8075242638587952,
-1.0632619857788086,
-0.48119327425956726,
1.179451823234558,
-0.13688290119171143,
-0.5927947163581848,
1.4379159212112427,
0.7892034649848938,
-0.9719113111495972,
-0.15952393412590027,
-0.17267736792564392,
-0.780790388584137,
0.11332029104232788,
-1.6243232488632202,
-0.06810806691646576,
0.4218057692050934,
-1.514362096786499,
-0.48160234093666077,
-0.25746867060661316,
1.2644853591918945,
-0.151670902967453,
1.4116042852401733,
-0.3173303008079529,
-0.26306769251823425,
-0.3301381468772888,
-0.43146830797195435,
0.21570104360580444,
-0.15931382775306702,
-0.565867006778717,
0.35225921869277954,
-0.8084504008293152,
0.35862940549850464,
1.4384007453918457,
0.2788684666156769,
0.034991197288036346,
0.41984689235687256,
1.0108243227005005,
0.34969931840896606,
-0.0126045448705554,
-0.9934487342834473,
-1.490261197090149,
2.0736746788024902,
-1.5021268129348755,
1.9911210536956787,
0.7928674221038818,
-0.0012741275131702423,
-1.674698829650879,
-1.8796699047088623,
1.3946270942687988,
1.107761263847351,
2.4116766452789307,
0.6112886667251587,
0.29768243432044983,
-0.8495941758155823,
-0.5846750736236572,
0.29181963205337524,
-1.0359777212142944,
-0.7950982451438904,
0.09384254366159439,
2.376033306121826,
1.7272518873214722,
-0.5760211944580078,
-0.19893565773963928,
-1.134206771850586,
1.4163769483566284,
-0.13175082206726074,
0.2669735848903656,
2.084282636642456,
-0.3191072940826416,
-1.1544393301010132,
1.2741167545318604,
-2.3309459686279297,
0.08103111386299133,
1.984840750694275,
0.30699238181114197,
0.12004945427179337,
-1.4751137495040894,
-0.5825846195220947,
-0.17193633317947388,
-0.4592415690422058,
-1.1927369832992554,
0.5456572771072388,
-0.2374051809310913,
-0.8205206394195557,
-1.4937224388122559,
0.1205880269408226,
-1.169734001159668,
-1.6642173528671265,
0.30693838000297546,
1.8359291553497314,
2.0292112827301025,
-0.7376963496208191,
1.6162889003753662,
-0.2563135623931885,
0.1546776294708252,
1.190515160560608,
1.2285175323486328,
3.119906187057495,
1.9015333652496338,
-1.2579134702682495,
0.6177352666854858,
-0.30663618445396423,
-0.46699678897857666,
1.1382418870925903,
-1.142423152923584,
1.2097008228302002,
-0.22178080677986145,
-1.1347756385803223,
-1.2408849000930786,
0.9496888518333435,
0.5064848065376282,
0.06599953770637512,
-0.5253491997718811,
1.1473289728164673,
0.07525630295276642,
1.287532925605774,
0.5538160800933838,
-0.23464471101760864,
0.6212515234947205,
-0.43191999197006226,
-0.5500757098197937,
1.6332772970199585,
0.23748096823692322,
-1.3248138427734375,
-2.358769178390503,
-0.2674165368080139,
-0.9893931746482849,
0.07357928901910782,
-0.5051509141921997,
-0.906539261341095,
1.669458270072937,
0.34079134464263916,
-1.3881027698516846,
-0.2608538269996643,
-0.29861631989479065,
-0.6303929090499878,
2.7067129611968994,
-1.4417672157287598,
-0.200508713722229,
-0.9197158813476562,
-0.6013877987861633,
1.6063189506530762,
-1.1896772384643555,
-0.1907830834388733,
-0.9989786148071289,
-0.6488363742828369,
-1.3403072357177734,
-0.547417163848877,
0.0007774084806442261,
-0.943755030632019,
0.8122720122337341,
0.20822271704673767,
-1.1878999471664429,
-0.3718191683292389,
-0.8520551323890686,
0.8345417976379395,
-0.0746484324336052,
0.350028395652771,
1.8431940078735352,
0.4215826094150543,
-0.29957741498947144,
0.6355428099632263,
1.1566721200942993,
0.6750555634498596,
-0.6578861474990845,
0.26898854970932007,
-0.6964896321296692,
0.22226464748382568,
-1.247889518737793,
0.2642000615596771,
-2.7524609565734863,
0.6783462762832642,
-0.06513337790966034,
-0.021550333127379417,
-0.025547582656145096,
-1.2133853435516357,
1.1649264097213745,
2.620720386505127,
-1.147723913192749,
0.37084871530532837,
0.27276235818862915,
1.1690664291381836,
-1.4858192205429077,
0.2642359435558319,
-0.3405302166938782,
2.1776785850524902,
0.23154550790786743,
1.2065935134887695,
-0.4389970898628235,
-2.195728302001953,
0.5635403990745544,
-1.3098642826080322,
-1.1326528787612915,
0.7576521635055542,
-0.7706084251403809,
-0.0336146354675293,
-1.452290415763855,
-0.14751502871513367,
-0.9439288973808289,
-1.2747056484222412,
0.7954465746879578,
0.11715007573366165,
0.5408073663711548,
-0.6488590240478516,
0.389635294675827,
-2.1030359268188477,
-1.4231746196746826,
-0.2929477393627167,
-1.006478190422058,
0.39589405059814453,
-0.24610674381256104,
0.6882337927818298,
-0.13869452476501465,
-0.004073384217917919,
0.41344213485717773,
1.423898458480835,
3.478567123413086,
0.16738533973693848,
0.37336185574531555,
-0.14634695649147034,
-1.0210458040237427,
1.4609569311141968,
0.9646203517913818,
-0.025411637499928474,
-0.5332604050636292,
-1.0991452932357788,
1.2088675498962402,
1.9963586330413818,
1.104970932006836,
0.02496149018406868,
-0.8021703362464905,
-0.68610680103302,
0.057921454310417175,
0.24758285284042358,
0.49704426527023315,
0.8162184357643127,
0.09446444362401962,
0.059349335730075836,
1.3554426431655884,
1.2373238801956177,
-0.4259967505931854,
0.4207272529602051,
-0.7961070537567139,
-0.3935907185077667,
0.4912547469139099,
0.21598535776138306,
0.07040698826313019,
0.3309139609336853,
-1.0801892280578613,
-0.2715104818344116,
-0.3425966203212738,
-1.0100983381271362,
-0.7336200475692749,
-0.4978392422199249,
-0.4124112129211426,
1.6539857387542725,
0.06943481415510178,
-0.3861399292945862,
0.023104332387447357,
-0.7267805933952332,
-0.048765506595373154,
-1.047888994216919,
0.17308005690574646,
-0.16546505689620972,
-0.0995146781206131,
-0.18355700373649597,
1.8744250535964966,
-0.8973804116249084,
-2.0983052253723145,
0.3224136233329773,
0.2426125705242157,
-0.4500103294849396,
0.28209081292152405,
1.5651302337646484,
0.5195679664611816,
1.4405180215835571,
1.3330239057540894,
1.0114600658416748,
-0.6543752551078796,
-1.281174659729004,
0.7148894667625427,
0.9779018759727478,
-1.4169389009475708,
0.8575703501701355,
-0.017341364175081253,
-0.470194548368454,
0.6893261075019836,
1.2808771133422852,
0.3349422216415405,
-2.0103566646575928,
0.7151247262954712,
-0.8655059337615967,
0.7738590836524963,
0.6004321575164795,
0.7341750264167786,
0.20268923044204712,
0.7029629349708557,
-1.2778199911117554,
-1.1331294775009155,
-0.7331645488739014,
-0.5777860283851624,
1.9722610712051392,
-0.08917222917079926,
0.5571067929267883,
-0.0626162737607956,
-1.2674988508224487,
-0.1340779960155487,
0.6813150644302368,
0.461646169424057,
-0.4875336289405823,
0.8437732458114624,
-0.6361384987831116,
-1.173020601272583,
-1.3055979013442993,
-0.4978027939796448,
-1.0737841129302979,
-0.8821237683296204,
1.088115930557251,
0.8431069850921631,
0.39351701736450195,
1.89248788356781,
0.6481146216392517,
0.2498960793018341,
-2.5976619720458984,
0.9241176247596741,
0.2885063886642456,
-0.1087198555469513,
0.9083294868469238,
0.32209891080856323,
1.0190868377685547,
-0.09702149778604507,
0.570135772228241,
-2.431025266647339,
2.3324527740478516,
-0.16484308242797852,
0.6122427582740784,
0.033949851989746094,
-0.22162851691246033,
1.0179048776626587,
0.5653002858161926,
0.44019702076911926,
-1.130521535873413,
0.579319179058075,
-0.6620694994926453,
1.208319067955017,
0.9466115832328796,
-0.780200183391571,
-0.019711554050445557,
1.312011957168579,
0.5056410431861877,
-0.4415791928768158,
-0.8824229836463928,
-0.8738206028938293,
0.8765490055084229,
1.749132513999939,
-0.15737858414649963,
-0.08800680190324783,
0.9674077033996582,
0.6001602411270142,
-1.2528820037841797,
0.09029344469308853,
-0.780902624130249,
-0.7638111114501953,
1.5863173007965088,
1.978430986404419,
-0.0882745087146759,
-0.19362199306488037,
-0.8335877656936646,
-1.2272136211395264,
0.769370436668396,
0.001240607351064682,
0.1831563413143158,
0.667807400226593,
-0.6224796175956726,
1.148650884628296,
0.9774206876754761,
0.9694046974182129,
0.20735076069831848,
0.29702264070510864,
0.36098915338516235,
-0.3901597857475281,
-1.1009209156036377,
-0.26536089181900024,
-1.1348721981048584,
-2.6547341346740723,
0.57425457239151,
-0.3469907343387604,
-1.4347563982009888,
0.004132011905312538,
-1.0076369047164917,
0.8737280368804932,
-0.5334780216217041,
-1.0514172315597534,
-1.4657999277114868,
0.2621402442455292,
-0.14833813905715942,
0.9715622663497925,
-1.6904929876327515,
-0.03143821656703949,
1.2115973234176636,
0.8434832096099854,
-0.7082470655441284,
0.9564433097839355,
0.29159536957740784,
1.0035005807876587,
0.837782621383667,
-0.335016667842865,
0.46865901350975037,
0.12288788706064224,
-1.2895158529281616,
0.38437631726264954,
1.0827490091323853,
0.16757088899612427,
1.360727071762085,
-0.5118668675422668,
0.034285400062799454,
0.34577059745788574,
-0.45166176557540894,
-0.44849616289138794,
-0.5707497596740723,
0.6811622381210327,
0.1248338595032692,
-0.931692898273468,
0.14836379885673523,
-0.033692628145217896,
-0.10886134952306747,
0.16356703639030457,
-1.473136305809021,
-0.24392783641815186,
-0.3929826617240906,
-0.44216498732566833,
-1.2003332376480103,
-0.08888409286737442,
1.3339650630950928,
-0.6424227356910706,
-0.15395307540893555,
0.5354081392288208,
0.31075769662857056,
0.554511308670044,
0.6311640739440918,
-0.5853632092475891,
-0.4530763030052185,
-0.29779669642448425,
-0.44036874175071716,
0.28780102729797363,
1.336051106452942,
-0.08715295046567917,
-0.9607586860656738,
0.7846208810806274,
-0.4127642810344696,
0.07282551378011703,
1.9536209106445312,
0.12012254446744919,
-0.8686040043830872,
0.37165674567222595,
-0.6144073009490967,
1.8890665769577026,
1.756016492843628,
1.2471070289611816,
-0.09445242583751678,
-0.9421690702438354,
0.5457677245140076,
-0.37455910444259644,
-0.3895127773284912,
0.8908723592758179,
0.312004953622818,
-0.20521238446235657,
-1.3635034561157227,
0.5957578420639038,
1.4045158624649048,
-0.8485857844352722,
-0.879615068435669,
0.19636830687522888,
-0.7582299709320068,
1.0117219686508179,
0.6974509358406067,
0.4077613055706024,
0.21955326199531555,
1.5223933458328247,
0.7908248901367188,
-0.41109907627105713,
0.5675605535507202,
0.5194784998893738,
-0.20312482118606567,
-2.1275980472564697,
-1.2177411317825317,
0.2673460841178894,
-0.47278696298599243,
-1.5478734970092773,
1.3681410551071167,
-1.174692988395691,
-0.9209588170051575,
0.6193445920944214,
0.06680245697498322,
1.4778013229370117,
0.42670923471450806,
1.5576945543289185,
2.0740134716033936,
0.8562983274459839,
0.3315202295780182,
1.3482266664505005,
-0.11749991774559021,
-0.5698817372322083,
1.8316681385040283,
-0.47515350580215454,
0.510838508605957,
1.1441155672073364,
-0.19949984550476074,
-0.9501919150352478,
-0.799889862537384,
-1.2353943586349487,
-0.6654536128044128,
1.2269823551177979,
0.04153095930814743,
-1.086323857307434,
0.22104132175445557,
1.7161988019943237,
0.08441919088363647,
-0.3701520264148712,
0.6376508474349976,
0.36122915148735046,
-0.8198169469833374,
-0.05163085088133812,
-0.8970363140106201,
0.4467172622680664,
-0.22078990936279297,
-0.33565327525138855,
0.36402902007102966,
0.45199698209762573,
1.1958823204040527,
-0.03366703540086746,
0.18001234531402588,
1.0909744501113892,
-1.3640083074569702,
1.5250142812728882,
-0.5311922430992126,
0.29524096846580505,
-2.4074673652648926,
1.374895691871643,
-0.7718228697776794,
1.866123914718628,
-2.5837042331695557,
0.34153276681900024,
-0.5202005505561829,
-0.5002194046974182,
0.2621573507785797,
-0.3924209177494049,
0.15260165929794312,
-0.21125665307044983,
-1.0870404243469238,
-0.09906697273254395,
-0.702692449092865,
0.5100304484367371,
1.0834494829177856,
1.425417423248291,
-1.0213191509246826,
-0.3512599766254425,
-1.8372350931167603,
-0.07886403799057007,
-0.5337483882904053,
0.3499235510826111,
-1.977790355682373,
-0.1392785906791687,
-1.902948260307312,
-2.2736129760742188,
-1.477689504623413,
-0.9162468314170837,
1.1374248266220093,
0.10719484090805054,
-0.8385148048400879,
1.0693055391311646,
-0.3279690146446228,
-1.9527757167816162,
0.9986151456832886,
-2.2005178928375244
] |
https://github.com/huggingface/datasets/issues/5687 | Document to compress data files before uploading | Hi @stevhliu, thanks for your suggestion.
I agree it is a good opportunity to mention that audio/image file formats are also supported.
Nit:
I would not mention .zip, .rar after "text, audio, and image data extensions". Those are "compression" extensions and not "text, audio, and image data extensions".
What about something similar to:
> We support many text, audio, and image data extensions such as `.csv`, `.mp3`, and `.jpg` among many others. For text data extensions like `.csv`, `.json`, `.jsonl`, and `.txt`, we recommend compressing them before uploading to the Hub (to `.zip` or `.gz` file extension for example).
>
> Note that text file extensions are not tracked by Git LFS by default, and if they're too large, they will not be committed and uploaded. Take a look at the `.gitattributes` file in your repository for a complete list of tracked file extensions by default.
Note that for compressions I have mentioned:
- gz, to compress individual files
- zip, to compress and archive multiple files; zip is preferred rather than tar because it supports streaming out of the box | In our docs to [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset), we tell users to upload directly their data files, like CSV, JSON, JSON-Lines, text,... However, these extensions are not tracked by Git LFS by default, as they are not in the `.giattributes` file. Therefore, if they are too large, Git will fail to commit/upload them.
I think for those file extensions (.csv, .json, .jsonl, .txt), we should better recommend to **compress** their data files (using ZIP for example) before uploading them to the Hub.
- Compressed files are tracked by Git LFS in our default `.gitattributes` file
What do you think?
CC: @stevhliu
See related issue:
- https://huggingface.co/datasets/tcor0005/langchain-docs-400-chunksize/discussions/1 | 235 | 181 | Document to compress data files before uploading
In our docs to [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset), we tell users to upload directly their data files, like CSV, JSON, JSON-Lines, text,... However, these extensions are not tracked by Git LFS by default, as they are not in the `.giattributes` file. Therefore, if they are too large, Git will fail to commit/upload them.
I think for those file extensions (.csv, .json, .jsonl, .txt), we should better recommend to **compress** their data files (using ZIP for example) before uploading them to the Hub.
- Compressed files are tracked by Git LFS in our default `.gitattributes` file
What do you think?
CC: @stevhliu
See related issue:
- https://huggingface.co/datasets/tcor0005/langchain-docs-400-chunksize/discussions/1
Hi @stevhliu, thanks for your suggestion.
I agree it is a good opportunity to mention that audio/image file formats are also supported.
Nit:
I would not mention .zip, .rar after "text, audio, and image data extensions". Those are "compression" extensions and not "text, audio, and image data extensions".
What about something similar to:
> We support many text, audio, and image data extensions such as `.csv`, `.mp3`, and `.jpg` among many others. For text data extensions like `.csv`, `.json`, `.jsonl`, and `.txt`, we recommend compressing them before uploading to the Hub (to `.zip` or `.gz` file extension for example).
>
> Note that text file extensions are not tracked by Git LFS by default, and if they're too large, they will not be committed and uploaded. Take a look at the `.gitattributes` file in your repository for a complete list of tracked file extensions by default.
Note that for compressions I have mentioned:
- gz, to compress individual files
- zip, to compress and archive multiple files; zip is preferred rather than tar because it supports streaming out of the box | [
-1.1804462671279907,
-0.9460320472717285,
-0.7821523547172546,
1.4059571027755737,
-0.2614946961402893,
-1.2717885971069336,
0.13019461929798126,
-1.1544872522354126,
1.7194490432739258,
-0.749336838722229,
0.30961933732032776,
-1.6119942665100098,
0.022222774103283882,
-0.661871075630188,
-0.8203778266906738,
-0.8822646141052246,
-0.454950213432312,
-0.8499051332473755,
0.9752246737480164,
2.5257060527801514,
1.1947157382965088,
-1.3945519924163818,
2.5767126083374023,
0.7224189639091492,
-0.2069089710712433,
-1.0820374488830566,
0.6013996601104736,
0.008636534214019775,
-1.2662080526351929,
-0.41391775012016296,
-0.9291722774505615,
-0.10143593698740005,
-0.7635504007339478,
-0.5386053919792175,
0.06171206384897232,
0.37740373611450195,
-0.22882655262947083,
-0.3462032377719879,
-0.5941770672798157,
-0.7376489639282227,
0.605072557926178,
-0.41071343421936035,
1.0611363649368286,
-0.33581262826919556,
1.7645671367645264,
-0.5890977382659912,
0.4972098469734192,
0.684173583984375,
1.380447506904602,
0.2411305010318756,
0.04707770794630051,
0.16105249524116516,
0.46706318855285645,
0.07769439369440079,
0.4663684368133545,
1.0686250925064087,
0.7022605538368225,
0.4398426115512848,
0.743114709854126,
-2.1800222396850586,
1.252585530281067,
-1.0470337867736816,
0.2894596755504608,
1.3878079652786255,
-0.8485202789306641,
0.34492620825767517,
-1.884140968322754,
-0.11849657446146011,
0.5709874033927917,
-2.220139741897583,
0.1775892674922943,
-1.2931147813796997,
-0.4687679409980774,
1.0241432189941406,
0.33747851848602295,
-1.2797975540161133,
0.22561796009540558,
-0.43258264660835266,
0.9101596474647522,
0.46607232093811035,
1.129225730895996,
-1.8505785465240479,
-0.07129176706075668,
-0.42904871702194214,
0.20176619291305542,
-1.2161309719085693,
-1.4089808464050293,
0.5034759044647217,
0.7203366160392761,
0.5361875891685486,
-0.20268993079662323,
0.9880020022392273,
-1.0834667682647705,
0.8653782606124878,
-1.0044403076171875,
-1.7017899751663208,
-1.3840627670288086,
-2.1692564487457275,
-2.3995893001556396,
0.7943801879882812,
-0.559276819229126,
-0.46758103370666504,
2.0256152153015137,
-0.9547805190086365,
-1.6423766613006592,
1.1569957733154297,
0.24807539582252502,
0.046075329184532166,
2.4201083183288574,
0.12383051961660385,
-0.6947810053825378,
0.4701058864593506,
-0.7315472960472107,
0.7907382845878601,
-0.35598570108413696,
1.344665765762329,
0.3843328058719635,
-1.0457254648208618,
1.5979554653167725,
-0.46916699409484863,
0.5529748201370239,
-0.6380409598350525,
-0.5046671032905579,
-0.7871089577674866,
0.36003541946411133,
1.874055027961731,
-0.314004510641098,
1.5092099905014038,
-0.2950548529624939,
-1.610567569732666,
-1.6182132959365845,
0.9562066197395325,
0.5324856638908386,
-0.7993887662887573,
-0.0030157831497490406,
-0.32264479994773865,
0.19673798978328705,
-0.01258543599396944,
1.0581848621368408,
1.2909857034683228,
0.8617415428161621,
-0.29739174246788025,
-0.8238490223884583,
0.2647509276866913,
-0.14000675082206726,
-0.8668541312217712,
-1.792468786239624,
-0.45952826738357544,
0.06230727583169937,
0.6780426502227783,
-1.207143783569336,
1.8059334754943848,
0.9001321196556091,
1.9869632720947266,
0.9213241338729858,
-0.49899959564208984,
1.4295213222503662,
-0.000305885449051857,
1.9453113079071045,
-0.5531756281852722,
0.7116361856460571,
-0.4720085561275482,
-1.189204216003418,
0.86597740650177,
-0.2601131796836853,
-2.011591672897339,
-0.6934124231338501,
-0.7715966105461121,
-0.24656268954277039,
-0.7221197485923767,
0.8912767171859741,
-0.2889983057975769,
-1.3954083919525146,
0.23891514539718628,
-0.6496561169624329,
0.04946589469909668,
-1.2423514127731323,
0.2830692529678345,
0.7098977565765381,
-0.6892845034599304,
0.0851910337805748,
-0.24568596482276917,
-1.2242013216018677,
-0.5375095009803772,
0.15244035422801971,
1.881930947303772,
-0.8044900894165039,
0.9825112223625183,
0.965010941028595,
-0.7717245817184448,
-0.023477628827095032,
0.4394318163394928,
-0.30852416157722473,
0.7508874535560608,
-1.0773028135299683,
-0.48122432827949524,
1.1686943769454956,
-0.10605500638484955,
-0.5580230951309204,
1.3999788761138916,
0.7303020358085632,
-0.9887382984161377,
-0.16200895607471466,
-0.15270158648490906,
-0.7820301651954651,
0.09154364466667175,
-1.647322416305542,
-0.05369611084461212,
0.4183219373226166,
-1.5342156887054443,
-0.46804100275039673,
-0.2405833899974823,
1.2185096740722656,
-0.12206289917230606,
1.3923062086105347,
-0.3472267985343933,
-0.24125143885612488,
-0.3510843813419342,
-0.4115035831928253,
0.19814108312129974,
-0.18213790655136108,
-0.5644779801368713,
0.34326499700546265,
-0.8534724712371826,
0.36531350016593933,
1.4581315517425537,
0.2731505036354065,
0.021824680268764496,
0.39617976546287537,
0.9765269160270691,
0.3725501000881195,
-0.011667733080685139,
-0.9835588932037354,
-1.4689691066741943,
2.0732181072235107,
-1.5089836120605469,
2.0201334953308105,
0.7869148850440979,
-0.04221022129058838,
-1.7127447128295898,
-1.8983311653137207,
1.373173475265503,
1.1187912225723267,
2.446474552154541,
0.6052665114402771,
0.3259986937046051,
-0.8595088720321655,
-0.5642094016075134,
0.3346535265445709,
-1.013056755065918,
-0.7839719653129578,
0.09124232083559036,
2.3867413997650146,
1.7491521835327148,
-0.579953670501709,
-0.2030409276485443,
-1.113547444343567,
1.4252643585205078,
-0.12270615249872208,
0.30294278264045715,
2.0367345809936523,
-0.3355412781238556,
-1.1394014358520508,
1.3194208145141602,
-2.3057241439819336,
0.07820615917444229,
1.982729434967041,
0.2824670672416687,
0.15660236775875092,
-1.4243699312210083,
-0.5700643062591553,
-0.18458020687103271,
-0.46966493129730225,
-1.1933687925338745,
0.5423433780670166,
-0.24663585424423218,
-0.8278337121009827,
-1.496910810470581,
0.10634735226631165,
-1.2027298212051392,
-1.6648809909820557,
0.30658018589019775,
1.8187048435211182,
2.044092893600464,
-0.771267294883728,
1.582122564315796,
-0.2686082720756531,
0.15490762889385223,
1.1833308935165405,
1.23143470287323,
3.0993025302886963,
1.8985720872879028,
-1.2516119480133057,
0.6320033073425293,
-0.32670822739601135,
-0.42031362652778625,
1.0884804725646973,
-1.1290559768676758,
1.1970438957214355,
-0.20272056758403778,
-1.1281518936157227,
-1.1801588535308838,
0.948795735836029,
0.4584445655345917,
0.059161774814128876,
-0.5042572617530823,
1.156632423400879,
0.08229463547468185,
1.3043924570083618,
0.5585319995880127,
-0.2541327476501465,
0.6478779911994934,
-0.41611820459365845,
-0.5472183227539062,
1.6337306499481201,
0.23748424649238586,
-1.3280248641967773,
-2.340679407119751,
-0.27892574667930603,
-0.9776278734207153,
0.07604572176933289,
-0.4960009753704071,
-0.9314026236534119,
1.6827058792114258,
0.3433147668838501,
-1.3951969146728516,
-0.2717666029930115,
-0.29834410548210144,
-0.6132844090461731,
2.722595453262329,
-1.4606056213378906,
-0.19028925895690918,
-0.8932318687438965,
-0.5899978876113892,
1.6036115884780884,
-1.186388373374939,
-0.18834972381591797,
-1.0318408012390137,
-0.5987027883529663,
-1.34658682346344,
-0.5463394522666931,
0.03781402111053467,
-0.9254024624824524,
0.848076343536377,
0.25892719626426697,
-1.2005499601364136,
-0.37834155559539795,
-0.8700396418571472,
0.8778921365737915,
-0.06670685112476349,
0.30528149008750916,
1.8842148780822754,
0.4056713879108429,
-0.2910661995410919,
0.6260054707527161,
1.1628293991088867,
0.6770355105400085,
-0.6738699674606323,
0.23597505688667297,
-0.7198936939239502,
0.2689162790775299,
-1.2670587301254272,
0.21728503704071045,
-2.750169038772583,
0.7242914438247681,
-0.058435916900634766,
-0.058545783162117004,
0.0011012079194188118,
-1.232388973236084,
1.1310302019119263,
2.6322052478790283,
-1.1425870656967163,
0.3647509813308716,
0.2961980700492859,
1.1824404001235962,
-1.4604767560958862,
0.26811960339546204,
-0.35274603962898254,
2.150768995285034,
0.2107856422662735,
1.2003467082977295,
-0.4690069258213043,
-2.2407824993133545,
0.5639200806617737,
-1.309552550315857,
-1.141242504119873,
0.7474439144134521,
-0.7795876860618591,
0.010632868856191635,
-1.467769742012024,
-0.16000080108642578,
-0.9567305445671082,
-1.2553527355194092,
0.7720289826393127,
0.12037251144647598,
0.5224493741989136,
-0.6593949198722839,
0.3896014392375946,
-2.0810015201568604,
-1.4203877449035645,
-0.30144065618515015,
-0.9681233167648315,
0.39800626039505005,
-0.259221613407135,
0.7065789103507996,
-0.1566757708787918,
-0.005458650179207325,
0.4154776334762573,
1.4133963584899902,
3.468832492828369,
0.13908179104328156,
0.35412877798080444,
-0.2176375389099121,
-1.0131036043167114,
1.4656734466552734,
0.9485562443733215,
-0.020267538726329803,
-0.5728941559791565,
-1.1092798709869385,
1.1908636093139648,
2.017183780670166,
1.0959107875823975,
0.02369788847863674,
-0.8056882619857788,
-0.6643447279930115,
0.0560639426112175,
0.23877044022083282,
0.49506044387817383,
0.856633186340332,
0.08081350475549698,
0.05609729140996933,
1.4019793272018433,
1.2418675422668457,
-0.38874733448028564,
0.3941490650177002,
-0.7992684841156006,
-0.43813425302505493,
0.5216342806816101,
0.23500117659568787,
0.07744833081960678,
0.34978508949279785,
-1.0560128688812256,
-0.2617838680744171,
-0.36724621057510376,
-1.0138323307037354,
-0.6984319090843201,
-0.4806360602378845,
-0.385480672121048,
1.6664323806762695,
0.0760204866528511,
-0.4189852774143219,
0.03334528207778931,
-0.7570607662200928,
-0.06028372794389725,
-1.0189874172210693,
0.18178370594978333,
-0.18166965246200562,
-0.07859267294406891,
-0.18626664578914642,
1.8863041400909424,
-0.8824597597122192,
-2.0472590923309326,
0.3208506107330322,
0.2415136694908142,
-0.41841956973075867,
0.28151750564575195,
1.5639656782150269,
0.5355834364891052,
1.4345489740371704,
1.3334883451461792,
0.9993878602981567,
-0.6467642784118652,
-1.250493049621582,
0.6858322620391846,
0.9709955453872681,
-1.4171946048736572,
0.8518571257591248,
-0.032490696758031845,
-0.4864470362663269,
0.6662333607673645,
1.287465214729309,
0.33495616912841797,
-2.0319952964782715,
0.7550461888313293,
-0.8783597946166992,
0.7767400145530701,
0.62555330991745,
0.744317889213562,
0.19186285138130188,
0.7272277474403381,
-1.279936671257019,
-1.0958837270736694,
-0.7337115406990051,
-0.5554421544075012,
2.036393642425537,
-0.1133379340171814,
0.5825953483581543,
-0.07061558961868286,
-1.288465142250061,
-0.15994444489479065,
0.6661797165870667,
0.4464631676673889,
-0.4938717782497406,
0.8520339727401733,
-0.6077828407287598,
-1.1298195123672485,
-1.2794641256332397,
-0.511569619178772,
-1.1072319746017456,
-0.888272225856781,
1.1220333576202393,
0.837186872959137,
0.41492295265197754,
1.9007461071014404,
0.6515805125236511,
0.24540847539901733,
-2.6125500202178955,
0.9048367738723755,
0.2560199499130249,
-0.10695075988769531,
0.9067169427871704,
0.32263195514678955,
1.0087556838989258,
-0.12057965248823166,
0.6033689975738525,
-2.400491237640381,
2.3194873332977295,
-0.18404756486415863,
0.6152815818786621,
0.03402169793844223,
-0.21297799050807953,
1.0052152872085571,
0.5796456336975098,
0.457614541053772,
-1.125707745552063,
0.5481314063072205,
-0.6598395705223083,
1.2099006175994873,
0.9419448971748352,
-0.7844159007072449,
0.02209744043648243,
1.283569574356079,
0.5010652542114258,
-0.47014445066452026,
-0.9230931997299194,
-0.8948338627815247,
0.9117380380630493,
1.801803708076477,
-0.18375234305858612,
-0.10250523686408997,
0.9402891993522644,
0.6536785960197449,
-1.268483281135559,
0.06832201778888702,
-0.7910670042037964,
-0.744842529296875,
1.581528663635254,
1.9979443550109863,
-0.09396194666624069,
-0.1766558736562729,
-0.7780930399894714,
-1.2484108209609985,
0.7919967174530029,
0.014526210725307465,
0.23535765707492828,
0.6508433222770691,
-0.6243547797203064,
1.1482646465301514,
0.9529750347137451,
0.9800903797149658,
0.22005654871463776,
0.30708590149879456,
0.37471580505371094,
-0.4059935510158539,
-1.096596598625183,
-0.23577426373958588,
-1.137195348739624,
-2.611802816390991,
0.5913564562797546,
-0.2782893478870392,
-1.41996431350708,
-0.02420705184340477,
-0.9549903273582458,
0.9056093692779541,
-0.5179740786552429,
-1.0408012866973877,
-1.4789882898330688,
0.257064551115036,
-0.11971721798181534,
1.0027337074279785,
-1.702343463897705,
-0.03724316880106926,
1.1790177822113037,
0.9009273648262024,
-0.7120298743247986,
0.9508786201477051,
0.2822231948375702,
1.0088534355163574,
0.8399932384490967,
-0.3280375897884369,
0.4313192367553711,
0.09686242043972015,
-1.2825900316238403,
0.3541010618209839,
1.079534649848938,
0.14296966791152954,
1.3430026769638062,
-0.5421289801597595,
0.06069070100784302,
0.3374970257282257,
-0.445376992225647,
-0.4573069214820862,
-0.5508247017860413,
0.6504705548286438,
0.12758490443229675,
-0.9430293440818787,
0.08855266124010086,
-0.05264536291360855,
-0.1619993895292282,
0.1776682436466217,
-1.4657927751541138,
-0.1997070461511612,
-0.42477089166641235,
-0.43236663937568665,
-1.173729419708252,
-0.08983210474252701,
1.358530879020691,
-0.6495777368545532,
-0.1658162921667099,
0.5255900025367737,
0.29371145367622375,
0.5601081848144531,
0.6061429977416992,
-0.6138760447502136,
-0.46605005860328674,
-0.2623520791530609,
-0.47071442008018494,
0.2845227122306824,
1.3411232233047485,
-0.08268264681100845,
-0.979588508605957,
0.7693447470664978,
-0.39472803473472595,
0.10477279126644135,
1.977353811264038,
0.12613016366958618,
-0.8524681329727173,
0.3584829568862915,
-0.6520794630050659,
1.850548505783081,
1.7553951740264893,
1.2528482675552368,
-0.10875006765127182,
-0.9085472822189331,
0.5619930028915405,
-0.38998863101005554,
-0.390964537858963,
0.8791195154190063,
0.3071935176849365,
-0.22068063914775848,
-1.371367335319519,
0.5930272936820984,
1.3909014463424683,
-0.8335713148117065,
-0.8403719067573547,
0.1773446500301361,
-0.7486754059791565,
1.0426472425460815,
0.6908094882965088,
0.4306252598762512,
0.23344561457633972,
1.5430177450180054,
0.8162618279457092,
-0.4037568271160126,
0.5877788662910461,
0.5480633974075317,
-0.21416497230529785,
-2.0976903438568115,
-1.2496668100357056,
0.2412908673286438,
-0.4898517429828644,
-1.574314832687378,
1.373234510421753,
-1.2094403505325317,
-0.9443042874336243,
0.6130805611610413,
0.060336239635944366,
1.4435533285140991,
0.44192007184028625,
1.5370702743530273,
2.078563690185547,
0.8649643063545227,
0.35132935643196106,
1.3598341941833496,
-0.11257462203502655,
-0.5540562272071838,
1.8562400341033936,
-0.47856444120407104,
0.4962659478187561,
1.1464192867279053,
-0.18942007422447205,
-0.9492638111114502,
-0.8031430840492249,
-1.2280499935150146,
-0.6840875148773193,
1.2341867685317993,
0.024241378530859947,
-1.0994057655334473,
0.24793660640716553,
1.7556267976760864,
0.05956875532865524,
-0.39774057269096375,
0.6675304770469666,
0.3595357835292816,
-0.8372326493263245,
-0.0750265121459961,
-0.8603062629699707,
0.4526679515838623,
-0.22908514738082886,
-0.364675372838974,
0.37995487451553345,
0.4382169842720032,
1.235557198524475,
-0.04382947087287903,
0.15136846899986267,
1.1059918403625488,
-1.3577046394348145,
1.5084177255630493,
-0.55059814453125,
0.2861461341381073,
-2.410964250564575,
1.3881698846817017,
-0.7630034685134888,
1.8901429176330566,
-2.6054816246032715,
0.34528177976608276,
-0.4894116520881653,
-0.5315160751342773,
0.23772335052490234,
-0.380143404006958,
0.14461717009544373,
-0.17565061151981354,
-1.0940884351730347,
-0.06056637316942215,
-0.6931850910186768,
0.5272495746612549,
1.0628223419189453,
1.4284394979476929,
-1.0628823041915894,
-0.3473430275917053,
-1.8303351402282715,
-0.08683867752552032,
-0.5489558577537537,
0.3453209698200226,
-1.994250774383545,
-0.16554386913776398,
-1.8716721534729004,
-2.301985740661621,
-1.4949655532836914,
-0.9239006638526917,
1.1420490741729736,
0.10812153667211533,
-0.8511916995048523,
1.0975265502929688,
-0.32819652557373047,
-1.9556795358657837,
1.0212382078170776,
-2.2175331115722656
] |
https://github.com/huggingface/datasets/issues/5685 | Broken Image render on the hub website | Hi!
You can fix the viewer by adding the `dataset_info` YAML field deleted in https://huggingface.co/datasets/Francesco/cell-towers/commit/b95b59ddd91ebe9c12920f0efe0ed415cd0d4298 back to the metadata section of the card.
To avoid this issue in the feature, you can use `huggingface_hub`'s [RepoCard](https://huggingface.co/docs/huggingface_hub/package_reference/cards) API to update the dataset card instead of `upload_file`:
```python
from huggingface_hub import DatasetCard
# Load card
card = DatasetCard.load("<namespace>/<repo_id>")
# Modify card content
card.content = ...
# Push card to the Hub
card.push_to_hub("<namespace>/<repo_id>")
```
However, the best solution would be to use the features info stored in the header of the Parquet shards generated with `push_to_hub` on the viewer side to avoid unexpected issues such as this one. This shouldn't be too hard to address. | ### Describe the bug
Hi :wave:
Not sure if this is the right place to ask, but I am trying to load a huge amount of datasets on the hub (:partying_face: ) but I am facing a little issue with the `image` type
![image](https://user-images.githubusercontent.com/15908060/228587875-427a37f1-3a31-4e17-8bbe-0f759003910d.png)
See this [dataset](https://huggingface.co/datasets/Francesco/cell-towers), basically for some reason the first image has numerical bytes inside, not sure if that is okay, but the image render feature **doesn't work**
So the dataset is stored in the following way
```python
builder.download_and_prepare(output_dir=str(output_dir))
ds = builder.as_dataset(split="train")
# [NOTE] no idea how to push it from the builder folder
ds.push_to_hub(repo_id=repo_id)
builder.as_dataset(split="validation").push_to_hub(repo_id=repo_id)
ds = builder.as_dataset(split="test")
ds.push_to_hub(repo_id=repo_id)
```
The build is this class
```python
class COCOLikeDatasetBuilder(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0")
def _info(self):
features = datasets.Features(
{
"image_id": datasets.Value("int64"),
"image": datasets.Image(),
"width": datasets.Value("int32"),
"height": datasets.Value("int32"),
"objects": datasets.Sequence(
{
"id": datasets.Value("int64"),
"area": datasets.Value("int64"),
"bbox": datasets.Sequence(
datasets.Value("float32"), length=4
),
"category": datasets.ClassLabel(names=categories),
}
),
}
)
return datasets.DatasetInfo(
description=description,
features=features,
homepage=homepage,
license=license,
citation=citation,
)
def _split_generators(self, dl_manager):
archive = dl_manager.download(url)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"annotation_file_path": "train/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"annotation_file_path": "test/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"annotation_file_path": "valid/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
]
def _generate_examples(self, annotation_file_path, files):
def process_annot(annot, category_id_to_category):
return {
"id": annot["id"],
"area": annot["area"],
"bbox": annot["bbox"],
"category": category_id_to_category[annot["category_id"]],
}
image_id_to_image = {}
idx = 0
# This loop relies on the ordering of the files in the archive:
# Annotation files come first, then the images.
for path, f in files:
file_name = os.path.basename(path)
if annotation_file_path in path:
annotations = json.load(f)
category_id_to_category = {
category["id"]: category["name"]
for category in annotations["categories"]
}
print(category_id_to_category)
image_id_to_annotations = collections.defaultdict(list)
for annot in annotations["annotations"]:
image_id_to_annotations[annot["image_id"]].append(annot)
image_id_to_image = {
annot["file_name"]: annot for annot in annotations["images"]
}
elif file_name in image_id_to_image:
image = image_id_to_image[file_name]
objects = [
process_annot(annot, category_id_to_category)
for annot in image_id_to_annotations[image["id"]]
]
print(file_name)
yield idx, {
"image_id": image["id"],
"image": {"path": path, "bytes": f.read()},
"width": image["width"],
"height": image["height"],
"objects": objects,
}
idx += 1
```
Basically, I want to add to the hub every dataset I come across on coco format
Thanks
Fra
### Steps to reproduce the bug
In this case, you can just navigate on the [dataset](https://huggingface.co/datasets/Francesco/cell-towers)
### Expected behavior
I was expecting the image rendering feature to work
### Environment info
Not a lot to share, I am using `datasets` from a fresh venv | 236 | 111 | Broken Image render on the hub website
### Describe the bug
Hi :wave:
Not sure if this is the right place to ask, but I am trying to load a huge amount of datasets on the hub (:partying_face: ) but I am facing a little issue with the `image` type
![image](https://user-images.githubusercontent.com/15908060/228587875-427a37f1-3a31-4e17-8bbe-0f759003910d.png)
See this [dataset](https://huggingface.co/datasets/Francesco/cell-towers), basically for some reason the first image has numerical bytes inside, not sure if that is okay, but the image render feature **doesn't work**
So the dataset is stored in the following way
```python
builder.download_and_prepare(output_dir=str(output_dir))
ds = builder.as_dataset(split="train")
# [NOTE] no idea how to push it from the builder folder
ds.push_to_hub(repo_id=repo_id)
builder.as_dataset(split="validation").push_to_hub(repo_id=repo_id)
ds = builder.as_dataset(split="test")
ds.push_to_hub(repo_id=repo_id)
```
The build is this class
```python
class COCOLikeDatasetBuilder(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0")
def _info(self):
features = datasets.Features(
{
"image_id": datasets.Value("int64"),
"image": datasets.Image(),
"width": datasets.Value("int32"),
"height": datasets.Value("int32"),
"objects": datasets.Sequence(
{
"id": datasets.Value("int64"),
"area": datasets.Value("int64"),
"bbox": datasets.Sequence(
datasets.Value("float32"), length=4
),
"category": datasets.ClassLabel(names=categories),
}
),
}
)
return datasets.DatasetInfo(
description=description,
features=features,
homepage=homepage,
license=license,
citation=citation,
)
def _split_generators(self, dl_manager):
archive = dl_manager.download(url)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"annotation_file_path": "train/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"annotation_file_path": "test/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"annotation_file_path": "valid/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
]
def _generate_examples(self, annotation_file_path, files):
def process_annot(annot, category_id_to_category):
return {
"id": annot["id"],
"area": annot["area"],
"bbox": annot["bbox"],
"category": category_id_to_category[annot["category_id"]],
}
image_id_to_image = {}
idx = 0
# This loop relies on the ordering of the files in the archive:
# Annotation files come first, then the images.
for path, f in files:
file_name = os.path.basename(path)
if annotation_file_path in path:
annotations = json.load(f)
category_id_to_category = {
category["id"]: category["name"]
for category in annotations["categories"]
}
print(category_id_to_category)
image_id_to_annotations = collections.defaultdict(list)
for annot in annotations["annotations"]:
image_id_to_annotations[annot["image_id"]].append(annot)
image_id_to_image = {
annot["file_name"]: annot for annot in annotations["images"]
}
elif file_name in image_id_to_image:
image = image_id_to_image[file_name]
objects = [
process_annot(annot, category_id_to_category)
for annot in image_id_to_annotations[image["id"]]
]
print(file_name)
yield idx, {
"image_id": image["id"],
"image": {"path": path, "bytes": f.read()},
"width": image["width"],
"height": image["height"],
"objects": objects,
}
idx += 1
```
Basically, I want to add to the hub every dataset I come across on coco format
Thanks
Fra
### Steps to reproduce the bug
In this case, you can just navigate on the [dataset](https://huggingface.co/datasets/Francesco/cell-towers)
### Expected behavior
I was expecting the image rendering feature to work
### Environment info
Not a lot to share, I am using `datasets` from a fresh venv
Hi!
You can fix the viewer by adding the `dataset_info` YAML field deleted in https://huggingface.co/datasets/Francesco/cell-towers/commit/b95b59ddd91ebe9c12920f0efe0ed415cd0d4298 back to the metadata section of the card.
To avoid this issue in the feature, you can use `huggingface_hub`'s [RepoCard](https://huggingface.co/docs/huggingface_hub/package_reference/cards) API to update the dataset card instead of `upload_file`:
```python
from huggingface_hub import DatasetCard
# Load card
card = DatasetCard.load("<namespace>/<repo_id>")
# Modify card content
card.content = ...
# Push card to the Hub
card.push_to_hub("<namespace>/<repo_id>")
```
However, the best solution would be to use the features info stored in the header of the Parquet shards generated with `push_to_hub` on the viewer side to avoid unexpected issues such as this one. This shouldn't be too hard to address. | [
-1.260399341583252,
-0.9592416286468506,
-0.6892937421798706,
1.4396061897277832,
-0.199323371052742,
-1.2824523448944092,
0.11736372113227844,
-1.076279878616333,
1.6392343044281006,
-0.7654402256011963,
0.31736984848976135,
-1.6271332502365112,
-0.0012400783598423004,
-0.5705572366714478,
-0.7701162099838257,
-0.9026494026184082,
-0.48873165249824524,
-0.7129824161529541,
1.086520791053772,
2.5576863288879395,
1.3020870685577393,
-1.3537828922271729,
2.774867534637451,
0.7186011672019958,
-0.10019192099571228,
-1.005993127822876,
0.5407041311264038,
0.025714583694934845,
-1.3137134313583374,
-0.41968682408332825,
-0.9484176635742188,
-0.17623744904994965,
-0.4830520749092102,
-0.5344994068145752,
-0.000493188388645649,
0.46165069937705994,
-0.3570637106895447,
-0.47568008303642273,
-0.6680760979652405,
-0.7227172255516052,
0.4986933767795563,
-0.3640696108341217,
0.9652113914489746,
-0.37358078360557556,
1.8335826396942139,
-0.6025798320770264,
0.5119863152503967,
0.671891450881958,
1.3682646751403809,
0.26005861163139343,
-0.055451761931180954,
0.4242731034755707,
0.345784991979599,
0.0018602656200528145,
0.5341978669166565,
1.2206281423568726,
0.6710600852966309,
0.48182833194732666,
0.7691001296043396,
-2.1912622451782227,
1.2615680694580078,
-1.069474458694458,
0.24344860017299652,
1.4391218423843384,
-0.902766227722168,
0.2710348665714264,
-1.7708497047424316,
-0.11184285581111908,
0.5512692928314209,
-2.221134662628174,
0.290483683347702,
-1.3150771856307983,
-0.48901671171188354,
1.078498125076294,
0.43960776925086975,
-1.1670562028884888,
0.13725227117538452,
-0.40199214220046997,
0.9663348197937012,
0.388309508562088,
1.1481096744537354,
-1.6304779052734375,
-0.04260551556944847,
-0.21101710200309753,
0.09453679621219635,
-1.2033878564834595,
-1.5394728183746338,
0.5471023917198181,
0.5340785384178162,
0.6214796900749207,
-0.13753370940685272,
1.026045799255371,
-1.0157045125961304,
0.7589956521987915,
-1.0166150331497192,
-1.6749323606491089,
-1.5071580410003662,
-2.3064002990722656,
-2.2500457763671875,
0.7547853589057922,
-0.45388299226760864,
-0.5594680309295654,
2.038238048553467,
-1.0518633127212524,
-1.6613104343414307,
1.1251684427261353,
0.3063291907310486,
0.06726562976837158,
2.429201364517212,
0.20603661239147186,
-0.7194097638130188,
0.5559632778167725,
-0.7175731658935547,
0.7307648062705994,
-0.2663787007331848,
1.3653613328933716,
0.45408356189727783,
-1.0848908424377441,
1.543957233428955,
-0.34614098072052,
0.6345014572143555,
-0.5568262934684753,
-0.485934853553772,
-0.7543897032737732,
0.3475148677825928,
1.8033884763717651,
-0.27760881185531616,
1.5652227401733398,
-0.33446913957595825,
-1.5846246480941772,
-1.6528400182724,
0.8663046360015869,
0.5654115080833435,
-0.7286656498908997,
0.026590220630168915,
-0.4228707253932953,
0.11784286797046661,
0.0007430762052536011,
1.196714162826538,
1.2829020023345947,
0.7701329588890076,
-0.40345099568367004,
-0.8040708303451538,
0.11246226727962494,
0.06851251423358917,
-0.7707400918006897,
-1.6461457014083862,
-0.3218447268009186,
0.2011377513408661,
0.5494166612625122,
-1.1953036785125732,
1.7226219177246094,
0.9619795083999634,
1.8506771326065063,
1.0092899799346924,
-0.2852106988430023,
1.4905750751495361,
0.058303575962781906,
1.7891672849655151,
-0.530018150806427,
0.544505774974823,
-0.2613944411277771,
-1.1702706813812256,
0.8064011931419373,
-0.3107755184173584,
-2.15834641456604,
-0.8629260063171387,
-0.7122615575790405,
-0.1640283465385437,
-0.7214130163192749,
0.9414505958557129,
-0.3198545575141907,
-1.3897677659988403,
0.1725664585828781,
-0.7793625593185425,
0.014382965862751007,
-1.219259262084961,
0.3204415440559387,
0.6886922717094421,
-0.6565076112747192,
0.03076469525694847,
-0.14223822951316833,
-1.2257986068725586,
-0.39858341217041016,
0.261941522359848,
1.9060224294662476,
-0.7788057327270508,
0.904983639717102,
1.0452474355697632,
-0.6861147880554199,
0.05232933908700943,
0.2692298889160156,
-0.3355506360530853,
0.8587195873260498,
-1.005853295326233,
-0.4375663101673126,
1.1723545789718628,
-0.13703186810016632,
-0.6255583167076111,
1.45232093334198,
0.674070417881012,
-0.9881941676139832,
-0.2555345296859741,
-0.08788052201271057,
-0.8961532115936279,
-0.0027833692729473114,
-1.5410065650939941,
-0.10563506186008453,
0.40595147013664246,
-1.5389704704284668,
-0.4383581876754761,
-0.1709212064743042,
1.3156929016113281,
-0.20416392385959625,
1.3999042510986328,
-0.4123871922492981,
-0.20697343349456787,
-0.3370034396648407,
-0.38686874508857727,
0.13607382774353027,
-0.2400246560573578,
-0.5983660817146301,
0.20188243687152863,
-0.8196533918380737,
0.35969844460487366,
1.460082769393921,
0.4500220715999603,
0.07900397479534149,
0.510572612285614,
1.1066904067993164,
0.45232391357421875,
-0.09035199880599976,
-0.8077258467674255,
-1.6227874755859375,
2.0087013244628906,
-1.3635845184326172,
2.010601282119751,
0.7498723864555359,
-0.0634656548500061,
-1.7755060195922852,
-1.9566655158996582,
1.292266607284546,
1.1575819253921509,
2.4072377681732178,
0.4557875692844391,
0.37752997875213623,
-0.8228065967559814,
-0.7375537157058716,
0.3573939800262451,
-1.0042955875396729,
-0.6461715698242188,
0.13554023206233978,
2.371220827102661,
1.8224475383758545,
-0.441652774810791,
-0.21824206411838531,
-1.0675369501113892,
1.4240283966064453,
-0.1821357011795044,
0.19911205768585205,
1.9821077585220337,
-0.2040226012468338,
-1.047621726989746,
1.425175428390503,
-2.238358974456787,
0.1469155102968216,
1.9806681871414185,
0.2984195053577423,
0.08895106613636017,
-1.3836387395858765,
-0.6400675773620605,
-0.3206632137298584,
-0.46605512499809265,
-1.2757880687713623,
0.500839352607727,
-0.27601173520088196,
-0.8194283246994019,
-1.3768771886825562,
0.07111628353595734,
-1.203864574432373,
-1.6838722229003906,
0.2853592038154602,
1.807101845741272,
2.0489139556884766,
-0.7211422920227051,
1.5187848806381226,
-0.3113081455230713,
0.11415383219718933,
1.17251455783844,
1.2885738611221313,
3.081026077270508,
1.8108292818069458,
-1.3273040056228638,
0.6509962677955627,
-0.13142545521259308,
-0.4821135997772217,
1.1578478813171387,
-1.257498860359192,
1.3212370872497559,
-0.0925011932849884,
-1.1815739870071411,
-1.1547563076019287,
0.961427628993988,
0.4601578116416931,
0.07801058888435364,
-0.47156015038490295,
1.1135118007659912,
0.0813220888376236,
1.3318880796432495,
0.6020512580871582,
-0.35186901688575745,
0.6979941725730896,
-0.3620676100254059,
-0.5239015221595764,
1.4329642057418823,
0.22497180104255676,
-1.4504222869873047,
-2.2713723182678223,
-0.1752254217863083,
-0.887488067150116,
0.03943777084350586,
-0.617794394493103,
-0.9691308736801147,
1.7202274799346924,
0.3043462932109833,
-1.2809476852416992,
-0.22106075286865234,
-0.36414000391960144,
-0.5295931696891785,
2.7511003017425537,
-1.3287756443023682,
-0.15122807025909424,
-0.989203691482544,
-0.7131417989730835,
1.623496413230896,
-1.1118861436843872,
-0.2174433022737503,
-1.0409786701202393,
-0.585182249546051,
-1.2814953327178955,
-0.613595724105835,
0.09857779741287231,
-0.937959611415863,
0.8899067044258118,
0.12654225528240204,
-1.1866439580917358,
-0.3508777618408203,
-0.8610464334487915,
0.9591038227081299,
-0.1757538616657257,
0.12743517756462097,
1.9811562299728394,
0.36064860224723816,
-0.3624431788921356,
0.7145547866821289,
1.201334834098816,
0.5928163528442383,
-0.6044628024101257,
0.19886493682861328,
-0.7064276933670044,
0.3029109537601471,
-1.294000506401062,
0.23033204674720764,
-2.8004133701324463,
0.6355035305023193,
-0.05880305543541908,
-0.046227164566516876,
0.012268001213669777,
-1.2857502698898315,
1.109522819519043,
2.605797529220581,
-1.241288661956787,
0.491767555475235,
0.34872376918792725,
1.075608491897583,
-1.6608628034591675,
0.2768911123275757,
-0.46477070450782776,
2.0080504417419434,
0.29853278398513794,
1.1643834114074707,
-0.4827418029308319,
-2.171271562576294,
0.7058562636375427,
-1.3593482971191406,
-1.1942524909973145,
0.732501745223999,
-0.9886094927787781,
0.27232465147972107,
-1.4525245428085327,
-0.22493280470371246,
-0.8562237024307251,
-1.1696972846984863,
0.6262621283531189,
0.14196191728115082,
0.3919169008731842,
-0.4750876724720001,
0.3305443227291107,
-2.249440908432007,
-1.3554489612579346,
-0.2425813525915146,
-0.9668787717819214,
0.559877872467041,
-0.40218138694763184,
0.7106112837791443,
-0.1859591156244278,
-0.024483220651745796,
0.4200040102005005,
1.4068143367767334,
3.381258010864258,
0.187653586268425,
0.22799131274223328,
-0.2188871204853058,
-0.9874261617660522,
1.5455431938171387,
0.8740884065628052,
-0.0732029378414154,
-0.574587881565094,
-1.0853395462036133,
1.2714682817459106,
1.9033957719802856,
1.0927042961120605,
-0.03726009279489517,
-0.89729243516922,
-0.7357730269432068,
0.016097569838166237,
0.1553613543510437,
0.4016243815422058,
0.9427359700202942,
0.000053396448493003845,
0.06276008486747742,
1.499475359916687,
1.1730393171310425,
-0.3923197090625763,
0.2896091043949127,
-0.837766170501709,
-0.5287309288978577,
0.5129219889640808,
0.2170601189136505,
0.015647340565919876,
0.46877095103263855,
-1.0352691411972046,
-0.24954816699028015,
-0.43401291966438293,
-0.8893124461174011,
-0.6429539322853088,
-0.4497424066066742,
-0.4558981657028198,
1.6029682159423828,
0.10711032152175903,
-0.5036331415176392,
-0.07633726298809052,
-0.8072159886360168,
-0.17621566355228424,
-1.0795655250549316,
0.3294115662574768,
-0.0839678943157196,
-0.1483585685491562,
-0.20519791543483734,
1.670541524887085,
-0.9139522910118103,
-2.0908608436584473,
0.23009848594665527,
0.23454244434833527,
-0.27100661396980286,
0.19363923370838165,
1.6183806657791138,
0.5861950516700745,
1.4178009033203125,
1.3575626611709595,
0.8837860822677612,
-0.6260912418365479,
-1.3077336549758911,
0.674018144607544,
0.9988508820533752,
-1.3662976026535034,
0.8358403444290161,
-0.10098373889923096,
-0.5011560916900635,
0.5859549641609192,
1.2999615669250488,
0.5254088044166565,
-1.94583261013031,
0.8452903628349304,
-0.8909475207328796,
0.781272828578949,
0.6545529365539551,
0.6569944620132446,
0.1471778154373169,
0.7861687541007996,
-1.1636550426483154,
-1.1473015546798706,
-0.7242206335067749,
-0.6602673530578613,
1.983254075050354,
-0.2935961186885834,
0.6424792408943176,
-0.2925107777118683,
-1.2683521509170532,
-0.05296952277421951,
0.668280303478241,
0.319216251373291,
-0.5201894640922546,
0.8461421728134155,
-0.5982316136360168,
-1.070352554321289,
-1.328417181968689,
-0.31292837858200073,
-1.0696934461593628,
-0.8550617694854736,
1.1070717573165894,
0.7487340569496155,
0.31826251745224,
1.8637276887893677,
0.682015597820282,
0.32546988129615784,
-2.628894090652466,
0.8465744853019714,
0.24984212219715118,
-0.01926826499402523,
0.877926766872406,
0.3015977442264557,
0.9845708012580872,
-0.08252213895320892,
0.5444695353507996,
-2.4019997119903564,
2.267728567123413,
-0.1857932060956955,
0.7223250269889832,
0.002867278642952442,
-0.20708908140659332,
1.1232162714004517,
0.6078608632087708,
0.5226272344589233,
-1.0676196813583374,
0.6002482175827026,
-0.46922093629837036,
1.206459879875183,
0.8952966928482056,
-0.8068668842315674,
-0.027239985764026642,
1.3948289155960083,
0.4896552860736847,
-0.47545236349105835,
-0.9546162486076355,
-0.9016656875610352,
1.0314561128616333,
1.711413025856018,
-0.030075596645474434,
0.02294858917593956,
0.8915608525276184,
0.6627474427223206,
-1.238593339920044,
-0.013695110566914082,
-0.7110962271690369,
-0.6458730101585388,
1.7011241912841797,
2.1402621269226074,
-0.1285219043493271,
-0.26246196031570435,
-0.6221569180488586,
-1.28977632522583,
0.8280656933784485,
-0.057432543486356735,
0.2347865253686905,
0.6057508587837219,
-0.5830343961715698,
1.1275588274002075,
0.9145122170448303,
0.9646850824356079,
0.12688708305358887,
0.25868040323257446,
0.36752137541770935,
-0.27533629536628723,
-1.180930495262146,
-0.24725888669490814,
-1.0145390033721924,
-2.4882965087890625,
0.44118690490722656,
-0.24972356855869293,
-1.4328999519348145,
0.028787508606910706,
-1.060504674911499,
0.956684410572052,
-0.5317606329917908,
-1.0428338050842285,
-1.5406138896942139,
0.19786471128463745,
-0.010309177450835705,
0.9778928756713867,
-1.617086410522461,
-0.2374589443206787,
1.1928237676620483,
0.8768793940544128,
-0.7068021297454834,
0.8903139233589172,
0.220840722322464,
1.0262770652770996,
0.7870610952377319,
-0.4198148250579834,
0.4829387366771698,
0.04842175170779228,
-1.4031609296798706,
0.41217800974845886,
1.1819078922271729,
0.17498452961444855,
1.5229021310806274,
-0.4842278063297272,
0.10482437908649445,
0.40219593048095703,
-0.6359474658966064,
-0.4921801686286926,
-0.5174815654754639,
0.6660050749778748,
-0.004799071699380875,
-0.9176906943321228,
-0.08774203062057495,
-0.03680727258324623,
-0.31580957770347595,
0.14126449823379517,
-1.4487611055374146,
-0.1517830640077591,
-0.3733261823654175,
-0.6524843573570251,
-1.1827600002288818,
-0.18707367777824402,
1.3499548435211182,
-0.8811333179473877,
-0.1915830373764038,
0.48968836665153503,
0.2694304585456848,
0.5988306999206543,
0.6409637928009033,
-0.70030677318573,
-0.2574000060558319,
-0.2582102119922638,
-0.40986114740371704,
0.24997760355472565,
1.364648461341858,
-0.10104678571224213,
-0.9852184057235718,
0.718537449836731,
-0.36340564489364624,
0.0640200525522232,
1.9401780366897583,
0.011540230363607407,
-0.7164012789726257,
0.3183887302875519,
-0.6784110069274902,
1.839011788368225,
1.7276688814163208,
1.4136536121368408,
-0.17262808978557587,
-0.9312758445739746,
0.5915522575378418,
-0.3415004014968872,
-0.35029950737953186,
0.8402546048164368,
0.35835564136505127,
-0.2141282856464386,
-1.4551620483398438,
0.7627547979354858,
1.2265697717666626,
-0.9007294178009033,
-0.7110778093338013,
0.11798405647277832,
-0.8777617812156677,
1.1187206506729126,
0.5504016280174255,
0.32066866755485535,
0.3380201756954193,
1.6359301805496216,
0.7547942399978638,
-0.40222883224487305,
0.4142896234989166,
0.6594210863113403,
-0.19909246265888214,
-2.1087794303894043,
-1.092174768447876,
0.3829866945743561,
-0.5476520657539368,
-1.5814543962478638,
1.300746202468872,
-1.1791090965270996,
-1.0494070053100586,
0.6025732755661011,
0.06061543896794319,
1.4157222509384155,
0.3810167610645294,
1.636767864227295,
2.1105659008026123,
0.948305070400238,
0.4199618995189667,
1.2606998682022095,
-0.07061721384525299,
-0.3835688829421997,
1.7798047065734863,
-0.3492853343486786,
0.5197632312774658,
1.0553381443023682,
-0.3261425495147705,
-1.1570475101470947,
-0.728271484375,
-1.243353009223938,
-0.839093029499054,
1.2259232997894287,
0.09658129513263702,
-1.0937635898590088,
0.21303457021713257,
1.6280665397644043,
0.10002538561820984,
-0.2933720350265503,
0.6184446811676025,
0.4001285135746002,
-0.7783439755439758,
-0.07754789292812347,
-0.9189811944961548,
0.4737730026245117,
-0.22685106098651886,
-0.4072131812572479,
0.2445870190858841,
0.47475069761276245,
1.3634742498397827,
-0.13929101824760437,
0.12471531331539154,
1.0876878499984741,
-1.3829790353775024,
1.5500034093856812,
-0.7064263224601746,
0.2481532245874405,
-2.400993585586548,
1.4325813055038452,
-0.7875500917434692,
1.944427490234375,
-2.6560287475585938,
0.5263097882270813,
-0.5379233360290527,
-0.43542709946632385,
0.2730534076690674,
-0.3972722589969635,
0.07173003256320953,
-0.0680287703871727,
-1.1295249462127686,
-0.07707288861274719,
-0.6331595182418823,
0.667037308216095,
1.186553955078125,
1.3658744096755981,
-1.1780709028244019,
-0.39809343218803406,
-1.7418338060379028,
-0.19928497076034546,
-0.8199217915534973,
0.23231299221515656,
-1.980726957321167,
-0.16480855643749237,
-1.8825175762176514,
-2.4001009464263916,
-1.261512041091919,
-0.8359975218772888,
1.1829735040664673,
0.1863320916891098,
-0.8967440724372864,
1.220369815826416,
-0.42839953303337097,
-1.9495353698730469,
1.156984567642212,
-2.2343475818634033
] |
https://github.com/huggingface/datasets/issues/5685 | Broken Image render on the hub website | Thanks for reporting @FrancescoSaverioZuppichini.
For future issues with your specific dataset, you can use its "Community" tab to start a conversation: https://huggingface.co/datasets/Francesco/cell-towers/discussions/new | ### Describe the bug
Hi :wave:
Not sure if this is the right place to ask, but I am trying to load a huge amount of datasets on the hub (:partying_face: ) but I am facing a little issue with the `image` type
![image](https://user-images.githubusercontent.com/15908060/228587875-427a37f1-3a31-4e17-8bbe-0f759003910d.png)
See this [dataset](https://huggingface.co/datasets/Francesco/cell-towers), basically for some reason the first image has numerical bytes inside, not sure if that is okay, but the image render feature **doesn't work**
So the dataset is stored in the following way
```python
builder.download_and_prepare(output_dir=str(output_dir))
ds = builder.as_dataset(split="train")
# [NOTE] no idea how to push it from the builder folder
ds.push_to_hub(repo_id=repo_id)
builder.as_dataset(split="validation").push_to_hub(repo_id=repo_id)
ds = builder.as_dataset(split="test")
ds.push_to_hub(repo_id=repo_id)
```
The build is this class
```python
class COCOLikeDatasetBuilder(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0")
def _info(self):
features = datasets.Features(
{
"image_id": datasets.Value("int64"),
"image": datasets.Image(),
"width": datasets.Value("int32"),
"height": datasets.Value("int32"),
"objects": datasets.Sequence(
{
"id": datasets.Value("int64"),
"area": datasets.Value("int64"),
"bbox": datasets.Sequence(
datasets.Value("float32"), length=4
),
"category": datasets.ClassLabel(names=categories),
}
),
}
)
return datasets.DatasetInfo(
description=description,
features=features,
homepage=homepage,
license=license,
citation=citation,
)
def _split_generators(self, dl_manager):
archive = dl_manager.download(url)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"annotation_file_path": "train/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"annotation_file_path": "test/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"annotation_file_path": "valid/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
]
def _generate_examples(self, annotation_file_path, files):
def process_annot(annot, category_id_to_category):
return {
"id": annot["id"],
"area": annot["area"],
"bbox": annot["bbox"],
"category": category_id_to_category[annot["category_id"]],
}
image_id_to_image = {}
idx = 0
# This loop relies on the ordering of the files in the archive:
# Annotation files come first, then the images.
for path, f in files:
file_name = os.path.basename(path)
if annotation_file_path in path:
annotations = json.load(f)
category_id_to_category = {
category["id"]: category["name"]
for category in annotations["categories"]
}
print(category_id_to_category)
image_id_to_annotations = collections.defaultdict(list)
for annot in annotations["annotations"]:
image_id_to_annotations[annot["image_id"]].append(annot)
image_id_to_image = {
annot["file_name"]: annot for annot in annotations["images"]
}
elif file_name in image_id_to_image:
image = image_id_to_image[file_name]
objects = [
process_annot(annot, category_id_to_category)
for annot in image_id_to_annotations[image["id"]]
]
print(file_name)
yield idx, {
"image_id": image["id"],
"image": {"path": path, "bytes": f.read()},
"width": image["width"],
"height": image["height"],
"objects": objects,
}
idx += 1
```
Basically, I want to add to the hub every dataset I come across on coco format
Thanks
Fra
### Steps to reproduce the bug
In this case, you can just navigate on the [dataset](https://huggingface.co/datasets/Francesco/cell-towers)
### Expected behavior
I was expecting the image rendering feature to work
### Environment info
Not a lot to share, I am using `datasets` from a fresh venv | 236 | 22 | Broken Image render on the hub website
### Describe the bug
Hi :wave:
Not sure if this is the right place to ask, but I am trying to load a huge amount of datasets on the hub (:partying_face: ) but I am facing a little issue with the `image` type
![image](https://user-images.githubusercontent.com/15908060/228587875-427a37f1-3a31-4e17-8bbe-0f759003910d.png)
See this [dataset](https://huggingface.co/datasets/Francesco/cell-towers), basically for some reason the first image has numerical bytes inside, not sure if that is okay, but the image render feature **doesn't work**
So the dataset is stored in the following way
```python
builder.download_and_prepare(output_dir=str(output_dir))
ds = builder.as_dataset(split="train")
# [NOTE] no idea how to push it from the builder folder
ds.push_to_hub(repo_id=repo_id)
builder.as_dataset(split="validation").push_to_hub(repo_id=repo_id)
ds = builder.as_dataset(split="test")
ds.push_to_hub(repo_id=repo_id)
```
The build is this class
```python
class COCOLikeDatasetBuilder(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0")
def _info(self):
features = datasets.Features(
{
"image_id": datasets.Value("int64"),
"image": datasets.Image(),
"width": datasets.Value("int32"),
"height": datasets.Value("int32"),
"objects": datasets.Sequence(
{
"id": datasets.Value("int64"),
"area": datasets.Value("int64"),
"bbox": datasets.Sequence(
datasets.Value("float32"), length=4
),
"category": datasets.ClassLabel(names=categories),
}
),
}
)
return datasets.DatasetInfo(
description=description,
features=features,
homepage=homepage,
license=license,
citation=citation,
)
def _split_generators(self, dl_manager):
archive = dl_manager.download(url)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"annotation_file_path": "train/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"annotation_file_path": "test/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"annotation_file_path": "valid/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
]
def _generate_examples(self, annotation_file_path, files):
def process_annot(annot, category_id_to_category):
return {
"id": annot["id"],
"area": annot["area"],
"bbox": annot["bbox"],
"category": category_id_to_category[annot["category_id"]],
}
image_id_to_image = {}
idx = 0
# This loop relies on the ordering of the files in the archive:
# Annotation files come first, then the images.
for path, f in files:
file_name = os.path.basename(path)
if annotation_file_path in path:
annotations = json.load(f)
category_id_to_category = {
category["id"]: category["name"]
for category in annotations["categories"]
}
print(category_id_to_category)
image_id_to_annotations = collections.defaultdict(list)
for annot in annotations["annotations"]:
image_id_to_annotations[annot["image_id"]].append(annot)
image_id_to_image = {
annot["file_name"]: annot for annot in annotations["images"]
}
elif file_name in image_id_to_image:
image = image_id_to_image[file_name]
objects = [
process_annot(annot, category_id_to_category)
for annot in image_id_to_annotations[image["id"]]
]
print(file_name)
yield idx, {
"image_id": image["id"],
"image": {"path": path, "bytes": f.read()},
"width": image["width"],
"height": image["height"],
"objects": objects,
}
idx += 1
```
Basically, I want to add to the hub every dataset I come across on coco format
Thanks
Fra
### Steps to reproduce the bug
In this case, you can just navigate on the [dataset](https://huggingface.co/datasets/Francesco/cell-towers)
### Expected behavior
I was expecting the image rendering feature to work
### Environment info
Not a lot to share, I am using `datasets` from a fresh venv
Thanks for reporting @FrancescoSaverioZuppichini.
For future issues with your specific dataset, you can use its "Community" tab to start a conversation: https://huggingface.co/datasets/Francesco/cell-towers/discussions/new | [
-1.260399341583252,
-0.9592416286468506,
-0.6892937421798706,
1.4396061897277832,
-0.199323371052742,
-1.2824523448944092,
0.11736372113227844,
-1.076279878616333,
1.6392343044281006,
-0.7654402256011963,
0.31736984848976135,
-1.6271332502365112,
-0.0012400783598423004,
-0.5705572366714478,
-0.7701162099838257,
-0.9026494026184082,
-0.48873165249824524,
-0.7129824161529541,
1.086520791053772,
2.5576863288879395,
1.3020870685577393,
-1.3537828922271729,
2.774867534637451,
0.7186011672019958,
-0.10019192099571228,
-1.005993127822876,
0.5407041311264038,
0.025714583694934845,
-1.3137134313583374,
-0.41968682408332825,
-0.9484176635742188,
-0.17623744904994965,
-0.4830520749092102,
-0.5344994068145752,
-0.000493188388645649,
0.46165069937705994,
-0.3570637106895447,
-0.47568008303642273,
-0.6680760979652405,
-0.7227172255516052,
0.4986933767795563,
-0.3640696108341217,
0.9652113914489746,
-0.37358078360557556,
1.8335826396942139,
-0.6025798320770264,
0.5119863152503967,
0.671891450881958,
1.3682646751403809,
0.26005861163139343,
-0.055451761931180954,
0.4242731034755707,
0.345784991979599,
0.0018602656200528145,
0.5341978669166565,
1.2206281423568726,
0.6710600852966309,
0.48182833194732666,
0.7691001296043396,
-2.1912622451782227,
1.2615680694580078,
-1.069474458694458,
0.24344860017299652,
1.4391218423843384,
-0.902766227722168,
0.2710348665714264,
-1.7708497047424316,
-0.11184285581111908,
0.5512692928314209,
-2.221134662628174,
0.290483683347702,
-1.3150771856307983,
-0.48901671171188354,
1.078498125076294,
0.43960776925086975,
-1.1670562028884888,
0.13725227117538452,
-0.40199214220046997,
0.9663348197937012,
0.388309508562088,
1.1481096744537354,
-1.6304779052734375,
-0.04260551556944847,
-0.21101710200309753,
0.09453679621219635,
-1.2033878564834595,
-1.5394728183746338,
0.5471023917198181,
0.5340785384178162,
0.6214796900749207,
-0.13753370940685272,
1.026045799255371,
-1.0157045125961304,
0.7589956521987915,
-1.0166150331497192,
-1.6749323606491089,
-1.5071580410003662,
-2.3064002990722656,
-2.2500457763671875,
0.7547853589057922,
-0.45388299226760864,
-0.5594680309295654,
2.038238048553467,
-1.0518633127212524,
-1.6613104343414307,
1.1251684427261353,
0.3063291907310486,
0.06726562976837158,
2.429201364517212,
0.20603661239147186,
-0.7194097638130188,
0.5559632778167725,
-0.7175731658935547,
0.7307648062705994,
-0.2663787007331848,
1.3653613328933716,
0.45408356189727783,
-1.0848908424377441,
1.543957233428955,
-0.34614098072052,
0.6345014572143555,
-0.5568262934684753,
-0.485934853553772,
-0.7543897032737732,
0.3475148677825928,
1.8033884763717651,
-0.27760881185531616,
1.5652227401733398,
-0.33446913957595825,
-1.5846246480941772,
-1.6528400182724,
0.8663046360015869,
0.5654115080833435,
-0.7286656498908997,
0.026590220630168915,
-0.4228707253932953,
0.11784286797046661,
0.0007430762052536011,
1.196714162826538,
1.2829020023345947,
0.7701329588890076,
-0.40345099568367004,
-0.8040708303451538,
0.11246226727962494,
0.06851251423358917,
-0.7707400918006897,
-1.6461457014083862,
-0.3218447268009186,
0.2011377513408661,
0.5494166612625122,
-1.1953036785125732,
1.7226219177246094,
0.9619795083999634,
1.8506771326065063,
1.0092899799346924,
-0.2852106988430023,
1.4905750751495361,
0.058303575962781906,
1.7891672849655151,
-0.530018150806427,
0.544505774974823,
-0.2613944411277771,
-1.1702706813812256,
0.8064011931419373,
-0.3107755184173584,
-2.15834641456604,
-0.8629260063171387,
-0.7122615575790405,
-0.1640283465385437,
-0.7214130163192749,
0.9414505958557129,
-0.3198545575141907,
-1.3897677659988403,
0.1725664585828781,
-0.7793625593185425,
0.014382965862751007,
-1.219259262084961,
0.3204415440559387,
0.6886922717094421,
-0.6565076112747192,
0.03076469525694847,
-0.14223822951316833,
-1.2257986068725586,
-0.39858341217041016,
0.261941522359848,
1.9060224294662476,
-0.7788057327270508,
0.904983639717102,
1.0452474355697632,
-0.6861147880554199,
0.05232933908700943,
0.2692298889160156,
-0.3355506360530853,
0.8587195873260498,
-1.005853295326233,
-0.4375663101673126,
1.1723545789718628,
-0.13703186810016632,
-0.6255583167076111,
1.45232093334198,
0.674070417881012,
-0.9881941676139832,
-0.2555345296859741,
-0.08788052201271057,
-0.8961532115936279,
-0.0027833692729473114,
-1.5410065650939941,
-0.10563506186008453,
0.40595147013664246,
-1.5389704704284668,
-0.4383581876754761,
-0.1709212064743042,
1.3156929016113281,
-0.20416392385959625,
1.3999042510986328,
-0.4123871922492981,
-0.20697343349456787,
-0.3370034396648407,
-0.38686874508857727,
0.13607382774353027,
-0.2400246560573578,
-0.5983660817146301,
0.20188243687152863,
-0.8196533918380737,
0.35969844460487366,
1.460082769393921,
0.4500220715999603,
0.07900397479534149,
0.510572612285614,
1.1066904067993164,
0.45232391357421875,
-0.09035199880599976,
-0.8077258467674255,
-1.6227874755859375,
2.0087013244628906,
-1.3635845184326172,
2.010601282119751,
0.7498723864555359,
-0.0634656548500061,
-1.7755060195922852,
-1.9566655158996582,
1.292266607284546,
1.1575819253921509,
2.4072377681732178,
0.4557875692844391,
0.37752997875213623,
-0.8228065967559814,
-0.7375537157058716,
0.3573939800262451,
-1.0042955875396729,
-0.6461715698242188,
0.13554023206233978,
2.371220827102661,
1.8224475383758545,
-0.441652774810791,
-0.21824206411838531,
-1.0675369501113892,
1.4240283966064453,
-0.1821357011795044,
0.19911205768585205,
1.9821077585220337,
-0.2040226012468338,
-1.047621726989746,
1.425175428390503,
-2.238358974456787,
0.1469155102968216,
1.9806681871414185,
0.2984195053577423,
0.08895106613636017,
-1.3836387395858765,
-0.6400675773620605,
-0.3206632137298584,
-0.46605512499809265,
-1.2757880687713623,
0.500839352607727,
-0.27601173520088196,
-0.8194283246994019,
-1.3768771886825562,
0.07111628353595734,
-1.203864574432373,
-1.6838722229003906,
0.2853592038154602,
1.807101845741272,
2.0489139556884766,
-0.7211422920227051,
1.5187848806381226,
-0.3113081455230713,
0.11415383219718933,
1.17251455783844,
1.2885738611221313,
3.081026077270508,
1.8108292818069458,
-1.3273040056228638,
0.6509962677955627,
-0.13142545521259308,
-0.4821135997772217,
1.1578478813171387,
-1.257498860359192,
1.3212370872497559,
-0.0925011932849884,
-1.1815739870071411,
-1.1547563076019287,
0.961427628993988,
0.4601578116416931,
0.07801058888435364,
-0.47156015038490295,
1.1135118007659912,
0.0813220888376236,
1.3318880796432495,
0.6020512580871582,
-0.35186901688575745,
0.6979941725730896,
-0.3620676100254059,
-0.5239015221595764,
1.4329642057418823,
0.22497180104255676,
-1.4504222869873047,
-2.2713723182678223,
-0.1752254217863083,
-0.887488067150116,
0.03943777084350586,
-0.617794394493103,
-0.9691308736801147,
1.7202274799346924,
0.3043462932109833,
-1.2809476852416992,
-0.22106075286865234,
-0.36414000391960144,
-0.5295931696891785,
2.7511003017425537,
-1.3287756443023682,
-0.15122807025909424,
-0.989203691482544,
-0.7131417989730835,
1.623496413230896,
-1.1118861436843872,
-0.2174433022737503,
-1.0409786701202393,
-0.585182249546051,
-1.2814953327178955,
-0.613595724105835,
0.09857779741287231,
-0.937959611415863,
0.8899067044258118,
0.12654225528240204,
-1.1866439580917358,
-0.3508777618408203,
-0.8610464334487915,
0.9591038227081299,
-0.1757538616657257,
0.12743517756462097,
1.9811562299728394,
0.36064860224723816,
-0.3624431788921356,
0.7145547866821289,
1.201334834098816,
0.5928163528442383,
-0.6044628024101257,
0.19886493682861328,
-0.7064276933670044,
0.3029109537601471,
-1.294000506401062,
0.23033204674720764,
-2.8004133701324463,
0.6355035305023193,
-0.05880305543541908,
-0.046227164566516876,
0.012268001213669777,
-1.2857502698898315,
1.109522819519043,
2.605797529220581,
-1.241288661956787,
0.491767555475235,
0.34872376918792725,
1.075608491897583,
-1.6608628034591675,
0.2768911123275757,
-0.46477070450782776,
2.0080504417419434,
0.29853278398513794,
1.1643834114074707,
-0.4827418029308319,
-2.171271562576294,
0.7058562636375427,
-1.3593482971191406,
-1.1942524909973145,
0.732501745223999,
-0.9886094927787781,
0.27232465147972107,
-1.4525245428085327,
-0.22493280470371246,
-0.8562237024307251,
-1.1696972846984863,
0.6262621283531189,
0.14196191728115082,
0.3919169008731842,
-0.4750876724720001,
0.3305443227291107,
-2.249440908432007,
-1.3554489612579346,
-0.2425813525915146,
-0.9668787717819214,
0.559877872467041,
-0.40218138694763184,
0.7106112837791443,
-0.1859591156244278,
-0.024483220651745796,
0.4200040102005005,
1.4068143367767334,
3.381258010864258,
0.187653586268425,
0.22799131274223328,
-0.2188871204853058,
-0.9874261617660522,
1.5455431938171387,
0.8740884065628052,
-0.0732029378414154,
-0.574587881565094,
-1.0853395462036133,
1.2714682817459106,
1.9033957719802856,
1.0927042961120605,
-0.03726009279489517,
-0.89729243516922,
-0.7357730269432068,
0.016097569838166237,
0.1553613543510437,
0.4016243815422058,
0.9427359700202942,
0.000053396448493003845,
0.06276008486747742,
1.499475359916687,
1.1730393171310425,
-0.3923197090625763,
0.2896091043949127,
-0.837766170501709,
-0.5287309288978577,
0.5129219889640808,
0.2170601189136505,
0.015647340565919876,
0.46877095103263855,
-1.0352691411972046,
-0.24954816699028015,
-0.43401291966438293,
-0.8893124461174011,
-0.6429539322853088,
-0.4497424066066742,
-0.4558981657028198,
1.6029682159423828,
0.10711032152175903,
-0.5036331415176392,
-0.07633726298809052,
-0.8072159886360168,
-0.17621566355228424,
-1.0795655250549316,
0.3294115662574768,
-0.0839678943157196,
-0.1483585685491562,
-0.20519791543483734,
1.670541524887085,
-0.9139522910118103,
-2.0908608436584473,
0.23009848594665527,
0.23454244434833527,
-0.27100661396980286,
0.19363923370838165,
1.6183806657791138,
0.5861950516700745,
1.4178009033203125,
1.3575626611709595,
0.8837860822677612,
-0.6260912418365479,
-1.3077336549758911,
0.674018144607544,
0.9988508820533752,
-1.3662976026535034,
0.8358403444290161,
-0.10098373889923096,
-0.5011560916900635,
0.5859549641609192,
1.2999615669250488,
0.5254088044166565,
-1.94583261013031,
0.8452903628349304,
-0.8909475207328796,
0.781272828578949,
0.6545529365539551,
0.6569944620132446,
0.1471778154373169,
0.7861687541007996,
-1.1636550426483154,
-1.1473015546798706,
-0.7242206335067749,
-0.6602673530578613,
1.983254075050354,
-0.2935961186885834,
0.6424792408943176,
-0.2925107777118683,
-1.2683521509170532,
-0.05296952277421951,
0.668280303478241,
0.319216251373291,
-0.5201894640922546,
0.8461421728134155,
-0.5982316136360168,
-1.070352554321289,
-1.328417181968689,
-0.31292837858200073,
-1.0696934461593628,
-0.8550617694854736,
1.1070717573165894,
0.7487340569496155,
0.31826251745224,
1.8637276887893677,
0.682015597820282,
0.32546988129615784,
-2.628894090652466,
0.8465744853019714,
0.24984212219715118,
-0.01926826499402523,
0.877926766872406,
0.3015977442264557,
0.9845708012580872,
-0.08252213895320892,
0.5444695353507996,
-2.4019997119903564,
2.267728567123413,
-0.1857932060956955,
0.7223250269889832,
0.002867278642952442,
-0.20708908140659332,
1.1232162714004517,
0.6078608632087708,
0.5226272344589233,
-1.0676196813583374,
0.6002482175827026,
-0.46922093629837036,
1.206459879875183,
0.8952966928482056,
-0.8068668842315674,
-0.027239985764026642,
1.3948289155960083,
0.4896552860736847,
-0.47545236349105835,
-0.9546162486076355,
-0.9016656875610352,
1.0314561128616333,
1.711413025856018,
-0.030075596645474434,
0.02294858917593956,
0.8915608525276184,
0.6627474427223206,
-1.238593339920044,
-0.013695110566914082,
-0.7110962271690369,
-0.6458730101585388,
1.7011241912841797,
2.1402621269226074,
-0.1285219043493271,
-0.26246196031570435,
-0.6221569180488586,
-1.28977632522583,
0.8280656933784485,
-0.057432543486356735,
0.2347865253686905,
0.6057508587837219,
-0.5830343961715698,
1.1275588274002075,
0.9145122170448303,
0.9646850824356079,
0.12688708305358887,
0.25868040323257446,
0.36752137541770935,
-0.27533629536628723,
-1.180930495262146,
-0.24725888669490814,
-1.0145390033721924,
-2.4882965087890625,
0.44118690490722656,
-0.24972356855869293,
-1.4328999519348145,
0.028787508606910706,
-1.060504674911499,
0.956684410572052,
-0.5317606329917908,
-1.0428338050842285,
-1.5406138896942139,
0.19786471128463745,
-0.010309177450835705,
0.9778928756713867,
-1.617086410522461,
-0.2374589443206787,
1.1928237676620483,
0.8768793940544128,
-0.7068021297454834,
0.8903139233589172,
0.220840722322464,
1.0262770652770996,
0.7870610952377319,
-0.4198148250579834,
0.4829387366771698,
0.04842175170779228,
-1.4031609296798706,
0.41217800974845886,
1.1819078922271729,
0.17498452961444855,
1.5229021310806274,
-0.4842278063297272,
0.10482437908649445,
0.40219593048095703,
-0.6359474658966064,
-0.4921801686286926,
-0.5174815654754639,
0.6660050749778748,
-0.004799071699380875,
-0.9176906943321228,
-0.08774203062057495,
-0.03680727258324623,
-0.31580957770347595,
0.14126449823379517,
-1.4487611055374146,
-0.1517830640077591,
-0.3733261823654175,
-0.6524843573570251,
-1.1827600002288818,
-0.18707367777824402,
1.3499548435211182,
-0.8811333179473877,
-0.1915830373764038,
0.48968836665153503,
0.2694304585456848,
0.5988306999206543,
0.6409637928009033,
-0.70030677318573,
-0.2574000060558319,
-0.2582102119922638,
-0.40986114740371704,
0.24997760355472565,
1.364648461341858,
-0.10104678571224213,
-0.9852184057235718,
0.718537449836731,
-0.36340564489364624,
0.0640200525522232,
1.9401780366897583,
0.011540230363607407,
-0.7164012789726257,
0.3183887302875519,
-0.6784110069274902,
1.839011788368225,
1.7276688814163208,
1.4136536121368408,
-0.17262808978557587,
-0.9312758445739746,
0.5915522575378418,
-0.3415004014968872,
-0.35029950737953186,
0.8402546048164368,
0.35835564136505127,
-0.2141282856464386,
-1.4551620483398438,
0.7627547979354858,
1.2265697717666626,
-0.9007294178009033,
-0.7110778093338013,
0.11798405647277832,
-0.8777617812156677,
1.1187206506729126,
0.5504016280174255,
0.32066866755485535,
0.3380201756954193,
1.6359301805496216,
0.7547942399978638,
-0.40222883224487305,
0.4142896234989166,
0.6594210863113403,
-0.19909246265888214,
-2.1087794303894043,
-1.092174768447876,
0.3829866945743561,
-0.5476520657539368,
-1.5814543962478638,
1.300746202468872,
-1.1791090965270996,
-1.0494070053100586,
0.6025732755661011,
0.06061543896794319,
1.4157222509384155,
0.3810167610645294,
1.636767864227295,
2.1105659008026123,
0.948305070400238,
0.4199618995189667,
1.2606998682022095,
-0.07061721384525299,
-0.3835688829421997,
1.7798047065734863,
-0.3492853343486786,
0.5197632312774658,
1.0553381443023682,
-0.3261425495147705,
-1.1570475101470947,
-0.728271484375,
-1.243353009223938,
-0.839093029499054,
1.2259232997894287,
0.09658129513263702,
-1.0937635898590088,
0.21303457021713257,
1.6280665397644043,
0.10002538561820984,
-0.2933720350265503,
0.6184446811676025,
0.4001285135746002,
-0.7783439755439758,
-0.07754789292812347,
-0.9189811944961548,
0.4737730026245117,
-0.22685106098651886,
-0.4072131812572479,
0.2445870190858841,
0.47475069761276245,
1.3634742498397827,
-0.13929101824760437,
0.12471531331539154,
1.0876878499984741,
-1.3829790353775024,
1.5500034093856812,
-0.7064263224601746,
0.2481532245874405,
-2.400993585586548,
1.4325813055038452,
-0.7875500917434692,
1.944427490234375,
-2.6560287475585938,
0.5263097882270813,
-0.5379233360290527,
-0.43542709946632385,
0.2730534076690674,
-0.3972722589969635,
0.07173003256320953,
-0.0680287703871727,
-1.1295249462127686,
-0.07707288861274719,
-0.6331595182418823,
0.667037308216095,
1.186553955078125,
1.3658744096755981,
-1.1780709028244019,
-0.39809343218803406,
-1.7418338060379028,
-0.19928497076034546,
-0.8199217915534973,
0.23231299221515656,
-1.980726957321167,
-0.16480855643749237,
-1.8825175762176514,
-2.4001009464263916,
-1.261512041091919,
-0.8359975218772888,
1.1829735040664673,
0.1863320916891098,
-0.8967440724372864,
1.220369815826416,
-0.42839953303337097,
-1.9495353698730469,
1.156984567642212,
-2.2343475818634033
] |
https://github.com/huggingface/datasets/issues/5685 | Broken Image render on the hub website | Thanks @albertvillanova , @mariosasko I was not aware of this requirement from the doc (must have skipped :sweat_smile: )
Confirmed, adding back `dataset_info` fixed the issu | ### Describe the bug
Hi :wave:
Not sure if this is the right place to ask, but I am trying to load a huge amount of datasets on the hub (:partying_face: ) but I am facing a little issue with the `image` type
![image](https://user-images.githubusercontent.com/15908060/228587875-427a37f1-3a31-4e17-8bbe-0f759003910d.png)
See this [dataset](https://huggingface.co/datasets/Francesco/cell-towers), basically for some reason the first image has numerical bytes inside, not sure if that is okay, but the image render feature **doesn't work**
So the dataset is stored in the following way
```python
builder.download_and_prepare(output_dir=str(output_dir))
ds = builder.as_dataset(split="train")
# [NOTE] no idea how to push it from the builder folder
ds.push_to_hub(repo_id=repo_id)
builder.as_dataset(split="validation").push_to_hub(repo_id=repo_id)
ds = builder.as_dataset(split="test")
ds.push_to_hub(repo_id=repo_id)
```
The build is this class
```python
class COCOLikeDatasetBuilder(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0")
def _info(self):
features = datasets.Features(
{
"image_id": datasets.Value("int64"),
"image": datasets.Image(),
"width": datasets.Value("int32"),
"height": datasets.Value("int32"),
"objects": datasets.Sequence(
{
"id": datasets.Value("int64"),
"area": datasets.Value("int64"),
"bbox": datasets.Sequence(
datasets.Value("float32"), length=4
),
"category": datasets.ClassLabel(names=categories),
}
),
}
)
return datasets.DatasetInfo(
description=description,
features=features,
homepage=homepage,
license=license,
citation=citation,
)
def _split_generators(self, dl_manager):
archive = dl_manager.download(url)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"annotation_file_path": "train/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"annotation_file_path": "test/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"annotation_file_path": "valid/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
]
def _generate_examples(self, annotation_file_path, files):
def process_annot(annot, category_id_to_category):
return {
"id": annot["id"],
"area": annot["area"],
"bbox": annot["bbox"],
"category": category_id_to_category[annot["category_id"]],
}
image_id_to_image = {}
idx = 0
# This loop relies on the ordering of the files in the archive:
# Annotation files come first, then the images.
for path, f in files:
file_name = os.path.basename(path)
if annotation_file_path in path:
annotations = json.load(f)
category_id_to_category = {
category["id"]: category["name"]
for category in annotations["categories"]
}
print(category_id_to_category)
image_id_to_annotations = collections.defaultdict(list)
for annot in annotations["annotations"]:
image_id_to_annotations[annot["image_id"]].append(annot)
image_id_to_image = {
annot["file_name"]: annot for annot in annotations["images"]
}
elif file_name in image_id_to_image:
image = image_id_to_image[file_name]
objects = [
process_annot(annot, category_id_to_category)
for annot in image_id_to_annotations[image["id"]]
]
print(file_name)
yield idx, {
"image_id": image["id"],
"image": {"path": path, "bytes": f.read()},
"width": image["width"],
"height": image["height"],
"objects": objects,
}
idx += 1
```
Basically, I want to add to the hub every dataset I come across on coco format
Thanks
Fra
### Steps to reproduce the bug
In this case, you can just navigate on the [dataset](https://huggingface.co/datasets/Francesco/cell-towers)
### Expected behavior
I was expecting the image rendering feature to work
### Environment info
Not a lot to share, I am using `datasets` from a fresh venv | 236 | 26 | Broken Image render on the hub website
### Describe the bug
Hi :wave:
Not sure if this is the right place to ask, but I am trying to load a huge amount of datasets on the hub (:partying_face: ) but I am facing a little issue with the `image` type
![image](https://user-images.githubusercontent.com/15908060/228587875-427a37f1-3a31-4e17-8bbe-0f759003910d.png)
See this [dataset](https://huggingface.co/datasets/Francesco/cell-towers), basically for some reason the first image has numerical bytes inside, not sure if that is okay, but the image render feature **doesn't work**
So the dataset is stored in the following way
```python
builder.download_and_prepare(output_dir=str(output_dir))
ds = builder.as_dataset(split="train")
# [NOTE] no idea how to push it from the builder folder
ds.push_to_hub(repo_id=repo_id)
builder.as_dataset(split="validation").push_to_hub(repo_id=repo_id)
ds = builder.as_dataset(split="test")
ds.push_to_hub(repo_id=repo_id)
```
The build is this class
```python
class COCOLikeDatasetBuilder(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0")
def _info(self):
features = datasets.Features(
{
"image_id": datasets.Value("int64"),
"image": datasets.Image(),
"width": datasets.Value("int32"),
"height": datasets.Value("int32"),
"objects": datasets.Sequence(
{
"id": datasets.Value("int64"),
"area": datasets.Value("int64"),
"bbox": datasets.Sequence(
datasets.Value("float32"), length=4
),
"category": datasets.ClassLabel(names=categories),
}
),
}
)
return datasets.DatasetInfo(
description=description,
features=features,
homepage=homepage,
license=license,
citation=citation,
)
def _split_generators(self, dl_manager):
archive = dl_manager.download(url)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"annotation_file_path": "train/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
gen_kwargs={
"annotation_file_path": "test/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"annotation_file_path": "valid/_annotations.coco.json",
"files": dl_manager.iter_archive(archive),
},
),
]
def _generate_examples(self, annotation_file_path, files):
def process_annot(annot, category_id_to_category):
return {
"id": annot["id"],
"area": annot["area"],
"bbox": annot["bbox"],
"category": category_id_to_category[annot["category_id"]],
}
image_id_to_image = {}
idx = 0
# This loop relies on the ordering of the files in the archive:
# Annotation files come first, then the images.
for path, f in files:
file_name = os.path.basename(path)
if annotation_file_path in path:
annotations = json.load(f)
category_id_to_category = {
category["id"]: category["name"]
for category in annotations["categories"]
}
print(category_id_to_category)
image_id_to_annotations = collections.defaultdict(list)
for annot in annotations["annotations"]:
image_id_to_annotations[annot["image_id"]].append(annot)
image_id_to_image = {
annot["file_name"]: annot for annot in annotations["images"]
}
elif file_name in image_id_to_image:
image = image_id_to_image[file_name]
objects = [
process_annot(annot, category_id_to_category)
for annot in image_id_to_annotations[image["id"]]
]
print(file_name)
yield idx, {
"image_id": image["id"],
"image": {"path": path, "bytes": f.read()},
"width": image["width"],
"height": image["height"],
"objects": objects,
}
idx += 1
```
Basically, I want to add to the hub every dataset I come across on coco format
Thanks
Fra
### Steps to reproduce the bug
In this case, you can just navigate on the [dataset](https://huggingface.co/datasets/Francesco/cell-towers)
### Expected behavior
I was expecting the image rendering feature to work
### Environment info
Not a lot to share, I am using `datasets` from a fresh venv
Thanks @albertvillanova , @mariosasko I was not aware of this requirement from the doc (must have skipped :sweat_smile: )
Confirmed, adding back `dataset_info` fixed the issu | [
-1.260399341583252,
-0.9592416286468506,
-0.6892937421798706,
1.4396061897277832,
-0.199323371052742,
-1.2824523448944092,
0.11736372113227844,
-1.076279878616333,
1.6392343044281006,
-0.7654402256011963,
0.31736984848976135,
-1.6271332502365112,
-0.0012400783598423004,
-0.5705572366714478,
-0.7701162099838257,
-0.9026494026184082,
-0.48873165249824524,
-0.7129824161529541,
1.086520791053772,
2.5576863288879395,
1.3020870685577393,
-1.3537828922271729,
2.774867534637451,
0.7186011672019958,
-0.10019192099571228,
-1.005993127822876,
0.5407041311264038,
0.025714583694934845,
-1.3137134313583374,
-0.41968682408332825,
-0.9484176635742188,
-0.17623744904994965,
-0.4830520749092102,
-0.5344994068145752,
-0.000493188388645649,
0.46165069937705994,
-0.3570637106895447,
-0.47568008303642273,
-0.6680760979652405,
-0.7227172255516052,
0.4986933767795563,
-0.3640696108341217,
0.9652113914489746,
-0.37358078360557556,
1.8335826396942139,
-0.6025798320770264,
0.5119863152503967,
0.671891450881958,
1.3682646751403809,
0.26005861163139343,
-0.055451761931180954,
0.4242731034755707,
0.345784991979599,
0.0018602656200528145,
0.5341978669166565,
1.2206281423568726,
0.6710600852966309,
0.48182833194732666,
0.7691001296043396,
-2.1912622451782227,
1.2615680694580078,
-1.069474458694458,
0.24344860017299652,
1.4391218423843384,
-0.902766227722168,
0.2710348665714264,
-1.7708497047424316,
-0.11184285581111908,
0.5512692928314209,
-2.221134662628174,
0.290483683347702,
-1.3150771856307983,
-0.48901671171188354,
1.078498125076294,
0.43960776925086975,
-1.1670562028884888,
0.13725227117538452,
-0.40199214220046997,
0.9663348197937012,
0.388309508562088,
1.1481096744537354,
-1.6304779052734375,
-0.04260551556944847,
-0.21101710200309753,
0.09453679621219635,
-1.2033878564834595,
-1.5394728183746338,
0.5471023917198181,
0.5340785384178162,
0.6214796900749207,
-0.13753370940685272,
1.026045799255371,
-1.0157045125961304,
0.7589956521987915,
-1.0166150331497192,
-1.6749323606491089,
-1.5071580410003662,
-2.3064002990722656,
-2.2500457763671875,
0.7547853589057922,
-0.45388299226760864,
-0.5594680309295654,
2.038238048553467,
-1.0518633127212524,
-1.6613104343414307,
1.1251684427261353,
0.3063291907310486,
0.06726562976837158,
2.429201364517212,
0.20603661239147186,
-0.7194097638130188,
0.5559632778167725,
-0.7175731658935547,
0.7307648062705994,
-0.2663787007331848,
1.3653613328933716,
0.45408356189727783,
-1.0848908424377441,
1.543957233428955,
-0.34614098072052,
0.6345014572143555,
-0.5568262934684753,
-0.485934853553772,
-0.7543897032737732,
0.3475148677825928,
1.8033884763717651,
-0.27760881185531616,
1.5652227401733398,
-0.33446913957595825,
-1.5846246480941772,
-1.6528400182724,
0.8663046360015869,
0.5654115080833435,
-0.7286656498908997,
0.026590220630168915,
-0.4228707253932953,
0.11784286797046661,
0.0007430762052536011,
1.196714162826538,
1.2829020023345947,
0.7701329588890076,
-0.40345099568367004,
-0.8040708303451538,
0.11246226727962494,
0.06851251423358917,
-0.7707400918006897,
-1.6461457014083862,
-0.3218447268009186,
0.2011377513408661,
0.5494166612625122,
-1.1953036785125732,
1.7226219177246094,
0.9619795083999634,
1.8506771326065063,
1.0092899799346924,
-0.2852106988430023,
1.4905750751495361,
0.058303575962781906,
1.7891672849655151,
-0.530018150806427,
0.544505774974823,
-0.2613944411277771,
-1.1702706813812256,
0.8064011931419373,
-0.3107755184173584,
-2.15834641456604,
-0.8629260063171387,
-0.7122615575790405,
-0.1640283465385437,
-0.7214130163192749,
0.9414505958557129,
-0.3198545575141907,
-1.3897677659988403,
0.1725664585828781,
-0.7793625593185425,
0.014382965862751007,
-1.219259262084961,
0.3204415440559387,
0.6886922717094421,
-0.6565076112747192,
0.03076469525694847,
-0.14223822951316833,
-1.2257986068725586,
-0.39858341217041016,
0.261941522359848,
1.9060224294662476,
-0.7788057327270508,
0.904983639717102,
1.0452474355697632,
-0.6861147880554199,
0.05232933908700943,
0.2692298889160156,
-0.3355506360530853,
0.8587195873260498,
-1.005853295326233,
-0.4375663101673126,
1.1723545789718628,
-0.13703186810016632,
-0.6255583167076111,
1.45232093334198,
0.674070417881012,
-0.9881941676139832,
-0.2555345296859741,
-0.08788052201271057,
-0.8961532115936279,
-0.0027833692729473114,
-1.5410065650939941,
-0.10563506186008453,
0.40595147013664246,
-1.5389704704284668,
-0.4383581876754761,
-0.1709212064743042,
1.3156929016113281,
-0.20416392385959625,
1.3999042510986328,
-0.4123871922492981,
-0.20697343349456787,
-0.3370034396648407,
-0.38686874508857727,
0.13607382774353027,
-0.2400246560573578,
-0.5983660817146301,
0.20188243687152863,
-0.8196533918380737,
0.35969844460487366,
1.460082769393921,
0.4500220715999603,
0.07900397479534149,
0.510572612285614,
1.1066904067993164,
0.45232391357421875,
-0.09035199880599976,
-0.8077258467674255,
-1.6227874755859375,
2.0087013244628906,
-1.3635845184326172,
2.010601282119751,
0.7498723864555359,
-0.0634656548500061,
-1.7755060195922852,
-1.9566655158996582,
1.292266607284546,
1.1575819253921509,
2.4072377681732178,
0.4557875692844391,
0.37752997875213623,
-0.8228065967559814,
-0.7375537157058716,
0.3573939800262451,
-1.0042955875396729,
-0.6461715698242188,
0.13554023206233978,
2.371220827102661,
1.8224475383758545,
-0.441652774810791,
-0.21824206411838531,
-1.0675369501113892,
1.4240283966064453,
-0.1821357011795044,
0.19911205768585205,
1.9821077585220337,
-0.2040226012468338,
-1.047621726989746,
1.425175428390503,
-2.238358974456787,
0.1469155102968216,
1.9806681871414185,
0.2984195053577423,
0.08895106613636017,
-1.3836387395858765,
-0.6400675773620605,
-0.3206632137298584,
-0.46605512499809265,
-1.2757880687713623,
0.500839352607727,
-0.27601173520088196,
-0.8194283246994019,
-1.3768771886825562,
0.07111628353595734,
-1.203864574432373,
-1.6838722229003906,
0.2853592038154602,
1.807101845741272,
2.0489139556884766,
-0.7211422920227051,
1.5187848806381226,
-0.3113081455230713,
0.11415383219718933,
1.17251455783844,
1.2885738611221313,
3.081026077270508,
1.8108292818069458,
-1.3273040056228638,
0.6509962677955627,
-0.13142545521259308,
-0.4821135997772217,
1.1578478813171387,
-1.257498860359192,
1.3212370872497559,
-0.0925011932849884,
-1.1815739870071411,
-1.1547563076019287,
0.961427628993988,
0.4601578116416931,
0.07801058888435364,
-0.47156015038490295,
1.1135118007659912,
0.0813220888376236,
1.3318880796432495,
0.6020512580871582,
-0.35186901688575745,
0.6979941725730896,
-0.3620676100254059,
-0.5239015221595764,
1.4329642057418823,
0.22497180104255676,
-1.4504222869873047,
-2.2713723182678223,
-0.1752254217863083,
-0.887488067150116,
0.03943777084350586,
-0.617794394493103,
-0.9691308736801147,
1.7202274799346924,
0.3043462932109833,
-1.2809476852416992,
-0.22106075286865234,
-0.36414000391960144,
-0.5295931696891785,
2.7511003017425537,
-1.3287756443023682,
-0.15122807025909424,
-0.989203691482544,
-0.7131417989730835,
1.623496413230896,
-1.1118861436843872,
-0.2174433022737503,
-1.0409786701202393,
-0.585182249546051,
-1.2814953327178955,
-0.613595724105835,
0.09857779741287231,
-0.937959611415863,
0.8899067044258118,
0.12654225528240204,
-1.1866439580917358,
-0.3508777618408203,
-0.8610464334487915,
0.9591038227081299,
-0.1757538616657257,
0.12743517756462097,
1.9811562299728394,
0.36064860224723816,
-0.3624431788921356,
0.7145547866821289,
1.201334834098816,
0.5928163528442383,
-0.6044628024101257,
0.19886493682861328,
-0.7064276933670044,
0.3029109537601471,
-1.294000506401062,
0.23033204674720764,
-2.8004133701324463,
0.6355035305023193,
-0.05880305543541908,
-0.046227164566516876,
0.012268001213669777,
-1.2857502698898315,
1.109522819519043,
2.605797529220581,
-1.241288661956787,
0.491767555475235,
0.34872376918792725,
1.075608491897583,
-1.6608628034591675,
0.2768911123275757,
-0.46477070450782776,
2.0080504417419434,
0.29853278398513794,
1.1643834114074707,
-0.4827418029308319,
-2.171271562576294,
0.7058562636375427,
-1.3593482971191406,
-1.1942524909973145,
0.732501745223999,
-0.9886094927787781,
0.27232465147972107,
-1.4525245428085327,
-0.22493280470371246,
-0.8562237024307251,
-1.1696972846984863,
0.6262621283531189,
0.14196191728115082,
0.3919169008731842,
-0.4750876724720001,
0.3305443227291107,
-2.249440908432007,
-1.3554489612579346,
-0.2425813525915146,
-0.9668787717819214,
0.559877872467041,
-0.40218138694763184,
0.7106112837791443,
-0.1859591156244278,
-0.024483220651745796,
0.4200040102005005,
1.4068143367767334,
3.381258010864258,
0.187653586268425,
0.22799131274223328,
-0.2188871204853058,
-0.9874261617660522,
1.5455431938171387,
0.8740884065628052,
-0.0732029378414154,
-0.574587881565094,
-1.0853395462036133,
1.2714682817459106,
1.9033957719802856,
1.0927042961120605,
-0.03726009279489517,
-0.89729243516922,
-0.7357730269432068,
0.016097569838166237,
0.1553613543510437,
0.4016243815422058,
0.9427359700202942,
0.000053396448493003845,
0.06276008486747742,
1.499475359916687,
1.1730393171310425,
-0.3923197090625763,
0.2896091043949127,
-0.837766170501709,
-0.5287309288978577,
0.5129219889640808,
0.2170601189136505,
0.015647340565919876,
0.46877095103263855,
-1.0352691411972046,
-0.24954816699028015,
-0.43401291966438293,
-0.8893124461174011,
-0.6429539322853088,
-0.4497424066066742,
-0.4558981657028198,
1.6029682159423828,
0.10711032152175903,
-0.5036331415176392,
-0.07633726298809052,
-0.8072159886360168,
-0.17621566355228424,
-1.0795655250549316,
0.3294115662574768,
-0.0839678943157196,
-0.1483585685491562,
-0.20519791543483734,
1.670541524887085,
-0.9139522910118103,
-2.0908608436584473,
0.23009848594665527,
0.23454244434833527,
-0.27100661396980286,
0.19363923370838165,
1.6183806657791138,
0.5861950516700745,
1.4178009033203125,
1.3575626611709595,
0.8837860822677612,
-0.6260912418365479,
-1.3077336549758911,
0.674018144607544,
0.9988508820533752,
-1.3662976026535034,
0.8358403444290161,
-0.10098373889923096,
-0.5011560916900635,
0.5859549641609192,
1.2999615669250488,
0.5254088044166565,
-1.94583261013031,
0.8452903628349304,
-0.8909475207328796,
0.781272828578949,
0.6545529365539551,
0.6569944620132446,
0.1471778154373169,
0.7861687541007996,
-1.1636550426483154,
-1.1473015546798706,
-0.7242206335067749,
-0.6602673530578613,
1.983254075050354,
-0.2935961186885834,
0.6424792408943176,
-0.2925107777118683,
-1.2683521509170532,
-0.05296952277421951,
0.668280303478241,
0.319216251373291,
-0.5201894640922546,
0.8461421728134155,
-0.5982316136360168,
-1.070352554321289,
-1.328417181968689,
-0.31292837858200073,
-1.0696934461593628,
-0.8550617694854736,
1.1070717573165894,
0.7487340569496155,
0.31826251745224,
1.8637276887893677,
0.682015597820282,
0.32546988129615784,
-2.628894090652466,
0.8465744853019714,
0.24984212219715118,
-0.01926826499402523,
0.877926766872406,
0.3015977442264557,
0.9845708012580872,
-0.08252213895320892,
0.5444695353507996,
-2.4019997119903564,
2.267728567123413,
-0.1857932060956955,
0.7223250269889832,
0.002867278642952442,
-0.20708908140659332,
1.1232162714004517,
0.6078608632087708,
0.5226272344589233,
-1.0676196813583374,
0.6002482175827026,
-0.46922093629837036,
1.206459879875183,
0.8952966928482056,
-0.8068668842315674,
-0.027239985764026642,
1.3948289155960083,
0.4896552860736847,
-0.47545236349105835,
-0.9546162486076355,
-0.9016656875610352,
1.0314561128616333,
1.711413025856018,
-0.030075596645474434,
0.02294858917593956,
0.8915608525276184,
0.6627474427223206,
-1.238593339920044,
-0.013695110566914082,
-0.7110962271690369,
-0.6458730101585388,
1.7011241912841797,
2.1402621269226074,
-0.1285219043493271,
-0.26246196031570435,
-0.6221569180488586,
-1.28977632522583,
0.8280656933784485,
-0.057432543486356735,
0.2347865253686905,
0.6057508587837219,
-0.5830343961715698,
1.1275588274002075,
0.9145122170448303,
0.9646850824356079,
0.12688708305358887,
0.25868040323257446,
0.36752137541770935,
-0.27533629536628723,
-1.180930495262146,
-0.24725888669490814,
-1.0145390033721924,
-2.4882965087890625,
0.44118690490722656,
-0.24972356855869293,
-1.4328999519348145,
0.028787508606910706,
-1.060504674911499,
0.956684410572052,
-0.5317606329917908,
-1.0428338050842285,
-1.5406138896942139,
0.19786471128463745,
-0.010309177450835705,
0.9778928756713867,
-1.617086410522461,
-0.2374589443206787,
1.1928237676620483,
0.8768793940544128,
-0.7068021297454834,
0.8903139233589172,
0.220840722322464,
1.0262770652770996,
0.7870610952377319,
-0.4198148250579834,
0.4829387366771698,
0.04842175170779228,
-1.4031609296798706,
0.41217800974845886,
1.1819078922271729,
0.17498452961444855,
1.5229021310806274,
-0.4842278063297272,
0.10482437908649445,
0.40219593048095703,
-0.6359474658966064,
-0.4921801686286926,
-0.5174815654754639,
0.6660050749778748,
-0.004799071699380875,
-0.9176906943321228,
-0.08774203062057495,
-0.03680727258324623,
-0.31580957770347595,
0.14126449823379517,
-1.4487611055374146,
-0.1517830640077591,
-0.3733261823654175,
-0.6524843573570251,
-1.1827600002288818,
-0.18707367777824402,
1.3499548435211182,
-0.8811333179473877,
-0.1915830373764038,
0.48968836665153503,
0.2694304585456848,
0.5988306999206543,
0.6409637928009033,
-0.70030677318573,
-0.2574000060558319,
-0.2582102119922638,
-0.40986114740371704,
0.24997760355472565,
1.364648461341858,
-0.10104678571224213,
-0.9852184057235718,
0.718537449836731,
-0.36340564489364624,
0.0640200525522232,
1.9401780366897583,
0.011540230363607407,
-0.7164012789726257,
0.3183887302875519,
-0.6784110069274902,
1.839011788368225,
1.7276688814163208,
1.4136536121368408,
-0.17262808978557587,
-0.9312758445739746,
0.5915522575378418,
-0.3415004014968872,
-0.35029950737953186,
0.8402546048164368,
0.35835564136505127,
-0.2141282856464386,
-1.4551620483398438,
0.7627547979354858,
1.2265697717666626,
-0.9007294178009033,
-0.7110778093338013,
0.11798405647277832,
-0.8777617812156677,
1.1187206506729126,
0.5504016280174255,
0.32066866755485535,
0.3380201756954193,
1.6359301805496216,
0.7547942399978638,
-0.40222883224487305,
0.4142896234989166,
0.6594210863113403,
-0.19909246265888214,
-2.1087794303894043,
-1.092174768447876,
0.3829866945743561,
-0.5476520657539368,
-1.5814543962478638,
1.300746202468872,
-1.1791090965270996,
-1.0494070053100586,
0.6025732755661011,
0.06061543896794319,
1.4157222509384155,
0.3810167610645294,
1.636767864227295,
2.1105659008026123,
0.948305070400238,
0.4199618995189667,
1.2606998682022095,
-0.07061721384525299,
-0.3835688829421997,
1.7798047065734863,
-0.3492853343486786,
0.5197632312774658,
1.0553381443023682,
-0.3261425495147705,
-1.1570475101470947,
-0.728271484375,
-1.243353009223938,
-0.839093029499054,
1.2259232997894287,
0.09658129513263702,
-1.0937635898590088,
0.21303457021713257,
1.6280665397644043,
0.10002538561820984,
-0.2933720350265503,
0.6184446811676025,
0.4001285135746002,
-0.7783439755439758,
-0.07754789292812347,
-0.9189811944961548,
0.4737730026245117,
-0.22685106098651886,
-0.4072131812572479,
0.2445870190858841,
0.47475069761276245,
1.3634742498397827,
-0.13929101824760437,
0.12471531331539154,
1.0876878499984741,
-1.3829790353775024,
1.5500034093856812,
-0.7064263224601746,
0.2481532245874405,
-2.400993585586548,
1.4325813055038452,
-0.7875500917434692,
1.944427490234375,
-2.6560287475585938,
0.5263097882270813,
-0.5379233360290527,
-0.43542709946632385,
0.2730534076690674,
-0.3972722589969635,
0.07173003256320953,
-0.0680287703871727,
-1.1295249462127686,
-0.07707288861274719,
-0.6331595182418823,
0.667037308216095,
1.186553955078125,
1.3658744096755981,
-1.1780709028244019,
-0.39809343218803406,
-1.7418338060379028,
-0.19928497076034546,
-0.8199217915534973,
0.23231299221515656,
-1.980726957321167,
-0.16480855643749237,
-1.8825175762176514,
-2.4001009464263916,
-1.261512041091919,
-0.8359975218772888,
1.1829735040664673,
0.1863320916891098,
-0.8967440724372864,
1.220369815826416,
-0.42839953303337097,
-1.9495353698730469,
1.156984567642212,
-2.2343475818634033
] |
https://github.com/huggingface/datasets/issues/5681 | Add information about patterns search order to the doc about structuring repo | Good idea, I think I've seen this a couple of times before too on the forums. I can work on this :) | Following [this](https://github.com/huggingface/datasets/issues/5650) issue I think we should add a note about the order of patterns that is used to find splits, see [my comment](https://github.com/huggingface/datasets/issues/5650#issuecomment-1488412527). Also we should reference this page in pages about packaged loaders.
I have a déjà vu that it had already been discussed as some point but I don't remember.... | 237 | 22 | Add information about patterns search order to the doc about structuring repo
Following [this](https://github.com/huggingface/datasets/issues/5650) issue I think we should add a note about the order of patterns that is used to find splits, see [my comment](https://github.com/huggingface/datasets/issues/5650#issuecomment-1488412527). Also we should reference this page in pages about packaged loaders.
I have a déjà vu that it had already been discussed as some point but I don't remember....
Good idea, I think I've seen this a couple of times before too on the forums. I can work on this :) | [
-1.2863783836364746,
-0.9688711166381836,
-0.8904821276664734,
1.5832221508026123,
-0.07885962724685669,
-1.2470723390579224,
0.07004249095916748,
-0.9710661172866821,
1.6387749910354614,
-0.7438533306121826,
0.40640026330947876,
-1.6556106805801392,
0.0645972490310669,
-0.537909746170044,
-0.8475098013877869,
-0.9382728934288025,
-0.3047446012496948,
-0.7686166167259216,
1.0579391717910767,
2.529987335205078,
1.1460788249969482,
-1.448085904121399,
2.8165626525878906,
0.6939678192138672,
-0.1655152440071106,
-1.1864900588989258,
0.6178905963897705,
0.02101729065179825,
-1.2040249109268188,
-0.532103419303894,
-0.9928951263427734,
0.05412322282791138,
-0.5217576026916504,
-0.5189865231513977,
0.07372400164604187,
0.35494646430015564,
-0.08559145778417587,
-0.32150185108184814,
-0.44224750995635986,
-0.6785497069358826,
0.42664751410484314,
-0.3230714201927185,
0.8334914445877075,
-0.2824224829673767,
1.778904676437378,
-0.5392335057258606,
0.3227420449256897,
0.67392498254776,
1.3985743522644043,
0.17974376678466797,
0.0010808594524860382,
0.25093135237693787,
0.4282950758934021,
-0.057681579142808914,
0.3663994073867798,
1.210615873336792,
0.5285855531692505,
0.4919639527797699,
0.7247170805931091,
-2.18742036819458,
1.3195676803588867,
-1.0725914239883423,
0.31756383180618286,
1.2784268856048584,
-1.0102620124816895,
0.3648291230201721,
-1.7879703044891357,
-0.06152923032641411,
0.526614248752594,
-2.332179069519043,
0.1401943415403366,
-1.2866700887680054,
-0.5362655520439148,
0.8611646890640259,
0.3152863383293152,
-1.3506674766540527,
0.14914672076702118,
-0.480733722448349,
1.013972520828247,
0.5542110204696655,
1.1997489929199219,
-1.5800939798355103,
0.10625220090150833,
-0.21242375671863556,
0.08784403651952744,
-1.239108681678772,
-1.4292274713516235,
0.5063671469688416,
0.6329183578491211,
0.7174658179283142,
-0.09021546691656113,
0.9217630624771118,
-0.9243701100349426,
0.9088793992996216,
-0.8998878002166748,
-1.5859808921813965,
-1.3613159656524658,
-2.361260414123535,
-2.348785638809204,
0.893742024898529,
-0.5207155346870422,
-0.497698575258255,
2.0718963146209717,
-1.0203758478164673,
-1.8478997945785522,
1.1019498109817505,
0.2606028616428375,
0.06084728240966797,
2.447903633117676,
0.2399403601884842,
-0.8121445178985596,
0.5290251970291138,
-0.7517755031585693,
0.9127843379974365,
-0.49900713562965393,
1.4381941556930542,
0.6259908676147461,
-0.8726807832717896,
1.7078700065612793,
-0.3319379985332489,
0.4168180227279663,
-0.6379879713058472,
-0.5065685510635376,
-0.8508132100105286,
0.2996216118335724,
1.8790018558502197,
-0.24768775701522827,
1.6148278713226318,
-0.33966395258903503,
-1.587883710861206,
-1.4801743030548096,
0.8939788937568665,
0.5641111731529236,
-0.9053751826286316,
0.0935874730348587,
-0.4605247676372528,
0.05553857982158661,
0.024525318294763565,
1.1090455055236816,
1.1593480110168457,
0.7426806092262268,
-0.28397443890571594,
-0.8919997811317444,
0.252943754196167,
-0.06267084181308746,
-0.6187249422073364,
-1.8606983423233032,
-0.40149933099746704,
0.20463573932647705,
0.6629509329795837,
-1.1844003200531006,
1.705796480178833,
0.9021127223968506,
1.9600279331207275,
0.926607072353363,
-0.26034387946128845,
1.472320556640625,
-0.11274433881044388,
1.9317071437835693,
-0.4652688801288605,
0.600213885307312,
-0.3802873194217682,
-1.1348768472671509,
0.8066813349723816,
-0.4189046323299408,
-1.8872385025024414,
-0.8043713569641113,
-0.9435672163963318,
-0.17719197273254395,
-0.7036769986152649,
0.9901278614997864,
-0.430120587348938,
-1.3735649585723877,
0.25528639554977417,
-0.6415387392044067,
0.1888483315706253,
-1.213800311088562,
0.27376073598861694,
0.7590309381484985,
-0.671577513217926,
0.0458686500787735,
-0.23809507489204407,
-1.300160527229309,
-0.5660693049430847,
0.26974499225616455,
1.9859758615493774,
-0.737281084060669,
1.0341898202896118,
0.9463050365447998,
-0.6123098731040955,
-0.004242199007421732,
0.42695558071136475,
-0.285393625497818,
0.8467450141906738,
-0.9981815218925476,
-0.36681920289993286,
1.2104675769805908,
-0.16296373307704926,
-0.6366034746170044,
1.4354244470596313,
0.8925148248672485,
-0.808849036693573,
-0.22907023131847382,
-0.14956730604171753,
-0.7489796280860901,
0.025665804743766785,
-1.5463693141937256,
-0.11139284819364548,
0.25193601846694946,
-1.5372544527053833,
-0.5050612092018127,
-0.21914449334144592,
1.268040657043457,
-0.12307410687208176,
1.3603825569152832,
-0.2781912684440613,
-0.24644550681114197,
-0.3368207514286041,
-0.4105991721153259,
0.1944919228553772,
-0.19573304057121277,
-0.6551812887191772,
0.19512531161308289,
-0.7988911271095276,
0.2644568979740143,
1.5438793897628784,
0.37843188643455505,
0.12043769657611847,
0.5408389568328857,
1.1012202501296997,
0.33946579694747925,
0.0005584470927715302,
-0.8872804045677185,
-1.5345948934555054,
2.087458610534668,
-1.510938048362732,
2.0130908489227295,
0.8412895798683167,
-0.14836385846138,
-1.7375596761703491,
-1.8464635610580444,
1.41353440284729,
1.2323933839797974,
2.359408140182495,
0.5222072601318359,
0.3376283049583435,
-0.8323891758918762,
-0.6408290863037109,
0.28618401288986206,
-1.141693115234375,
-0.8231038451194763,
0.03632335364818573,
2.4303908348083496,
1.831078052520752,
-0.5520951747894287,
-0.2028239369392395,
-1.0818899869918823,
1.2886943817138672,
-0.15822286903858185,
0.14176511764526367,
1.9429643154144287,
-0.30218926072120667,
-1.096953272819519,
1.1705381870269775,
-2.3127520084381104,
0.12916889786720276,
2.0528290271759033,
0.34659504890441895,
0.04823478311300278,
-1.5919184684753418,
-0.5837721228599548,
-0.21637313067913055,
-0.46383705735206604,
-1.1745514869689941,
0.7428745031356812,
-0.34558096528053284,
-0.9850505590438843,
-1.4015247821807861,
0.012651641853153706,
-1.1278671026229858,
-1.7737475633621216,
0.37483012676239014,
1.7971686124801636,
2.098484992980957,
-0.691318929195404,
1.5101126432418823,
-0.24915730953216553,
0.13630636036396027,
1.2675591707229614,
1.2852674722671509,
3.0746262073516846,
1.8707114458084106,
-1.1533123254776,
0.6203891038894653,
-0.2228037565946579,
-0.5141059756278992,
1.1130093336105347,
-1.0383914709091187,
1.1877973079681396,
-0.21987678110599518,
-1.2063215970993042,
-1.2394158840179443,
0.9661580324172974,
0.5197436809539795,
0.03960838541388512,
-0.5631702542304993,
1.3022584915161133,
0.11560171097517014,
1.2515876293182373,
0.46612176299095154,
-0.3499908745288849,
0.5829251408576965,
-0.3857980966567993,
-0.5413114428520203,
1.5733919143676758,
0.19914916157722473,
-1.6350843906402588,
-2.2974512577056885,
-0.09926898032426834,
-0.8237070441246033,
-0.06717593967914581,
-0.5983268022537231,
-1.1451520919799805,
1.5854034423828125,
0.4200974404811859,
-1.2789578437805176,
-0.24655981361865997,
-0.2785409986972809,
-0.7479400634765625,
2.6302669048309326,
-1.2772127389907837,
-0.37014612555503845,
-0.9197605848312378,
-0.4876641631126404,
1.7083576917648315,
-1.297755241394043,
-0.10585945844650269,
-0.9994001388549805,
-0.6412515044212341,
-1.4551591873168945,
-0.5826630592346191,
-0.02728569507598877,
-0.9699299335479736,
0.7225452661514282,
0.01417438592761755,
-1.0487970113754272,
-0.22645895183086395,
-0.8010442852973938,
0.8462553024291992,
-0.10972841829061508,
0.2580246031284332,
1.9106907844543457,
0.3977956771850586,
-0.3571884334087372,
0.70735764503479,
1.2265123128890991,
0.6412709355354309,
-0.6712577939033508,
0.2259088009595871,
-0.6472770571708679,
0.3626508414745331,
-1.2766895294189453,
0.29275181889533997,
-2.9285361766815186,
0.805850088596344,
-0.04770466312766075,
-0.13141220808029175,
-0.04485791176557541,
-1.2015777826309204,
1.2354345321655273,
2.6133978366851807,
-1.1652945280075073,
0.45805662870407104,
0.3303891718387604,
1.1892064809799194,
-1.4946118593215942,
0.30539119243621826,
-0.4675660729408264,
2.1757538318634033,
0.2099745124578476,
1.1723688840866089,
-0.44438788294792175,
-2.1858184337615967,
0.624835193157196,
-1.2828508615493774,
-1.0605852603912354,
0.6712815761566162,
-0.8258026242256165,
0.06718869507312775,
-1.3590008020401,
-0.08278116583824158,
-0.9581142067909241,
-1.2310664653778076,
0.8447747826576233,
0.21000395715236664,
0.4501437842845917,
-0.7306157350540161,
0.3201119005680084,
-2.1756341457366943,
-1.4631844758987427,
-0.1070488840341568,
-0.9722226858139038,
0.468924343585968,
-0.3223762810230255,
0.5734420418739319,
-0.2112000435590744,
0.09924785047769547,
0.30762237310409546,
1.4316792488098145,
3.493720054626465,
0.26957955956459045,
0.4506649971008301,
-0.08737966418266296,
-0.9437856674194336,
1.570164680480957,
1.070004940032959,
-0.19197575747966766,
-0.5799064040184021,
-0.9838091731071472,
1.396052360534668,
1.9486907720565796,
1.0387283563613892,
0.06210324168205261,
-0.7455671429634094,
-0.6847280859947205,
-0.012181420810520649,
0.16169627010822296,
0.5194903612136841,
0.9667543768882751,
-0.09571746736764908,
0.1171862781047821,
1.377000093460083,
1.2306454181671143,
-0.513109564781189,
0.4922788441181183,
-0.9878774881362915,
-0.30967584252357483,
0.44198477268218994,
0.33821287751197815,
-0.05075870826840401,
0.5265761017799377,
-1.0239726305007935,
-0.2918621897697449,
-0.28418079018592834,
-1.0443731546401978,
-0.7386974096298218,
-0.29675015807151794,
-0.36707690358161926,
1.5345975160598755,
0.08489193767309189,
-0.4504968822002411,
0.02887726202607155,
-0.8187952637672424,
-0.16253383457660675,
-1.003775715827942,
0.20814712345600128,
-0.1337013989686966,
-0.0896938145160675,
-0.0823737308382988,
1.8245917558670044,
-0.9731749296188354,
-2.220510482788086,
0.35447946190834045,
0.3683024048805237,
-0.4101608395576477,
0.19795528054237366,
1.614078164100647,
0.4956200420856476,
1.401049256324768,
1.364040732383728,
1.004014492034912,
-0.6347827315330505,
-1.2300463914871216,
0.7212740778923035,
0.8997682929039001,
-1.3391951322555542,
0.9139805436134338,
-0.13115395605564117,
-0.45830240845680237,
0.7309632301330566,
1.255966305732727,
0.36460795998573303,
-1.9562875032424927,
0.7745630145072937,
-0.7644610404968262,
0.8469598293304443,
0.5699809789657593,
0.79664146900177,
0.25791072845458984,
0.8158321380615234,
-1.2185766696929932,
-1.2023590803146362,
-0.8576159477233887,
-0.6953198909759521,
1.923290491104126,
-0.08568758517503738,
0.5430272817611694,
-0.08630666881799698,
-1.2088661193847656,
-0.20825709402561188,
0.6231861710548401,
0.18388739228248596,
-0.3877961337566376,
0.8340270519256592,
-0.78206866979599,
-1.1669961214065552,
-1.421391487121582,
-0.503084659576416,
-0.929146945476532,
-0.9339273571968079,
0.97236168384552,
0.8063679337501526,
0.32427382469177246,
1.9654103517532349,
0.5825662612915039,
0.18239493668079376,
-2.645808219909668,
0.8669571280479431,
0.3495955169200897,
0.04166779667139053,
0.848671555519104,
0.3090622127056122,
1.0757267475128174,
0.03623933717608452,
0.47775769233703613,
-2.290140151977539,
2.166515350341797,
-0.31847304105758667,
0.7432522773742676,
0.059122487902641296,
-0.1299196481704712,
1.1063835620880127,
0.5800290107727051,
0.6979690790176392,
-1.1885621547698975,
0.7031829357147217,
-0.623225212097168,
1.205898642539978,
0.9583359360694885,
-0.7871295809745789,
0.11776581406593323,
1.4099737405776978,
0.5211114287376404,
-0.4279036521911621,
-0.9778618812561035,
-0.7858904600143433,
0.9477389454841614,
1.7125012874603271,
0.03301721066236496,
-0.08188260346651077,
0.7919409871101379,
0.539214015007019,
-1.3362534046173096,
-0.14586718380451202,
-0.7367388010025024,
-0.7168583869934082,
1.7285397052764893,
2.065584421157837,
-0.14305830001831055,
-0.19155779480934143,
-0.7458168268203735,
-1.2254753112792969,
0.669655978679657,
-0.13995327055454254,
0.087701715528965,
0.7972689867019653,
-0.6346966624259949,
1.1480785608291626,
0.741130530834198,
0.9658403396606445,
0.08100159466266632,
0.327483206987381,
0.2886776626110077,
-0.2203301340341568,
-1.2357021570205688,
-0.4618949592113495,
-1.2855817079544067,
-2.528690814971924,
0.3292158246040344,
-0.35586652159690857,
-1.3790642023086548,
0.1173110157251358,
-1.0793640613555908,
0.9008550643920898,
-0.6027846336364746,
-0.9336210489273071,
-1.323525071144104,
0.13106942176818848,
-0.20100055634975433,
0.8288900852203369,
-1.552234411239624,
-0.06597529351711273,
1.2666804790496826,
0.9269608855247498,
-0.6267103552818298,
1.0928179025650024,
0.2525612413883209,
0.9840942025184631,
0.7498987913131714,
-0.580284059047699,
0.5780003666877747,
0.15144066512584686,
-1.4976156949996948,
0.49295446276664734,
1.1510388851165771,
0.1846536546945572,
1.318648099899292,
-0.4575164318084717,
-0.031678903847932816,
0.5402219295501709,
-0.6346793174743652,
-0.5215197801589966,
-0.5957935452461243,
0.684958815574646,
0.01950111985206604,
-1.0499590635299683,
0.09819809347391129,
-0.15201324224472046,
-0.24952253699302673,
0.3647456169128418,
-1.607404112815857,
-0.40398919582366943,
-0.3887447714805603,
-0.4504057466983795,
-1.30890953540802,
0.035646092146635056,
1.3441741466522217,
-0.8805214166641235,
-0.18160203099250793,
0.4465986490249634,
0.3631346821784973,
0.46803194284439087,
0.7049281001091003,
-0.6480065584182739,
-0.4359847903251648,
-0.3272842764854431,
-0.3176570534706116,
0.34557032585144043,
1.2505855560302734,
-0.25770339369773865,
-0.9690266847610474,
0.7073246240615845,
-0.248500794172287,
0.09518703073263168,
1.9284701347351074,
-0.023344025015830994,
-0.8087419867515564,
0.24759508669376373,
-0.6425232291221619,
1.8678277730941772,
1.484775424003601,
1.22127366065979,
-0.17548398673534393,
-0.7363461256027222,
0.6398844718933105,
-0.20215268433094025,
-0.3109220266342163,
0.7815569043159485,
0.48179763555526733,
-0.1531943678855896,
-1.3982207775115967,
0.4731578230857849,
1.146887183189392,
-0.8791829347610474,
-0.8153101205825806,
-0.04088117182254791,
-0.874370276927948,
1.0844186544418335,
0.747704029083252,
0.49260684847831726,
0.21138177812099457,
1.6580232381820679,
0.7065172791481018,
-0.5814098119735718,
0.40656957030296326,
0.4864109456539154,
0.01876271516084671,
-2.1098265647888184,
-0.9833985567092896,
0.16397713124752045,
-0.3228019177913666,
-1.5347883701324463,
1.2919963598251343,
-1.155531406402588,
-0.8920464515686035,
0.5531091094017029,
0.10503895580768585,
1.3585295677185059,
0.23934826254844666,
1.6371527910232544,
1.979791283607483,
0.8663055896759033,
0.2537296414375305,
1.3189736604690552,
-0.14909499883651733,
-0.4621715545654297,
1.8691068887710571,
-0.31728848814964294,
0.561969518661499,
1.0283598899841309,
-0.4369235038757324,
-1.0528801679611206,
-0.8311063051223755,
-1.200842261314392,
-0.5685852766036987,
1.1642876863479614,
0.14420883357524872,
-1.3170832395553589,
0.17230351269245148,
1.4758538007736206,
0.07347282022237778,
-0.25004804134368896,
0.5696732401847839,
0.4159705340862274,
-0.6649461984634399,
-0.0022764564491808414,
-0.9290834069252014,
0.5544259548187256,
-0.08675098419189453,
-0.4009704887866974,
0.3714826703071594,
0.40137386322021484,
1.0944455862045288,
-0.07070983201265335,
0.10268223285675049,
1.2109951972961426,
-1.4233521223068237,
1.4806660413742065,
-0.6320691108703613,
0.2697422504425049,
-2.386060953140259,
1.4506664276123047,
-0.8455302715301514,
1.8388274908065796,
-2.6692087650299072,
0.3726094961166382,
-0.6190482974052429,
-0.5562635064125061,
0.3809281885623932,
-0.3945598900318146,
0.1923189014196396,
-0.1836400330066681,
-0.9259506464004517,
-0.036319926381111145,
-0.7949329018592834,
0.4752214550971985,
1.1820210218429565,
1.304727554321289,
-1.037848711013794,
-0.24430769681930542,
-1.7726943492889404,
-0.15443859994411469,
-0.7154160141944885,
0.32043716311454773,
-2.173919200897217,
-0.13772988319396973,
-1.8830084800720215,
-2.237354040145874,
-1.3973960876464844,
-0.9285072088241577,
1.0429327487945557,
0.2731381952762604,
-0.8584333062171936,
1.1221120357513428,
-0.26334434747695923,
-1.6370320320129395,
1.0420076847076416,
-2.0928893089294434
] |
https://github.com/huggingface/datasets/issues/5679 | Allow load_dataset to take a working dir for intermediate data | Hi ! AFAIK a dataset must be present on a local disk to be able to efficiently memory map the datasets Arrow files. What makes you think that it is possible to load from a cloud storage and have good performance ?
Anyway it's already possible to download_and_prepare a dataset as Arrow files in a cloud storage with:
```python
builder = load_dataset_builder(..., cache_dir="/temp/dir")
builder.download_and_prepare("/cloud_dir")
```
but then
```python
ds = builder.as_dataset()
```
would fail if "/cloud_dir" is not a local directory. | ### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable. | 238 | 81 | Allow load_dataset to take a working dir for intermediate data
### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable.
Hi ! AFAIK a dataset must be present on a local disk to be able to efficiently memory map the datasets Arrow files. What makes you think that it is possible to load from a cloud storage and have good performance ?
Anyway it's already possible to download_and_prepare a dataset as Arrow files in a cloud storage with:
```python
builder = load_dataset_builder(..., cache_dir="/temp/dir")
builder.download_and_prepare("/cloud_dir")
```
but then
```python
ds = builder.as_dataset()
```
would fail if "/cloud_dir" is not a local directory. | [
-1.195762276649475,
-0.9117304682731628,
-0.684326708316803,
1.4581472873687744,
-0.14692801237106323,
-1.3718359470367432,
0.15874092280864716,
-1.121563196182251,
1.6843329668045044,
-0.9083919525146484,
0.37396034598350525,
-1.6747208833694458,
0.06289356201887131,
-0.6584471464157104,
-0.7509657740592957,
-0.9191086292266846,
-0.4394002854824066,
-0.696076512336731,
0.9198436141014099,
2.4175078868865967,
1.1721296310424805,
-1.357579231262207,
2.6061391830444336,
0.7270580530166626,
-0.16547955572605133,
-0.9689094424247742,
0.39882317185401917,
0.033590611070394516,
-1.150815486907959,
-0.5012474060058594,
-0.9672834277153015,
-0.1182473748922348,
-0.5480661392211914,
-0.5325109362602234,
0.00002398621290922165,
0.442342072725296,
-0.3680369257926941,
-0.39076879620552063,
-0.517098605632782,
-0.8221498131752014,
0.4995001256465912,
-0.44872739911079407,
1.0670437812805176,
-0.32333946228027344,
1.8852035999298096,
-0.5736098885536194,
0.5758562684059143,
0.6686576008796692,
1.2805417776107788,
0.11396265029907227,
-0.04206601530313492,
0.2772426903247833,
0.43603646755218506,
-0.012009876780211926,
0.519245982170105,
1.13803231716156,
0.558616578578949,
0.6277998089790344,
0.6658552885055542,
-2.2239208221435547,
1.3523226976394653,
-1.0141113996505737,
0.3094998896121979,
1.361089825630188,
-0.9469853639602661,
0.3375076353549957,
-1.6586037874221802,
-0.1312555968761444,
0.56155925989151,
-2.1909494400024414,
0.27831315994262695,
-1.3785587549209595,
-0.550536572933197,
0.9360985159873962,
0.3090406656265259,
-1.2255544662475586,
0.20949818193912506,
-0.3909356892108917,
1.0419191122055054,
0.4690028429031372,
1.038379192352295,
-1.6818209886550903,
-0.05489177629351616,
-0.2784407138824463,
0.08637215942144394,
-1.2988330125808716,
-1.5831855535507202,
0.5167587995529175,
0.6637265086174011,
0.6325497627258301,
-0.09594462066888809,
1.0420230627059937,
-1.070067286491394,
0.806104302406311,
-1.0650213956832886,
-1.5939676761627197,
-1.3861011266708374,
-2.2495739459991455,
-2.3606362342834473,
0.7443714737892151,
-0.4683235287666321,
-0.591157853603363,
2.0291857719421387,
-1.0064399242401123,
-1.7536183595657349,
1.1090795993804932,
0.16893868148326874,
-0.046894967555999756,
2.372035503387451,
0.20895177125930786,
-0.6216530203819275,
0.4927203357219696,
-0.7017547488212585,
0.7672123908996582,
-0.45599326491355896,
1.2842751741409302,
0.4787471294403076,
-1.058334231376648,
1.6154972314834595,
-0.4550184905529022,
0.5290711522102356,
-0.6705520749092102,
-0.554379403591156,
-0.7889657020568848,
0.3860601782798767,
1.8504222631454468,
-0.31692034006118774,
1.578492522239685,
-0.3376172184944153,
-1.5193088054656982,
-1.7134958505630493,
0.9163504242897034,
0.32883962988853455,
-0.7742350697517395,
0.09741941094398499,
-0.2934383451938629,
0.19597169756889343,
-0.10231161117553711,
1.134657859802246,
1.2219457626342773,
0.7137811183929443,
-0.3029511868953705,
-0.7964471578598022,
0.2803660035133362,
0.006358296610414982,
-0.688357949256897,
-1.6912606954574585,
-0.30470478534698486,
0.22109267115592957,
0.5196531414985657,
-1.0540364980697632,
1.8061821460723877,
0.893212080001831,
1.8784481287002563,
0.9821582436561584,
-0.269048810005188,
1.5155434608459473,
-0.015149980783462524,
1.85064697265625,
-0.46923062205314636,
0.6590442061424255,
-0.2663276791572571,
-1.0994465351104736,
0.8309969305992126,
-0.32686033844947815,
-1.9831122159957886,
-0.7284464836120605,
-0.8189579248428345,
-0.11765694618225098,
-0.7783181667327881,
0.9208306670188904,
-0.23294617235660553,
-1.427505373954773,
0.24674205482006073,
-0.7576727271080017,
0.13551776111125946,
-1.1474038362503052,
0.3366508483886719,
0.7232733368873596,
-0.6205652952194214,
0.12112130224704742,
-0.21341398358345032,
-1.2762091159820557,
-0.45755159854888916,
0.38536232709884644,
1.9262611865997314,
-0.7077195048332214,
0.8643790483474731,
0.9510617852210999,
-0.6991336941719055,
-0.12251970171928406,
0.3031279444694519,
-0.2195659577846527,
0.7783759832382202,
-1.107987403869629,
-0.371014267206192,
1.1997945308685303,
-0.23191425204277039,
-0.6510118842124939,
1.506651759147644,
0.772307276725769,
-0.9847478270530701,
-0.03606121242046356,
-0.30579331517219543,
-0.8506871461868286,
-0.04534357413649559,
-1.5398350954055786,
-0.15086734294891357,
0.37376001477241516,
-1.4754942655563354,
-0.48124924302101135,
-0.1667245626449585,
1.1994160413742065,
-0.21466690301895142,
1.449049472808838,
-0.40744635462760925,
-0.2652307450771332,
-0.2612658441066742,
-0.4003129303455353,
0.17108190059661865,
-0.18815259635448456,
-0.5357341766357422,
0.10088479518890381,
-0.7371798753738403,
0.3239591717720032,
1.4911038875579834,
0.25128448009490967,
0.13622450828552246,
0.45085933804512024,
1.089213490486145,
0.32983237504959106,
-0.057728372514247894,
-0.8633571267127991,
-1.4710471630096436,
1.935966968536377,
-1.3974313735961914,
1.9546692371368408,
0.6474335789680481,
-0.026631619781255722,
-1.831843614578247,
-1.8034358024597168,
1.2962979078292847,
1.1948649883270264,
2.348090648651123,
0.5681553483009338,
0.28638237714767456,
-0.8497710227966309,
-0.668805718421936,
0.457530677318573,
-1.0433151721954346,
-0.6406233310699463,
0.17189787328243256,
2.285672187805176,
1.8699004650115967,
-0.49474987387657166,
-0.3011076748371124,
-1.0241488218307495,
1.538962483406067,
-0.20176270604133606,
0.19980467855930328,
1.9784852266311646,
-0.36509886384010315,
-0.9543158411979675,
1.3557268381118774,
-2.308756113052368,
0.15782426297664642,
2.00810170173645,
0.21388709545135498,
0.06664889305830002,
-1.3812763690948486,
-0.6397929787635803,
-0.3144572675228119,
-0.35668912529945374,
-1.2925482988357544,
0.43001893162727356,
-0.388761043548584,
-0.7017800211906433,
-1.4709829092025757,
0.20884886384010315,
-1.0997108221054077,
-1.7510497570037842,
0.1863437443971634,
1.9305143356323242,
1.9608163833618164,
-0.7175169587135315,
1.5900542736053467,
-0.24503186345100403,
0.2681673765182495,
1.3459012508392334,
1.2187334299087524,
3.168426036834717,
1.9525091648101807,
-1.2204416990280151,
0.6653048396110535,
-0.13567030429840088,
-0.45553627610206604,
1.207988977432251,
-1.2205874919891357,
1.2977750301361084,
-0.13025422394275665,
-1.201606273651123,
-1.257201075553894,
0.9872716069221497,
0.44366636872291565,
0.06641336530447006,
-0.5576841831207275,
1.2444281578063965,
0.11641831696033478,
1.42447030544281,
0.6056311726570129,
-0.4375949800014496,
0.6382735371589661,
-0.3655151128768921,
-0.5223953127861023,
1.5526167154312134,
0.33197513222694397,
-1.3595975637435913,
-2.2730720043182373,
-0.24661335349082947,
-0.9091898798942566,
-0.05683855339884758,
-0.5540791153907776,
-1.0073541402816772,
1.6941883563995361,
0.4278348982334137,
-1.3109804391860962,
-0.23481528460979462,
-0.2719309329986572,
-0.5591065883636475,
2.7653729915618896,
-1.2486134767532349,
-0.19057396054267883,
-1.0767185688018799,
-0.69181227684021,
1.687532663345337,
-1.328608751296997,
-0.2522919476032257,
-1.1166363954544067,
-0.5753850936889648,
-1.3087435960769653,
-0.48179328441619873,
-0.056605301797389984,
-0.9547190070152283,
0.8414826989173889,
0.17509186267852783,
-1.1882342100143433,
-0.34390950202941895,
-0.8115354776382446,
0.8956190347671509,
-0.19487495720386505,
0.1965612769126892,
1.8427928686141968,
0.3402172327041626,
-0.4589586853981018,
0.6940430402755737,
1.10264253616333,
0.5604045987129211,
-0.6782851219177246,
0.2547438442707062,
-0.7322584390640259,
0.24266643822193146,
-1.2536228895187378,
0.30415821075439453,
-2.8898491859436035,
0.6823797225952148,
-0.21934005618095398,
-0.2060781866312027,
-0.024691015481948853,
-1.3347177505493164,
1.0233935117721558,
2.6001625061035156,
-1.1047780513763428,
0.5141535997390747,
0.30019712448120117,
1.1963952779769897,
-1.624858021736145,
0.35914596915245056,
-0.3708862066268921,
2.067308187484741,
0.18003851175308228,
1.162179946899414,
-0.4524816572666168,
-2.2235403060913086,
0.627661943435669,
-1.1929681301116943,
-1.2997047901153564,
0.7506368160247803,
-0.8849720358848572,
0.05131266266107559,
-1.3214857578277588,
-0.1818058043718338,
-0.9296779036521912,
-1.2479934692382812,
0.767820417881012,
0.17201928794384003,
0.4066868722438812,
-0.559339165687561,
0.36722424626350403,
-2.160682201385498,
-1.321384072303772,
-0.3250900208950043,
-0.8801037073135376,
0.45326343178749084,
-0.3109373450279236,
0.6088840365409851,
-0.25930652022361755,
0.06597084552049637,
0.35372331738471985,
1.4562084674835205,
3.3700268268585205,
0.28456810116767883,
0.2837720811367035,
-0.10446801781654358,
-0.9034606218338013,
1.4183838367462158,
0.8411294221878052,
-0.044140975922346115,
-0.560543417930603,
-1.054073691368103,
1.303609848022461,
1.9287892580032349,
0.9971657991409302,
0.04383688420057297,
-0.6977269649505615,
-0.6328188180923462,
-0.010706303641200066,
0.13001438975334167,
0.49686703085899353,
0.9434748291969299,
0.1631358414888382,
0.06496363133192062,
1.3882744312286377,
1.2210161685943604,
-0.37656643986701965,
0.30899474024772644,
-0.7744069695472717,
-0.458187073469162,
0.4251291751861572,
0.2696773409843445,
0.021499648690223694,
0.264799028635025,
-0.8998904824256897,
-0.2793962061405182,
-0.45914655923843384,
-0.9802204966545105,
-0.7139180898666382,
-0.54791259765625,
-0.3877147138118744,
1.7395912408828735,
0.06787657737731934,
-0.5285351872444153,
-0.09700966626405716,
-0.7983811497688293,
-0.15387004613876343,
-1.07126784324646,
0.22950910031795502,
-0.06690865010023117,
-0.08257041126489639,
0.05607923865318298,
1.761192798614502,
-0.9516872763633728,
-2.0701091289520264,
0.26256895065307617,
0.1359565407037735,
-0.279434472322464,
0.2741812467575073,
1.6097952127456665,
0.4941096007823944,
1.400879979133606,
1.4250611066818237,
1.0280660390853882,
-0.6309770345687866,
-1.2652838230133057,
0.7434948682785034,
0.8730452060699463,
-1.4367897510528564,
0.7644690275192261,
0.11689317226409912,
-0.47704264521598816,
0.7116709351539612,
1.1664068698883057,
0.3866046965122223,
-2.0208451747894287,
0.8173461556434631,
-1.0085811614990234,
0.7771669626235962,
0.7861113548278809,
0.7425020337104797,
0.2390737235546112,
0.8889272212982178,
-1.1701966524124146,
-1.1738587617874146,
-0.7588114738464355,
-0.6088088154792786,
1.9382404088974,
-0.2727428674697876,
0.6978216171264648,
-0.16726423799991608,
-1.2849630117416382,
-0.07082948833703995,
0.8499059081077576,
0.3971889317035675,
-0.5196928977966309,
0.8288107514381409,
-0.6628531217575073,
-0.890070378780365,
-1.391660213470459,
-0.45936551690101624,
-1.08152437210083,
-0.9510888457298279,
0.9943079948425293,
0.8371185064315796,
0.2892833948135376,
1.9389901161193848,
0.7374032735824585,
0.35910725593566895,
-2.622973918914795,
0.8042973875999451,
0.23768804967403412,
-0.020670905709266663,
0.7714211344718933,
0.3940430283546448,
0.9584948420524597,
-0.056203443557024,
0.5163373351097107,
-2.4627277851104736,
2.2865374088287354,
-0.27308768033981323,
0.6682332158088684,
-0.06690138578414917,
-0.19876806437969208,
1.2379469871520996,
0.5595850944519043,
0.49503257870674133,
-1.0993531942367554,
0.6451314687728882,
-0.5531843900680542,
1.2145153284072876,
0.9296900033950806,
-0.8362054228782654,
0.010016811080276966,
1.4756256341934204,
0.427053302526474,
-0.5707537531852722,
-1.007104516029358,
-0.9623219966888428,
0.9214422702789307,
1.6616642475128174,
-0.0188121534883976,
-0.08793800324201584,
0.8971091508865356,
0.7158011794090271,
-1.2283601760864258,
0.12484028935432434,
-0.7388128042221069,
-0.7545794248580933,
1.6992210149765015,
1.955918788909912,
-0.1717209666967392,
-0.21361728012561798,
-0.7751796841621399,
-1.2301627397537231,
0.7951488494873047,
0.009163265116512775,
0.05473107099533081,
0.6247638463973999,
-0.6997776031494141,
1.0324211120605469,
0.8673812747001648,
1.0339374542236328,
0.18650920689105988,
0.3197498023509979,
0.47223159670829773,
-0.4173564910888672,
-1.2249969244003296,
-0.19625729322433472,
-1.182425618171692,
-2.569946050643921,
0.4930278956890106,
-0.2311977595090866,
-1.471724271774292,
0.02143329754471779,
-1.0652832984924316,
0.9346798658370972,
-0.5927041172981262,
-1.150877594947815,
-1.5203397274017334,
0.19379231333732605,
-0.06148512288928032,
0.9158301949501038,
-1.5195544958114624,
-0.05478111654520035,
1.161670207977295,
0.8651230335235596,
-0.676419198513031,
0.9776633977890015,
0.13352040946483612,
1.0476258993148804,
0.9168195724487305,
-0.4519597291946411,
0.5415112376213074,
-0.005377128254622221,
-1.4502160549163818,
0.5106918215751648,
1.156558632850647,
0.14488095045089722,
1.4539990425109863,
-0.5262462496757507,
0.13837547600269318,
0.3599911630153656,
-0.6515542268753052,
-0.481259286403656,
-0.5646997690200806,
0.712665319442749,
-0.028821442276239395,
-0.8299080729484558,
-0.03656788915395737,
-0.037405308336019516,
-0.26134583353996277,
0.05023956298828125,
-1.4971500635147095,
-0.12364117801189423,
-0.3349475562572479,
-0.6017544865608215,
-1.2492634057998657,
-0.1069025918841362,
1.3299635648727417,
-0.67916339635849,
-0.20925310254096985,
0.4554934799671173,
0.42075690627098083,
0.612918496131897,
0.4580022394657135,
-0.6527068018913269,
-0.22938817739486694,
-0.3091164827346802,
-0.31641343235969543,
0.39497217535972595,
1.3140355348587036,
-0.17369861900806427,
-0.9006970524787903,
0.6794010996818542,
-0.4665897488594055,
0.0714116320014,
1.9605633020401,
0.12327776849269867,
-0.6326783299446106,
0.261930912733078,
-0.7105984687805176,
1.890815019607544,
1.870514988899231,
1.2772314548492432,
-0.022286605089902878,
-0.9465819597244263,
0.632483184337616,
-0.35521212220191956,
-0.36734113097190857,
0.9273772835731506,
0.445215106010437,
-0.1921541392803192,
-1.3646619319915771,
0.7141425609588623,
1.1624411344528198,
-0.8402031064033508,
-0.8430732488632202,
0.07379280775785446,
-0.7163898944854736,
1.0336964130401611,
0.6395622491836548,
0.4176289439201355,
0.23501676321029663,
1.7826977968215942,
0.7210079431533813,
-0.4387846887111664,
0.6139033436775208,
0.5590433478355408,
-0.12027335911989212,
-2.1572635173797607,
-1.187261939048767,
0.3770996928215027,
-0.5695834755897522,
-1.6606086492538452,
1.3694125413894653,
-1.1074531078338623,
-0.988275945186615,
0.5703136324882507,
0.122309610247612,
1.5362628698349,
0.43080708384513855,
1.4984455108642578,
2.1509594917297363,
0.7944447994232178,
0.47308093309402466,
1.3621587753295898,
-0.1569634974002838,
-0.4476239085197449,
1.9361610412597656,
-0.5153787136077881,
0.5436128973960876,
1.0696351528167725,
-0.3290300667285919,
-1.0845777988433838,
-0.7781797647476196,
-1.2294588088989258,
-0.663479208946228,
1.1639502048492432,
0.07635777443647385,
-0.9457874298095703,
0.25894877314567566,
1.562852144241333,
0.055295445024967194,
-0.37985843420028687,
0.5438376069068909,
0.25950151681900024,
-0.7781578302383423,
-0.10820750892162323,
-0.9495638012886047,
0.5909507870674133,
-0.1883876919746399,
-0.34780457615852356,
0.41337111592292786,
0.4352066218852997,
1.2552052736282349,
-0.050146061927080154,
0.1817266196012497,
1.2040752172470093,
-1.4141554832458496,
1.4792581796646118,
-0.6737166047096252,
0.20079445838928223,
-2.4043216705322266,
1.469042181968689,
-0.8013684749603271,
1.9129054546356201,
-2.7069761753082275,
0.32284894585609436,
-0.5370340943336487,
-0.545588493347168,
0.383693665266037,
-0.3379579782485962,
0.0366811528801918,
-0.15764212608337402,
-1.2068020105361938,
0.08633635193109512,
-0.5577420592308044,
0.5869216918945312,
1.0856821537017822,
1.3635625839233398,
-1.2564798593521118,
-0.19420398771762848,
-1.73271906375885,
-0.11085686087608337,
-0.8059325814247131,
0.3642081320285797,
-2.085379123687744,
-0.09935615956783295,
-1.902540683746338,
-2.4225616455078125,
-1.3517801761627197,
-0.7280218601226807,
1.0068776607513428,
0.08148129284381866,
-0.8908727169036865,
1.2263966798782349,
-0.38518792390823364,
-1.858774185180664,
1.0696663856506348,
-2.1976537704467773
] |
https://github.com/huggingface/datasets/issues/5679 | Allow load_dataset to take a working dir for intermediate data | In my use case, I am trying to mount the S3 bucket as local system with S3FS-FUSE / [goofys](https://github.com/kahing/goofys). I want to use S3 to save the download data and save checkpoint for training for persistent. Setting the s3 location as cache directory is not fast enough. That is why I want to set a work directory for temp data for memory map and only save the final result to s3 cache. | ### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable. | 238 | 72 | Allow load_dataset to take a working dir for intermediate data
### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable.
In my use case, I am trying to mount the S3 bucket as local system with S3FS-FUSE / [goofys](https://github.com/kahing/goofys). I want to use S3 to save the download data and save checkpoint for training for persistent. Setting the s3 location as cache directory is not fast enough. That is why I want to set a work directory for temp data for memory map and only save the final result to s3 cache. | [
-1.2179388999938965,
-0.9751522541046143,
-0.8132283091545105,
1.424100637435913,
-0.18423683941364288,
-1.318167805671692,
0.12499965727329254,
-1.1312968730926514,
1.6852436065673828,
-0.9187774062156677,
0.3229617178440094,
-1.6762548685073853,
0.020860860124230385,
-0.6077541708946228,
-0.7197389006614685,
-0.9217939376831055,
-0.39289993047714233,
-0.8223010897636414,
0.9232874512672424,
2.5501060485839844,
1.1301857233047485,
-1.3917759656906128,
2.7255001068115234,
0.7202304601669312,
-0.1953454464673996,
-1.0266613960266113,
0.447338342666626,
0.030491242185235023,
-1.1595640182495117,
-0.4779214560985565,
-1.0756938457489014,
-0.0614035502076149,
-0.5331906080245972,
-0.46784526109695435,
0.05051450431346893,
0.35022348165512085,
-0.2636333405971527,
-0.3392246961593628,
-0.48398178815841675,
-0.7850498557090759,
0.45505860447883606,
-0.44386500120162964,
1.076776385307312,
-0.26698336005210876,
1.8494032621383667,
-0.44505074620246887,
0.5132033228874207,
0.6399271488189697,
1.3017410039901733,
0.022930489853024483,
-0.10863976925611496,
0.2121807336807251,
0.41497159004211426,
-0.04171460121870041,
0.4030691087245941,
1.1215821504592896,
0.5717034339904785,
0.6499996185302734,
0.6733593344688416,
-2.1791372299194336,
1.3247153759002686,
-0.9647886753082275,
0.3261689841747284,
1.4489742517471313,
-1.1047414541244507,
0.41711458563804626,
-1.7326525449752808,
-0.11971435695886612,
0.5615894198417664,
-2.226865530014038,
0.17537149786949158,
-1.2632794380187988,
-0.5286903381347656,
0.9423630237579346,
0.24399223923683167,
-1.3335554599761963,
0.14876651763916016,
-0.4418974220752716,
1.0552926063537598,
0.48457178473472595,
1.1541894674301147,
-1.7214510440826416,
0.014407053589820862,
-0.3105987012386322,
0.014235427603125572,
-1.377113699913025,
-1.6033350229263306,
0.5766780376434326,
0.6673190593719482,
0.6640726923942566,
-0.02923816628754139,
0.9634462594985962,
-0.9677090048789978,
0.8781735897064209,
-0.9896761178970337,
-1.5714242458343506,
-1.2665477991104126,
-2.390604257583618,
-2.3152434825897217,
0.726470947265625,
-0.3998998701572418,
-0.6130852699279785,
2.1445071697235107,
-1.0470380783081055,
-1.756635069847107,
1.1684552431106567,
0.14539465308189392,
0.004466640762984753,
2.388312816619873,
0.24413400888442993,
-0.6161380410194397,
0.47436830401420593,
-0.7088294625282288,
0.8401044011116028,
-0.418863445520401,
1.3434635400772095,
0.4813816547393799,
-1.0665744543075562,
1.7172867059707642,
-0.4110073447227478,
0.49640488624572754,
-0.6672042608261108,
-0.5203272700309753,
-0.8949728012084961,
0.4177345037460327,
1.8636919260025024,
-0.3344057500362396,
1.604272484779358,
-0.36466071009635925,
-1.5318937301635742,
-1.6965582370758057,
0.841743528842926,
0.4515741765499115,
-0.7778128981590271,
0.19022247195243835,
-0.2678765058517456,
0.09299177676439285,
-0.02665952779352665,
1.0975009202957153,
1.2192314863204956,
0.6017258167266846,
-0.26020345091819763,
-0.966888427734375,
0.28242039680480957,
-0.06487364321947098,
-0.7096560597419739,
-1.7422140836715698,
-0.3379560708999634,
0.1923191249370575,
0.6903500556945801,
-1.149327278137207,
1.7842607498168945,
0.8896288275718689,
1.924257516860962,
1.0026518106460571,
-0.26301559805870056,
1.4366021156311035,
-0.014274105429649353,
1.783704161643982,
-0.49323585629463196,
0.7604919075965881,
-0.18929168581962585,
-1.0612396001815796,
0.8387735486030579,
-0.37175253033638,
-1.9111826419830322,
-0.7570085525512695,
-0.8502989411354065,
-0.16672460734844208,
-0.6889771223068237,
0.9610400199890137,
-0.28053009510040283,
-1.3576374053955078,
0.3646785616874695,
-0.7035723924636841,
0.08570487797260284,
-1.1729271411895752,
0.3399384021759033,
0.7008422613143921,
-0.6651962399482727,
0.027741564437747,
-0.3318016231060028,
-1.3593851327896118,
-0.4814285933971405,
0.33961135149002075,
1.9446989297866821,
-0.7443597316741943,
0.8966167569160461,
0.8890088796615601,
-0.6821433901786804,
-0.12053834646940231,
0.35350489616394043,
-0.22341880202293396,
0.8552284836769104,
-1.1722261905670166,
-0.39219850301742554,
1.0748873949050903,
-0.20722612738609314,
-0.5993528366088867,
1.472521424293518,
0.671616792678833,
-1.0752482414245605,
-0.13272935152053833,
-0.2743271589279175,
-0.8414052724838257,
-0.012233410030603409,
-1.656230092048645,
-0.2129124402999878,
0.2882603704929352,
-1.4736038446426392,
-0.5568430423736572,
-0.20959600806236267,
1.3675203323364258,
-0.11353494971990585,
1.4383364915847778,
-0.3641694188117981,
-0.38383549451828003,
-0.3292851150035858,
-0.40710118412971497,
0.18183207511901855,
-0.16655820608139038,
-0.5460531115531921,
0.16360850632190704,
-0.778177797794342,
0.3559153378009796,
1.4993926286697388,
0.28489065170288086,
0.2082607001066208,
0.5607245564460754,
1.09662663936615,
0.34283730387687683,
-0.02444026991724968,
-0.881307065486908,
-1.5300939083099365,
1.9509882926940918,
-1.434240460395813,
1.8778879642486572,
0.7607988119125366,
-0.09934531897306442,
-1.8375630378723145,
-1.7556198835372925,
1.3665143251419067,
1.2952146530151367,
2.294167995452881,
0.6783819198608398,
0.3034396469593048,
-0.7673783898353577,
-0.6772741675376892,
0.38196486234664917,
-1.0092262029647827,
-0.7287190556526184,
0.10506434738636017,
2.29823899269104,
1.798384428024292,
-0.4660796523094177,
-0.24643638730049133,
-1.0455199480056763,
1.3795905113220215,
-0.12776023149490356,
0.19996985793113708,
2.0267064571380615,
-0.45032113790512085,
-1.0297647714614868,
1.2665504217147827,
-2.2826061248779297,
0.12647807598114014,
1.9864519834518433,
0.20336176455020905,
0.02772620879113674,
-1.4696556329727173,
-0.6967254281044006,
-0.20107980072498322,
-0.33679068088531494,
-1.2930009365081787,
0.5710707306861877,
-0.4607040286064148,
-0.7746116518974304,
-1.5422002077102661,
0.1465524137020111,
-1.1079113483428955,
-1.7070019245147705,
0.27783623337745667,
1.913251280784607,
2.045863151550293,
-0.7039592862129211,
1.5427502393722534,
-0.21943609416484833,
0.24477016925811768,
1.3066569566726685,
1.1865757703781128,
3.1230814456939697,
1.9251911640167236,
-1.1859828233718872,
0.6584756970405579,
-0.10974198579788208,
-0.4280923902988434,
1.1308554410934448,
-1.1037566661834717,
1.3047958612442017,
-0.1550469547510147,
-1.247148871421814,
-1.2317492961883545,
1.029184103012085,
0.4080120623111725,
0.04452035576105118,
-0.5102081894874573,
1.3477134704589844,
0.10054831206798553,
1.320419430732727,
0.5074229836463928,
-0.41355735063552856,
0.6310403943061829,
-0.42160969972610474,
-0.5164251327514648,
1.597983717918396,
0.24271076917648315,
-1.422753930091858,
-2.387638568878174,
-0.26711219549179077,
-0.8332098126411438,
-0.04826367646455765,
-0.631037175655365,
-0.9945557117462158,
1.6680119037628174,
0.4854412078857422,
-1.2610483169555664,
-0.33232223987579346,
-0.3702884316444397,
-0.6604223251342773,
2.6295182704925537,
-1.3879722356796265,
-0.24732425808906555,
-1.0947484970092773,
-0.5796468257904053,
1.6281884908676147,
-1.2932199239730835,
-0.1740148663520813,
-1.1344274282455444,
-0.6475597620010376,
-1.346240758895874,
-0.4832521975040436,
-0.07067565619945526,
-0.915412962436676,
0.781815230846405,
0.11910754442214966,
-1.0453624725341797,
-0.18708384037017822,
-0.8055158853530884,
0.8852053284645081,
-0.15311992168426514,
0.2580360174179077,
1.8123456239700317,
0.4165617823600769,
-0.5550456047058105,
0.6972143650054932,
1.1327873468399048,
0.6621935367584229,
-0.743984043598175,
0.16863951086997986,
-0.7110340595245361,
0.26595473289489746,
-1.18740713596344,
0.370956689119339,
-2.968838930130005,
0.6810135245323181,
-0.16710419952869415,
-0.14233988523483276,
0.03248000890016556,
-1.2866660356521606,
0.9871147871017456,
2.6429710388183594,
-1.082056999206543,
0.519737720489502,
0.33423835039138794,
1.2508052587509155,
-1.5850555896759033,
0.39540085196495056,
-0.3552534282207489,
2.1098318099975586,
0.13755148649215698,
1.1791831254959106,
-0.4903852939605713,
-2.1394264698028564,
0.6648845672607422,
-1.1802270412445068,
-1.2376588582992554,
0.7448804974555969,
-0.8205938339233398,
0.06201179325580597,
-1.3024253845214844,
-0.13570091128349304,
-0.915019690990448,
-1.2731090784072876,
0.7735925316810608,
0.11499524116516113,
0.43071573972702026,
-0.5850952863693237,
0.30175769329071045,
-2.1202902793884277,
-1.353718876838684,
-0.2603723704814911,
-0.8937588930130005,
0.3991002142429352,
-0.31904757022857666,
0.613240122795105,
-0.22160384058952332,
0.16329263150691986,
0.23992860317230225,
1.4297443628311157,
3.3431236743927,
0.24546638131141663,
0.44234499335289,
-0.07593537122011185,
-0.947721004486084,
1.476911187171936,
0.8950600028038025,
0.03372284770011902,
-0.6357364058494568,
-1.0358847379684448,
1.3088784217834473,
1.8970112800598145,
0.9612383842468262,
0.17196772992610931,
-0.7834909558296204,
-0.5587806105613708,
-0.053944237530231476,
0.21719954907894135,
0.5050017833709717,
0.9181820750236511,
0.07866624742746353,
0.0865064337849617,
1.5118619203567505,
1.221732258796692,
-0.457506388425827,
0.39970454573631287,
-0.7881566882133484,
-0.4544001817703247,
0.3752497434616089,
0.35322344303131104,
0.06343580037355423,
0.24351009726524353,
-0.8921964764595032,
-0.2798890173435211,
-0.3802105188369751,
-1.017406940460205,
-0.7348341345787048,
-0.4198058545589447,
-0.36507096886634827,
1.7340012788772583,
0.11959633231163025,
-0.49747759103775024,
-0.09267741441726685,
-0.8370572328567505,
-0.1300935596227646,
-1.072350263595581,
0.18584614992141724,
-0.09973300248384476,
-0.10422937572002411,
0.02536521665751934,
1.7990843057632446,
-0.9752466082572937,
-2.0720722675323486,
0.267633855342865,
0.19500157237052917,
-0.29792025685310364,
0.27740779519081116,
1.5041399002075195,
0.5884583592414856,
1.4539791345596313,
1.3843220472335815,
0.9639198184013367,
-0.6859297156333923,
-1.2961519956588745,
0.6596868634223938,
0.8746796250343323,
-1.4544880390167236,
0.8274998664855957,
0.05926740914583206,
-0.5145056247711182,
0.7306336760520935,
1.293203353881836,
0.4363043010234833,
-1.9991511106491089,
0.8358889818191528,
-0.8964934349060059,
0.8219514489173889,
0.7837275266647339,
0.7653969526290894,
0.2144206315279007,
0.7988256216049194,
-1.2375974655151367,
-1.2194336652755737,
-0.8055206537246704,
-0.5417574048042297,
2.012789487838745,
-0.23663587868213654,
0.6812148094177246,
-0.2135479748249054,
-1.293635368347168,
-0.0273212268948555,
0.7305518388748169,
0.37874189019203186,
-0.35107332468032837,
0.842779278755188,
-0.7033236622810364,
-1.000449538230896,
-1.4629279375076294,
-0.4735066890716553,
-0.9605929851531982,
-0.9570813775062561,
1.0851038694381714,
0.788831353187561,
0.2618147134780884,
2.0251357555389404,
0.5501651763916016,
0.24783214926719666,
-2.569462776184082,
0.8414390683174133,
0.3229212164878845,
0.05282667279243469,
0.8485539555549622,
0.2950950562953949,
1.0957088470458984,
-0.022598426789045334,
0.5056260228157043,
-2.3566651344299316,
2.2107465267181396,
-0.2630378007888794,
0.6587854027748108,
-0.059669844806194305,
-0.17610588669776917,
1.2082889080047607,
0.5228657126426697,
0.6484591364860535,
-1.0232435464859009,
0.6901872754096985,
-0.5972563624382019,
1.265767216682434,
0.9735488891601562,
-0.8070865273475647,
0.030000822618603706,
1.4390827417373657,
0.5429610013961792,
-0.4909091889858246,
-0.9553915858268738,
-0.9905423521995544,
0.8694705963134766,
1.7630876302719116,
-0.0033656619489192963,
0.017011238262057304,
0.7633007764816284,
0.7020493745803833,
-1.3286033868789673,
0.08644919842481613,
-0.7805265188217163,
-0.7934694886207581,
1.6327961683273315,
1.9748773574829102,
-0.14677119255065918,
-0.2815256118774414,
-0.8059950470924377,
-1.2486356496810913,
0.8278166651725769,
0.0002586357295513153,
0.02542840875685215,
0.697662889957428,
-0.6611376404762268,
1.1091151237487793,
0.8424993753433228,
0.9802755117416382,
0.13397221267223358,
0.3557916283607483,
0.4453517496585846,
-0.3320218622684479,
-1.1331374645233154,
-0.17310601472854614,
-1.1637364625930786,
-2.535163164138794,
0.45853951573371887,
-0.26525160670280457,
-1.4964439868927002,
-0.011838884092867374,
-1.043574333190918,
0.9426453709602356,
-0.5340508818626404,
-1.1370936632156372,
-1.575508952140808,
0.17979733645915985,
-0.12595611810684204,
0.9024955630302429,
-1.4796735048294067,
-0.0037854197435081005,
1.2041347026824951,
0.8999016880989075,
-0.6321098208427429,
0.9748719334602356,
0.1240147054195404,
0.9942612648010254,
0.8111900687217712,
-0.4339168965816498,
0.45454487204551697,
-0.026339340955018997,
-1.4062093496322632,
0.46600693464279175,
1.091322422027588,
0.20548604428768158,
1.4580217599868774,
-0.5881286263465881,
0.12893079221248627,
0.4371691942214966,
-0.4773902893066406,
-0.5473105311393738,
-0.5321438312530518,
0.7532075047492981,
-0.04555889964103699,
-0.7527100443840027,
0.015280744060873985,
-0.09916824847459793,
-0.30620330572128296,
0.19822940230369568,
-1.4784146547317505,
-0.17690543830394745,
-0.4203116297721863,
-0.6005953550338745,
-1.3097941875457764,
0.030766630545258522,
1.2466952800750732,
-0.7377376556396484,
-0.21233022212982178,
0.440637469291687,
0.4969797730445862,
0.48772603273391724,
0.5314271450042725,
-0.5546712875366211,
-0.30964767932891846,
-0.31410935521125793,
-0.33672910928726196,
0.3567690849304199,
1.147383689880371,
-0.21400128304958344,
-1.0008074045181274,
0.6802495121955872,
-0.4226720929145813,
0.08414420485496521,
1.9635647535324097,
0.12345623970031738,
-0.7567687630653381,
0.26806703209877014,
-0.6891064643859863,
1.872869849205017,
1.699376106262207,
1.324986457824707,
0.003523026593029499,
-0.8538424372673035,
0.681797981262207,
-0.300716370344162,
-0.30129769444465637,
0.9900908470153809,
0.46930044889450073,
-0.09255637973546982,
-1.352551817893982,
0.5819449424743652,
1.2040077447891235,
-0.809642493724823,
-0.7751848697662354,
0.03503494709730148,
-0.8011269569396973,
0.9714133143424988,
0.7257598042488098,
0.5480754971504211,
0.21606694161891937,
1.7007043361663818,
0.6575925946235657,
-0.5540139079093933,
0.5394154191017151,
0.4497124254703522,
-0.12477996200323105,
-2.0729856491088867,
-1.0479724407196045,
0.23478931188583374,
-0.5203853249549866,
-1.6225131750106812,
1.3652838468551636,
-1.1815671920776367,
-0.9386866092681885,
0.4918150305747986,
0.13225409388542175,
1.4513486623764038,
0.35499176383018494,
1.5522797107696533,
2.126619577407837,
0.781635582447052,
0.40209558606147766,
1.3810120820999146,
-0.11896047741174698,
-0.37376755475997925,
1.9203330278396606,
-0.5030506253242493,
0.5379100441932678,
1.1580705642700195,
-0.36522212624549866,
-1.0560516119003296,
-0.7924201488494873,
-1.1221660375595093,
-0.5866561532020569,
1.0375876426696777,
0.1855398565530777,
-1.0558375120162964,
0.2500922679901123,
1.426000952720642,
0.11646705865859985,
-0.3205254077911377,
0.4797987639904022,
0.34781143069267273,
-0.7561254501342773,
-0.10560481250286102,
-0.865480899810791,
0.5777884125709534,
-0.22646069526672363,
-0.35324549674987793,
0.40005233883857727,
0.43480175733566284,
1.2437331676483154,
-0.14397123456001282,
0.25736039876937866,
1.298818826675415,
-1.4193047285079956,
1.472082495689392,
-0.5775212049484253,
0.2186269760131836,
-2.4623003005981445,
1.47329843044281,
-0.7913806438446045,
1.900093913078308,
-2.746521472930908,
0.2830691635608673,
-0.5597678422927856,
-0.4641788601875305,
0.40413698554039,
-0.3417915999889374,
0.08811415731906891,
-0.18624575436115265,
-1.1426416635513306,
0.02786370925605297,
-0.6485421657562256,
0.5021651983261108,
1.2185438871383667,
1.2702736854553223,
-1.1747890710830688,
-0.12668055295944214,
-1.7322070598602295,
-0.1402481347322464,
-0.7688575983047485,
0.40613606572151184,
-2.155033826828003,
-0.18514998257160187,
-1.9124805927276611,
-2.4501423835754395,
-1.3222594261169434,
-0.8130747675895691,
0.9808757901191711,
0.04468568414449692,
-0.9508796334266663,
1.166113018989563,
-0.36605629324913025,
-1.733773112297058,
0.9831098914146423,
-2.1545722484588623
] |
https://github.com/huggingface/datasets/issues/5679 | Allow load_dataset to take a working dir for intermediate data | You can try setting `HF_DATASETS_DOWNLOADED_DATASETS_PATH` and `HF_DATASETS_EXTRACTED_DATASETS_PATH` to S3, and `HF_DATASETS_CACHE` to your local disk.
This way all your downloaded and extracted data are on your mounted S3, but the datasets Arrow files are on your local disk | ### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable. | 238 | 38 | Allow load_dataset to take a working dir for intermediate data
### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable.
You can try setting `HF_DATASETS_DOWNLOADED_DATASETS_PATH` and `HF_DATASETS_EXTRACTED_DATASETS_PATH` to S3, and `HF_DATASETS_CACHE` to your local disk.
This way all your downloaded and extracted data are on your mounted S3, but the datasets Arrow files are on your local disk | [
-1.175635576248169,
-0.9566090703010559,
-0.730627715587616,
1.4632325172424316,
-0.1999858021736145,
-1.3635915517807007,
0.15563815832138062,
-1.1481155157089233,
1.7140026092529297,
-0.9396654963493347,
0.3143867552280426,
-1.6687864065170288,
0.040378671139478683,
-0.6752669811248779,
-0.6671903133392334,
-0.9449783563613892,
-0.33749711513519287,
-0.794352650642395,
0.9845327138900757,
2.458775758743286,
1.1066293716430664,
-1.3080041408538818,
2.6635942459106445,
0.6978548765182495,
-0.19938674569129944,
-0.946773111820221,
0.45571738481521606,
0.05404135584831238,
-1.2004024982452393,
-0.5030575394630432,
-0.9591948390007019,
-0.08543510735034943,
-0.5492227077484131,
-0.4836905896663666,
0.05457281321287155,
0.48276785016059875,
-0.3521072268486023,
-0.34129852056503296,
-0.4704309403896332,
-0.8846278786659241,
0.42715340852737427,
-0.3564099669456482,
1.0544953346252441,
-0.3498001992702484,
1.902199625968933,
-0.4543571174144745,
0.48935070633888245,
0.6755645275115967,
1.2467900514602661,
0.08841275423765182,
-0.0410257987678051,
0.15652042627334595,
0.3774527907371521,
0.03150145336985588,
0.39818719029426575,
1.078877568244934,
0.49407055974006653,
0.7254549264907837,
0.6041325926780701,
-2.2362985610961914,
1.3518158197402954,
-0.937652587890625,
0.360405296087265,
1.4660581350326538,
-1.0487208366394043,
0.26469895243644714,
-1.6096289157867432,
-0.13692928850650787,
0.6260340809822083,
-2.1913657188415527,
0.29083818197250366,
-1.2786270380020142,
-0.568568229675293,
0.9944220781326294,
0.2910553514957428,
-1.215106725692749,
0.14583802223205566,
-0.45655548572540283,
1.1016936302185059,
0.5055904984474182,
0.9914324283599854,
-1.7296034097671509,
0.02532785013318062,
-0.3543435335159302,
-0.07246796041727066,
-1.4273476600646973,
-1.58468759059906,
0.601830244064331,
0.6662495136260986,
0.6998357772827148,
-0.09705425798892975,
1.0551784038543701,
-1.0231025218963623,
0.7681412100791931,
-0.9871702194213867,
-1.592279314994812,
-1.2499514818191528,
-2.4402005672454834,
-2.3816628456115723,
0.7514309287071228,
-0.4394594728946686,
-0.5992336869239807,
2.079991340637207,
-1.0456297397613525,
-1.7243860960006714,
1.1173449754714966,
0.2004857212305069,
-0.030502162873744965,
2.414018392562866,
0.3078891634941101,
-0.5898018479347229,
0.4370061457157135,
-0.7186281681060791,
0.815625786781311,
-0.42936718463897705,
1.3370124101638794,
0.45980480313301086,
-1.124079704284668,
1.6178791522979736,
-0.4648592174053192,
0.5773884654045105,
-0.662299394607544,
-0.5619204640388489,
-0.9085332751274109,
0.4102400839328766,
1.8098037242889404,
-0.32998114824295044,
1.5655452013015747,
-0.3509649336338043,
-1.546449899673462,
-1.659559965133667,
0.8970006108283997,
0.32512226700782776,
-0.7415241599082947,
0.12802492082118988,
-0.39537179470062256,
0.11936493963003159,
-0.09083002805709839,
1.181701421737671,
1.1776795387268066,
0.6042454242706299,
-0.36083218455314636,
-0.8800148367881775,
0.30175262689590454,
0.015993908047676086,
-0.7581003308296204,
-1.780635952949524,
-0.267774373292923,
0.09207914024591446,
0.5831573009490967,
-0.9817307591438293,
1.7872194051742554,
0.8914096355438232,
1.9174946546554565,
0.9598555564880371,
-0.2634625732898712,
1.392596960067749,
0.0005122395232319832,
1.830772876739502,
-0.5078631639480591,
0.6890754699707031,
-0.19263477623462677,
-1.0384880304336548,
0.9071420431137085,
-0.33007749915122986,
-1.8936179876327515,
-0.7172980308532715,
-0.8388407826423645,
-0.17413581907749176,
-0.7722083330154419,
1.004420518875122,
-0.2577630877494812,
-1.470694899559021,
0.2562435269355774,
-0.6827582716941833,
0.169374018907547,
-1.1616485118865967,
0.28247860074043274,
0.7447854280471802,
-0.6280698180198669,
0.010323465801775455,
-0.22756125032901764,
-1.3080329895019531,
-0.5179442763328552,
0.41230106353759766,
1.8857969045639038,
-0.6656151413917542,
0.9393317699432373,
0.9496275782585144,
-0.6984824538230896,
-0.08245817571878433,
0.2311016023159027,
-0.2614927291870117,
0.8169613480567932,
-1.1639536619186401,
-0.36466193199157715,
1.1601881980895996,
-0.34942689538002014,
-0.617711067199707,
1.5329750776290894,
0.7004196047782898,
-1.109412431716919,
-0.02056974545121193,
-0.2658035159111023,
-0.8175468444824219,
0.01802976429462433,
-1.6044164896011353,
-0.13412274420261383,
0.4285672903060913,
-1.4463063478469849,
-0.5721530914306641,
-0.1625436395406723,
1.3290327787399292,
-0.16758839786052704,
1.33851158618927,
-0.4078395664691925,
-0.3663463890552521,
-0.32506075501441956,
-0.3909069001674652,
0.18973477184772491,
-0.16203249990940094,
-0.4855773150920868,
0.1178555116057396,
-0.7574559450149536,
0.28682243824005127,
1.5301218032836914,
0.2073708474636078,
0.12727296352386475,
0.5081632137298584,
1.1246739625930786,
0.2770236134529114,
-0.08571864664554596,
-0.8308080434799194,
-1.522407054901123,
1.8679978847503662,
-1.4096990823745728,
1.94973623752594,
0.6877912878990173,
-0.0526244193315506,
-1.874025583267212,
-1.8034828901290894,
1.3625913858413696,
1.1961719989776611,
2.2477993965148926,
0.5960165858268738,
0.24325037002563477,
-0.8610252737998962,
-0.7142106890678406,
0.48120543360710144,
-0.9828958511352539,
-0.5818908214569092,
0.12395217269659042,
2.2137601375579834,
1.8530950546264648,
-0.4700736701488495,
-0.20613791048526764,
-1.0403774976730347,
1.412874698638916,
-0.17814236879348755,
0.24370497465133667,
1.9600229263305664,
-0.47510790824890137,
-1.0122630596160889,
1.3151692152023315,
-2.2551534175872803,
0.15654733777046204,
2.0166258811950684,
0.20829041302204132,
0.08427616953849792,
-1.3770740032196045,
-0.6681466102600098,
-0.30367332696914673,
-0.3041674792766571,
-1.323804259300232,
0.516600489616394,
-0.42009100317955017,
-0.6504142880439758,
-1.464984655380249,
0.29231444001197815,
-1.0698521137237549,
-1.708058476448059,
0.23216207325458527,
1.940213918685913,
2.0419516563415527,
-0.6919065713882446,
1.5859508514404297,
-0.21418243646621704,
0.26642560958862305,
1.330262303352356,
1.2200098037719727,
3.0669209957122803,
1.876274824142456,
-1.2382104396820068,
0.6436233520507812,
0.023385901004076004,
-0.4560115933418274,
1.2281638383865356,
-1.103983998298645,
1.4177634716033936,
-0.14816562831401825,
-1.1987026929855347,
-1.3477617502212524,
0.9545740485191345,
0.4883922040462494,
0.1113157868385315,
-0.4767875373363495,
1.2947007417678833,
0.03331368789076805,
1.3161358833312988,
0.6007146835327148,
-0.5166822671890259,
0.6757360696792603,
-0.4173969328403473,
-0.5054534673690796,
1.5378930568695068,
0.357145220041275,
-1.3941844701766968,
-2.294078826904297,
-0.26290541887283325,
-0.7729175090789795,
-0.02644377574324608,
-0.6590512990951538,
-1.0098116397857666,
1.662458896636963,
0.4940478503704071,
-1.203173279762268,
-0.2820689380168915,
-0.2697772979736328,
-0.6039393544197083,
2.6680471897125244,
-1.1915085315704346,
-0.16404631733894348,
-1.005353331565857,
-0.6597359776496887,
1.6763966083526611,
-1.2959364652633667,
-0.25304538011550903,
-1.1827101707458496,
-0.6454808712005615,
-1.2505934238433838,
-0.4353887736797333,
0.053467780351638794,
-1.0042603015899658,
0.9005558490753174,
0.04724794626235962,
-1.2328139543533325,
-0.2635745406150818,
-0.8965254426002502,
0.9374759793281555,
-0.22592300176620483,
0.2417120635509491,
1.7832396030426025,
0.35941946506500244,
-0.5926872491836548,
0.7220820784568787,
1.1153669357299805,
0.6589610576629639,
-0.7739508748054504,
0.21958263218402863,
-0.7332647442817688,
0.23809875547885895,
-1.1522388458251953,
0.3284887969493866,
-3.0593810081481934,
0.6938620209693909,
-0.1947760432958603,
-0.15588854253292084,
0.00037322938442230225,
-1.352421522140503,
0.9955180883407593,
2.568723201751709,
-1.1749030351638794,
0.5243769884109497,
0.3244762718677521,
1.1904360055923462,
-1.636546015739441,
0.3867741823196411,
-0.34610459208488464,
2.080389976501465,
0.07820083200931549,
1.218483805656433,
-0.5004955530166626,
-2.1132946014404297,
0.685416579246521,
-1.2011703252792358,
-1.2582122087478638,
0.7864534258842468,
-0.8799043893814087,
0.06850697845220566,
-1.3985662460327148,
-0.19591519236564636,
-0.9147910475730896,
-1.3666822910308838,
0.6980185508728027,
0.16811171174049377,
0.43347737193107605,
-0.5412631034851074,
0.2701285183429718,
-2.1503100395202637,
-1.314686894416809,
-0.2677021920681,
-0.9273543953895569,
0.4609586000442505,
-0.3754686117172241,
0.6230531930923462,
-0.18089766800403595,
0.10337347537279129,
0.40312322974205017,
1.5099025964736938,
3.3919332027435303,
0.2023015171289444,
0.3192494809627533,
-0.10713589936494827,
-0.8488302230834961,
1.399027943611145,
0.9511384963989258,
0.034264300018548965,
-0.5934613347053528,
-1.0147771835327148,
1.280333399772644,
1.9576719999313354,
0.9729980230331421,
0.08893924206495285,
-0.705144464969635,
-0.5146088004112244,
-0.14290617406368256,
0.19076283276081085,
0.4782397150993347,
0.8540128469467163,
0.14952291548252106,
0.08359289169311523,
1.4459309577941895,
1.1415362358093262,
-0.4612717032432556,
0.3306211233139038,
-0.7639228701591492,
-0.4068358838558197,
0.46656015515327454,
0.2935408055782318,
0.00002110004425048828,
0.2568381428718567,
-0.9159001708030701,
-0.2912288308143616,
-0.3495672643184662,
-0.9627895355224609,
-0.6821696162223816,
-0.5629081130027771,
-0.43939265608787537,
1.6321077346801758,
0.05528588593006134,
-0.5371223092079163,
-0.1059352457523346,
-0.7376341819763184,
-0.16624142229557037,
-1.0914613008499146,
0.19021853804588318,
-0.12796135246753693,
-0.11745833605527878,
-0.04522952809929848,
1.7237465381622314,
-1.0120034217834473,
-2.1057088375091553,
0.24032658338546753,
0.19606752693653107,
-0.24789321422576904,
0.23927070200443268,
1.5353258848190308,
0.545414924621582,
1.4880141019821167,
1.3474770784378052,
1.0626403093338013,
-0.7221901416778564,
-1.3283365964889526,
0.7721335887908936,
0.898557722568512,
-1.418391466140747,
0.8008871078491211,
0.04368767514824867,
-0.5885339379310608,
0.7767507433891296,
1.2630138397216797,
0.46530473232269287,
-1.9705586433410645,
0.8277756571769714,
-0.9965095520019531,
0.7918323874473572,
0.8260895013809204,
0.7877340316772461,
0.18988215923309326,
0.913040280342102,
-1.1822874546051025,
-1.171787977218628,
-0.6970395445823669,
-0.6073551177978516,
1.9716622829437256,
-0.27849850058555603,
0.6761566996574402,
-0.22807717323303223,
-1.3009392023086548,
-0.03343728557229042,
0.7989481687545776,
0.4173404574394226,
-0.3942183256149292,
0.8412719368934631,
-0.6827394366264343,
-0.9073157906532288,
-1.4065738916397095,
-0.36892804503440857,
-1.1256886720657349,
-0.9271402359008789,
0.985024094581604,
0.7559340000152588,
0.2982923984527588,
1.9266780614852905,
0.6275116801261902,
0.35619789361953735,
-2.4871702194213867,
0.8383557796478271,
0.2900477349758148,
0.0000677136704325676,
0.7818682193756104,
0.33102309703826904,
1.1735855340957642,
0.02151886373758316,
0.48921075463294983,
-2.4086759090423584,
2.266996383666992,
-0.2677317261695862,
0.5845349431037903,
-0.05280030518770218,
-0.25441408157348633,
1.259394645690918,
0.5634236335754395,
0.5574848651885986,
-1.0539143085479736,
0.816074013710022,
-0.5612136721611023,
1.1973528861999512,
1.0070887804031372,
-0.8072763681411743,
-0.02527535706758499,
1.4507161378860474,
0.5316766500473022,
-0.519435465335846,
-0.9636343717575073,
-0.9259526133537292,
0.8869634866714478,
1.607659935951233,
-0.018077004700899124,
-0.07269254326820374,
0.7815129160881042,
0.7703405618667603,
-1.182472825050354,
0.14460894465446472,
-0.6919249892234802,
-0.7934768795967102,
1.6239887475967407,
1.9234373569488525,
-0.13673284649848938,
-0.16979455947875977,
-0.8801277875900269,
-1.1375007629394531,
0.7904894351959229,
-0.0558505617082119,
-0.059094998985528946,
0.6344848871231079,
-0.6447457671165466,
0.9754939675331116,
0.8686230778694153,
0.9593232274055481,
0.14250491559505463,
0.3347591161727905,
0.5371882915496826,
-0.3467053174972534,
-1.186435580253601,
-0.2950016260147095,
-1.1340343952178955,
-2.6304800510406494,
0.4810403883457184,
-0.29868629574775696,
-1.5510703325271606,
-0.027688078582286835,
-1.1223108768463135,
1.0272184610366821,
-0.6014319062232971,
-1.1620349884033203,
-1.687990665435791,
0.20789416134357452,
-0.133794367313385,
0.9173086285591125,
-1.4789968729019165,
-0.05288257822394371,
1.1937700510025024,
0.8196606636047363,
-0.6567214727401733,
1.0491623878479004,
0.06186579167842865,
0.9990092515945435,
0.8202205896377563,
-0.45284417271614075,
0.5270072817802429,
0.03631410002708435,
-1.4760264158248901,
0.4964028298854828,
1.1439721584320068,
0.1692497581243515,
1.4572296142578125,
-0.43959352374076843,
0.108876533806324,
0.40728768706321716,
-0.5621017217636108,
-0.5615973472595215,
-0.45865073800086975,
0.7596099376678467,
-0.029607560485601425,
-0.7150667905807495,
-0.002365071326494217,
-0.11549276113510132,
-0.35309648513793945,
0.1201760545372963,
-1.5466574430465698,
-0.22366470098495483,
-0.4196549952030182,
-0.5613199472427368,
-1.2842696905136108,
-0.05381491035223007,
1.3488835096359253,
-0.6125071048736572,
-0.2376968413591385,
0.46538326144218445,
0.5040645003318787,
0.579646646976471,
0.5558353662490845,
-0.584257960319519,
-0.1402692198753357,
-0.3733295202255249,
-0.31969720125198364,
0.32677096128463745,
1.2723543643951416,
-0.11656206101179123,
-0.9003782868385315,
0.6744711399078369,
-0.42620861530303955,
0.08284520357847214,
1.9917978048324585,
0.15062975883483887,
-0.7460420727729797,
0.27061957120895386,
-0.7079781293869019,
1.931802749633789,
1.7432880401611328,
1.3087491989135742,
0.020664364099502563,
-0.9544939398765564,
0.6170488595962524,
-0.28976860642433167,
-0.3289596140384674,
1.0121678113937378,
0.41405221819877625,
-0.1605607569217682,
-1.3125194311141968,
0.7560474276542664,
1.1650937795639038,
-0.8040903210639954,
-0.8708266019821167,
0.10892906039953232,
-0.7198049426078796,
0.969745397567749,
0.677960991859436,
0.5539024472236633,
0.3384307324886322,
1.6819546222686768,
0.6535494923591614,
-0.543678343296051,
0.5386532545089722,
0.46479979157447815,
-0.1199726015329361,
-2.013432741165161,
-1.1989350318908691,
0.39925235509872437,
-0.676293134689331,
-1.642416000366211,
1.3694112300872803,
-1.125280499458313,
-0.9811456203460693,
0.5174018144607544,
0.13009776175022125,
1.4505300521850586,
0.502846360206604,
1.5279048681259155,
2.1152403354644775,
0.7392810583114624,
0.43238896131515503,
1.4172477722167969,
-0.19752401113510132,
-0.4453181028366089,
2.0088369846343994,
-0.5266252160072327,
0.5614923238754272,
1.1576755046844482,
-0.38000625371932983,
-1.0673540830612183,
-0.7673124074935913,
-1.0994595289230347,
-0.5475842952728271,
1.0216652154922485,
0.10343828797340393,
-1.0830644369125366,
0.2300129234790802,
1.4672423601150513,
0.08881733566522598,
-0.2831987738609314,
0.6862456798553467,
0.2740771770477295,
-0.8193067312240601,
-0.08687350898981094,
-0.9900352954864502,
0.5939890742301941,
-0.3033614456653595,
-0.326681911945343,
0.41002950072288513,
0.5712230205535889,
1.3032360076904297,
-0.13326215744018555,
0.20745541155338287,
1.1926580667495728,
-1.3977903127670288,
1.3862310647964478,
-0.665022075176239,
0.15830299258232117,
-2.4513962268829346,
1.4300563335418701,
-0.6872782111167908,
1.901965856552124,
-2.7328875064849854,
0.2794111669063568,
-0.5757067799568176,
-0.5493929386138916,
0.40852901339530945,
-0.2594704329967499,
0.1256389021873474,
-0.16727982461452484,
-1.2251685857772827,
0.07083575427532196,
-0.6264025568962097,
0.5727334022521973,
1.2029814720153809,
1.3081225156784058,
-1.2374526262283325,
-0.1832340806722641,
-1.7035858631134033,
-0.14248257875442505,
-0.7611271142959595,
0.35812923312187195,
-2.1666154861450195,
-0.1755640059709549,
-1.8848904371261597,
-2.506260395050049,
-1.2308021783828735,
-0.7445120215415955,
1.0348255634307861,
0.07505824416875839,
-0.9726355671882629,
1.3149614334106445,
-0.36463287472724915,
-1.7984743118286133,
0.9210687279701233,
-2.1500813961029053
] |
https://github.com/huggingface/datasets/issues/5679 | Allow load_dataset to take a working dir for intermediate data | If we hope to also persist the Arrow files on the mounted S3 but work with the efficiency of local disk, is there any recommended way to do this, other than copying the Arrow files from local disk to S3? | ### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable. | 238 | 40 | Allow load_dataset to take a working dir for intermediate data
### Feature request
As a user, I can set a working dir for intermediate data creation. The processed files will be moved to the cache dir, like
```
load_dataset(…, working_dir=”/temp/dir”, cache_dir=”/cloud_dir”).
```
### Motivation
This will help the use case for using datasets with cloud storage as cache. It will help boost the performance.
### Your contribution
I can provide a PR to fix this if the proposal seems reasonable.
If we hope to also persist the Arrow files on the mounted S3 but work with the efficiency of local disk, is there any recommended way to do this, other than copying the Arrow files from local disk to S3? | [
-1.1368213891983032,
-0.9246813654899597,
-0.8290974497795105,
1.5174353122711182,
-0.21670615673065186,
-1.336381435394287,
0.18729238212108612,
-1.1208465099334717,
1.6545919179916382,
-0.9116479754447937,
0.37355831265449524,
-1.669002652168274,
0.1261192113161087,
-0.664239227771759,
-0.6329672932624817,
-0.9596636295318604,
-0.3851523995399475,
-0.7259277105331421,
0.9516820311546326,
2.4690911769866943,
1.1010569334030151,
-1.4068986177444458,
2.6515870094299316,
0.7544706463813782,
-0.2164245843887329,
-0.9614765048027039,
0.5028789043426514,
0.0810580849647522,
-1.1358429193496704,
-0.5390810370445251,
-0.9887604117393494,
-0.09639985859394073,
-0.4687054455280304,
-0.4041767418384552,
-0.009391714818775654,
0.3991534411907196,
-0.31487247347831726,
-0.3438284695148468,
-0.49933767318725586,
-0.8206759691238403,
0.463998943567276,
-0.43210694193840027,
1.0127536058425903,
-0.30489015579223633,
1.8838492631912231,
-0.47124654054641724,
0.505843997001648,
0.7440986037254333,
1.3564434051513672,
0.0779874324798584,
-0.16300508379936218,
0.24007023870944977,
0.3881590664386749,
-0.0586085170507431,
0.41889744997024536,
1.0608724355697632,
0.5415201783180237,
0.7955394983291626,
0.5875729322433472,
-2.1710493564605713,
1.3522206544876099,
-1.0194252729415894,
0.37245842814445496,
1.4364200830459595,
-1.1199262142181396,
0.42259639501571655,
-1.6850584745407104,
-0.16331098973751068,
0.5434960126876831,
-2.256711721420288,
0.2898593842983246,
-1.2222769260406494,
-0.5352160334587097,
0.906934380531311,
0.21433646976947784,
-1.3202488422393799,
0.1255224496126175,
-0.45400065183639526,
1.065507173538208,
0.46819987893104553,
1.058997392654419,
-1.6002116203308105,
0.1278400719165802,
-0.39734283089637756,
-0.033783361315727234,
-1.3826560974121094,
-1.5765610933303833,
0.5899862051010132,
0.6696555614471436,
0.6197304725646973,
-0.015731152147054672,
1.002493143081665,
-0.976001501083374,
0.8296195268630981,
-0.9393817782402039,
-1.6048407554626465,
-1.2803428173065186,
-2.3616340160369873,
-2.302521228790283,
0.7865785956382751,
-0.45817965269088745,
-0.6520704030990601,
2.133072853088379,
-1.0414117574691772,
-1.7590144872665405,
1.159608006477356,
0.1357516050338745,
-0.07435749471187592,
2.505667209625244,
0.21861451864242554,
-0.574884295463562,
0.42920076847076416,
-0.721130907535553,
0.8464943170547485,
-0.5370414853096008,
1.2934926748275757,
0.4261890947818756,
-1.077416181564331,
1.7512246370315552,
-0.38822731375694275,
0.5011513829231262,
-0.6462666988372803,
-0.5776472091674805,
-0.917134702205658,
0.40676966309547424,
1.8829401731491089,
-0.36462557315826416,
1.5860772132873535,
-0.383035808801651,
-1.443359375,
-1.67911696434021,
0.9537529349327087,
0.38227251172065735,
-0.8229700326919556,
0.17086602747440338,
-0.30396032333374023,
0.12496349215507507,
-0.046362150460481644,
1.0874550342559814,
1.2099103927612305,
0.6093236804008484,
-0.2470080852508545,
-0.9130233526229858,
0.2525978982448578,
-0.022490736097097397,
-0.6497893929481506,
-1.7858911752700806,
-0.27440962195396423,
0.039920516312122345,
0.5985032320022583,
-1.0326745510101318,
1.7832015752792358,
0.923846960067749,
1.9098107814788818,
0.9525856971740723,
-0.2913983464241028,
1.5129927396774292,
-0.023612700402736664,
1.8100532293319702,
-0.4614441394805908,
0.6979747414588928,
-0.22191327810287476,
-1.0882030725479126,
0.8846741914749146,
-0.3081856667995453,
-1.8966141939163208,
-0.7307863235473633,
-0.8895927667617798,
-0.166215717792511,
-0.7691363096237183,
1.0078911781311035,
-0.27937790751457214,
-1.304020643234253,
0.3042009174823761,
-0.6651416420936584,
0.13041682541370392,
-1.3030390739440918,
0.36608386039733887,
0.7384474873542786,
-0.621114194393158,
0.09164150059223175,
-0.3129211962223053,
-1.2927842140197754,
-0.5203748345375061,
0.33929771184921265,
1.9125124216079712,
-0.7077809572219849,
0.8507943153381348,
0.8872639536857605,
-0.689480721950531,
-0.22853851318359375,
0.3597918748855591,
-0.23793664574623108,
0.8322709798812866,
-1.1086715459823608,
-0.48378124833106995,
1.1012616157531738,
-0.28241991996765137,
-0.5961474180221558,
1.464357852935791,
0.6828590035438538,
-1.063437819480896,
-0.11565357446670532,
-0.2811991274356842,
-0.8605211973190308,
0.04232747480273247,
-1.5858521461486816,
-0.15602794289588928,
0.37902411818504333,
-1.4576483964920044,
-0.5698990821838379,
-0.16643470525741577,
1.2778030633926392,
-0.16556958854198456,
1.4383682012557983,
-0.3984234035015106,
-0.3647669851779938,
-0.3110613524913788,
-0.3819212019443512,
0.1878919005393982,
-0.12765899300575256,
-0.5248444080352783,
0.12131011486053467,
-0.7230253219604492,
0.3667459189891815,
1.5111080408096313,
0.2400045245885849,
0.10981033742427826,
0.5776355862617493,
1.0628001689910889,
0.3512725532054901,
-0.07872819900512695,
-0.9260419011116028,
-1.4286096096038818,
1.8757412433624268,
-1.427776575088501,
1.88198983669281,
0.7725685834884644,
-0.06339062750339508,
-1.8998634815216064,
-1.7815994024276733,
1.3842133283615112,
1.2723486423492432,
2.2153868675231934,
0.6413841843605042,
0.2814001441001892,
-0.8175375461578369,
-0.6499655246734619,
0.4181675910949707,
-1.0744245052337646,
-0.7005075216293335,
0.12933111190795898,
2.276684045791626,
1.8710534572601318,
-0.45058387517929077,
-0.22864915430545807,
-1.0811831951141357,
1.3704583644866943,
-0.09688010811805725,
0.16738064587116241,
1.9367053508758545,
-0.4585144817829132,
-1.0747814178466797,
1.175054669380188,
-2.2945079803466797,
0.09433108568191528,
1.9691518545150757,
0.2120520919561386,
0.04777579754590988,
-1.4337704181671143,
-0.6363571286201477,
-0.21720950305461884,
-0.29677683115005493,
-1.3588770627975464,
0.48830804228782654,
-0.39600932598114014,
-0.6917654275894165,
-1.518120288848877,
0.28120848536491394,
-1.15164053440094,
-1.7011232376098633,
0.26775097846984863,
1.9815948009490967,
2.0401084423065186,
-0.6840957999229431,
1.5550323724746704,
-0.2345428317785263,
0.2588866949081421,
1.2930998802185059,
1.113721251487732,
3.058457136154175,
1.974566102027893,
-1.1788796186447144,
0.5596055388450623,
-0.010301042348146439,
-0.4609907269477844,
1.1768734455108643,
-1.0838170051574707,
1.3997553586959839,
-0.13172608613967896,
-1.2213152647018433,
-1.3251540660858154,
0.904087245464325,
0.3993363380432129,
0.10625636577606201,
-0.4265952408313751,
1.3424686193466187,
0.12996013462543488,
1.3370673656463623,
0.6250416040420532,
-0.5041200518608093,
0.639605700969696,
-0.34104958176612854,
-0.45164766907691956,
1.600540041923523,
0.2937951982021332,
-1.3639215230941772,
-2.354949474334717,
-0.25625666975975037,
-0.7802761197090149,
0.03450121730566025,
-0.6685553193092346,
-0.9554482698440552,
1.7052768468856812,
0.4618872106075287,
-1.1680208444595337,
-0.3272327184677124,
-0.27223989367485046,
-0.6382001638412476,
2.617182970046997,
-1.3372970819473267,
-0.2601251006126404,
-1.0579197406768799,
-0.6474465727806091,
1.6758763790130615,
-1.2842897176742554,
-0.27329221367836,
-1.1166867017745972,
-0.6128352284431458,
-1.2675474882125854,
-0.43647411465644836,
-0.09422305226325989,
-0.951104462146759,
0.8362674713134766,
0.05128743499517441,
-1.142467975616455,
-0.30065590143203735,
-0.7961013317108154,
0.7964684963226318,
-0.2262265980243683,
0.2523740530014038,
1.7788981199264526,
0.375811904668808,
-0.5260680913925171,
0.8058799505233765,
1.1138310432434082,
0.600104808807373,
-0.6846792697906494,
0.21784749627113342,
-0.6771632432937622,
0.23977071046829224,
-1.1313072443008423,
0.35850435495376587,
-3.0019283294677734,
0.5792499780654907,
-0.24581505358219147,
-0.10197383165359497,
0.004116478376090527,
-1.290038824081421,
1.0496389865875244,
2.565882682800293,
-1.0639680624008179,
0.5233848094940186,
0.29674965143203735,
1.2728290557861328,
-1.6211742162704468,
0.42735129594802856,
-0.34690579771995544,
2.1452267169952393,
0.09270724654197693,
1.1579982042312622,
-0.5130541324615479,
-2.1883997917175293,
0.6663019061088562,
-1.200517177581787,
-1.328126072883606,
0.7318859696388245,
-0.7979904413223267,
-0.04843991994857788,
-1.3516509532928467,
-0.20927414298057556,
-0.8825562596321106,
-1.3741424083709717,
0.7571486234664917,
0.12712624669075012,
0.46198657155036926,
-0.5700973272323608,
0.23259902000427246,
-2.1845645904541016,
-1.3786845207214355,
-0.27789178490638733,
-0.9383606314659119,
0.39098212122917175,
-0.37841975688934326,
0.6522626280784607,
-0.27468085289001465,
0.13319002091884613,
0.27532830834388733,
1.479110836982727,
3.353245496749878,
0.31014284491539,
0.41541990637779236,
-0.1714746505022049,
-0.8154233694076538,
1.4848209619522095,
0.907774031162262,
0.05463261529803276,
-0.6123623251914978,
-1.0004799365997314,
1.342801809310913,
1.9222394227981567,
0.9122031927108765,
0.108318030834198,
-0.7400804162025452,
-0.4715515375137329,
-0.1550493687391281,
0.26965954899787903,
0.459663987159729,
0.9459376335144043,
0.11392416059970856,
0.0552954263985157,
1.4357647895812988,
1.2358297109603882,
-0.5091639757156372,
0.40543878078460693,
-0.7604178786277771,
-0.378500372171402,
0.4117771089076996,
0.33384501934051514,
0.012044716626405716,
0.25316891074180603,
-0.8664509057998657,
-0.37128594517707825,
-0.38674044609069824,
-0.9898455739021301,
-0.7120548486709595,
-0.43629559874534607,
-0.37771710753440857,
1.7269996404647827,
0.13953055441379547,
-0.5283925533294678,
-0.11416609585285187,
-0.7703254222869873,
-0.18115171790122986,
-1.0996899604797363,
0.15581922233104706,
-0.1170549988746643,
-0.13975444436073303,
0.06176379695534706,
1.8229695558547974,
-1.0216271877288818,
-2.1895782947540283,
0.30655577778816223,
0.17334969341754913,
-0.16741298139095306,
0.30964359641075134,
1.5253478288650513,
0.4763335883617401,
1.497870922088623,
1.3766865730285645,
1.0350459814071655,
-0.7839924097061157,
-1.3210570812225342,
0.7357671856880188,
0.9652459621429443,
-1.481249213218689,
0.678631603717804,
0.09820088744163513,
-0.5111925601959229,
0.6983798742294312,
1.1577857732772827,
0.45287683606147766,
-2.086977243423462,
0.9001865386962891,
-0.9814580082893372,
0.7932345271110535,
0.8716362118721008,
0.765550434589386,
0.2689214050769806,
0.778581976890564,
-1.1263976097106934,
-1.2079384326934814,
-0.7499750256538391,
-0.5619309544563293,
1.962005376815796,
-0.2872898578643799,
0.7463405728340149,
-0.11448870599269867,
-1.3050462007522583,
-0.0380290225148201,
0.736961305141449,
0.388982355594635,
-0.40777769684791565,
0.8228068947792053,
-0.6676645874977112,
-1.019321322441101,
-1.5093306303024292,
-0.4364991784095764,
-1.0580443143844604,
-0.9582029581069946,
1.0415538549423218,
0.8070451617240906,
0.21540145576000214,
2.0151028633117676,
0.6293767094612122,
0.30567142367362976,
-2.5984323024749756,
0.8648295998573303,
0.3647197484970093,
-0.006157275289297104,
0.7543672323226929,
0.41659194231033325,
1.0919547080993652,
0.047179725021123886,
0.4119870066642761,
-2.4349257946014404,
2.316178321838379,
-0.22793427109718323,
0.6827391982078552,
-0.003165049944072962,
-0.24901850521564484,
1.2139747142791748,
0.5194175839424133,
0.5895140171051025,
-1.0287340879440308,
0.7057528495788574,
-0.6041532754898071,
1.313462734222412,
0.9924823045730591,
-0.761178731918335,
-0.01349590253084898,
1.4154924154281616,
0.5452016592025757,
-0.5041809678077698,
-0.9471803307533264,
-0.9274759888648987,
0.8496484756469727,
1.7065566778182983,
-0.012507005594670773,
-0.005906322039663792,
0.7536782622337341,
0.666496992111206,
-1.1830453872680664,
0.09721344709396362,
-0.7224099040031433,
-0.8270729184150696,
1.5825262069702148,
1.8630497455596924,
-0.18439047038555145,
-0.2272501289844513,
-0.8928605318069458,
-1.2725260257720947,
0.7798665165901184,
-0.08977112174034119,
0.03158983215689659,
0.6467424631118774,
-0.6878785490989685,
1.03937828540802,
0.8745025396347046,
1.011879563331604,
0.22042979300022125,
0.36104094982147217,
0.47526073455810547,
-0.374524861574173,
-1.1357704401016235,
-0.17636144161224365,
-1.1678292751312256,
-2.5927484035491943,
0.43749862909317017,
-0.4341225326061249,
-1.4441994428634644,
-0.0007489882409572601,
-1.1051008701324463,
0.97449791431427,
-0.5825656056404114,
-1.1350189447402954,
-1.623966932296753,
0.18124106526374817,
-0.13905321061611176,
0.8970383405685425,
-1.465807557106018,
-0.06312409788370132,
1.137566328048706,
0.8944821357727051,
-0.6899735927581787,
1.007045865058899,
0.13000008463859558,
1.0859829187393188,
0.8734509348869324,
-0.45710569620132446,
0.46997833251953125,
-0.0014908332377672195,
-1.4320800304412842,
0.49686121940612793,
1.1025152206420898,
0.17995363473892212,
1.4633420705795288,
-0.5211597681045532,
0.006321625784039497,
0.4177875220775604,
-0.5058265328407288,
-0.5148946046829224,
-0.5281478762626648,
0.7478379011154175,
-0.14919234812259674,
-0.7489573955535889,
0.07694610953330994,
-0.1475321650505066,
-0.30003681778907776,
0.0744035542011261,
-1.502823829650879,
-0.22756817936897278,
-0.47609126567840576,
-0.6485661268234253,
-1.3324264287948608,
-0.01941920816898346,
1.2968835830688477,
-0.5684649348258972,
-0.2605186998844147,
0.4635109007358551,
0.5061858296394348,
0.518312931060791,
0.5365712642669678,
-0.5529213547706604,
-0.2522084712982178,
-0.24399369955062866,
-0.29214149713516235,
0.4200800359249115,
1.268802523612976,
-0.21148456633090973,
-0.9337697625160217,
0.6306512951850891,
-0.35940393805503845,
0.018966741859912872,
1.9973748922348022,
0.180011585354805,
-0.7300714254379272,
0.3162538707256317,
-0.645995020866394,
1.961965799331665,
1.7095816135406494,
1.2940665483474731,
-0.03312248736619949,
-0.867936909198761,
0.7337325811386108,
-0.25263017416000366,
-0.2536664307117462,
0.9345564246177673,
0.4892708361148834,
-0.09283798933029175,
-1.4080913066864014,
0.6484133005142212,
1.1938283443450928,
-0.8160033226013184,
-0.8632305264472961,
0.0637051910161972,
-0.6831541657447815,
0.9962037801742554,
0.7068681120872498,
0.5136833786964417,
0.218326136469841,
1.7728155851364136,
0.699461042881012,
-0.5805956125259399,
0.5653631091117859,
0.4734620153903961,
-0.10988964140415192,
-2.1380245685577393,
-1.1316882371902466,
0.33483096957206726,
-0.565774142742157,
-1.6253451108932495,
1.355636477470398,
-1.1225780248641968,
-0.9539499878883362,
0.4935941696166992,
0.1625213772058487,
1.4680801630020142,
0.4347057044506073,
1.477611780166626,
2.057568311691284,
0.7845166921615601,
0.43842026591300964,
1.4095373153686523,
-0.18170055747032166,
-0.40381288528442383,
1.9893587827682495,
-0.4991151690483093,
0.4842635691165924,
1.1710246801376343,
-0.3635895550251007,
-1.0367709398269653,
-0.745780348777771,
-1.1272566318511963,
-0.6298460960388184,
1.0977813005447388,
0.08903893828392029,
-1.0354582071304321,
0.29671910405158997,
1.4000515937805176,
0.05346633866429329,
-0.369333952665329,
0.4841195344924927,
0.3222249746322632,
-0.7903198599815369,
-0.1274251788854599,
-0.8996708393096924,
0.5874991416931152,
-0.3211687207221985,
-0.3526886999607086,
0.45314568281173706,
0.4929879903793335,
1.230018138885498,
-0.12731988728046417,
0.27376416325569153,
1.236986756324768,
-1.4154596328735352,
1.4221880435943604,
-0.6378405690193176,
0.1585967242717743,
-2.4346163272857666,
1.4717479944229126,
-0.7148373126983643,
1.920814871788025,
-2.735569953918457,
0.28270477056503296,
-0.6005152463912964,
-0.4299320578575134,
0.4063950479030609,
-0.2554696500301361,
0.04254717379808426,
-0.2194836288690567,
-1.1708985567092896,
0.03651919588446617,
-0.5822308659553528,
0.507217526435852,
1.1399294137954712,
1.2564886808395386,
-1.1781259775161743,
-0.1107119619846344,
-1.7520791292190552,
-0.14708437025547028,
-0.6791706681251526,
0.29649579524993896,
-2.1879701614379883,
-0.24797464907169342,
-1.9603999853134155,
-2.3857839107513428,
-1.2385832071304321,
-0.7245332598686218,
1.0365970134735107,
0.09786184132099152,
-0.8908674716949463,
1.3111060857772827,
-0.29918551445007324,
-1.7855603694915771,
0.9909687042236328,
-2.084754228591919
] |
https://github.com/huggingface/datasets/issues/5678 | Add support to create a Dataset from spark dataframe | if i read spark Dataframe , got an error on multi-node Spark cluster.
Did the Api (Dataset.from_spark) support Spark cluster, read dataframe and save_to_disk?
Error:
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| ### Feature request
Add a new API `Dataset.from_spark` to create a Dataset from Spark DataFrame.
### Motivation
Spark is a distributed computing framework that can handle large datasets. By supporting loading Spark DataFrames directly into Hugging Face Datasets, we enable take the advantages of spark to processing the data in parallel.
By providing a seamless integration between these two frameworks, we make it easier for data scientists and developers to work with both Spark and Hugging Face in the same workflow.
### Your contribution
We can discuss about the ideas and I can help preparing a PR for this feature. | 239 | 87 | Add support to create a Dataset from spark dataframe
### Feature request
Add a new API `Dataset.from_spark` to create a Dataset from Spark DataFrame.
### Motivation
Spark is a distributed computing framework that can handle large datasets. By supporting loading Spark DataFrames directly into Hugging Face Datasets, we enable take the advantages of spark to processing the data in parallel.
By providing a seamless integration between these two frameworks, we make it easier for data scientists and developers to work with both Spark and Hugging Face in the same workflow.
### Your contribution
We can discuss about the ideas and I can help preparing a PR for this feature.
if i read spark Dataframe , got an error on multi-node Spark cluster.
Did the Api (Dataset.from_spark) support Spark cluster, read dataframe and save_to_disk?
Error:
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| [
-1.189666986465454,
-0.9503148794174194,
-0.8395661115646362,
1.3577117919921875,
-0.21242567896842957,
-1.2281767129898071,
0.10671717673540115,
-1.1994884014129639,
1.645789384841919,
-0.8394747972488403,
0.302105575799942,
-1.5731501579284668,
0.09700564295053482,
-0.5269193649291992,
-0.7214673757553101,
-0.8996080756187439,
-0.5338461399078369,
-0.8428909182548523,
1.0050686597824097,
2.52482271194458,
1.203637957572937,
-1.4199954271316528,
2.653345823287964,
0.7469688057899475,
-0.23965564370155334,
-1.0780872106552124,
0.5584540963172913,
0.1680694967508316,
-1.2458974123001099,
-0.3782171607017517,
-0.9863454103469849,
-0.17231489717960358,
-0.5770342350006104,
-0.4922305643558502,
-0.06543929874897003,
0.27370771765708923,
-0.24981346726417542,
-0.41592249274253845,
-0.4684770107269287,
-0.7935398817062378,
0.4746038317680359,
-0.3656720817089081,
1.030159592628479,
-0.29142698645591736,
1.8886104822158813,
-0.6082725524902344,
0.4887242615222931,
0.7372778058052063,
1.2548125982284546,
0.25568434596061707,
-0.05047440528869629,
0.23211553692817688,
0.3641347587108612,
-0.011904312297701836,
0.4270443320274353,
1.0777474641799927,
0.6147208213806152,
0.5271977186203003,
0.6694371104240417,
-2.1282057762145996,
1.3312287330627441,
-1.0690934658050537,
0.31151053309440613,
1.3431150913238525,
-1.0498521327972412,
0.38163161277770996,
-1.7606627941131592,
-0.17746375501155853,
0.5697046518325806,
-2.324082612991333,
0.2858407497406006,
-1.2213729619979858,
-0.5931389927864075,
1.0465186834335327,
0.23052778840065002,
-1.1657978296279907,
0.1659906506538391,
-0.5002241730690002,
0.9246270060539246,
0.5521419048309326,
1.078381061553955,
-1.7020776271820068,
-0.07167971879243851,
-0.3377246558666229,
0.16046950221061707,
-1.39686918258667,
-1.5520707368850708,
0.56810462474823,
0.704548716545105,
0.5997442603111267,
0.01089497935026884,
0.9778047204017639,
-1.0755254030227661,
0.9244767427444458,
-1.0285100936889648,
-1.5979206562042236,
-1.4334224462509155,
-2.386492967605591,
-2.4190144538879395,
0.7144347429275513,
-0.492514967918396,
-0.6014902591705322,
2.1334009170532227,
-0.9592575430870056,
-1.7530388832092285,
1.2692010402679443,
0.25030872225761414,
-0.0029042577371001244,
2.409114122390747,
0.12037507444620132,
-0.6462967395782471,
0.40302497148513794,
-0.7278313040733337,
0.8270641565322876,
-0.49452200531959534,
1.3495153188705444,
0.5151897072792053,
-1.006494402885437,
1.610935926437378,
-0.4938191771507263,
0.44659659266471863,
-0.7319380640983582,
-0.5009347200393677,
-0.9097782373428345,
0.36608487367630005,
1.7793382406234741,
-0.20776815712451935,
1.631478190422058,
-0.31647390127182007,
-1.5698045492172241,
-1.5807600021362305,
0.8739244937896729,
0.469372421503067,
-0.8040604591369629,
0.12688100337982178,
-0.29282066226005554,
0.047920871526002884,
-0.07252073287963867,
1.112425446510315,
1.1503469944000244,
0.6801528334617615,
-0.3505374491214752,
-0.9817278385162354,
0.2158205360174179,
-0.18303526937961578,
-0.8228477835655212,
-1.6833914518356323,
-0.42900004982948303,
0.07594616711139679,
0.5861518979072571,
-1.2677141427993774,
1.683106780052185,
0.8850882053375244,
1.959032654762268,
0.9467161893844604,
-0.3432238698005676,
1.5075212717056274,
0.07443840801715851,
1.7663558721542358,
-0.5435075759887695,
0.7663903832435608,
-0.3317233622074127,
-1.2011737823486328,
0.8017522692680359,
-0.38416731357574463,
-2.0913877487182617,
-0.7889396548271179,
-0.785991370677948,
-0.17219452559947968,
-0.7627062797546387,
0.9667761921882629,
-0.14216358959674835,
-1.3884327411651611,
0.2888382077217102,
-0.7033871412277222,
0.2271541804075241,
-1.2385799884796143,
0.38950222730636597,
0.7512834072113037,
-0.7039298415184021,
0.06543263047933578,
-0.21455727517604828,
-1.266855239868164,
-0.4273662567138672,
0.21910196542739868,
1.8764910697937012,
-0.8011016249656677,
0.7549337148666382,
1.0083718299865723,
-0.5755383372306824,
0.0844355970621109,
0.3553393483161926,
-0.22166027128696442,
0.8735690116882324,
-1.058876633644104,
-0.4850134253501892,
1.2222408056259155,
-0.18472906947135925,
-0.5737914443016052,
1.4369744062423706,
0.7043406963348389,
-0.9581278562545776,
-0.18162301182746887,
-0.1988094449043274,
-0.8905916213989258,
-0.06533076614141464,
-1.618714451789856,
-0.10903050005435944,
0.277791291475296,
-1.5022388696670532,
-0.4789389669895172,
-0.27282416820526123,
1.2849161624908447,
-0.2463042289018631,
1.3973456621170044,
-0.4192124605178833,
-0.33241763710975647,
-0.4053526520729065,
-0.33585453033447266,
0.24550960958003998,
-0.2704175114631653,
-0.6119087934494019,
0.15973657369613647,
-0.7766686677932739,
0.3252604603767395,
1.4243911504745483,
0.38247624039649963,
0.23189008235931396,
0.525547981262207,
1.0541489124298096,
0.24064484238624573,
-0.10514681786298752,
-0.7797523140907288,
-1.5235527753829956,
2.087110757827759,
-1.4217246770858765,
1.9989978075027466,
0.9099412560462952,
-0.03699735179543495,
-1.8412076234817505,
-1.7500972747802734,
1.2357903718948364,
1.211033821105957,
2.3400213718414307,
0.5850296020507812,
0.3628874123096466,
-0.8697329759597778,
-0.6476192474365234,
0.33525994420051575,
-1.0538774728775024,
-0.7855077981948853,
0.10958053916692734,
2.2904396057128906,
1.7954503297805786,
-0.43425238132476807,
-0.21694310009479523,
-1.0175025463104248,
1.4649404287338257,
-0.19703328609466553,
0.21356327831745148,
2.0356411933898926,
-0.3676547110080719,
-1.1861413717269897,
1.3033747673034668,
-2.4914205074310303,
0.1755755990743637,
1.953818678855896,
0.3518149256706238,
-0.0120198093354702,
-1.4063162803649902,
-0.6968386173248291,
-0.33008334040641785,
-0.3917575478553772,
-1.1508506536483765,
0.43654322624206543,
-0.2688153386116028,
-0.7361756563186646,
-1.5272085666656494,
0.07692429423332214,
-1.087316632270813,
-1.7167166471481323,
0.2966051697731018,
1.6775833368301392,
1.952505350112915,
-0.8297093510627747,
1.4073486328125,
-0.19838932156562805,
0.0929933711886406,
1.2201056480407715,
1.1904263496398926,
3.121654987335205,
1.8519084453582764,
-1.2223076820373535,
0.590156614780426,
-0.11528723686933517,
-0.43645134568214417,
1.1306872367858887,
-1.1720095872879028,
1.3282548189163208,
-0.09475694596767426,
-1.2500368356704712,
-1.280981183052063,
1.007571816444397,
0.3696412146091461,
0.11083393543958664,
-0.596651554107666,
1.252389907836914,
0.07836703211069107,
1.389347791671753,
0.5819170475006104,
-0.29571112990379333,
0.5428761839866638,
-0.40324753522872925,
-0.5699126124382019,
1.5916032791137695,
0.2163548320531845,
-1.4042102098464966,
-2.3458759784698486,
-0.28890079259872437,
-0.7612997889518738,
-0.02839808538556099,
-0.6249576210975647,
-1.050201177597046,
1.7161281108856201,
0.36106836795806885,
-1.3012983798980713,
-0.3189905285835266,
-0.3276011347770691,
-0.628820538520813,
2.7253830432891846,
-1.4357969760894775,
-0.23052647709846497,
-0.9808446764945984,
-0.5558990240097046,
1.6720523834228516,
-1.2503161430358887,
-0.1964253932237625,
-1.0310617685317993,
-0.6251698732376099,
-1.2825826406478882,
-0.6316119432449341,
-0.019185490906238556,
-0.9391786456108093,
0.7916619777679443,
0.3440478444099426,
-1.136056900024414,
-0.31455156207084656,
-0.8326787948608398,
0.8689882159233093,
-0.013155071064829826,
0.31237196922302246,
1.8351770639419556,
0.44252920150756836,
-0.435783714056015,
0.6999045610427856,
1.1648004055023193,
0.6711623072624207,
-0.6950385570526123,
0.16762375831604004,
-0.7454382181167603,
0.24346481263637543,
-1.2725399732589722,
0.34472736716270447,
-2.851707696914673,
0.5765388607978821,
-0.08047772943973541,
-0.07803820073604584,
0.0022213831543922424,
-1.326802134513855,
1.0751324892044067,
2.5737526416778564,
-1.0766596794128418,
0.5264838337898254,
0.3531666696071625,
1.1674493551254272,
-1.5923261642456055,
0.336446613073349,
-0.34409406781196594,
2.1080875396728516,
0.24146263301372528,
1.2063345909118652,
-0.41633307933807373,
-2.3141326904296875,
0.6255594491958618,
-1.3248735666275024,
-1.1748884916305542,
0.7404231429100037,
-0.9854741096496582,
0.10862637311220169,
-1.373904824256897,
-0.22197313606739044,
-0.848265528678894,
-1.2690929174423218,
0.7180983424186707,
0.14759448170661926,
0.5183810591697693,
-0.6055752038955688,
0.34319835901260376,
-2.179548978805542,
-1.2836298942565918,
-0.1928819864988327,
-0.9385747313499451,
0.39057281613349915,
-0.356283575296402,
0.6616514325141907,
-0.1753278523683548,
0.03011251613497734,
0.32127466797828674,
1.4937981367111206,
3.3287336826324463,
0.29601630568504333,
0.43234843015670776,
-0.07232468575239182,
-0.906043529510498,
1.3996093273162842,
0.8515740633010864,
-0.03960457071661949,
-0.5840484499931335,
-0.9906650185585022,
1.2327041625976562,
1.9445596933364868,
0.9712563753128052,
-0.029002435505390167,
-0.7136688232421875,
-0.5943558216094971,
-0.006647026166319847,
0.30340415239334106,
0.47423291206359863,
0.9680547714233398,
-0.0467182956635952,
0.10484317690134048,
1.547003984451294,
1.385522484779358,
-0.4309093952178955,
0.390513151884079,
-0.8310710787773132,
-0.6467322707176208,
0.46605005860328674,
0.31981438398361206,
-0.0881749838590622,
0.426440566778183,
-1.0885359048843384,
-0.3123394548892975,
-0.3518364131450653,
-0.916439414024353,
-0.6669022440910339,
-0.4709373116493225,
-0.41762450337409973,
1.6745105981826782,
0.03989117592573166,
-0.4229550361633301,
-0.0071120536886155605,
-0.6769728660583496,
-0.1413886994123459,
-1.1274036169052124,
0.25052881240844727,
-0.0516047440469265,
-0.11667123436927795,
-0.052927978336811066,
1.8793026208877563,
-0.8546076416969299,
-2.0317254066467285,
0.2549322843551636,
0.180000901222229,
-0.3437782824039459,
0.18375441431999207,
1.5954710245132446,
0.3896644115447998,
1.4323724508285522,
1.361936092376709,
0.917624831199646,
-0.7451218366622925,
-1.354071021080017,
0.7099201679229736,
0.9930709004402161,
-1.3191373348236084,
0.7782236933708191,
0.05611664429306984,
-0.6083046793937683,
0.6421345472335815,
1.264264464378357,
0.41687795519828796,
-1.932580828666687,
0.8688212037086487,
-1.0054371356964111,
0.8178555369377136,
0.682260274887085,
0.6648543477058411,
0.17146527767181396,
0.7643815279006958,
-1.2885586023330688,
-1.0884202718734741,
-0.8006749749183655,
-0.6228454113006592,
1.9171172380447388,
-0.3094140589237213,
0.5862217545509338,
-0.1523856818675995,
-1.2900102138519287,
-0.057330407202243805,
0.672607421875,
0.3469507396221161,
-0.35953468084335327,
0.8509403467178345,
-0.7039681077003479,
-1.10581374168396,
-1.3715198040008545,
-0.367357075214386,
-1.0015887022018433,
-0.7888702154159546,
1.1467279195785522,
0.9099043011665344,
0.12052900344133377,
1.9661056995391846,
0.644658088684082,
0.23527172207832336,
-2.6856260299682617,
0.887001633644104,
0.18747615814208984,
-0.05262076109647751,
0.8111550807952881,
0.21469414234161377,
1.0476118326187134,
0.04600609838962555,
0.4346342980861664,
-2.4493720531463623,
2.304837703704834,
-0.24492210149765015,
0.821647047996521,
-0.025591496378183365,
-0.14399755001068115,
1.1790165901184082,
0.6417468190193176,
0.561648964881897,
-1.0630943775177002,
0.5541619658470154,
-0.5719708800315857,
1.2250454425811768,
0.9417535066604614,
-0.7930336594581604,
-0.016212735325098038,
1.2445379495620728,
0.5418737530708313,
-0.5218242406845093,
-0.8834162950515747,
-0.900531530380249,
0.8687343001365662,
1.77169930934906,
0.007933245040476322,
-0.03216439485549927,
0.9981749653816223,
0.6722961068153381,
-1.2547261714935303,
0.044928621500730515,
-0.8338442444801331,
-0.8181321620941162,
1.628056526184082,
2.1326701641082764,
-0.02965761348605156,
-0.2271556556224823,
-0.6637469530105591,
-1.1971536874771118,
0.8481350541114807,
-0.011774557642638683,
0.16552163660526276,
0.582943320274353,
-0.6150690913200378,
1.1130378246307373,
0.9000127911567688,
0.9198943376541138,
0.24672140181064606,
0.2142942249774933,
0.27502521872520447,
-0.2904239594936371,
-1.1461840867996216,
-0.1232740581035614,
-1.0793287754058838,
-2.5158684253692627,
0.5455323457717896,
-0.19615325331687927,
-1.5600680112838745,
0.09189821034669876,
-1.0158157348632812,
0.9336916208267212,
-0.6081823110580444,
-0.9796777367591858,
-1.5576351881027222,
0.27665236592292786,
-0.16532106697559357,
0.9270726442337036,
-1.5070240497589111,
-0.050792135298252106,
1.1950206756591797,
0.7874490022659302,
-0.5130686163902283,
0.9154020547866821,
0.26743456721305847,
1.0970302820205688,
0.826274037361145,
-0.39522022008895874,
0.5423498153686523,
0.1769409328699112,
-1.3491497039794922,
0.3765413463115692,
1.145015001296997,
0.15287062525749207,
1.634138584136963,
-0.43947064876556396,
0.032032378017902374,
0.41428032517433167,
-0.45763206481933594,
-0.4340622127056122,
-0.5247895121574402,
0.759019136428833,
0.04308976233005524,
-0.8756296038627625,
0.013346678577363491,
-0.06982997059822083,
-0.35547134280204773,
0.25047993659973145,
-1.5356744527816772,
-0.18823282420635223,
-0.46148681640625,
-0.5861861705780029,
-1.2423679828643799,
0.06644172221422195,
1.4264005422592163,
-0.7929474711418152,
-0.1607731431722641,
0.5149311423301697,
0.4227035939693451,
0.6165353059768677,
0.7051166892051697,
-0.6070064306259155,
-0.3717438876628876,
-0.2276483029127121,
-0.3331252634525299,
0.37779536843299866,
1.2807167768478394,
-0.22962376475334167,
-1.0154385566711426,
0.749864399433136,
-0.2952069640159607,
0.10463070869445801,
1.9580851793289185,
0.1996086984872818,
-0.83619624376297,
0.285344660282135,
-0.6712305545806885,
1.9051002264022827,
1.6553168296813965,
1.3498883247375488,
-0.09396188706159592,
-0.9618527889251709,
0.6100865006446838,
-0.3189235031604767,
-0.276747465133667,
0.8056151270866394,
0.4952876567840576,
-0.09289994090795517,
-1.3152663707733154,
0.635843813419342,
1.2034317255020142,
-0.8931141495704651,
-0.8610003590583801,
0.10352365672588348,
-0.7614786028862,
1.0568903684616089,
0.7610319256782532,
0.45623815059661865,
0.269997775554657,
1.6591410636901855,
0.8646204471588135,
-0.4808165729045868,
0.5832340717315674,
0.5317099690437317,
-0.11639843136072159,
-1.9832402467727661,
-1.042426586151123,
0.313999205827713,
-0.5568973422050476,
-1.565988302230835,
1.3648192882537842,
-1.169734001159668,
-0.8824102878570557,
0.4799286723136902,
-0.013957451097667217,
1.490880012512207,
0.3481425940990448,
1.6539428234100342,
2.0915372371673584,
0.947853684425354,
0.34237220883369446,
1.4340050220489502,
-0.07827075570821762,
-0.45839306712150574,
1.921351671218872,
-0.389647513628006,
0.5045669674873352,
1.159982681274414,
-0.37912654876708984,
-0.9841741919517517,
-0.719913899898529,
-1.1619590520858765,
-0.6284721493721008,
1.1841228008270264,
0.1239423081278801,
-1.029802680015564,
0.24912028014659882,
1.554243803024292,
0.027524583041667938,
-0.3310154378414154,
0.5640126466751099,
0.42994415760040283,
-0.7096261382102966,
-0.14277547597885132,
-0.8546597957611084,
0.36717289686203003,
-0.2366763800382614,
-0.40297725796699524,
0.292550653219223,
0.3971917927265167,
1.2385095357894897,
-0.02992379665374756,
0.09968367964029312,
1.1791354417800903,
-1.484007716178894,
1.4273303747177124,
-0.6026018261909485,
0.24569754302501678,
-2.3869361877441406,
1.3907638788223267,
-0.8097607493400574,
1.9108861684799194,
-2.6855251789093018,
0.42139536142349243,
-0.6304407715797424,
-0.37423405051231384,
0.3444632887840271,
-0.44593507051467896,
0.15930552780628204,
-0.12689822912216187,
-1.150201439857483,
-0.046125203371047974,
-0.7446925640106201,
0.5909223556518555,
1.0918552875518799,
1.2278687953948975,
-1.081122875213623,
-0.3334507942199707,
-1.6205247640609741,
-0.17294274270534515,
-0.7516260743141174,
0.3527422845363617,
-1.9159096479415894,
-0.10415827482938766,
-1.9716441631317139,
-2.284170150756836,
-1.295101284980774,
-0.8370524048805237,
1.1137440204620361,
0.057907093316316605,
-0.9875758290290833,
1.088777780532837,
-0.3565967381000519,
-1.8161677122116089,
1.202968955039978,
-2.1121082305908203
] |
https://github.com/huggingface/datasets/issues/5675 | Filter datasets by language code | The dataset still can be found, if instead of using the search form you just enter the language code in the url, like https://huggingface.co/datasets?language=language:myv.
But of course having a more complete list of languages in the search form (or just a fallback to the language codes, if they are missing from the code=>language mapping) would be much more convenient! | Hi! I use the language search field on https://huggingface.co/datasets
However, some of the datasets tagged by ISO language code are not accessible by this search form.
For example, [myv_ru_2022](https://huggingface.co/datasets/slone/myv_ru_2022) is has `myv` language tag but it is not included in Languages search form.
I've also noticed the same problem with `mhr` (see https://huggingface.co/datasets/AigizK/mari-russian-parallel-corpora) | 240 | 59 | Filter datasets by language code
Hi! I use the language search field on https://huggingface.co/datasets
However, some of the datasets tagged by ISO language code are not accessible by this search form.
For example, [myv_ru_2022](https://huggingface.co/datasets/slone/myv_ru_2022) is has `myv` language tag but it is not included in Languages search form.
I've also noticed the same problem with `mhr` (see https://huggingface.co/datasets/AigizK/mari-russian-parallel-corpora)
The dataset still can be found, if instead of using the search form you just enter the language code in the url, like https://huggingface.co/datasets?language=language:myv.
But of course having a more complete list of languages in the search form (or just a fallback to the language codes, if they are missing from the code=>language mapping) would be much more convenient! | [
-1.1932626962661743,
-0.8880062699317932,
-0.9264031648635864,
1.4190787076950073,
-0.10355173051357269,
-1.325943112373352,
0.017070308327674866,
-1.0033189058303833,
1.6058053970336914,
-0.7445747256278992,
0.22315631806850433,
-1.7302889823913574,
-0.02957513928413391,
-0.5344475507736206,
-0.7609579563140869,
-0.8685569763183594,
-0.4465515911579132,
-0.8634690642356873,
0.9591357111930847,
2.6069326400756836,
1.248458981513977,
-1.3260462284088135,
2.7510242462158203,
0.6595832705497742,
-0.21164429187774658,
-1.028471827507019,
0.6806160807609558,
0.018251601606607437,
-1.2500625848770142,
-0.5364170670509338,
-0.9288281202316284,
0.04561414197087288,
-0.5801393389701843,
-0.5366454720497131,
0.01765350252389908,
0.35226020216941833,
-0.1622702032327652,
-0.3079732656478882,
-0.5908088088035583,
-0.7660502791404724,
0.46828940510749817,
-0.2650108337402344,
0.9694231748580933,
-0.4141460657119751,
1.8599847555160522,
-0.5194582939147949,
0.25871723890304565,
0.6758773326873779,
1.384788155555725,
0.16457614302635193,
-0.06022298336029053,
0.2504856586456299,
0.38954150676727295,
0.03264861926436424,
0.39569079875946045,
1.2214051485061646,
0.552947461605072,
0.4489719271659851,
0.7103725075721741,
-2.2379462718963623,
1.383786678314209,
-0.921292781829834,
0.29703134298324585,
1.348976969718933,
-0.9275889992713928,
0.36524900794029236,
-1.7694951295852661,
-0.014255929738283157,
0.5669412016868591,
-2.280228853225708,
0.1486939936876297,
-1.2374329566955566,
-0.6287990808486938,
0.9077262878417969,
0.2863819897174835,
-1.3300251960754395,
0.15137344598770142,
-0.48661497235298157,
1.011595606803894,
0.6070712804794312,
1.1909880638122559,
-1.7128745317459106,
0.05741411820054054,
-0.30746006965637207,
0.09890962392091751,
-1.3547661304473877,
-1.4993233680725098,
0.5640067458152771,
0.6915924549102783,
0.6483696699142456,
-0.13446436822414398,
0.9095141291618347,
-0.9404300451278687,
0.8703734278678894,
-0.8014814853668213,
-1.713399887084961,
-1.5147793292999268,
-2.314119577407837,
-2.32776141166687,
0.8232470154762268,
-0.5753917694091797,
-0.4841242730617523,
1.9295209646224976,
-1.0477700233459473,
-1.7633397579193115,
1.159449815750122,
0.23078955709934235,
0.034075137227773666,
2.3360886573791504,
0.2324131727218628,
-0.8032047152519226,
0.29810577630996704,
-0.6078589558601379,
0.8639010190963745,
-0.323475182056427,
1.4272515773773193,
0.612567126750946,
-1.06590735912323,
1.6437644958496094,
-0.5757460594177246,
0.39600870013237,
-0.656615674495697,
-0.5048030614852905,
-0.810175895690918,
0.35730838775634766,
1.8327914476394653,
-0.412945032119751,
1.623793363571167,
-0.3378143012523651,
-1.5187102556228638,
-1.576484203338623,
0.8584523797035217,
0.5398672223091125,
-0.8341437578201294,
0.16544847190380096,
-0.4815600514411926,
0.002440650947391987,
0.014100381173193455,
1.121619462966919,
1.1375994682312012,
0.7465535402297974,
-0.31628158688545227,
-0.7996777892112732,
0.23626969754695892,
0.0008628284558653831,
-0.5360419154167175,
-1.9624124765396118,
-0.4244685173034668,
0.16729700565338135,
0.6997984051704407,
-1.2316316366195679,
1.7539966106414795,
0.91314697265625,
1.9827358722686768,
1.0089454650878906,
-0.3256107270717621,
1.5182868242263794,
-0.07632757723331451,
1.8353174924850464,
-0.4685314893722534,
0.6334055066108704,
-0.4203863739967346,
-1.2330307960510254,
0.8663520812988281,
-0.3521374762058258,
-2.022892713546753,
-0.8760432600975037,
-0.9564623236656189,
-0.20787334442138672,
-0.8548519015312195,
0.9545513987541199,
-0.36279746890068054,
-1.2841511964797974,
0.24602636694908142,
-0.7029996514320374,
0.11119282990694046,
-1.2801333665847778,
0.26500797271728516,
0.7405381202697754,
-0.6562495827674866,
-0.014838702976703644,
-0.2543129026889801,
-1.3212529420852661,
-0.5985941290855408,
0.22172552347183228,
1.8758862018585205,
-0.7429695129394531,
0.9470662474632263,
1.0133930444717407,
-0.6443195939064026,
0.1018548309803009,
0.3436872363090515,
-0.23850277066230774,
0.8749281764030457,
-0.9972242116928101,
-0.3545069992542267,
1.1277985572814941,
-0.1657654196023941,
-0.6948566436767578,
1.5665510892868042,
0.8180750012397766,
-0.9815167188644409,
-0.25722044706344604,
-0.19092626869678497,
-0.8228803873062134,
0.07734603434801102,
-1.4835525751113892,
-0.11099372804164886,
0.23237824440002441,
-1.4280948638916016,
-0.40809643268585205,
-0.15289980173110962,
1.3466811180114746,
-0.18664032220840454,
1.4534298181533813,
-0.36919182538986206,
-0.1281213015317917,
-0.41067245602607727,
-0.44518372416496277,
0.273271769285202,
-0.22062869369983673,
-0.6966162919998169,
0.37821924686431885,
-0.8679509162902832,
0.29284870624542236,
1.3603380918502808,
0.4865671396255493,
0.05879342928528786,
0.540274977684021,
1.1612576246261597,
0.29763731360435486,
-0.03081785887479782,
-0.9523569345474243,
-1.6599913835525513,
2.088899612426758,
-1.507742166519165,
1.9434741735458374,
0.8217974305152893,
-0.008893217891454697,
-1.8008460998535156,
-1.808855414390564,
1.3484041690826416,
1.2128657102584839,
2.2850863933563232,
0.5514225959777832,
0.30995437502861023,
-0.7951186895370483,
-0.6521623730659485,
0.38338160514831543,
-1.0727132558822632,
-0.7374956607818604,
0.09557515382766724,
2.2863683700561523,
1.9049018621444702,
-0.5141900181770325,
-0.22727704048156738,
-1.0125792026519775,
1.2456862926483154,
-0.2202707678079605,
0.21892324090003967,
1.9889448881149292,
-0.350603848695755,
-1.1383039951324463,
1.240256905555725,
-2.3590643405914307,
0.20851458609104156,
2.0170154571533203,
0.2745310664176941,
0.14697517454624176,
-1.5277029275894165,
-0.6634522676467896,
-0.2625264525413513,
-0.44106394052505493,
-1.2370710372924805,
0.6219975352287292,
-0.3634662628173828,
-0.926200270652771,
-1.40346097946167,
0.18392722308635712,
-1.1787563562393188,
-1.6671620607376099,
0.370577871799469,
1.8145614862442017,
2.088931083679199,
-0.6833786964416504,
1.4627249240875244,
-0.2412981390953064,
0.15919873118400574,
1.2824084758758545,
1.2201144695281982,
3.1793885231018066,
1.886877417564392,
-1.2738152742385864,
0.6333971619606018,
-0.13790835440158844,
-0.5149387121200562,
1.2083752155303955,
-1.0272414684295654,
1.2144695520401,
-0.2713068425655365,
-1.2172940969467163,
-1.18754243850708,
1.082837700843811,
0.4724198281764984,
0.0016826633363962173,
-0.650261402130127,
1.2787573337554932,
-0.08003879338502884,
1.2404767274856567,
0.5637047290802002,
-0.44594988226890564,
0.45609718561172485,
-0.4075924754142761,
-0.5359850525856018,
1.542862057685852,
0.21763572096824646,
-1.4894766807556152,
-2.2900230884552,
-0.15860846638679504,
-0.8454164862632751,
-0.08595947176218033,
-0.5883244276046753,
-1.0146520137786865,
1.7006474733352661,
0.49769327044487,
-1.2967082262039185,
-0.34435713291168213,
-0.40378648042678833,
-0.6250011324882507,
2.6121323108673096,
-1.42062509059906,
-0.12965640425682068,
-0.9706937670707703,
-0.4864594638347626,
1.6881890296936035,
-1.2468245029449463,
-0.05873892828822136,
-1.045000672340393,
-0.6776967644691467,
-1.3300684690475464,
-0.6263193488121033,
-0.1700381636619568,
-0.8748835921287537,
0.7145763039588928,
0.09216608107089996,
-1.0148439407348633,
-0.2781658172607422,
-0.7890574932098389,
0.9295445680618286,
-0.13073991239070892,
0.38806143403053284,
1.9625612497329712,
0.4468802511692047,
-0.44557201862335205,
0.6615660786628723,
1.1641002893447876,
0.639726996421814,
-0.6213082075119019,
0.18879692256450653,
-0.6773537397384644,
0.25597214698791504,
-1.3756470680236816,
0.35105812549591064,
-2.8858213424682617,
0.7651557326316833,
0.0057768747210502625,
-0.05024879053235054,
0.00001722387969493866,
-1.2334582805633545,
1.071267008781433,
2.5123891830444336,
-1.2475087642669678,
0.32236239314079285,
0.25387775897979736,
1.07131028175354,
-1.586702585220337,
0.23541639745235443,
-0.4197799265384674,
2.1430060863494873,
0.20027528703212738,
1.1652451753616333,
-0.42942115664482117,
-2.140242576599121,
0.6134241819381714,
-1.281337857246399,
-1.0257850885391235,
0.8494173288345337,
-0.8142591714859009,
0.010650581680238247,
-1.5566704273223877,
-0.11566466838121414,
-0.9385558366775513,
-1.2631878852844238,
0.9160036444664001,
0.15487101674079895,
0.47836294770240784,
-0.650762677192688,
0.36576274037361145,
-2.1118433475494385,
-1.3663421869277954,
-0.16557365655899048,
-0.9162713885307312,
0.4833998680114746,
-0.2373485118150711,
0.6024217009544373,
-0.03836689889431,
0.10085959732532501,
0.36722618341445923,
1.390607237815857,
3.539971351623535,
0.16333100199699402,
0.33789995312690735,
-0.08521932363510132,
-0.9212133288383484,
1.4788281917572021,
1.054336428642273,
-0.12423659861087799,
-0.559978187084198,
-1.0204660892486572,
1.3793909549713135,
1.8652085065841675,
1.0505095720291138,
0.17135001718997955,
-0.857785165309906,
-0.7954735159873962,
-0.04407922551035881,
0.21004092693328857,
0.5709062814712524,
0.8683185577392578,
-0.054036229848861694,
0.1576833575963974,
1.4081214666366577,
1.260109543800354,
-0.4132053554058075,
0.41424277424812317,
-0.9175514578819275,
-0.4823489487171173,
0.5264171957969666,
0.272006094455719,
-0.027993429452180862,
0.5267221927642822,
-1.0712209939956665,
-0.30243879556655884,
-0.30999213457107544,
-1.0027740001678467,
-0.6349537968635559,
-0.44144028425216675,
-0.44661805033683777,
1.5332765579223633,
0.10872466117143631,
-0.4902755916118622,
-0.03982410207390785,
-0.8376741409301758,
-0.21386922895908356,
-1.091316819190979,
0.2724650204181671,
-0.11246349662542343,
-0.03361935541033745,
-0.1843332052230835,
1.6810473203659058,
-0.9621039628982544,
-2.1823432445526123,
0.265146940946579,
0.25002652406692505,
-0.4617002606391907,
0.17235088348388672,
1.6401326656341553,
0.4371093213558197,
1.2725309133529663,
1.2625069618225098,
0.9794182777404785,
-0.5613641142845154,
-1.189561128616333,
0.6103232502937317,
0.981663703918457,
-1.4910101890563965,
1.0113160610198975,
-0.189285010099411,
-0.5538167357444763,
0.739759624004364,
1.2649458646774292,
0.40771031379699707,
-1.9310187101364136,
0.9172240495681763,
-0.81098872423172,
0.7565956115722656,
0.6645492315292358,
0.8091254234313965,
0.23514534533023834,
0.814355731010437,
-1.3234734535217285,
-1.1873148679733276,
-0.7243067026138306,
-0.6432948112487793,
1.8649533987045288,
-0.14294761419296265,
0.417615681886673,
-0.18809974193572998,
-1.2447773218154907,
-0.15527558326721191,
0.6403007507324219,
0.2785509526729584,
-0.3852710723876953,
0.9023022651672363,
-0.6891207098960876,
-1.068397879600525,
-1.366689920425415,
-0.4362730085849762,
-0.8740309476852417,
-0.9582886099815369,
1.0461620092391968,
0.8718798756599426,
0.33757835626602173,
1.9458900690078735,
0.5241174697875977,
0.12727870047092438,
-2.6180312633514404,
0.8656657934188843,
0.25531572103500366,
0.0412779338657856,
1.0164477825164795,
0.2225373089313507,
1.1418336629867554,
-0.030913177877664566,
0.4577016830444336,
-2.303006410598755,
2.141583204269409,
-0.2455291897058487,
0.6069561839103699,
-0.008809635415673256,
-0.21708306670188904,
1.0968632698059082,
0.6037271022796631,
0.6719130873680115,
-1.1862272024154663,
0.8399938344955444,
-0.6705921292304993,
1.0987435579299927,
1.004881501197815,
-0.9433108568191528,
0.008160634897649288,
1.3509669303894043,
0.511940062046051,
-0.47582897543907166,
-0.8608999252319336,
-0.8682498931884766,
0.9056301712989807,
1.6908810138702393,
0.050330668687820435,
0.045587215572595596,
0.8483945727348328,
0.5961084961891174,
-1.2315424680709839,
0.15487425029277802,
-0.6732053756713867,
-0.7130919694900513,
1.6446831226348877,
2.0035269260406494,
-0.07848435640335083,
-0.0710655152797699,
-0.7470701336860657,
-1.1353031396865845,
0.8058445453643799,
-0.10814376175403595,
0.12336141616106033,
0.7173221707344055,
-0.7082780003547668,
1.1411199569702148,
0.7544622421264648,
0.9619423151016235,
0.09577441960573196,
0.4387300908565521,
0.4327565133571625,
-0.18794570863246918,
-1.2096924781799316,
-0.3811655342578888,
-1.0671690702438354,
-2.5841526985168457,
0.4349355399608612,
-0.4477139115333557,
-1.3720755577087402,
-0.01167310681194067,
-1.047173023223877,
0.8869864344596863,
-0.612705647945404,
-0.9893513321876526,
-1.369877815246582,
0.24667033553123474,
-0.14121119678020477,
0.8057534694671631,
-1.6882753372192383,
-0.1074492335319519,
1.3764134645462036,
0.8632920384407043,
-0.5456146597862244,
1.0041230916976929,
0.37620091438293457,
1.015621304512024,
0.8841572999954224,
-0.37416231632232666,
0.4823983907699585,
0.10163315385580063,
-1.3779263496398926,
0.4484025537967682,
1.1010085344314575,
0.1707536280155182,
1.3954277038574219,
-0.5060721635818481,
0.00398468691855669,
0.4479372501373291,
-0.5610686540603638,
-0.4101872146129608,
-0.5460666418075562,
0.6952853202819824,
0.12579336762428284,
-0.888156533241272,
0.08743520826101303,
-0.14678385853767395,
-0.21435905992984772,
0.23405440151691437,
-1.5168800354003906,
-0.26895081996917725,
-0.3332655429840088,
-0.4167937934398651,
-1.3491660356521606,
-0.04930400848388672,
1.3640910387039185,
-0.7586893439292908,
-0.15379662811756134,
0.4988262951374054,
0.43510422110557556,
0.6080297827720642,
0.6920629143714905,
-0.638660728931427,
-0.3812158405780792,
-0.31445595622062683,
-0.2899112105369568,
0.20394788682460785,
1.124150037765503,
-0.16965293884277344,
-1.023800015449524,
0.736094057559967,
-0.3654305338859558,
0.09262353181838989,
2.0359413623809814,
0.13171622157096863,
-0.8117470145225525,
0.349250853061676,
-0.7110262513160706,
1.8971202373504639,
1.6485254764556885,
1.2761298418045044,
-0.13781064748764038,
-0.8780869841575623,
0.5748118162155151,
-0.20367680490016937,
-0.2715038061141968,
0.8896921277046204,
0.4895644783973694,
-0.15393361449241638,
-1.394973874092102,
0.5904151797294617,
1.329560399055481,
-1.0258839130401611,
-0.7188706398010254,
0.11816761642694473,
-0.811451256275177,
1.0880204439163208,
0.7186487317085266,
0.43262094259262085,
0.23725934326648712,
1.5966404676437378,
0.5408090949058533,
-0.4829205572605133,
0.41907110810279846,
0.5369333624839783,
-0.10231897979974747,
-2.0321385860443115,
-1.0215803384780884,
0.28227895498275757,
-0.32651108503341675,
-1.5525195598602295,
1.2534700632095337,
-1.1131726503372192,
-0.9069022536277771,
0.551474392414093,
0.07759978622198105,
1.4218186140060425,
0.22442904114723206,
1.7207130193710327,
2.087864637374878,
0.8493393659591675,
0.28183192014694214,
1.2650731801986694,
-0.01264510490000248,
-0.3564794063568115,
1.7630399465560913,
-0.3520733714103699,
0.5658794045448303,
1.113562822341919,
-0.4048705995082855,
-1.0351903438568115,
-0.730107307434082,
-1.1427862644195557,
-0.5738032460212708,
1.1692911386489868,
0.12822222709655762,
-1.1875638961791992,
0.193195641040802,
1.5453119277954102,
0.14003390073776245,
-0.14749272167682648,
0.47689560055732727,
0.5148111581802368,
-0.6798338890075684,
-0.03422121703624725,
-1.0422862768173218,
0.5254398584365845,
-0.07139409333467484,
-0.37093043327331543,
0.3562990725040436,
0.46344712376594543,
1.246569037437439,
-0.05316827818751335,
0.18879002332687378,
1.266874074935913,
-1.3940691947937012,
1.4427531957626343,
-0.6247982382774353,
0.13984860479831696,
-2.383002758026123,
1.4961779117584229,
-0.8471200466156006,
1.9181774854660034,
-2.5518434047698975,
0.41767096519470215,
-0.5890865921974182,
-0.5257908701896667,
0.34091460704803467,
-0.35805830359458923,
0.06863126903772354,
-0.17207787930965424,
-0.9781103730201721,
-0.06916172057390213,
-0.7147128582000732,
0.5311987400054932,
1.1515977382659912,
1.3832013607025146,
-1.133679747581482,
-0.32452839612960815,
-1.715114712715149,
-0.1837996244430542,
-0.6890867352485657,
0.3597939610481262,
-1.986469030380249,
-0.12380200624465942,
-1.941645860671997,
-2.41349196434021,
-1.5029569864273071,
-0.8503818511962891,
1.1038810014724731,
0.22037115693092346,
-0.8611188530921936,
1.0899598598480225,
-0.36855006217956543,
-1.8472590446472168,
0.970012366771698,
-2.183290958404541
] |
https://github.com/huggingface/datasets/issues/5675 | Filter datasets by language code | Thanks @mariosasko!
Do you think it is possible to turn this into a more scalable pipeline? Such as:
1. Looping through all the datasets on the hub and collecting the set of all their language codes;
2. Selecting the codes not covered yet in `Language.ts`
3. Looking up their codes at https://iso639-3.sil.org/code_tables/639/data
4. Adding all the newly found language codes to `Language.ts` | Hi! I use the language search field on https://huggingface.co/datasets
However, some of the datasets tagged by ISO language code are not accessible by this search form.
For example, [myv_ru_2022](https://huggingface.co/datasets/slone/myv_ru_2022) is has `myv` language tag but it is not included in Languages search form.
I've also noticed the same problem with `mhr` (see https://huggingface.co/datasets/AigizK/mari-russian-parallel-corpora) | 240 | 62 | Filter datasets by language code
Hi! I use the language search field on https://huggingface.co/datasets
However, some of the datasets tagged by ISO language code are not accessible by this search form.
For example, [myv_ru_2022](https://huggingface.co/datasets/slone/myv_ru_2022) is has `myv` language tag but it is not included in Languages search form.
I've also noticed the same problem with `mhr` (see https://huggingface.co/datasets/AigizK/mari-russian-parallel-corpora)
Thanks @mariosasko!
Do you think it is possible to turn this into a more scalable pipeline? Such as:
1. Looping through all the datasets on the hub and collecting the set of all their language codes;
2. Selecting the codes not covered yet in `Language.ts`
3. Looking up their codes at https://iso639-3.sil.org/code_tables/639/data
4. Adding all the newly found language codes to `Language.ts` | [
-1.1897996664047241,
-0.9151601791381836,
-0.9072151780128479,
1.3619167804718018,
-0.09097640961408615,
-1.3691867589950562,
0.07689256221055984,
-1.055793046951294,
1.5897873640060425,
-0.7038528919219971,
0.27698642015457153,
-1.713036298751831,
-0.04743942618370056,
-0.563224732875824,
-0.7898350954055786,
-0.8617414832115173,
-0.43807557225227356,
-0.8590039014816284,
0.9641588926315308,
2.59849214553833,
1.2129900455474854,
-1.3001275062561035,
2.7620410919189453,
0.7100399732589722,
-0.23960603773593903,
-1.0227528810501099,
0.5829671025276184,
-0.027342796325683594,
-1.330547571182251,
-0.496298223733902,
-0.9309723377227783,
-0.006774893030524254,
-0.6255190372467041,
-0.54945969581604,
0.103534996509552,
0.35606804490089417,
-0.13086548447608948,
-0.29327547550201416,
-0.5644696950912476,
-0.7940409779548645,
0.5234026312828064,
-0.29654204845428467,
0.9637186527252197,
-0.4013652205467224,
1.8327511548995972,
-0.5567904114723206,
0.3387782871723175,
0.7267038822174072,
1.353303074836731,
0.15436209738254547,
-0.0973176434636116,
0.2718755602836609,
0.39049941301345825,
0.08100287616252899,
0.37652361392974854,
1.2071619033813477,
0.5377146005630493,
0.48726266622543335,
0.7145158648490906,
-2.2806735038757324,
1.3539021015167236,
-0.9413125514984131,
0.284751832485199,
1.3919050693511963,
-0.9330204129219055,
0.3346405029296875,
-1.7861219644546509,
-0.02791655622422695,
0.5963902473449707,
-2.319148302078247,
0.15606684982776642,
-1.3052295446395874,
-0.5845208168029785,
0.9686183929443359,
0.30692651867866516,
-1.3142815828323364,
0.1754179447889328,
-0.406441330909729,
0.9788365960121155,
0.6099019646644592,
1.1850117444992065,
-1.7100003957748413,
0.01720830425620079,
-0.2636609673500061,
0.11891281604766846,
-1.3673820495605469,
-1.5406025648117065,
0.5792034864425659,
0.6602681279182434,
0.5961744785308838,
-0.16419139504432678,
0.876781165599823,
-0.9314302802085876,
0.9090396761894226,
-0.833188533782959,
-1.6870800256729126,
-1.5778074264526367,
-2.259788751602173,
-2.354860782623291,
0.8034681081771851,
-0.5754357576370239,
-0.386097252368927,
1.9011101722717285,
-1.0748685598373413,
-1.7720555067062378,
1.0963178873062134,
0.17489302158355713,
0.08770307153463364,
2.24483585357666,
0.2344156801700592,
-0.7569764852523804,
0.2682527005672455,
-0.6254079937934875,
0.7993118762969971,
-0.28264114260673523,
1.386004090309143,
0.6352194547653198,
-1.036506175994873,
1.5654646158218384,
-0.5543720722198486,
0.416800320148468,
-0.6953274011611938,
-0.4713628590106964,
-0.7871133685112,
0.38361209630966187,
1.8160545825958252,
-0.44002312421798706,
1.6217432022094727,
-0.35537493228912354,
-1.5215407609939575,
-1.5600389242172241,
0.8131798505783081,
0.6169614791870117,
-0.791010856628418,
0.09386097639799118,
-0.48292338848114014,
0.06562776118516922,
-0.06495707482099533,
1.1453313827514648,
1.1256147623062134,
0.776512622833252,
-0.3071818947792053,
-0.7794162034988403,
0.2830412983894348,
0.07213091105222702,
-0.616217851638794,
-1.9027150869369507,
-0.4144493043422699,
0.2631612718105316,
0.688919723033905,
-1.2201982736587524,
1.7237035036087036,
0.894832968711853,
2.0208845138549805,
0.9884579181671143,
-0.29982057213783264,
1.542026400566101,
-0.007867010310292244,
1.9190160036087036,
-0.5004914999008179,
0.6080950498580933,
-0.4258158206939697,
-1.203734040260315,
0.8594170212745667,
-0.3194858431816101,
-2.0618736743927,
-0.7907987236976624,
-0.9764732122421265,
-0.2322629690170288,
-0.8205840587615967,
0.9581763744354248,
-0.3334713876247406,
-1.28419029712677,
0.19103559851646423,
-0.6476096510887146,
0.04405426234006882,
-1.2538671493530273,
0.22753997147083282,
0.724882185459137,
-0.6389983892440796,
0.003798247314989567,
-0.17027443647384644,
-1.3720722198486328,
-0.5912176370620728,
0.2067209780216217,
1.9032955169677734,
-0.7241106629371643,
1.024038314819336,
1.0072224140167236,
-0.6723195314407349,
0.08812671899795532,
0.3537786602973938,
-0.2944307029247284,
0.8468743562698364,
-1.011522650718689,
-0.3180573284626007,
1.1285978555679321,
-0.13165386021137238,
-0.7245762348175049,
1.5522098541259766,
0.7954188585281372,
-0.96303391456604,
-0.27384093403816223,
-0.19634559750556946,
-0.7934655547142029,
0.07907174527645111,
-1.5855718851089478,
-0.15759029984474182,
0.24598726630210876,
-1.4127204418182373,
-0.4588369131088257,
-0.1900850087404251,
1.3564847707748413,
-0.21124979853630066,
1.3875072002410889,
-0.32359257340431213,
-0.1694839894771576,
-0.46375635266304016,
-0.4488102197647095,
0.2309311479330063,
-0.14406698942184448,
-0.6689445376396179,
0.37813788652420044,
-0.8928331136703491,
0.31957751512527466,
1.413131594657898,
0.4215824604034424,
0.05476900935173035,
0.49679136276245117,
1.0983525514602661,
0.2922331690788269,
-0.040801748633384705,
-0.9680976271629333,
-1.6717805862426758,
2.122492790222168,
-1.486274003982544,
1.9240920543670654,
0.7667436599731445,
-0.037680793553590775,
-1.7435964345932007,
-1.818182110786438,
1.3338862657546997,
1.1271181106567383,
2.326315402984619,
0.590348482131958,
0.3346216082572937,
-0.8169161677360535,
-0.6045884490013123,
0.4043731689453125,
-1.0265576839447021,
-0.7132956981658936,
0.10974372178316116,
2.314903974533081,
1.8025317192077637,
-0.5370689034461975,
-0.24749335646629333,
-0.9915239810943604,
1.228173017501831,
-0.181446373462677,
0.21133708953857422,
2.009627342224121,
-0.3216436207294464,
-1.118589162826538,
1.2217992544174194,
-2.312403917312622,
0.2253076434135437,
2.0002548694610596,
0.23778928816318512,
0.1720488965511322,
-1.4757181406021118,
-0.6057120561599731,
-0.3016131520271301,
-0.468187540769577,
-1.228790044784546,
0.6549856066703796,
-0.27195730805397034,
-0.971483051776886,
-1.3911705017089844,
0.1448156088590622,
-1.1963483095169067,
-1.7313008308410645,
0.37537357211112976,
1.800034999847412,
2.0356457233428955,
-0.7067635655403137,
1.4592938423156738,
-0.27560684084892273,
0.13231033086776733,
1.2495256662368774,
1.2335987091064453,
3.1716701984405518,
1.9287620782852173,
-1.2426838874816895,
0.6837449669837952,
-0.15659403800964355,
-0.4438171982765198,
1.194850206375122,
-0.973661482334137,
1.159569263458252,
-0.20949912071228027,
-1.2117018699645996,
-1.193861722946167,
1.0711392164230347,
0.4733322262763977,
0.02758048288524151,
-0.619454562664032,
1.2885407209396362,
-0.04444745182991028,
1.296763300895691,
0.5470935106277466,
-0.43060269951820374,
0.5447998642921448,
-0.3465210199356079,
-0.5406836867332458,
1.5172977447509766,
0.23363223671913147,
-1.4995479583740234,
-2.334522247314453,
-0.16698016226291656,
-0.868541955947876,
-0.11918595433235168,
-0.596373438835144,
-1.01700758934021,
1.661203384399414,
0.4871339201927185,
-1.3441120386123657,
-0.269256591796875,
-0.4456326365470886,
-0.6304201483726501,
2.6521685123443604,
-1.404689908027649,
-0.11533855646848679,
-0.9818809628486633,
-0.4372730553150177,
1.7392982244491577,
-1.258120059967041,
-0.13639771938323975,
-1.0140159130096436,
-0.6351498365402222,
-1.3365788459777832,
-0.6231265664100647,
-0.08832170069217682,
-0.8936766386032104,
0.7095136642456055,
0.08757255971431732,
-1.0234527587890625,
-0.26583391427993774,
-0.8280611038208008,
0.9376423358917236,
-0.08549708127975464,
0.3442668616771698,
1.9773658514022827,
0.4294208884239197,
-0.38475483655929565,
0.6212740540504456,
1.1272872686386108,
0.6631534695625305,
-0.5940453410148621,
0.23608417809009552,
-0.6935744285583496,
0.2575850486755371,
-1.3855583667755127,
0.3493388891220093,
-2.850717306137085,
0.7619866132736206,
-0.034306176006793976,
-0.06924276798963547,
-0.04039975255727768,
-1.283145785331726,
1.105960488319397,
2.5760366916656494,
-1.2804110050201416,
0.36157530546188354,
0.3146911561489105,
1.0927019119262695,
-1.541711688041687,
0.2642909586429596,
-0.4167880117893219,
2.156243085861206,
0.23976603150367737,
1.1937254667282104,
-0.38531845808029175,
-2.1083500385284424,
0.6320762634277344,
-1.2731776237487793,
-1.0795236825942993,
0.8431086540222168,
-0.8287044763565063,
-0.00036550965160131454,
-1.5490963459014893,
-0.11757543683052063,
-0.9258566498756409,
-1.2474502325057983,
0.924820065498352,
0.11793291568756104,
0.511648416519165,
-0.7220876812934875,
0.3759393095970154,
-2.145005226135254,
-1.3483625650405884,
-0.1609737128019333,
-0.912945032119751,
0.5014472603797913,
-0.15608496963977814,
0.6385376453399658,
-0.07562002539634705,
0.10921544581651688,
0.3970125913619995,
1.421416163444519,
3.545379638671875,
0.16277499496936798,
0.30395931005477905,
-0.14400628209114075,
-0.9211204051971436,
1.4505342245101929,
1.0744717121124268,
-0.1282394975423813,
-0.5033631920814514,
-1.0166032314300537,
1.346990704536438,
1.9708929061889648,
1.0722650289535522,
0.14393389225006104,
-0.9361245632171631,
-0.825305700302124,
-0.0011365893296897411,
0.19157320261001587,
0.5773389935493469,
0.9109386801719666,
-0.010283179581165314,
0.16913558542728424,
1.4251418113708496,
1.2606981992721558,
-0.40697911381721497,
0.43564656376838684,
-0.9308322072029114,
-0.4604547917842865,
0.48393645882606506,
0.2912956476211548,
0.021154433488845825,
0.5105057954788208,
-1.0149468183517456,
-0.29421594738960266,
-0.3217821419239044,
-0.9961940050125122,
-0.7013885974884033,
-0.4622301757335663,
-0.4289681911468506,
1.5952235460281372,
0.04577606916427612,
-0.4753475487232208,
0.00714908167719841,
-0.819830060005188,
-0.19527524709701538,
-1.0826189517974854,
0.27695509791374207,
-0.10694852471351624,
-0.0055063883773982525,
-0.14605289697647095,
1.6193554401397705,
-0.9888222813606262,
-2.105435371398926,
0.2626071572303772,
0.21830032765865326,
-0.5224671363830566,
0.1760866343975067,
1.6397645473480225,
0.4999158978462219,
1.2851271629333496,
1.3318912982940674,
0.969041109085083,
-0.5623177886009216,
-1.176530122756958,
0.6594289541244507,
0.8766210079193115,
-1.441475749015808,
0.9373273253440857,
-0.20309902727603912,
-0.4984368085861206,
0.7246527075767517,
1.2360831499099731,
0.44146499037742615,
-1.9767361879348755,
0.8600128293037415,
-0.7900885343551636,
0.7523225545883179,
0.6058453321456909,
0.8519154787063599,
0.19879190623760223,
0.8126275539398193,
-1.3205691576004028,
-1.1484332084655762,
-0.6841509938240051,
-0.6194625496864319,
1.883530855178833,
-0.09545149654150009,
0.41011640429496765,
-0.20054487884044647,
-1.2717416286468506,
-0.14517036080360413,
0.6633232235908508,
0.260100781917572,
-0.40618178248405457,
0.8990706205368042,
-0.6891912221908569,
-1.0307724475860596,
-1.3258109092712402,
-0.456936776638031,
-0.891636848449707,
-0.9484913349151611,
0.9893041849136353,
0.8808699250221252,
0.389121949672699,
1.9337047338485718,
0.5008719563484192,
0.1964130699634552,
-2.6432673931121826,
0.9114322066307068,
0.2597532868385315,
0.0027691926807165146,
1.0496582984924316,
0.23549754917621613,
1.1313728094100952,
-0.11500637978315353,
0.49984604120254517,
-2.3324060440063477,
2.196244478225708,
-0.2496199756860733,
0.594829797744751,
0.003053463064134121,
-0.22100180387496948,
1.1011087894439697,
0.5829665064811707,
0.6874392628669739,
-1.233480453491211,
0.799243152141571,
-0.7034818530082703,
1.0821856260299683,
0.9826081395149231,
-0.9754800796508789,
-0.021615132689476013,
1.361975073814392,
0.5205727815628052,
-0.4164450466632843,
-0.8610472679138184,
-0.9300375580787659,
0.8570622205734253,
1.678985834121704,
-0.041959889233112335,
0.019228586927056313,
0.851946234703064,
0.64448082447052,
-1.2324607372283936,
0.12074868381023407,
-0.6978070139884949,
-0.6917631030082703,
1.6381559371948242,
2.014906883239746,
-0.09224840253591537,
-0.11178071051836014,
-0.7116460204124451,
-1.0981682538986206,
0.7190384864807129,
-0.09224416315555573,
0.13262403011322021,
0.6798082590103149,
-0.6607601642608643,
1.189013957977295,
0.8152572512626648,
0.9789957404136658,
0.06037139892578125,
0.4451639950275421,
0.35013628005981445,
-0.2248554676771164,
-1.1872292757034302,
-0.4149470627307892,
-1.0882588624954224,
-2.569728374481201,
0.5232815742492676,
-0.35385021567344666,
-1.3873164653778076,
-0.01854006014764309,
-1.0625752210617065,
0.84419846534729,
-0.6030942797660828,
-1.0438804626464844,
-1.3636932373046875,
0.214289128780365,
-0.16966739296913147,
0.8139296770095825,
-1.6922944784164429,
-0.09958665072917938,
1.3377619981765747,
0.8267182111740112,
-0.5611363053321838,
1.0017257928848267,
0.3568793833255768,
0.9968668222427368,
0.8409395813941956,
-0.36505359411239624,
0.47361814975738525,
0.1591692417860031,
-1.3724892139434814,
0.5010198950767517,
1.118849515914917,
0.26132312417030334,
1.4025574922561646,
-0.5386816263198853,
0.1067245677113533,
0.43124285340309143,
-0.5859801173210144,
-0.453145831823349,
-0.5579098463058472,
0.7562670707702637,
0.1798086017370224,
-0.9058935046195984,
0.04618050903081894,
-0.13782604038715363,
-0.18782836198806763,
0.15812833607196808,
-1.541759967803955,
-0.3005574345588684,
-0.3054417371749878,
-0.4377771019935608,
-1.311530590057373,
-0.06760013103485107,
1.3535338640213013,
-0.8072918653488159,
-0.17545442283153534,
0.4845186769962311,
0.40517178177833557,
0.6233086585998535,
0.7004605531692505,
-0.6375587582588196,
-0.44861695170402527,
-0.34907275438308716,
-0.2887594401836395,
0.2285313457250595,
1.162610650062561,
-0.19087916612625122,
-1.070043683052063,
0.728201687335968,
-0.38604286313056946,
0.10082601010799408,
2.0137500762939453,
0.06366187334060669,
-0.7944435477256775,
0.31730514764785767,
-0.6733134388923645,
1.8674545288085938,
1.6653785705566406,
1.2686126232147217,
-0.13299228250980377,
-0.8833471536636353,
0.5050186514854431,
-0.252798855304718,
-0.31367963552474976,
0.9822813272476196,
0.4747329652309418,
-0.17856018245220184,
-1.3950008153915405,
0.5688798427581787,
1.3443753719329834,
-1.025912880897522,
-0.7652963995933533,
0.11799944937229156,
-0.802025318145752,
1.0695480108261108,
0.6806502342224121,
0.3822941184043884,
0.26751708984375,
1.5335887670516968,
0.5817123055458069,
-0.4901998043060303,
0.4300200045108795,
0.48446211218833923,
-0.13911330699920654,
-2.081421375274658,
-1.0181301832199097,
0.4067176580429077,
-0.29288405179977417,
-1.5596930980682373,
1.2851825952529907,
-1.1585733890533447,
-0.9341999888420105,
0.5630686283111572,
0.11720429360866547,
1.433241605758667,
0.23032142221927643,
1.7301108837127686,
2.053698778152466,
0.8508471846580505,
0.27379998564720154,
1.3192552328109741,
0.04929124563932419,
-0.3949096202850342,
1.7314465045928955,
-0.3836668133735657,
0.566979706287384,
1.0616189241409302,
-0.39043834805488586,
-0.9788054823875427,
-0.7621117234230042,
-1.2199006080627441,
-0.6162334084510803,
1.1924570798873901,
0.17148765921592712,
-1.2236441373825073,
0.21140867471694946,
1.6013727188110352,
0.1264432668685913,
-0.1636483371257782,
0.5923101305961609,
0.4720509350299835,
-0.6417843699455261,
-0.020645158365368843,
-1.000146746635437,
0.5458953976631165,
-0.04816523939371109,
-0.3857083022594452,
0.33342963457107544,
0.42651575803756714,
1.2450439929962158,
-0.06742915511131287,
0.16579149663448334,
1.2778915166854858,
-1.3657217025756836,
1.4562476873397827,
-0.606262743473053,
0.19354569911956787,
-2.369218587875366,
1.3981167078018188,
-0.7762042284011841,
1.8959592580795288,
-2.55949330329895,
0.3719103932380676,
-0.5602572560310364,
-0.48396486043930054,
0.3263072371482849,
-0.2890585958957672,
0.0823344960808754,
-0.17981043457984924,
-1.0266971588134766,
-0.10152961313724518,
-0.7994949221611023,
0.6171311140060425,
1.1572142839431763,
1.3477154970169067,
-1.1249265670776367,
-0.3135288953781128,
-1.7418969869613647,
-0.1423097848892212,
-0.6595674753189087,
0.35514384508132935,
-1.9939734935760498,
-0.08839201927185059,
-1.9730992317199707,
-2.4106342792510986,
-1.5250104665756226,
-0.7672649621963501,
1.1443839073181152,
0.18238160014152527,
-0.8698490858078003,
0.9945671558380127,
-0.3870770335197449,
-1.8182110786437988,
0.9682603478431702,
-2.1968564987182617
] |
https://github.com/huggingface/datasets/issues/5675 | Filter datasets by language code | @avidale This has been discussed in https://github.com/huggingface/datasets/issues/4881, so also feel free to share your opinion there. | Hi! I use the language search field on https://huggingface.co/datasets
However, some of the datasets tagged by ISO language code are not accessible by this search form.
For example, [myv_ru_2022](https://huggingface.co/datasets/slone/myv_ru_2022) is has `myv` language tag but it is not included in Languages search form.
I've also noticed the same problem with `mhr` (see https://huggingface.co/datasets/AigizK/mari-russian-parallel-corpora) | 240 | 16 | Filter datasets by language code
Hi! I use the language search field on https://huggingface.co/datasets
However, some of the datasets tagged by ISO language code are not accessible by this search form.
For example, [myv_ru_2022](https://huggingface.co/datasets/slone/myv_ru_2022) is has `myv` language tag but it is not included in Languages search form.
I've also noticed the same problem with `mhr` (see https://huggingface.co/datasets/AigizK/mari-russian-parallel-corpora)
@avidale This has been discussed in https://github.com/huggingface/datasets/issues/4881, so also feel free to share your opinion there. | [
-1.1485486030578613,
-0.9069532155990601,
-0.882111668586731,
1.4434990882873535,
-0.06242365390062332,
-1.3361639976501465,
0.09153486043214798,
-0.9745886325836182,
1.5801395177841187,
-0.7083759307861328,
0.276601642370224,
-1.7224369049072266,
-0.10613051801919937,
-0.5469898581504822,
-0.7593818306922913,
-0.839187502861023,
-0.4156837463378906,
-0.7931005954742432,
0.9433056116104126,
2.5741188526153564,
1.2326030731201172,
-1.2819392681121826,
2.786142110824585,
0.6089106202125549,
-0.28188347816467285,
-1.0127382278442383,
0.653275191783905,
0.029035432264208794,
-1.235151767730713,
-0.4582061171531677,
-0.9035727977752686,
0.11268271505832672,
-0.5393655300140381,
-0.4707218110561371,
0.07438685745000839,
0.45663055777549744,
-0.12162122130393982,
-0.2666652798652649,
-0.6006298661231995,
-0.7461860775947571,
0.4747479557991028,
-0.2862888276576996,
0.9473626613616943,
-0.3816806674003601,
1.833436369895935,
-0.5534466505050659,
0.24650190770626068,
0.6739770770072937,
1.398415446281433,
0.1151098757982254,
-0.0060216994024813175,
0.29983919858932495,
0.3428182005882263,
0.02400065027177334,
0.38913625478744507,
1.2561582326889038,
0.5210294723510742,
0.4496346414089203,
0.6967598795890808,
-2.233262062072754,
1.3292346000671387,
-0.8872643113136292,
0.28153225779533386,
1.3488450050354004,
-0.9277219176292419,
0.3486626446247101,
-1.8216688632965088,
-0.06308154761791229,
0.5335965156555176,
-2.338745355606079,
0.12441202253103256,
-1.1958924531936646,
-0.6001318693161011,
0.9350728988647461,
0.29956528544425964,
-1.346608281135559,
0.14173489809036255,
-0.5022112131118774,
1.0008013248443604,
0.5859489440917969,
1.1841338872909546,
-1.6502691507339478,
0.11315330117940903,
-0.2401764988899231,
0.08472326397895813,
-1.3413362503051758,
-1.522605299949646,
0.558707594871521,
0.6762244701385498,
0.7420366406440735,
-0.1719834953546524,
0.8672807216644287,
-0.9671065211296082,
0.8944852948188782,
-0.8381744623184204,
-1.6849067211151123,
-1.4881348609924316,
-2.3814330101013184,
-2.3387556076049805,
0.8209646344184875,
-0.5334607362747192,
-0.45802244544029236,
1.9154359102249146,
-0.972500741481781,
-1.7772666215896606,
1.0518546104431152,
0.315679669380188,
0.0665246769785881,
2.3270814418792725,
0.2959642708301544,
-0.7918745875358582,
0.31927254796028137,
-0.6316612362861633,
0.8657014966011047,
-0.3111483156681061,
1.3898249864578247,
0.6378034949302673,
-1.0090333223342896,
1.6258642673492432,
-0.5076210498809814,
0.4212871193885803,
-0.7003293633460999,
-0.4871993660926819,
-0.7999038100242615,
0.3431311845779419,
1.8383629322052002,
-0.4220951497554779,
1.6003589630126953,
-0.41848140954971313,
-1.6062201261520386,
-1.5439553260803223,
0.8092114925384521,
0.5786757469177246,
-0.8019288182258606,
0.1299382746219635,
-0.5407797694206238,
0.00823022611439228,
0.027679497376084328,
1.1165649890899658,
1.0913043022155762,
0.6942246556282043,
-0.30718713998794556,
-0.821371853351593,
0.27155399322509766,
0.03446917235851288,
-0.5645622611045837,
-2.0125277042388916,
-0.39096054434776306,
0.28700295090675354,
0.6304210424423218,
-1.2537012100219727,
1.771119236946106,
0.9175000786781311,
2.034607410430908,
0.9647707939147949,
-0.2882618308067322,
1.5134955644607544,
-0.09016282111406326,
1.9079039096832275,
-0.4390850067138672,
0.5617254972457886,
-0.39197349548339844,
-1.23715078830719,
0.8227350115776062,
-0.3522053062915802,
-1.9992151260375977,
-0.9252374172210693,
-0.9785942435264587,
-0.15260057151317596,
-0.8524481654167175,
0.9909809827804565,
-0.33846181631088257,
-1.3623472452163696,
0.13526418805122375,
-0.6939748525619507,
0.08300325274467468,
-1.309291124343872,
0.16113430261611938,
0.7464097738265991,
-0.6878348588943481,
-0.024566853418946266,
-0.21023720502853394,
-1.3719369173049927,
-0.5134826302528381,
0.3302518427371979,
1.9223791360855103,
-0.7163172960281372,
0.9804049134254456,
0.9928702116012573,
-0.6883900165557861,
0.18640008568763733,
0.234023317694664,
-0.3478626310825348,
0.8277484178543091,
-0.9872126579284668,
-0.36704641580581665,
1.1057310104370117,
-0.1202634796500206,
-0.7738431692123413,
1.5355496406555176,
0.8751921057701111,
-0.974466860294342,
-0.2730385959148407,
-0.18386463820934296,
-0.7618393898010254,
0.044706568121910095,
-1.5695289373397827,
-0.15397503972053528,
0.21351280808448792,
-1.3698409795761108,
-0.3969353437423706,
-0.18324697017669678,
1.3014204502105713,
-0.1892094910144806,
1.3732234239578247,
-0.25291627645492554,
-0.13395389914512634,
-0.46709516644477844,
-0.5188113451004028,
0.24961961805820465,
-0.17113204300403595,
-0.6824708580970764,
0.3997674584388733,
-0.8887081146240234,
0.3432846963405609,
1.4229621887207031,
0.3976975977420807,
0.06608458608388901,
0.5680732131004333,
1.1097958087921143,
0.3255785405635834,
-0.027568072080612183,
-0.9477888345718384,
-1.6790366172790527,
2.078803539276123,
-1.4972025156021118,
1.9072037935256958,
0.7812002301216125,
-0.10664231330156326,
-1.7705116271972656,
-1.8493564128875732,
1.3989344835281372,
1.2292274236679077,
2.359797954559326,
0.5058876276016235,
0.3339952230453491,
-0.7756392359733582,
-0.7432582378387451,
0.3354664742946625,
-1.0412037372589111,
-0.724162757396698,
0.10472586750984192,
2.302288770675659,
1.9001396894454956,
-0.5530856251716614,
-0.2517643868923187,
-0.9953845739364624,
1.1906296014785767,
-0.23906210064888,
0.2390131652355194,
2.0066537857055664,
-0.35275718569755554,
-1.0536874532699585,
1.2295258045196533,
-2.4063451290130615,
0.28945446014404297,
1.995287299156189,
0.28057947754859924,
0.18762129545211792,
-1.5272612571716309,
-0.6263929009437561,
-0.31013602018356323,
-0.4837927222251892,
-1.2169798612594604,
0.6273182034492493,
-0.25446760654449463,
-1.0412582159042358,
-1.4028161764144897,
0.15131650865077972,
-1.1849744319915771,
-1.7052810192108154,
0.44770270586013794,
1.7959977388381958,
2.1182668209075928,
-0.7841662764549255,
1.3844311237335205,
-0.20333875715732574,
0.14552254974842072,
1.229297161102295,
1.2178235054016113,
3.0781872272491455,
1.8701202869415283,
-1.2745310068130493,
0.722387433052063,
-0.11988718062639236,
-0.5032215714454651,
1.2128796577453613,
-0.9600790739059448,
1.1676080226898193,
-0.2607376277446747,
-1.1988681554794312,
-1.2487448453903198,
1.0858210325241089,
0.5276501178741455,
-0.015864863991737366,
-0.605078399181366,
1.2457785606384277,
-0.009270909242331982,
1.2597113847732544,
0.6024385094642639,
-0.42714715003967285,
0.5011725425720215,
-0.3284873366355896,
-0.5533559322357178,
1.58958899974823,
0.18198414146900177,
-1.6003620624542236,
-2.280878782272339,
-0.19001458585262299,
-0.8935011029243469,
-0.17296332120895386,
-0.6119419932365417,
-1.0425467491149902,
1.6194193363189697,
0.46422237157821655,
-1.2876482009887695,
-0.32217785716056824,
-0.3478139638900757,
-0.59256511926651,
2.616180658340454,
-1.3431395292282104,
-0.10640554130077362,
-0.9202619194984436,
-0.42771396040916443,
1.7386151552200317,
-1.1859227418899536,
-0.09511338174343109,
-1.0487265586853027,
-0.6646947860717773,
-1.3874210119247437,
-0.627028226852417,
-0.07969352602958679,
-0.9183502793312073,
0.6445936560630798,
0.041118524968624115,
-1.001429557800293,
-0.24473296105861664,
-0.8119177222251892,
1.062567114830017,
-0.12172406911849976,
0.29909709095954895,
1.9071543216705322,
0.47869446873664856,
-0.3857797682285309,
0.6771169304847717,
1.1335347890853882,
0.6478347778320312,
-0.6780261993408203,
0.2161051332950592,
-0.6743645071983337,
0.2682257890701294,
-1.4469943046569824,
0.25099849700927734,
-2.9438858032226562,
0.7439596056938171,
-0.044237032532691956,
-0.09666067361831665,
-0.03623984009027481,
-1.2980663776397705,
1.1965471506118774,
2.5277068614959717,
-1.2747917175292969,
0.40775203704833984,
0.3719073534011841,
1.047003984451294,
-1.5184979438781738,
0.21836553514003754,
-0.4809354841709137,
2.1586015224456787,
0.15404112637043,
1.191613793373108,
-0.4793611466884613,
-1.9803372621536255,
0.6189732551574707,
-1.352367877960205,
-1.0159995555877686,
0.8313848376274109,
-0.9261727333068848,
0.14024634659290314,
-1.5265322923660278,
-0.12110573798418045,
-0.9335256814956665,
-1.2786931991577148,
0.8720386028289795,
0.141444593667984,
0.4534560441970825,
-0.6490022540092468,
0.42384350299835205,
-2.133138418197632,
-1.3854690790176392,
-0.14205649495124817,
-1.0577682256698608,
0.4669409990310669,
-0.2228233367204666,
0.563727855682373,
-0.011910435743629932,
0.09740055352449417,
0.358679860830307,
1.377479076385498,
3.530646324157715,
0.1444307565689087,
0.23919470608234406,
-0.0638919323682785,
-0.9532760977745056,
1.540061354637146,
1.1069984436035156,
-0.0822802260518074,
-0.48652398586273193,
-0.9629356265068054,
1.3658583164215088,
1.9697813987731934,
1.1441974639892578,
0.15398560464382172,
-0.9090812802314758,
-0.8088293671607971,
-0.00786089152097702,
0.1711953580379486,
0.57647705078125,
0.875385582447052,
-0.11079458892345428,
0.1773463934659958,
1.3728523254394531,
1.2165619134902954,
-0.4196062386035919,
0.5166869163513184,
-0.9987703561782837,
-0.4358379542827606,
0.4398881793022156,
0.2448294311761856,
0.01741728000342846,
0.5805075764656067,
-1.1150493621826172,
-0.2968452572822571,
-0.2696581184864044,
-0.8888971209526062,
-0.7079519629478455,
-0.37633663415908813,
-0.4101496636867523,
1.5535883903503418,
0.044451192021369934,
-0.4678378403186798,
0.05694544315338135,
-0.8112059235572815,
-0.1800689399242401,
-1.0434459447860718,
0.23178529739379883,
-0.1352779120206833,
0.06994849443435669,
-0.16031023859977722,
1.684342861175537,
-1.0155786275863647,
-2.2166857719421387,
0.21345734596252441,
0.29789766669273376,
-0.5109242796897888,
0.16857090592384338,
1.661201000213623,
0.46518197655677795,
1.3046265840530396,
1.2428598403930664,
1.0720548629760742,
-0.5807546973228455,
-1.176833152770996,
0.6669620871543884,
0.9346504807472229,
-1.3697341680526733,
0.9575188755989075,
-0.26613423228263855,
-0.5035866498947144,
0.7530819177627563,
1.2723838090896606,
0.39857491850852966,
-1.9804936647415161,
0.9351768493652344,
-0.8037087321281433,
0.7873033285140991,
0.6258625388145447,
0.8807141184806824,
0.25441738963127136,
0.877210259437561,
-1.304472804069519,
-1.131421685218811,
-0.7735769748687744,
-0.6191112399101257,
1.8637460470199585,
-0.11569720506668091,
0.37936410307884216,
-0.09724030643701553,
-1.255609393119812,
-0.14702890813350677,
0.7171767354011536,
0.33407050371170044,
-0.43422386050224304,
0.9225907325744629,
-0.6675910949707031,
-0.9993041157722473,
-1.309134840965271,
-0.3983621299266815,
-0.8812495470046997,
-0.954146683216095,
0.9786949157714844,
0.7969521284103394,
0.4480615556240082,
1.9725606441497803,
0.49517562985420227,
0.24053643643856049,
-2.674523115158081,
0.9438598155975342,
0.26213082671165466,
0.09245118498802185,
0.9183149933815002,
0.26731401681900024,
1.2447515726089478,
-0.11502677947282791,
0.52243572473526,
-2.242565631866455,
2.109426259994507,
-0.16378647089004517,
0.5899609327316284,
0.05141167342662811,
-0.1888190358877182,
1.090162992477417,
0.5272178649902344,
0.7265405654907227,
-1.270261526107788,
0.8380780816078186,
-0.6426303386688232,
1.051882028579712,
0.9928476810455322,
-0.9627532958984375,
0.07335718721151352,
1.3674734830856323,
0.56228107213974,
-0.395535945892334,
-0.922791600227356,
-0.7969745397567749,
0.9212589859962463,
1.5925263166427612,
-0.0007499363273382187,
-0.013253161683678627,
0.8971537947654724,
0.5969552397727966,
-1.2592110633850098,
0.04842587560415268,
-0.654754102230072,
-0.65022873878479,
1.75193452835083,
2.0054337978363037,
-0.09387226402759552,
-0.12057354301214218,
-0.7967045307159424,
-1.1056045293807983,
0.7023196816444397,
-0.14454813301563263,
0.1300249844789505,
0.7666377425193787,
-0.7219814658164978,
1.2163574695587158,
0.6326807141304016,
0.9251225590705872,
-0.009035717695951462,
0.4100084900856018,
0.3738281726837158,
-0.17782872915267944,
-1.209375023841858,
-0.48389390110969543,
-1.1360300779342651,
-2.5734126567840576,
0.40937015414237976,
-0.4065706729888916,
-1.320839524269104,
0.019933393225073814,
-1.0643576383590698,
0.8720682859420776,
-0.619265079498291,
-0.9656038880348206,
-1.3265045881271362,
0.2763381898403168,
-0.2103968858718872,
0.8006551861763,
-1.7367180585861206,
-0.1161298006772995,
1.3544293642044067,
0.820795476436615,
-0.575617253780365,
0.9897139668464661,
0.3659449815750122,
0.9769534468650818,
0.8087891936302185,
-0.3717653453350067,
0.5122748017311096,
0.14754779636859894,
-1.4138997793197632,
0.4309234619140625,
1.083250880241394,
0.15601691603660583,
1.3377817869186401,
-0.4807995855808258,
0.07094500958919525,
0.5132597088813782,
-0.6166801452636719,
-0.5154088139533997,
-0.49215853214263916,
0.7111467123031616,
0.07789456844329834,
-1.0398783683776855,
0.02064776048064232,
-0.1246696412563324,
-0.24037109315395355,
0.27602097392082214,
-1.559526801109314,
-0.3692103624343872,
-0.28955456614494324,
-0.46842053532600403,
-1.3032747507095337,
0.04402943700551987,
1.3369684219360352,
-0.7918131947517395,
-0.18729665875434875,
0.508271336555481,
0.37222516536712646,
0.6159096360206604,
0.6893119215965271,
-0.704216718673706,
-0.38591864705085754,
-0.3998006582260132,
-0.24140565097332,
0.2917296886444092,
1.143591284751892,
-0.1603448987007141,
-1.103216528892517,
0.7201999425888062,
-0.39371931552886963,
0.15721875429153442,
2.0920541286468506,
0.06330271065235138,
-0.819444477558136,
0.341250479221344,
-0.7251891493797302,
1.8645063638687134,
1.55832040309906,
1.3028150796890259,
-0.08572845906019211,
-0.8291689157485962,
0.5504669547080994,
-0.20775724947452545,
-0.2786227762699127,
0.8897922039031982,
0.5002107620239258,
-0.13168926537036896,
-1.380938172340393,
0.5273913741111755,
1.4635297060012817,
-0.9945977330207825,
-0.810391366481781,
0.1115003228187561,
-0.8788613080978394,
1.1768362522125244,
0.7350044846534729,
0.37368786334991455,
0.2360958307981491,
1.488739252090454,
0.5786314606666565,
-0.46046212315559387,
0.39453697204589844,
0.5485872626304626,
-0.14296351373195648,
-2.004379987716675,
-0.9516769647598267,
0.31502580642700195,
-0.277473121881485,
-1.5183496475219727,
1.260878086090088,
-1.0852948427200317,
-0.8713984489440918,
0.4914890229701996,
0.08981065452098846,
1.4391388893127441,
0.2588190734386444,
1.7051997184753418,
1.991784691810608,
0.8646897077560425,
0.25100815296173096,
1.2856169939041138,
-0.06033174693584442,
-0.4121214747428894,
1.7588142156600952,
-0.4121688902378082,
0.5562300086021423,
0.9860690236091614,
-0.43338608741760254,
-1.0707108974456787,
-0.8157232403755188,
-1.166825294494629,
-0.5371001958847046,
1.2197481393814087,
0.16013076901435852,
-1.250775933265686,
0.20055696368217468,
1.556713581085205,
0.1892114132642746,
-0.19506627321243286,
0.6093828082084656,
0.4873245656490326,
-0.6599526405334473,
-0.0061412714421749115,
-0.9593455195426941,
0.5059752464294434,
-0.03982461988925934,
-0.33408108353614807,
0.29528090357780457,
0.4586482644081116,
1.1973127126693726,
-0.06819551438093185,
0.23499980568885803,
1.2568299770355225,
-1.3125275373458862,
1.4728670120239258,
-0.5947865843772888,
0.22031170129776,
-2.3919994831085205,
1.4658827781677246,
-0.8028286695480347,
1.8535404205322266,
-2.5668842792510986,
0.3748774826526642,
-0.5733782649040222,
-0.5063946843147278,
0.2768573760986328,
-0.3505738377571106,
0.09771153330802917,
-0.15539108216762543,
-1.016602635383606,
-0.11931487917900085,
-0.7404254078865051,
0.5520451068878174,
1.149526596069336,
1.300665259361267,
-1.0853084325790405,
-0.3307335376739502,
-1.730107069015503,
-0.18000537157058716,
-0.701546311378479,
0.3546426594257355,
-2.0588815212249756,
-0.15484504401683807,
-1.970710277557373,
-2.40048885345459,
-1.4330646991729736,
-0.7723504900932312,
1.113072156906128,
0.26209262013435364,
-0.904057502746582,
1.0728918313980103,
-0.33369728922843933,
-1.7806724309921265,
0.978484570980072,
-2.181783437728882
] |
https://github.com/huggingface/datasets/issues/5672 | Pushing dataset to hub crash | Hi ! It's been fixed by https://github.com/huggingface/datasets/pull/5598. We're doing a new release tomorrow with the fix and you'll be able to push your 100k images ;)
Basically `push_to_hub` used to fail if the remote repository already exists and has a README.md without dataset_info in the YAML tags.
In the meantime you can install datasets from source | ### Describe the bug
Uploading a dataset with `push_to_hub()` fails without error description.
### Steps to reproduce the bug
Hey there,
I've built a image dataset of 100k images + text pair as described here https://huggingface.co/docs/datasets/image_dataset#imagefolder
Now I'm trying to push it to the hub but I'm running into issues. First, I tried doing it via git directly, I added all the files in git lfs and pushed but I got hit with an error saying huggingface only accept up to 10k files in a folder.
So I'm now trying with the `push_to_hub()` func as follow:
```python
from datasets import load_dataset
import os
dataset = load_dataset("imagefolder", data_dir="./data", split="train")
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
```
But again, this produces an error:
```
Resolving data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 100212/100212 [00:00<00:00, 439108.61it/s]
Downloading and preparing dataset imagefolder/default to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f...
Downloading data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 100211/100211 [00:00<00:00, 149323.73it/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 15947.92it/s]
Extracting data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2245.34it/s]
Dataset imagefolder downloaded and prepared to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f. Subsequent calls will reuse this data.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:31<00:00, 2.24s/it]
Downloading metadata: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 118/118 [00:00<00:00, 225kB/s]
Traceback (most recent call last):
File "/home/contact_theochampion/organization-logos/push_to_hub.py", line 5, in <module>
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
File "/home/contact_theochampion/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5245, in push_to_hub
repo_info = dataset_infos[next(iter(dataset_infos))]
StopIteration
```
What could be happening here ?
### Expected behavior
The dataset is pushed to the hub
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.10.0-21-cloud-amd64-x86_64-with-glibc2.31
- Python version: 3.9.2
- PyArrow version: 11.0.0
- Pandas version: 1.5.3 | 242 | 56 | Pushing dataset to hub crash
### Describe the bug
Uploading a dataset with `push_to_hub()` fails without error description.
### Steps to reproduce the bug
Hey there,
I've built a image dataset of 100k images + text pair as described here https://huggingface.co/docs/datasets/image_dataset#imagefolder
Now I'm trying to push it to the hub but I'm running into issues. First, I tried doing it via git directly, I added all the files in git lfs and pushed but I got hit with an error saying huggingface only accept up to 10k files in a folder.
So I'm now trying with the `push_to_hub()` func as follow:
```python
from datasets import load_dataset
import os
dataset = load_dataset("imagefolder", data_dir="./data", split="train")
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
```
But again, this produces an error:
```
Resolving data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 100212/100212 [00:00<00:00, 439108.61it/s]
Downloading and preparing dataset imagefolder/default to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f...
Downloading data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 100211/100211 [00:00<00:00, 149323.73it/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 15947.92it/s]
Extracting data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2245.34it/s]
Dataset imagefolder downloaded and prepared to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f. Subsequent calls will reuse this data.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:31<00:00, 2.24s/it]
Downloading metadata: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 118/118 [00:00<00:00, 225kB/s]
Traceback (most recent call last):
File "/home/contact_theochampion/organization-logos/push_to_hub.py", line 5, in <module>
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
File "/home/contact_theochampion/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5245, in push_to_hub
repo_info = dataset_infos[next(iter(dataset_infos))]
StopIteration
```
What could be happening here ?
### Expected behavior
The dataset is pushed to the hub
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.10.0-21-cloud-amd64-x86_64-with-glibc2.31
- Python version: 3.9.2
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Hi ! It's been fixed by https://github.com/huggingface/datasets/pull/5598. We're doing a new release tomorrow with the fix and you'll be able to push your 100k images ;)
Basically `push_to_hub` used to fail if the remote repository already exists and has a README.md without dataset_info in the YAML tags.
In the meantime you can install datasets from source | [
-1.1694098711013794,
-0.9390988349914551,
-0.7956576943397522,
1.3902919292449951,
-0.15796399116516113,
-1.2473849058151245,
0.15137629210948944,
-1.1578655242919922,
1.5682157278060913,
-0.7130810618400574,
0.31832554936408997,
-1.6981559991836548,
-0.00633679423481226,
-0.508917510509491,
-0.7761488556861877,
-0.8722177743911743,
-0.4212994873523712,
-0.8242190480232239,
1.001576542854309,
2.571540117263794,
1.2018693685531616,
-1.3536722660064697,
2.767256498336792,
0.6431704163551331,
-0.18253818154335022,
-1.014424204826355,
0.5768207907676697,
0.07215762138366699,
-1.3251817226409912,
-0.38766828179359436,
-0.8873021006584167,
-0.04796314984560013,
-0.5745419859886169,
-0.47447994351387024,
0.0944308489561081,
0.4363384544849396,
-0.2886010408401489,
-0.41575953364372253,
-0.6135646104812622,
-0.7339092493057251,
0.534021258354187,
-0.4391038119792938,
0.9889514446258545,
-0.2814550995826721,
1.8070683479309082,
-0.6243172287940979,
0.3923274278640747,
0.7763668894767761,
1.3148727416992188,
0.19191399216651917,
0.09476611018180847,
0.42150062322616577,
0.3622685968875885,
-0.014845586381852627,
0.4010547697544098,
1.2301565408706665,
0.5556906461715698,
0.44114506244659424,
0.7584203481674194,
-2.189051866531372,
1.2877403497695923,
-0.9621211290359497,
0.31150996685028076,
1.3754081726074219,
-0.8281238079071045,
0.3353096842765808,
-1.8695372343063354,
-0.06045136600732803,
0.6102361083030701,
-2.182607889175415,
0.302152156829834,
-1.274143934249878,
-0.5195881724357605,
0.9235323071479797,
0.3213229775428772,
-1.1453090906143188,
0.25042492151260376,
-0.5383690595626831,
1.040402889251709,
0.4279024600982666,
1.1736578941345215,
-1.6503040790557861,
-0.04847273230552673,
-0.29224538803100586,
0.13429710268974304,
-1.3273483514785767,
-1.557214379310608,
0.5428662300109863,
0.5714816451072693,
0.6346225142478943,
-0.12168796360492706,
1.0618401765823364,
-0.9843525886535645,
0.7919090390205383,
-1.0016404390335083,
-1.708644986152649,
-1.3955833911895752,
-2.2728121280670166,
-2.2612035274505615,
0.7479518055915833,
-0.40981805324554443,
-0.5339213013648987,
2.013820171356201,
-0.9530232548713684,
-1.7591443061828613,
1.137094497680664,
0.297270804643631,
-0.033653609454631805,
2.3766860961914062,
0.2592593729496002,
-0.7755227088928223,
0.48353245854377747,
-0.7182893753051758,
0.8433699011802673,
-0.2330017238855362,
1.3276746273040771,
0.4819684326648712,
-0.9190433025360107,
1.541907548904419,
-0.43109801411628723,
0.5569553971290588,
-0.7189162969589233,
-0.5462767481803894,
-0.8875445127487183,
0.2602580487728119,
1.9182813167572021,
-0.3318282961845398,
1.5812947750091553,
-0.36510300636291504,
-1.6409406661987305,
-1.5687562227249146,
0.877031683921814,
0.5515907406806946,
-0.8472947478294373,
0.0242304690182209,
-0.39946916699409485,
0.09011434018611908,
0.023981429636478424,
1.0736409425735474,
1.2115771770477295,
0.6955447793006897,
-0.34567543864250183,
-0.8792508244514465,
0.17180635035037994,
-0.0722263976931572,
-0.8136230707168579,
-1.8173654079437256,
-0.2952946126461029,
0.23042112588882446,
0.6240329742431641,
-1.2557352781295776,
1.7251620292663574,
0.9144192337989807,
2.008527994155884,
0.9839638471603394,
-0.43796902894973755,
1.4890824556350708,
0.052002158015966415,
1.8340985774993896,
-0.5269671082496643,
0.6107565760612488,
-0.3976360857486725,
-1.1234699487686157,
0.8349686861038208,
-0.3108764588832855,
-2.065897226333618,
-0.829943060874939,
-0.7861780524253845,
-0.22085310518741608,
-0.7398243546485901,
0.8838270902633667,
-0.29113325476646423,
-1.4508126974105835,
0.1898033618927002,
-0.694455623626709,
0.08077569305896759,
-1.2297890186309814,
0.20328013598918915,
0.676513135433197,
-0.6356386542320251,
0.03623822703957558,
-0.12433050572872162,
-1.3068385124206543,
-0.3837219774723053,
0.3058648407459259,
1.8604211807250977,
-0.7339345812797546,
0.878913938999176,
1.0724352598190308,
-0.6843461394309998,
0.11521872878074646,
0.3086507320404053,
-0.3617745041847229,
0.8062875866889954,
-1.1188933849334717,
-0.37211430072784424,
1.1375657320022583,
-0.07551917433738708,
-0.5847047567367554,
1.4568455219268799,
0.7848175764083862,
-1.0572031736373901,
-0.21320798993110657,
-0.14706243574619293,
-0.8369529247283936,
0.02048763446509838,
-1.6039505004882812,
-0.11716972291469574,
0.4308232069015503,
-1.4650495052337646,
-0.45360854268074036,
-0.2879185974597931,
1.2321124076843262,
-0.18600961565971375,
1.4302889108657837,
-0.38056594133377075,
-0.18753594160079956,
-0.3376305401325226,
-0.41589343547821045,
0.16576088964939117,
-0.25476473569869995,
-0.6280835270881653,
0.1445222795009613,
-0.8023367524147034,
0.37453916668891907,
1.453779697418213,
0.3399014472961426,
0.059236329048871994,
0.42775437235832214,
1.0848479270935059,
0.3600132465362549,
0.05570763722062111,
-0.846207857131958,
-1.5777230262756348,
2.040215015411377,
-1.4831738471984863,
1.9332784414291382,
0.7891079783439636,
0.026384148746728897,
-1.8417288064956665,
-1.8292818069458008,
1.3440529108047485,
1.1111406087875366,
2.4124417304992676,
0.5246284604072571,
0.4728131592273712,
-0.8104779124259949,
-0.759139895439148,
0.3151654601097107,
-0.96759033203125,
-0.6312336921691895,
0.20200017094612122,
2.366605520248413,
1.7503291368484497,
-0.5174207091331482,
-0.18305227160453796,
-0.9478843212127686,
1.3735642433166504,
-0.12219950556755066,
0.19269047677516937,
2.1017935276031494,
-0.1733178049325943,
-1.0984923839569092,
1.32961106300354,
-2.294349431991577,
0.17060153186321259,
1.9682645797729492,
0.28597292304039,
0.15910333395004272,
-1.4124778509140015,
-0.6364230513572693,
-0.31861457228660583,
-0.4400328993797302,
-1.2728567123413086,
0.5239788293838501,
-0.3021816313266754,
-0.8087106347084045,
-1.463060736656189,
0.07546442747116089,
-1.2245994806289673,
-1.6599514484405518,
0.31969520449638367,
1.8889672756195068,
2.0585243701934814,
-0.7580086588859558,
1.525112509727478,
-0.3336004614830017,
0.13454368710517883,
1.2046846151351929,
1.2178479433059692,
3.0204343795776367,
1.8555923700332642,
-1.2375426292419434,
0.6723578572273254,
-0.15491238236427307,
-0.5080509781837463,
1.1432092189788818,
-1.1017968654632568,
1.2400492429733276,
-0.10490095615386963,
-1.1895217895507812,
-1.167218804359436,
1.0187649726867676,
0.44695812463760376,
0.12078364193439484,
-0.5147393941879272,
1.265794038772583,
0.06168225780129433,
1.2869247198104858,
0.6004886031150818,
-0.36541587114334106,
0.6378220319747925,
-0.36207371950149536,
-0.5705816745758057,
1.5779638290405273,
0.2318873107433319,
-1.4506365060806274,
-2.4309933185577393,
-0.309806227684021,
-0.8039706349372864,
0.040104564279317856,
-0.6075940132141113,
-1.1149327754974365,
1.6218209266662598,
0.3551366925239563,
-1.2998979091644287,
-0.28230854868888855,
-0.31030869483947754,
-0.5723233222961426,
2.656482458114624,
-1.3886226415634155,
-0.14493940770626068,
-0.9150259494781494,
-0.5642831325531006,
1.6504569053649902,
-1.1082277297973633,
-0.2307072877883911,
-1.0956311225891113,
-0.5253522396087646,
-1.3695176839828491,
-0.6065490245819092,
0.03944985941052437,
-0.9055785536766052,
0.7796895503997803,
0.17997227609157562,
-1.1329368352890015,
-0.2545630633831024,
-0.897282063961029,
0.9940210580825806,
-0.12686339020729065,
0.20165570080280304,
1.8736680746078491,
0.45189255475997925,
-0.350836843252182,
0.7141606211662292,
1.2003178596496582,
0.6134655475616455,
-0.7090016007423401,
0.07240131497383118,
-0.7852350473403931,
0.19710269570350647,
-1.3608309030532837,
0.23233161866664886,
-2.8112125396728516,
0.6862959861755371,
-0.09915533661842346,
-0.008440259844064713,
0.0244830884039402,
-1.29261314868927,
1.1305034160614014,
2.6458466053009033,
-1.2025680541992188,
0.5096006989479065,
0.32401782274246216,
1.1782222986221313,
-1.5382156372070312,
0.2704731822013855,
-0.43859872221946716,
2.028536796569824,
0.1271957904100418,
1.222036600112915,
-0.5253320932388306,
-2.195350170135498,
0.6010180711746216,
-1.3178719282150269,
-1.170651912689209,
0.8081291317939758,
-0.9009343981742859,
0.12592731416225433,
-1.4908130168914795,
-0.33963310718536377,
-0.9901381731033325,
-1.2563796043395996,
0.729882001876831,
0.12568791210651398,
0.46990540623664856,
-0.4895345866680145,
0.3239014446735382,
-2.3009281158447266,
-1.4565210342407227,
-0.2308753877878189,
-1.0095902681350708,
0.52646404504776,
-0.3081470727920532,
0.6808598041534424,
-0.09995533525943756,
0.12960469722747803,
0.3944839835166931,
1.4158328771591187,
3.3897719383239746,
0.1824350506067276,
0.3407309949398041,
-0.1447087973356247,
-0.9478275179862976,
1.4079771041870117,
0.9723531007766724,
-0.0784481018781662,
-0.5700050592422485,
-0.9928653240203857,
1.1752840280532837,
2.0635740756988525,
1.054275393486023,
-0.033646225929260254,
-0.8367980122566223,
-0.7474768161773682,
0.01711008884012699,
0.13384391367435455,
0.48959389328956604,
0.9316197633743286,
0.0704994946718216,
0.12543870508670807,
1.4730823040008545,
1.1497716903686523,
-0.45962491631507874,
0.39477941393852234,
-0.8647910952568054,
-0.43458014726638794,
0.4592745006084442,
0.19165882468223572,
0.00613180547952652,
0.46295973658561707,
-1.0803375244140625,
-0.23690710961818695,
-0.4689868688583374,
-0.93089759349823,
-0.6965482831001282,
-0.4726770222187042,
-0.3350588083267212,
1.6172828674316406,
0.1484072208404541,
-0.4806634187698364,
0.049108948558568954,
-0.6774733066558838,
-0.1717015951871872,
-1.1200464963912964,
0.2650648355484009,
-0.1982985883951187,
-0.0574764646589756,
-0.09013189375400543,
1.7730705738067627,
-0.9554123282432556,
-2.0666415691375732,
0.1313721239566803,
0.2684038281440735,
-0.3527507185935974,
0.23353461921215057,
1.6608610153198242,
0.5794150829315186,
1.4270983934402466,
1.3408209085464478,
0.9483122825622559,
-0.6646683812141418,
-1.249025821685791,
0.6190733909606934,
0.9613993763923645,
-1.29987370967865,
0.7939853072166443,
-0.03618369251489639,
-0.4988960325717926,
0.711828351020813,
1.4039549827575684,
0.41301900148391724,
-2.096642255783081,
0.8386573791503906,
-0.8756300806999207,
0.7509271502494812,
0.6857596039772034,
0.7534635066986084,
0.24933384358882904,
0.7908637523651123,
-1.1693252325057983,
-1.091232180595398,
-0.7714831829071045,
-0.6575027108192444,
1.936726450920105,
-0.23724107444286346,
0.5328845381736755,
-0.1946173459291458,
-1.2530008554458618,
-0.08862443268299103,
0.7293656468391418,
0.39315640926361084,
-0.5309222936630249,
0.798252522945404,
-0.5397886037826538,
-1.116361141204834,
-1.3129750490188599,
-0.45436927676200867,
-1.0693355798721313,
-0.8974424004554749,
0.9937658309936523,
0.7081313729286194,
0.32832208275794983,
1.8494302034378052,
0.693523108959198,
0.2630561888217926,
-2.709850788116455,
0.9146034121513367,
0.21309879422187805,
0.005210845731198788,
0.9546169638633728,
0.30173200368881226,
1.071053385734558,
-0.06501130759716034,
0.5534480810165405,
-2.33693790435791,
2.2432875633239746,
-0.2297307550907135,
0.7076917886734009,
-0.07441480457782745,
-0.2164486199617386,
1.0973577499389648,
0.5077527761459351,
0.533544659614563,
-1.0810335874557495,
0.6601020097732544,
-0.6065475344657898,
1.1039186716079712,
0.8863312005996704,
-0.8796088099479675,
0.05208788812160492,
1.3876949548721313,
0.4571740925312042,
-0.4721618890762329,
-0.991939127445221,
-0.8677049279212952,
0.9779431819915771,
1.7016303539276123,
-0.11183346807956696,
0.02776055410504341,
0.9125643968582153,
0.5990777015686035,
-1.2754358053207397,
0.09430807828903198,
-0.71954745054245,
-0.7788488268852234,
1.7121403217315674,
2.1082844734191895,
-0.14110365509986877,
-0.1917194277048111,
-0.7747704982757568,
-1.2225581407546997,
0.7399862408638,
-0.06676313281059265,
0.17822133004665375,
0.5521832704544067,
-0.6999019980430603,
1.208867073059082,
0.7481938004493713,
0.9499375224113464,
0.08592279255390167,
0.3848026394844055,
0.337965190410614,
-0.4053935110569,
-1.1162428855895996,
-0.3039601743221283,
-1.1107876300811768,
-2.462557792663574,
0.5141398310661316,
-0.18946976959705353,
-1.502637267112732,
0.06687361001968384,
-1.0337425470352173,
0.950438380241394,
-0.5673445463180542,
-1.0141340494155884,
-1.5466959476470947,
0.3007093071937561,
-0.07907335460186005,
0.9828894734382629,
-1.5957022905349731,
-0.09405945241451263,
1.1590520143508911,
0.8838750720024109,
-0.6857805848121643,
1.030133843421936,
0.310973584651947,
0.982120156288147,
0.8037207126617432,
-0.39144256711006165,
0.51941978931427,
0.07663574814796448,
-1.2908755540847778,
0.4643727242946625,
1.1788371801376343,
0.18449410796165466,
1.445028305053711,
-0.4577252268791199,
0.05581197515130043,
0.3737991750240326,
-0.4631122648715973,
-0.4044322073459625,
-0.47167062759399414,
0.6054699420928955,
0.17265374958515167,
-0.9929646253585815,
-0.06277427077293396,
-0.10094891488552094,
-0.23019744455814362,
0.20574595034122467,
-1.5229299068450928,
-0.2104458063840866,
-0.3846532702445984,
-0.5562312602996826,
-1.2106508016586304,
0.0072004422545433044,
1.3949989080429077,
-0.751649022102356,
-0.23967225849628448,
0.4862231910228729,
0.4216357171535492,
0.5914495587348938,
0.6577395796775818,
-0.642426609992981,
-0.33530643582344055,
-0.28920450806617737,
-0.29090577363967896,
0.2347181737422943,
1.2673430442810059,
-0.1644839644432068,
-1.0165523290634155,
0.7384212613105774,
-0.4400615394115448,
0.07288643717765808,
1.9368164539337158,
0.014315368607640266,
-0.7728717923164368,
0.35587209463119507,
-0.6918192505836487,
1.8830140829086304,
1.8141365051269531,
1.3238154649734497,
-0.14304931461811066,
-0.8928921222686768,
0.5894762873649597,
-0.3099754750728607,
-0.2693105638027191,
0.9733487367630005,
0.432949423789978,
-0.15612180531024933,
-1.387264609336853,
0.644024133682251,
1.3467460870742798,
-0.8752549886703491,
-0.7894231677055359,
0.10144449770450592,
-0.8311991691589355,
1.1619926691055298,
0.7142142653465271,
0.40327247977256775,
0.261106014251709,
1.5470020771026611,
0.7152780294418335,
-0.5016030073165894,
0.630195677280426,
0.48138394951820374,
-0.19652381539344788,
-2.124169111251831,
-1.1280447244644165,
0.34149831533432007,
-0.41018736362457275,
-1.654915690422058,
1.3416011333465576,
-1.0769877433776855,
-0.9855042695999146,
0.551824152469635,
0.07129518687725067,
1.3613253831863403,
0.38763827085494995,
1.601264476776123,
2.075296640396118,
0.8884648084640503,
0.29019397497177124,
1.2899737358093262,
-0.08236870169639587,
-0.474080353975296,
1.9106969833374023,
-0.4798690378665924,
0.4565303921699524,
1.017596960067749,
-0.3672066032886505,
-0.9955257177352905,
-0.7877184748649597,
-1.2497402429580688,
-0.6841800808906555,
1.1478368043899536,
0.07468976080417633,
-1.1730561256408691,
0.2043691873550415,
1.5999988317489624,
0.12048652768135071,
-0.3138285279273987,
0.745952844619751,
0.423165887594223,
-0.8193074464797974,
-0.08561480045318604,
-0.8910596966743469,
0.48562419414520264,
-0.1312291920185089,
-0.26869380474090576,
0.27690961956977844,
0.5182544589042664,
1.276393175125122,
-0.046423327177762985,
0.06896154582500458,
1.224045753479004,
-1.412219524383545,
1.5061652660369873,
-0.5896227955818176,
0.3074704110622406,
-2.4200658798217773,
1.3810930252075195,
-0.693551242351532,
1.8473126888275146,
-2.6037473678588867,
0.3897158205509186,
-0.675947904586792,
-0.5024551153182983,
0.25101879239082336,
-0.3497755229473114,
0.13171988725662231,
-0.10065512359142303,
-1.0591284036636353,
-0.0922965407371521,
-0.7382054328918457,
0.5797762870788574,
1.1026548147201538,
1.375677227973938,
-1.076479196548462,
-0.2974318265914917,
-1.7600568532943726,
-0.1285581737756729,
-0.6790695190429688,
0.3267866373062134,
-2.0005033016204834,
-0.20495931804180145,
-1.9392049312591553,
-2.3872151374816895,
-1.4565058946609497,
-0.8801146149635315,
1.0650053024291992,
0.19893400371074677,
-0.9787653684616089,
1.1393744945526123,
-0.3981655240058899,
-1.7752748727798462,
1.1295080184936523,
-2.134244441986084
] |
https://github.com/huggingface/datasets/issues/5672 | Pushing dataset to hub crash | Hi @lhoestq ,
What version of datasets library fix this case? I am using the last `v2.10.1` and I get the same error. | ### Describe the bug
Uploading a dataset with `push_to_hub()` fails without error description.
### Steps to reproduce the bug
Hey there,
I've built a image dataset of 100k images + text pair as described here https://huggingface.co/docs/datasets/image_dataset#imagefolder
Now I'm trying to push it to the hub but I'm running into issues. First, I tried doing it via git directly, I added all the files in git lfs and pushed but I got hit with an error saying huggingface only accept up to 10k files in a folder.
So I'm now trying with the `push_to_hub()` func as follow:
```python
from datasets import load_dataset
import os
dataset = load_dataset("imagefolder", data_dir="./data", split="train")
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
```
But again, this produces an error:
```
Resolving data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 100212/100212 [00:00<00:00, 439108.61it/s]
Downloading and preparing dataset imagefolder/default to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f...
Downloading data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 100211/100211 [00:00<00:00, 149323.73it/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 15947.92it/s]
Extracting data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2245.34it/s]
Dataset imagefolder downloaded and prepared to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f. Subsequent calls will reuse this data.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:31<00:00, 2.24s/it]
Downloading metadata: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 118/118 [00:00<00:00, 225kB/s]
Traceback (most recent call last):
File "/home/contact_theochampion/organization-logos/push_to_hub.py", line 5, in <module>
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
File "/home/contact_theochampion/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5245, in push_to_hub
repo_info = dataset_infos[next(iter(dataset_infos))]
StopIteration
```
What could be happening here ?
### Expected behavior
The dataset is pushed to the hub
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.10.0-21-cloud-amd64-x86_64-with-glibc2.31
- Python version: 3.9.2
- PyArrow version: 11.0.0
- Pandas version: 1.5.3 | 242 | 23 | Pushing dataset to hub crash
### Describe the bug
Uploading a dataset with `push_to_hub()` fails without error description.
### Steps to reproduce the bug
Hey there,
I've built a image dataset of 100k images + text pair as described here https://huggingface.co/docs/datasets/image_dataset#imagefolder
Now I'm trying to push it to the hub but I'm running into issues. First, I tried doing it via git directly, I added all the files in git lfs and pushed but I got hit with an error saying huggingface only accept up to 10k files in a folder.
So I'm now trying with the `push_to_hub()` func as follow:
```python
from datasets import load_dataset
import os
dataset = load_dataset("imagefolder", data_dir="./data", split="train")
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
```
But again, this produces an error:
```
Resolving data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 100212/100212 [00:00<00:00, 439108.61it/s]
Downloading and preparing dataset imagefolder/default to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f...
Downloading data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 100211/100211 [00:00<00:00, 149323.73it/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 15947.92it/s]
Extracting data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2245.34it/s]
Dataset imagefolder downloaded and prepared to /home/contact_theochampion/.cache/huggingface/datasets/imagefolder/default-20567ffc703aa314/0.0.0/37fbb85cc714a338bea574ac6c7d0b5be5aff46c1862c1989b20e0771199e93f. Subsequent calls will reuse this data.
Resuming upload of the dataset shards.
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:31<00:00, 2.24s/it]
Downloading metadata: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 118/118 [00:00<00:00, 225kB/s]
Traceback (most recent call last):
File "/home/contact_theochampion/organization-logos/push_to_hub.py", line 5, in <module>
dataset.push_to_hub("tzvc/organization-logos", token=os.environ.get('HF_TOKEN'))
File "/home/contact_theochampion/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5245, in push_to_hub
repo_info = dataset_infos[next(iter(dataset_infos))]
StopIteration
```
What could be happening here ?
### Expected behavior
The dataset is pushed to the hub
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.10.0-21-cloud-amd64-x86_64-with-glibc2.31
- Python version: 3.9.2
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Hi @lhoestq ,
What version of datasets library fix this case? I am using the last `v2.10.1` and I get the same error. | [
-1.1694098711013794,
-0.9390988349914551,
-0.7956576943397522,
1.3902919292449951,
-0.15796399116516113,
-1.2473849058151245,
0.15137629210948944,
-1.1578655242919922,
1.5682157278060913,
-0.7130810618400574,
0.31832554936408997,
-1.6981559991836548,
-0.00633679423481226,
-0.508917510509491,
-0.7761488556861877,
-0.8722177743911743,
-0.4212994873523712,
-0.8242190480232239,
1.001576542854309,
2.571540117263794,
1.2018693685531616,
-1.3536722660064697,
2.767256498336792,
0.6431704163551331,
-0.18253818154335022,
-1.014424204826355,
0.5768207907676697,
0.07215762138366699,
-1.3251817226409912,
-0.38766828179359436,
-0.8873021006584167,
-0.04796314984560013,
-0.5745419859886169,
-0.47447994351387024,
0.0944308489561081,
0.4363384544849396,
-0.2886010408401489,
-0.41575953364372253,
-0.6135646104812622,
-0.7339092493057251,
0.534021258354187,
-0.4391038119792938,
0.9889514446258545,
-0.2814550995826721,
1.8070683479309082,
-0.6243172287940979,
0.3923274278640747,
0.7763668894767761,
1.3148727416992188,
0.19191399216651917,
0.09476611018180847,
0.42150062322616577,
0.3622685968875885,
-0.014845586381852627,
0.4010547697544098,
1.2301565408706665,
0.5556906461715698,
0.44114506244659424,
0.7584203481674194,
-2.189051866531372,
1.2877403497695923,
-0.9621211290359497,
0.31150996685028076,
1.3754081726074219,
-0.8281238079071045,
0.3353096842765808,
-1.8695372343063354,
-0.06045136600732803,
0.6102361083030701,
-2.182607889175415,
0.302152156829834,
-1.274143934249878,
-0.5195881724357605,
0.9235323071479797,
0.3213229775428772,
-1.1453090906143188,
0.25042492151260376,
-0.5383690595626831,
1.040402889251709,
0.4279024600982666,
1.1736578941345215,
-1.6503040790557861,
-0.04847273230552673,
-0.29224538803100586,
0.13429710268974304,
-1.3273483514785767,
-1.557214379310608,
0.5428662300109863,
0.5714816451072693,
0.6346225142478943,
-0.12168796360492706,
1.0618401765823364,
-0.9843525886535645,
0.7919090390205383,
-1.0016404390335083,
-1.708644986152649,
-1.3955833911895752,
-2.2728121280670166,
-2.2612035274505615,
0.7479518055915833,
-0.40981805324554443,
-0.5339213013648987,
2.013820171356201,
-0.9530232548713684,
-1.7591443061828613,
1.137094497680664,
0.297270804643631,
-0.033653609454631805,
2.3766860961914062,
0.2592593729496002,
-0.7755227088928223,
0.48353245854377747,
-0.7182893753051758,
0.8433699011802673,
-0.2330017238855362,
1.3276746273040771,
0.4819684326648712,
-0.9190433025360107,
1.541907548904419,
-0.43109801411628723,
0.5569553971290588,
-0.7189162969589233,
-0.5462767481803894,
-0.8875445127487183,
0.2602580487728119,
1.9182813167572021,
-0.3318282961845398,
1.5812947750091553,
-0.36510300636291504,
-1.6409406661987305,
-1.5687562227249146,
0.877031683921814,
0.5515907406806946,
-0.8472947478294373,
0.0242304690182209,
-0.39946916699409485,
0.09011434018611908,
0.023981429636478424,
1.0736409425735474,
1.2115771770477295,
0.6955447793006897,
-0.34567543864250183,
-0.8792508244514465,
0.17180635035037994,
-0.0722263976931572,
-0.8136230707168579,
-1.8173654079437256,
-0.2952946126461029,
0.23042112588882446,
0.6240329742431641,
-1.2557352781295776,
1.7251620292663574,
0.9144192337989807,
2.008527994155884,
0.9839638471603394,
-0.43796902894973755,
1.4890824556350708,
0.052002158015966415,
1.8340985774993896,
-0.5269671082496643,
0.6107565760612488,
-0.3976360857486725,
-1.1234699487686157,
0.8349686861038208,
-0.3108764588832855,
-2.065897226333618,
-0.829943060874939,
-0.7861780524253845,
-0.22085310518741608,
-0.7398243546485901,
0.8838270902633667,
-0.29113325476646423,
-1.4508126974105835,
0.1898033618927002,
-0.694455623626709,
0.08077569305896759,
-1.2297890186309814,
0.20328013598918915,
0.676513135433197,
-0.6356386542320251,
0.03623822703957558,
-0.12433050572872162,
-1.3068385124206543,
-0.3837219774723053,
0.3058648407459259,
1.8604211807250977,
-0.7339345812797546,
0.878913938999176,
1.0724352598190308,
-0.6843461394309998,
0.11521872878074646,
0.3086507320404053,
-0.3617745041847229,
0.8062875866889954,
-1.1188933849334717,
-0.37211430072784424,
1.1375657320022583,
-0.07551917433738708,
-0.5847047567367554,
1.4568455219268799,
0.7848175764083862,
-1.0572031736373901,
-0.21320798993110657,
-0.14706243574619293,
-0.8369529247283936,
0.02048763446509838,
-1.6039505004882812,
-0.11716972291469574,
0.4308232069015503,
-1.4650495052337646,
-0.45360854268074036,
-0.2879185974597931,
1.2321124076843262,
-0.18600961565971375,
1.4302889108657837,
-0.38056594133377075,
-0.18753594160079956,
-0.3376305401325226,
-0.41589343547821045,
0.16576088964939117,
-0.25476473569869995,
-0.6280835270881653,
0.1445222795009613,
-0.8023367524147034,
0.37453916668891907,
1.453779697418213,
0.3399014472961426,
0.059236329048871994,
0.42775437235832214,
1.0848479270935059,
0.3600132465362549,
0.05570763722062111,
-0.846207857131958,
-1.5777230262756348,
2.040215015411377,
-1.4831738471984863,
1.9332784414291382,
0.7891079783439636,
0.026384148746728897,
-1.8417288064956665,
-1.8292818069458008,
1.3440529108047485,
1.1111406087875366,
2.4124417304992676,
0.5246284604072571,
0.4728131592273712,
-0.8104779124259949,
-0.759139895439148,
0.3151654601097107,
-0.96759033203125,
-0.6312336921691895,
0.20200017094612122,
2.366605520248413,
1.7503291368484497,
-0.5174207091331482,
-0.18305227160453796,
-0.9478843212127686,
1.3735642433166504,
-0.12219950556755066,
0.19269047677516937,
2.1017935276031494,
-0.1733178049325943,
-1.0984923839569092,
1.32961106300354,
-2.294349431991577,
0.17060153186321259,
1.9682645797729492,
0.28597292304039,
0.15910333395004272,
-1.4124778509140015,
-0.6364230513572693,
-0.31861457228660583,
-0.4400328993797302,
-1.2728567123413086,
0.5239788293838501,
-0.3021816313266754,
-0.8087106347084045,
-1.463060736656189,
0.07546442747116089,
-1.2245994806289673,
-1.6599514484405518,
0.31969520449638367,
1.8889672756195068,
2.0585243701934814,
-0.7580086588859558,
1.525112509727478,
-0.3336004614830017,
0.13454368710517883,
1.2046846151351929,
1.2178479433059692,
3.0204343795776367,
1.8555923700332642,
-1.2375426292419434,
0.6723578572273254,
-0.15491238236427307,
-0.5080509781837463,
1.1432092189788818,
-1.1017968654632568,
1.2400492429733276,
-0.10490095615386963,
-1.1895217895507812,
-1.167218804359436,
1.0187649726867676,
0.44695812463760376,
0.12078364193439484,
-0.5147393941879272,
1.265794038772583,
0.06168225780129433,
1.2869247198104858,
0.6004886031150818,
-0.36541587114334106,
0.6378220319747925,
-0.36207371950149536,
-0.5705816745758057,
1.5779638290405273,
0.2318873107433319,
-1.4506365060806274,
-2.4309933185577393,
-0.309806227684021,
-0.8039706349372864,
0.040104564279317856,
-0.6075940132141113,
-1.1149327754974365,
1.6218209266662598,
0.3551366925239563,
-1.2998979091644287,
-0.28230854868888855,
-0.31030869483947754,
-0.5723233222961426,
2.656482458114624,
-1.3886226415634155,
-0.14493940770626068,
-0.9150259494781494,
-0.5642831325531006,
1.6504569053649902,
-1.1082277297973633,
-0.2307072877883911,
-1.0956311225891113,
-0.5253522396087646,
-1.3695176839828491,
-0.6065490245819092,
0.03944985941052437,
-0.9055785536766052,
0.7796895503997803,
0.17997227609157562,
-1.1329368352890015,
-0.2545630633831024,
-0.897282063961029,
0.9940210580825806,
-0.12686339020729065,
0.20165570080280304,
1.8736680746078491,
0.45189255475997925,
-0.350836843252182,
0.7141606211662292,
1.2003178596496582,
0.6134655475616455,
-0.7090016007423401,
0.07240131497383118,
-0.7852350473403931,
0.19710269570350647,
-1.3608309030532837,
0.23233161866664886,
-2.8112125396728516,
0.6862959861755371,
-0.09915533661842346,
-0.008440259844064713,
0.0244830884039402,
-1.29261314868927,
1.1305034160614014,
2.6458466053009033,
-1.2025680541992188,
0.5096006989479065,
0.32401782274246216,
1.1782222986221313,
-1.5382156372070312,
0.2704731822013855,
-0.43859872221946716,
2.028536796569824,
0.1271957904100418,
1.222036600112915,
-0.5253320932388306,
-2.195350170135498,
0.6010180711746216,
-1.3178719282150269,
-1.170651912689209,
0.8081291317939758,
-0.9009343981742859,
0.12592731416225433,
-1.4908130168914795,
-0.33963310718536377,
-0.9901381731033325,
-1.2563796043395996,
0.729882001876831,
0.12568791210651398,
0.46990540623664856,
-0.4895345866680145,
0.3239014446735382,
-2.3009281158447266,
-1.4565210342407227,
-0.2308753877878189,
-1.0095902681350708,
0.52646404504776,
-0.3081470727920532,
0.6808598041534424,
-0.09995533525943756,
0.12960469722747803,
0.3944839835166931,
1.4158328771591187,
3.3897719383239746,
0.1824350506067276,
0.3407309949398041,
-0.1447087973356247,
-0.9478275179862976,
1.4079771041870117,
0.9723531007766724,
-0.0784481018781662,
-0.5700050592422485,
-0.9928653240203857,
1.1752840280532837,
2.0635740756988525,
1.054275393486023,
-0.033646225929260254,
-0.8367980122566223,
-0.7474768161773682,
0.01711008884012699,
0.13384391367435455,
0.48959389328956604,
0.9316197633743286,
0.0704994946718216,
0.12543870508670807,
1.4730823040008545,
1.1497716903686523,
-0.45962491631507874,
0.39477941393852234,
-0.8647910952568054,
-0.43458014726638794,
0.4592745006084442,
0.19165882468223572,
0.00613180547952652,
0.46295973658561707,
-1.0803375244140625,
-0.23690710961818695,
-0.4689868688583374,
-0.93089759349823,
-0.6965482831001282,
-0.4726770222187042,
-0.3350588083267212,
1.6172828674316406,
0.1484072208404541,
-0.4806634187698364,
0.049108948558568954,
-0.6774733066558838,
-0.1717015951871872,
-1.1200464963912964,
0.2650648355484009,
-0.1982985883951187,
-0.0574764646589756,
-0.09013189375400543,
1.7730705738067627,
-0.9554123282432556,
-2.0666415691375732,
0.1313721239566803,
0.2684038281440735,
-0.3527507185935974,
0.23353461921215057,
1.6608610153198242,
0.5794150829315186,
1.4270983934402466,
1.3408209085464478,
0.9483122825622559,
-0.6646683812141418,
-1.249025821685791,
0.6190733909606934,
0.9613993763923645,
-1.29987370967865,
0.7939853072166443,
-0.03618369251489639,
-0.4988960325717926,
0.711828351020813,
1.4039549827575684,
0.41301900148391724,
-2.096642255783081,
0.8386573791503906,
-0.8756300806999207,
0.7509271502494812,
0.6857596039772034,
0.7534635066986084,
0.24933384358882904,
0.7908637523651123,
-1.1693252325057983,
-1.091232180595398,
-0.7714831829071045,
-0.6575027108192444,
1.936726450920105,
-0.23724107444286346,
0.5328845381736755,
-0.1946173459291458,
-1.2530008554458618,
-0.08862443268299103,
0.7293656468391418,
0.39315640926361084,
-0.5309222936630249,
0.798252522945404,
-0.5397886037826538,
-1.116361141204834,
-1.3129750490188599,
-0.45436927676200867,
-1.0693355798721313,
-0.8974424004554749,
0.9937658309936523,
0.7081313729286194,
0.32832208275794983,
1.8494302034378052,
0.693523108959198,
0.2630561888217926,
-2.709850788116455,
0.9146034121513367,
0.21309879422187805,
0.005210845731198788,
0.9546169638633728,
0.30173200368881226,
1.071053385734558,
-0.06501130759716034,
0.5534480810165405,
-2.33693790435791,
2.2432875633239746,
-0.2297307550907135,
0.7076917886734009,
-0.07441480457782745,
-0.2164486199617386,
1.0973577499389648,
0.5077527761459351,
0.533544659614563,
-1.0810335874557495,
0.6601020097732544,
-0.6065475344657898,
1.1039186716079712,
0.8863312005996704,
-0.8796088099479675,
0.05208788812160492,
1.3876949548721313,
0.4571740925312042,
-0.4721618890762329,
-0.991939127445221,
-0.8677049279212952,
0.9779431819915771,
1.7016303539276123,
-0.11183346807956696,
0.02776055410504341,
0.9125643968582153,
0.5990777015686035,
-1.2754358053207397,
0.09430807828903198,
-0.71954745054245,
-0.7788488268852234,
1.7121403217315674,
2.1082844734191895,
-0.14110365509986877,
-0.1917194277048111,
-0.7747704982757568,
-1.2225581407546997,
0.7399862408638,
-0.06676313281059265,
0.17822133004665375,
0.5521832704544067,
-0.6999019980430603,
1.208867073059082,
0.7481938004493713,
0.9499375224113464,
0.08592279255390167,
0.3848026394844055,
0.337965190410614,
-0.4053935110569,
-1.1162428855895996,
-0.3039601743221283,
-1.1107876300811768,
-2.462557792663574,
0.5141398310661316,
-0.18946976959705353,
-1.502637267112732,
0.06687361001968384,
-1.0337425470352173,
0.950438380241394,
-0.5673445463180542,
-1.0141340494155884,
-1.5466959476470947,
0.3007093071937561,
-0.07907335460186005,
0.9828894734382629,
-1.5957022905349731,
-0.09405945241451263,
1.1590520143508911,
0.8838750720024109,
-0.6857805848121643,
1.030133843421936,
0.310973584651947,
0.982120156288147,
0.8037207126617432,
-0.39144256711006165,
0.51941978931427,
0.07663574814796448,
-1.2908755540847778,
0.4643727242946625,
1.1788371801376343,
0.18449410796165466,
1.445028305053711,
-0.4577252268791199,
0.05581197515130043,
0.3737991750240326,
-0.4631122648715973,
-0.4044322073459625,
-0.47167062759399414,
0.6054699420928955,
0.17265374958515167,
-0.9929646253585815,
-0.06277427077293396,
-0.10094891488552094,
-0.23019744455814362,
0.20574595034122467,
-1.5229299068450928,
-0.2104458063840866,
-0.3846532702445984,
-0.5562312602996826,
-1.2106508016586304,
0.0072004422545433044,
1.3949989080429077,
-0.751649022102356,
-0.23967225849628448,
0.4862231910228729,
0.4216357171535492,
0.5914495587348938,
0.6577395796775818,
-0.642426609992981,
-0.33530643582344055,
-0.28920450806617737,
-0.29090577363967896,
0.2347181737422943,
1.2673430442810059,
-0.1644839644432068,
-1.0165523290634155,
0.7384212613105774,
-0.4400615394115448,
0.07288643717765808,
1.9368164539337158,
0.014315368607640266,
-0.7728717923164368,
0.35587209463119507,
-0.6918192505836487,
1.8830140829086304,
1.8141365051269531,
1.3238154649734497,
-0.14304931461811066,
-0.8928921222686768,
0.5894762873649597,
-0.3099754750728607,
-0.2693105638027191,
0.9733487367630005,
0.432949423789978,
-0.15612180531024933,
-1.387264609336853,
0.644024133682251,
1.3467460870742798,
-0.8752549886703491,
-0.7894231677055359,
0.10144449770450592,
-0.8311991691589355,
1.1619926691055298,
0.7142142653465271,
0.40327247977256775,
0.261106014251709,
1.5470020771026611,
0.7152780294418335,
-0.5016030073165894,
0.630195677280426,
0.48138394951820374,
-0.19652381539344788,
-2.124169111251831,
-1.1280447244644165,
0.34149831533432007,
-0.41018736362457275,
-1.654915690422058,
1.3416011333465576,
-1.0769877433776855,
-0.9855042695999146,
0.551824152469635,
0.07129518687725067,
1.3613253831863403,
0.38763827085494995,
1.601264476776123,
2.075296640396118,
0.8884648084640503,
0.29019397497177124,
1.2899737358093262,
-0.08236870169639587,
-0.474080353975296,
1.9106969833374023,
-0.4798690378665924,
0.4565303921699524,
1.017596960067749,
-0.3672066032886505,
-0.9955257177352905,
-0.7877184748649597,
-1.2497402429580688,
-0.6841800808906555,
1.1478368043899536,
0.07468976080417633,
-1.1730561256408691,
0.2043691873550415,
1.5999988317489624,
0.12048652768135071,
-0.3138285279273987,
0.745952844619751,
0.423165887594223,
-0.8193074464797974,
-0.08561480045318604,
-0.8910596966743469,
0.48562419414520264,
-0.1312291920185089,
-0.26869380474090576,
0.27690961956977844,
0.5182544589042664,
1.276393175125122,
-0.046423327177762985,
0.06896154582500458,
1.224045753479004,
-1.412219524383545,
1.5061652660369873,
-0.5896227955818176,
0.3074704110622406,
-2.4200658798217773,
1.3810930252075195,
-0.693551242351532,
1.8473126888275146,
-2.6037473678588867,
0.3897158205509186,
-0.675947904586792,
-0.5024551153182983,
0.25101879239082336,
-0.3497755229473114,
0.13171988725662231,
-0.10065512359142303,
-1.0591284036636353,
-0.0922965407371521,
-0.7382054328918457,
0.5797762870788574,
1.1026548147201538,
1.375677227973938,
-1.076479196548462,
-0.2974318265914917,
-1.7600568532943726,
-0.1285581737756729,
-0.6790695190429688,
0.3267866373062134,
-2.0005033016204834,
-0.20495931804180145,
-1.9392049312591553,
-2.3872151374816895,
-1.4565058946609497,
-0.8801146149635315,
1.0650053024291992,
0.19893400371074677,
-0.9787653684616089,
1.1393744945526123,
-0.3981655240058899,
-1.7752748727798462,
1.1295080184936523,
-2.134244441986084
] |
https://github.com/huggingface/datasets/issues/5671 | How to use `load_dataset('glue', 'cola')` | Sounds like an issue with incompatible `transformers` dependencies versions.
Can you try to update `transformers` ?
EDIT: I checked the `transformers` dependencies and it seems like you need `tokenizers>=0.10.1,<0.11` with `transformers==4.5.1`
EDIT2: this old version of `datasets` seems to import `transformers` but it's no longer the case, so you could also simply update `datasets` and `transformers` won't be imported | ### Describe the bug
I'm new to use HuggingFace datasets but I cannot use `load_dataset('glue', 'cola')`.
- I was stacked by the following problem:
```python
from datasets import load_dataset
cola_dataset = load_dataset('glue', 'cola')
---------------------------------------------------------------------------
InvalidVersion Traceback (most recent call last)
File <timed exec>:1
(Omit because of long error message)
File /usr/local/lib/python3.8/site-packages/packaging/version.py:197, in Version.__init__(self, version)
195 match = self._regex.search(version)
196 if not match:
--> 197 raise InvalidVersion(f"Invalid version: '{version}'")
199 # Store the parsed out pieces of the version
200 self._version = _Version(
201 epoch=int(match.group("epoch")) if match.group("epoch") else 0,
202 release=tuple(int(i) for i in match.group("release").split(".")),
(...)
208 local=_parse_local_version(match.group("local")),
209 )
InvalidVersion: Invalid version: '0.10.1,<0.11'
```
- You can check this full error message in my repository: [MLOps-Basics/week_0_project_setup/experimental_notebooks/data_exploration.ipynb](https://github.com/makinzm/MLOps-Basics/blob/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup/experimental_notebooks/data_exploration.ipynb)
### Steps to reproduce the bug
- This is my repository to reproduce: [MLOps-Basics/week_0_project_setup](https://github.com/makinzm/MLOps-Basics/tree/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup)
1. cd `/DockerImage` and command `docker build . -t week0`
2. cd `/` and command `docker-compose up`
3. Run `experimental_notebooks/data_exploration.ipynb`
----
Just to be sure, I wrote down Dockerfile and requirements.txt
- Dockerfile
```Dockerfile
FROM python:3.8
WORKDIR /root/working
RUN apt-get update && \
apt-get install -y python3-dev python3-pip python3-venv && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip3 install --no-cache-dir jupyter notebook && pip install --no-cache-dir -r requirements.txt
CMD ["bash"]
```
- requirements.txt
```txt
pytorch-lightning==1.2.10
datasets==1.6.2
transformers==4.5.1
scikit-learn==0.24.2
```
### Expected behavior
There is no bug to implement `load_dataset('glue', 'cola')`
### Environment info
I already wrote it. | 243 | 59 | How to use `load_dataset('glue', 'cola')`
### Describe the bug
I'm new to use HuggingFace datasets but I cannot use `load_dataset('glue', 'cola')`.
- I was stacked by the following problem:
```python
from datasets import load_dataset
cola_dataset = load_dataset('glue', 'cola')
---------------------------------------------------------------------------
InvalidVersion Traceback (most recent call last)
File <timed exec>:1
(Omit because of long error message)
File /usr/local/lib/python3.8/site-packages/packaging/version.py:197, in Version.__init__(self, version)
195 match = self._regex.search(version)
196 if not match:
--> 197 raise InvalidVersion(f"Invalid version: '{version}'")
199 # Store the parsed out pieces of the version
200 self._version = _Version(
201 epoch=int(match.group("epoch")) if match.group("epoch") else 0,
202 release=tuple(int(i) for i in match.group("release").split(".")),
(...)
208 local=_parse_local_version(match.group("local")),
209 )
InvalidVersion: Invalid version: '0.10.1,<0.11'
```
- You can check this full error message in my repository: [MLOps-Basics/week_0_project_setup/experimental_notebooks/data_exploration.ipynb](https://github.com/makinzm/MLOps-Basics/blob/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup/experimental_notebooks/data_exploration.ipynb)
### Steps to reproduce the bug
- This is my repository to reproduce: [MLOps-Basics/week_0_project_setup](https://github.com/makinzm/MLOps-Basics/tree/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup)
1. cd `/DockerImage` and command `docker build . -t week0`
2. cd `/` and command `docker-compose up`
3. Run `experimental_notebooks/data_exploration.ipynb`
----
Just to be sure, I wrote down Dockerfile and requirements.txt
- Dockerfile
```Dockerfile
FROM python:3.8
WORKDIR /root/working
RUN apt-get update && \
apt-get install -y python3-dev python3-pip python3-venv && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip3 install --no-cache-dir jupyter notebook && pip install --no-cache-dir -r requirements.txt
CMD ["bash"]
```
- requirements.txt
```txt
pytorch-lightning==1.2.10
datasets==1.6.2
transformers==4.5.1
scikit-learn==0.24.2
```
### Expected behavior
There is no bug to implement `load_dataset('glue', 'cola')`
### Environment info
I already wrote it.
Sounds like an issue with incompatible `transformers` dependencies versions.
Can you try to update `transformers` ?
EDIT: I checked the `transformers` dependencies and it seems like you need `tokenizers>=0.10.1,<0.11` with `transformers==4.5.1`
EDIT2: this old version of `datasets` seems to import `transformers` but it's no longer the case, so you could also simply update `datasets` and `transformers` won't be imported | [
-1.242923617362976,
-0.8090680837631226,
-0.5667579770088196,
1.4932599067687988,
-0.016458960250020027,
-1.2967854738235474,
0.05277257040143013,
-0.8301689028739929,
1.5365967750549316,
-0.8346707224845886,
0.3501524329185486,
-1.6392711400985718,
0.0350043959915638,
-0.5708592534065247,
-0.6803174614906311,
-0.6895116567611694,
-0.36117517948150635,
-0.6767922043800354,
1.1650925874710083,
2.4350059032440186,
1.2655287981033325,
-1.3769752979278564,
2.833341598510742,
0.5757378339767456,
-0.16147381067276,
-0.8896165490150452,
0.42414146661758423,
-0.022413447499275208,
-1.400045394897461,
-0.295830100774765,
-0.9869040250778198,
-0.03063037618994713,
-0.6521989703178406,
-0.5199152827262878,
0.09441449493169785,
0.4587366282939911,
-0.1754148006439209,
-0.45456528663635254,
-0.41572925448417664,
-0.7773094773292542,
0.6278708577156067,
-0.27047693729400635,
0.7924466729164124,
-0.23664994537830353,
1.7506749629974365,
-0.5978891253471375,
0.5311706066131592,
0.5241990089416504,
1.3517420291900635,
0.24262133240699768,
-0.04304962605237961,
0.547496497631073,
0.2244240641593933,
0.0865459069609642,
0.6215241551399231,
1.25845205783844,
0.6653953194618225,
0.4060615599155426,
0.7501018643379211,
-2.2325961589813232,
1.337714672088623,
-0.8789297342300415,
0.2201187014579773,
1.2813392877578735,
-1.0647696256637573,
0.4346873462200165,
-1.855345368385315,
-0.11139779537916183,
0.42035382986068726,
-2.239309310913086,
0.19081951677799225,
-1.3402334451675415,
-0.494147390127182,
0.9934210777282715,
0.4125315248966217,
-1.2220816612243652,
-0.030221015214920044,
-0.473655104637146,
0.9460108280181885,
0.3348392844200134,
1.1275737285614014,
-1.671238899230957,
0.03604605421423912,
-0.19266819953918457,
0.29491445422172546,
-1.1245630979537964,
-1.6105527877807617,
0.5649306178092957,
0.6836182475090027,
0.6362311244010925,
-0.17075596749782562,
0.9356811046600342,
-1.1016016006469727,
0.7963032722473145,
-0.9715117812156677,
-1.7699054479599,
-1.3591716289520264,
-2.46077299118042,
-2.33349609375,
0.7566112875938416,
-0.40172791481018066,
-0.3399304449558258,
2.143601417541504,
-1.1411467790603638,
-1.738904356956482,
1.0261528491973877,
0.32593396306037903,
-0.10130132734775543,
2.374518871307373,
0.17199227213859558,
-0.9363139867782593,
0.6899719834327698,
-0.9169158339500427,
0.6387887597084045,
-0.39117467403411865,
1.3015191555023193,
0.4395521283149719,
-1.0150120258331299,
1.5694369077682495,
-0.4008166193962097,
0.4737485647201538,
-0.6817893385887146,
-0.3673637807369232,
-0.6070178151130676,
0.21058200299739838,
1.9952629804611206,
-0.14363223314285278,
1.5005847215652466,
-0.19869546592235565,
-1.5125627517700195,
-1.4093818664550781,
0.7643644213676453,
0.4837559759616852,
-0.8064207434654236,
0.19468916952610016,
-0.4650673568248749,
0.15380387008190155,
0.15771792829036713,
1.0760900974273682,
1.312220573425293,
0.7719457745552063,
-0.2578815519809723,
-0.9954714179039001,
0.024271130561828613,
-0.030933726578950882,
-0.5089064836502075,
-1.8167895078659058,
-0.24422574043273926,
0.19180616736412048,
0.6407615542411804,
-1.1903765201568604,
1.8919117450714111,
0.9181890487670898,
1.9981869459152222,
0.9628218412399292,
-0.2957485020160675,
1.6465462446212769,
0.11105149984359741,
1.8784328699111938,
-0.32707178592681885,
0.6564229726791382,
-0.5214505791664124,
-1.2535786628723145,
0.7316333651542664,
-0.3227841854095459,
-1.9693899154663086,
-0.5020586848258972,
-0.8631234765052795,
-0.11535584926605225,
-0.8839771747589111,
1.0509744882583618,
-0.2962949573993683,
-1.4119733572006226,
0.18824885785579681,
-0.7408690452575684,
0.15994030237197876,
-1.3746838569641113,
0.3236426115036011,
0.7506476044654846,
-0.7089135050773621,
0.08198735117912292,
-0.4771347641944885,
-1.3820343017578125,
-0.6138150095939636,
0.5142091512680054,
1.7617403268814087,
-0.6518451571464539,
1.0331013202667236,
1.0996030569076538,
-0.5951535701751709,
-0.012074556201696396,
0.3850843608379364,
-0.3499528765678406,
0.9022156596183777,
-1.0029997825622559,
-0.43475431203842163,
1.1997562646865845,
-0.2905850112438202,
-0.5167063474655151,
1.2884654998779297,
0.7477684617042542,
-1.0048630237579346,
-0.3110055923461914,
-0.09483716636896133,
-0.8794870972633362,
0.06957835704088211,
-1.6232984066009521,
-0.11689801514148712,
0.3715042173862457,
-1.5264861583709717,
-0.43658652901649475,
-0.022831812500953674,
1.3246606588363647,
0.012775554321706295,
1.4221174716949463,
-0.2575956881046295,
-0.04981376230716705,
-0.4752969741821289,
-0.5050217509269714,
0.208445206284523,
-0.16327598690986633,
-0.6689468622207642,
0.24066850543022156,
-0.774967610836029,
0.19469794631004333,
1.4564253091812134,
0.23199304938316345,
0.11939544975757599,
0.5272328853607178,
1.1951792240142822,
0.31005918979644775,
-0.14370517432689667,
-0.8342753648757935,
-1.740098476409912,
2.020771026611328,
-1.5305402278900146,
1.933448076248169,
0.7612962126731873,
-0.07042285054922104,
-1.7799772024154663,
-1.8614647388458252,
1.4068782329559326,
1.1001166105270386,
2.5055031776428223,
0.43672701716423035,
0.45473387837409973,
-0.8914229869842529,
-0.6982706189155579,
0.4802275002002716,
-0.7902345061302185,
-0.8729450702667236,
0.12652736902236938,
2.3664915561676025,
1.7261680364608765,
-0.35381415486335754,
-0.22055548429489136,
-0.9577634930610657,
1.4029539823532104,
-0.3654360771179199,
0.2974292039871216,
1.8445533514022827,
-0.3572908341884613,
-1.0299818515777588,
1.2883107662200928,
-2.429466724395752,
0.3513711094856262,
2.028695583343506,
0.3349739611148834,
0.15195484459400177,
-1.2275288105010986,
-0.7648412585258484,
-0.14146196842193604,
-0.46500375866889954,
-1.2360649108886719,
0.42340776324272156,
-0.25128400325775146,
-0.8801699876785278,
-1.3493165969848633,
0.021242156624794006,
-1.1892238855361938,
-1.7327251434326172,
0.3167070746421814,
1.831480622291565,
2.234429121017456,
-0.7712064981460571,
1.3851914405822754,
-0.2950729727745056,
0.32270073890686035,
1.1402050256729126,
1.246657371520996,
3.1324286460876465,
1.8938097953796387,
-1.2416743040084839,
0.6952815651893616,
-0.1058218851685524,
-0.5129402279853821,
1.2157108783721924,
-1.0754033327102661,
1.127358078956604,
-0.22892527282238007,
-1.3092126846313477,
-1.1274410486221313,
0.9650325179100037,
0.4146151542663574,
-0.07196711748838425,
-0.4350211024284363,
1.0582935810089111,
0.1389566957950592,
1.2904402017593384,
0.712586522102356,
-0.30069583654403687,
0.5418562293052673,
-0.3551414906978607,
-0.5498493313789368,
1.5208864212036133,
0.021228574216365814,
-1.5839279890060425,
-2.2480907440185547,
-0.14506755769252777,
-0.9968003034591675,
0.01744893193244934,
-0.7844141721725464,
-1.015920877456665,
1.465661883354187,
0.4239506423473358,
-0.9693703651428223,
-0.12605725228786469,
-0.37711861729621887,
-0.539742112159729,
2.609328508377075,
-1.318772792816162,
-0.2765480875968933,
-0.9670247435569763,
-0.6280799508094788,
1.5446990728378296,
-1.088191270828247,
-0.2537153959274292,
-0.9931106567382812,
-0.5045313239097595,
-1.2703883647918701,
-0.4634148180484772,
-0.0953020229935646,
-0.8168668150901794,
0.7106512784957886,
0.044624555855989456,
-1.2226423025131226,
-0.28370052576065063,
-1.0676811933517456,
0.912504255771637,
-0.23638059198856354,
-0.014478789642453194,
1.7037659883499146,
0.2661060392856598,
-0.3778058588504791,
0.8629826307296753,
1.1634184122085571,
0.6070152521133423,
-0.4536174535751343,
0.18025623261928558,
-0.5994308590888977,
0.4759385883808136,
-1.2240673303604126,
0.36897629499435425,
-2.9216718673706055,
0.6295061111450195,
0.028724901378154755,
-0.05636436119675636,
-0.18532845377922058,
-1.471092939376831,
0.9833710789680481,
2.4159579277038574,
-1.1933597326278687,
0.6866844296455383,
0.2719152569770813,
1.2184733152389526,
-1.6514707803726196,
0.04948348179459572,
-0.6274436712265015,
2.1125504970550537,
0.05118391290307045,
1.0932259559631348,
-0.5547446608543396,
-2.3714096546173096,
0.6342004537582397,
-1.2454017400741577,
-0.9734554290771484,
0.7172572016716003,
-0.924370288848877,
0.28102922439575195,
-1.1600953340530396,
-0.1573176383972168,
-0.8492670059204102,
-1.114253044128418,
0.4465425908565521,
0.02802855521440506,
0.5589236617088318,
-0.5762468576431274,
0.2891225218772888,
-2.227506399154663,
-1.3710821866989136,
-0.1767364889383316,
-0.9586613774299622,
0.5024242997169495,
-0.4631366729736328,
0.7021813988685608,
-0.11307835578918457,
0.037613313645124435,
0.24755242466926575,
1.473253607749939,
3.241323232650757,
0.0012482143938541412,
0.2596206068992615,
-0.21732774376869202,
-1.0422800779342651,
1.4942790269851685,
0.9316006302833557,
-0.3369341492652893,
-0.6291553974151611,
-0.9731912612915039,
1.403606653213501,
1.9454466104507446,
0.9875475168228149,
0.06849943846464157,
-0.8675764203071594,
-0.8326471447944641,
0.1201457679271698,
0.08448591083288193,
0.5293311476707458,
0.9663048982620239,
0.13545629382133484,
0.14224843680858612,
1.3727929592132568,
1.086909294128418,
-0.3070997893810272,
0.39203914999961853,
-0.9025907516479492,
-0.39175230264663696,
0.5518152713775635,
0.2712256908416748,
-0.0608808733522892,
0.30216363072395325,
-1.1097854375839233,
-0.21968939900398254,
-0.24713215231895447,
-0.7924286723136902,
-0.7442046999931335,
-0.361653208732605,
-0.4161815047264099,
1.7407320737838745,
0.03548585996031761,
-0.5495744347572327,
-0.04772123694419861,
-0.7773585319519043,
-0.1183139756321907,
-0.9941376447677612,
0.30065762996673584,
-0.1403287649154663,
0.04437315836548805,
-0.17308245599269867,
1.6820602416992188,
-1.002103328704834,
-2.2652153968811035,
0.14617744088172913,
0.22151343524456024,
-0.2709820866584778,
-0.014445601962506771,
1.8061763048171997,
0.5786562561988831,
1.3812662363052368,
1.5407582521438599,
1.0392094850540161,
-0.6020458340644836,
-1.2669142484664917,
0.7558231353759766,
0.9592844843864441,
-1.4196468591690063,
0.8601285219192505,
-0.17347779870033264,
-0.6281932592391968,
0.5234457850456238,
1.2875268459320068,
0.4869704246520996,
-1.9283770322799683,
0.9313250184059143,
-1.1220345497131348,
0.9191817045211792,
0.7771474123001099,
0.8662451505661011,
0.12180618941783905,
0.8866284489631653,
-1.2631622552871704,
-1.0331782102584839,
-0.589706301689148,
-0.7775546312332153,
1.8616492748260498,
-0.3387528657913208,
0.35102105140686035,
-0.2913600206375122,
-1.2899442911148071,
0.07556352764368057,
0.6942718625068665,
0.2317548245191574,
-0.35246017575263977,
0.805645227432251,
-0.7269569039344788,
-1.1500041484832764,
-1.3695684671401978,
-0.4948867857456207,
-0.9840003252029419,
-0.8957896828651428,
1.005094051361084,
0.721660315990448,
0.5183600187301636,
1.9372543096542358,
0.6917221546173096,
0.158901184797287,
-2.5793378353118896,
0.8382998108863831,
0.37276574969291687,
-0.05304286628961563,
0.7807941436767578,
0.23793388903141022,
1.185798168182373,
-0.21627503633499146,
0.6119381785392761,
-2.32240629196167,
2.1791810989379883,
-0.16442571580410004,
0.8397642374038696,
0.09892541915178299,
0.03905998542904854,
0.9787853956222534,
0.5289483070373535,
0.5995591282844543,
-1.174872636795044,
0.939003586769104,
-0.6106891632080078,
1.1396756172180176,
0.7598738670349121,
-0.8752859830856323,
0.10339362174272537,
1.2630172967910767,
0.3460220694541931,
-0.5880411267280579,
-1.026096224784851,
-0.9127723574638367,
0.9466110467910767,
1.8106471300125122,
0.037588052451610565,
0.12666518986225128,
0.7890267968177795,
0.7270988821983337,
-1.278092622756958,
-0.09965786337852478,
-0.5844338536262512,
-0.6177651286125183,
1.882010817527771,
2.1005165576934814,
-0.10724794864654541,
-0.12893183529376984,
-0.6924501061439514,
-1.5002957582473755,
0.8123618364334106,
0.14509253203868866,
-0.07312039285898209,
0.7396049499511719,
-0.6607814431190491,
1.1608405113220215,
0.7993335723876953,
0.8629376292228699,
0.19223128259181976,
0.026634670794010162,
0.3121569752693176,
-0.26583802700042725,
-1.1577202081680298,
-0.3629927635192871,
-1.0142195224761963,
-2.621070384979248,
0.37647193670272827,
-0.20245029032230377,
-1.4527887105941772,
0.19165156781673431,
-0.9703420400619507,
0.7811852693557739,
-0.4991225004196167,
-1.1535823345184326,
-1.284907341003418,
0.23947250843048096,
-0.1457352638244629,
0.7332189679145813,
-1.6510206460952759,
-0.16214825212955475,
1.2052247524261475,
1.0235298871994019,
-0.6098994016647339,
0.9142181873321533,
0.2578769624233246,
0.9253232479095459,
0.902485728263855,
-0.43728652596473694,
0.5109758973121643,
0.2499445378780365,
-1.3481884002685547,
0.37007200717926025,
1.4226927757263184,
0.1162974089384079,
1.4115030765533447,
-0.4424653947353363,
-0.10268677026033401,
0.38612234592437744,
-0.3754214942455292,
-0.5461496114730835,
-0.6566083431243896,
0.6536998152732849,
-0.13580948114395142,
-0.9696705341339111,
-0.0963893011212349,
0.0333830751478672,
-0.20471413433551788,
0.2878519594669342,
-1.516539216041565,
-0.11257801949977875,
-0.38385164737701416,
-0.652815580368042,
-1.441573977470398,
-0.10086118429899216,
1.3445097208023071,
-0.8541432023048401,
-0.07728813588619232,
0.5399020314216614,
0.1770300716161728,
0.5188150405883789,
0.6896310448646545,
-0.7457259893417358,
-0.26492154598236084,
-0.10842513293027878,
-0.4145524501800537,
0.3352700173854828,
1.2139772176742554,
-0.0624520406126976,
-0.9612938165664673,
0.5500375628471375,
-0.26032111048698425,
0.2035290002822876,
1.8461859226226807,
0.005654874257743359,
-0.8365347981452942,
0.3752235472202301,
-0.7730481028556824,
1.9158310890197754,
1.5990906953811646,
1.3031457662582397,
-0.16478145122528076,
-0.9173156023025513,
0.6305146217346191,
-0.30902233719825745,
-0.3415757715702057,
0.8392518758773804,
0.3889023959636688,
-0.2717677056789398,
-1.3885616064071655,
0.7941054105758667,
1.195024847984314,
-0.8081182241439819,
-0.721966028213501,
0.06549876928329468,
-0.8071156740188599,
1.303007960319519,
0.6330549716949463,
0.3420153856277466,
0.247379332780838,
1.7718886137008667,
0.7560323476791382,
-0.5765056014060974,
0.5055387020111084,
0.5137906670570374,
-0.15584145486354828,
-2.0076253414154053,
-1.1056870222091675,
0.26881498098373413,
-0.4842786192893982,
-1.523909091949463,
1.378791332244873,
-1.177344799041748,
-0.9905290603637695,
0.5501784086227417,
0.14457687735557556,
1.3766200542449951,
0.2987740933895111,
1.6936883926391602,
2.01706862449646,
0.9521862864494324,
0.5115041732788086,
1.1204115152359009,
-0.2129109650850296,
-0.24957866966724396,
1.665725588798523,
-0.40146851539611816,
0.6693374514579773,
1.0377976894378662,
-0.5266515612602234,
-1.2129982709884644,
-0.7822175025939941,
-1.1908507347106934,
-0.7801808714866638,
1.031411051750183,
0.12647484242916107,
-1.0999345779418945,
0.3201870918273926,
1.6389201879501343,
0.10548621416091919,
-0.11381331086158752,
0.7666236758232117,
0.3545440435409546,
-0.6544219255447388,
-0.07071266323328018,
-1.0746797323226929,
0.5869571566581726,
-0.3697517514228821,
-0.43145862221717834,
0.1808416247367859,
0.5133866667747498,
1.2342209815979004,
0.14456689357757568,
0.13489359617233276,
1.308972954750061,
-1.4242292642593384,
1.2921992540359497,
-1.0200610160827637,
0.36548811197280884,
-2.3024933338165283,
1.4003093242645264,
-0.9872983694076538,
2.0203349590301514,
-2.7003796100616455,
0.46888595819473267,
-0.5027032494544983,
-0.5616709589958191,
0.15222683548927307,
-0.19640296697616577,
0.06761880218982697,
-0.004699307959526777,
-1.0830841064453125,
-0.14037974178791046,
-0.805033266544342,
0.4999944865703583,
1.2283674478530884,
1.3720860481262207,
-0.9461585879325867,
-0.1749301254749298,
-1.6508888006210327,
-0.1786774843931198,
-0.516684889793396,
0.18373747169971466,
-1.849745273590088,
-0.1903839111328125,
-2.0165717601776123,
-2.410648822784424,
-1.241788625717163,
-0.9824944138526917,
1.3083873987197876,
0.16416260600090027,
-0.8283767104148865,
1.1724807024002075,
-0.38882651925086975,
-1.7596014738082886,
1.1850086450576782,
-2.2485313415527344
] |
https://github.com/huggingface/datasets/issues/5671 | How to use `load_dataset('glue', 'cola')` | Thank you for advising me to update these libraries versions.
I can implement codes using `datasets==2.10.1` and `transformers==4.27.3` | ### Describe the bug
I'm new to use HuggingFace datasets but I cannot use `load_dataset('glue', 'cola')`.
- I was stacked by the following problem:
```python
from datasets import load_dataset
cola_dataset = load_dataset('glue', 'cola')
---------------------------------------------------------------------------
InvalidVersion Traceback (most recent call last)
File <timed exec>:1
(Omit because of long error message)
File /usr/local/lib/python3.8/site-packages/packaging/version.py:197, in Version.__init__(self, version)
195 match = self._regex.search(version)
196 if not match:
--> 197 raise InvalidVersion(f"Invalid version: '{version}'")
199 # Store the parsed out pieces of the version
200 self._version = _Version(
201 epoch=int(match.group("epoch")) if match.group("epoch") else 0,
202 release=tuple(int(i) for i in match.group("release").split(".")),
(...)
208 local=_parse_local_version(match.group("local")),
209 )
InvalidVersion: Invalid version: '0.10.1,<0.11'
```
- You can check this full error message in my repository: [MLOps-Basics/week_0_project_setup/experimental_notebooks/data_exploration.ipynb](https://github.com/makinzm/MLOps-Basics/blob/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup/experimental_notebooks/data_exploration.ipynb)
### Steps to reproduce the bug
- This is my repository to reproduce: [MLOps-Basics/week_0_project_setup](https://github.com/makinzm/MLOps-Basics/tree/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup)
1. cd `/DockerImage` and command `docker build . -t week0`
2. cd `/` and command `docker-compose up`
3. Run `experimental_notebooks/data_exploration.ipynb`
----
Just to be sure, I wrote down Dockerfile and requirements.txt
- Dockerfile
```Dockerfile
FROM python:3.8
WORKDIR /root/working
RUN apt-get update && \
apt-get install -y python3-dev python3-pip python3-venv && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip3 install --no-cache-dir jupyter notebook && pip install --no-cache-dir -r requirements.txt
CMD ["bash"]
```
- requirements.txt
```txt
pytorch-lightning==1.2.10
datasets==1.6.2
transformers==4.5.1
scikit-learn==0.24.2
```
### Expected behavior
There is no bug to implement `load_dataset('glue', 'cola')`
### Environment info
I already wrote it. | 243 | 18 | How to use `load_dataset('glue', 'cola')`
### Describe the bug
I'm new to use HuggingFace datasets but I cannot use `load_dataset('glue', 'cola')`.
- I was stacked by the following problem:
```python
from datasets import load_dataset
cola_dataset = load_dataset('glue', 'cola')
---------------------------------------------------------------------------
InvalidVersion Traceback (most recent call last)
File <timed exec>:1
(Omit because of long error message)
File /usr/local/lib/python3.8/site-packages/packaging/version.py:197, in Version.__init__(self, version)
195 match = self._regex.search(version)
196 if not match:
--> 197 raise InvalidVersion(f"Invalid version: '{version}'")
199 # Store the parsed out pieces of the version
200 self._version = _Version(
201 epoch=int(match.group("epoch")) if match.group("epoch") else 0,
202 release=tuple(int(i) for i in match.group("release").split(".")),
(...)
208 local=_parse_local_version(match.group("local")),
209 )
InvalidVersion: Invalid version: '0.10.1,<0.11'
```
- You can check this full error message in my repository: [MLOps-Basics/week_0_project_setup/experimental_notebooks/data_exploration.ipynb](https://github.com/makinzm/MLOps-Basics/blob/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup/experimental_notebooks/data_exploration.ipynb)
### Steps to reproduce the bug
- This is my repository to reproduce: [MLOps-Basics/week_0_project_setup](https://github.com/makinzm/MLOps-Basics/tree/eabab4b837880607d9968d3fa687c70177b2affd/week_0_project_setup)
1. cd `/DockerImage` and command `docker build . -t week0`
2. cd `/` and command `docker-compose up`
3. Run `experimental_notebooks/data_exploration.ipynb`
----
Just to be sure, I wrote down Dockerfile and requirements.txt
- Dockerfile
```Dockerfile
FROM python:3.8
WORKDIR /root/working
RUN apt-get update && \
apt-get install -y python3-dev python3-pip python3-venv && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip3 install --no-cache-dir jupyter notebook && pip install --no-cache-dir -r requirements.txt
CMD ["bash"]
```
- requirements.txt
```txt
pytorch-lightning==1.2.10
datasets==1.6.2
transformers==4.5.1
scikit-learn==0.24.2
```
### Expected behavior
There is no bug to implement `load_dataset('glue', 'cola')`
### Environment info
I already wrote it.
Thank you for advising me to update these libraries versions.
I can implement codes using `datasets==2.10.1` and `transformers==4.27.3` | [
-1.242923617362976,
-0.8090680837631226,
-0.5667579770088196,
1.4932599067687988,
-0.016458960250020027,
-1.2967854738235474,
0.05277257040143013,
-0.8301689028739929,
1.5365967750549316,
-0.8346707224845886,
0.3501524329185486,
-1.6392711400985718,
0.0350043959915638,
-0.5708592534065247,
-0.6803174614906311,
-0.6895116567611694,
-0.36117517948150635,
-0.6767922043800354,
1.1650925874710083,
2.4350059032440186,
1.2655287981033325,
-1.3769752979278564,
2.833341598510742,
0.5757378339767456,
-0.16147381067276,
-0.8896165490150452,
0.42414146661758423,
-0.022413447499275208,
-1.400045394897461,
-0.295830100774765,
-0.9869040250778198,
-0.03063037618994713,
-0.6521989703178406,
-0.5199152827262878,
0.09441449493169785,
0.4587366282939911,
-0.1754148006439209,
-0.45456528663635254,
-0.41572925448417664,
-0.7773094773292542,
0.6278708577156067,
-0.27047693729400635,
0.7924466729164124,
-0.23664994537830353,
1.7506749629974365,
-0.5978891253471375,
0.5311706066131592,
0.5241990089416504,
1.3517420291900635,
0.24262133240699768,
-0.04304962605237961,
0.547496497631073,
0.2244240641593933,
0.0865459069609642,
0.6215241551399231,
1.25845205783844,
0.6653953194618225,
0.4060615599155426,
0.7501018643379211,
-2.2325961589813232,
1.337714672088623,
-0.8789297342300415,
0.2201187014579773,
1.2813392877578735,
-1.0647696256637573,
0.4346873462200165,
-1.855345368385315,
-0.11139779537916183,
0.42035382986068726,
-2.239309310913086,
0.19081951677799225,
-1.3402334451675415,
-0.494147390127182,
0.9934210777282715,
0.4125315248966217,
-1.2220816612243652,
-0.030221015214920044,
-0.473655104637146,
0.9460108280181885,
0.3348392844200134,
1.1275737285614014,
-1.671238899230957,
0.03604605421423912,
-0.19266819953918457,
0.29491445422172546,
-1.1245630979537964,
-1.6105527877807617,
0.5649306178092957,
0.6836182475090027,
0.6362311244010925,
-0.17075596749782562,
0.9356811046600342,
-1.1016016006469727,
0.7963032722473145,
-0.9715117812156677,
-1.7699054479599,
-1.3591716289520264,
-2.46077299118042,
-2.33349609375,
0.7566112875938416,
-0.40172791481018066,
-0.3399304449558258,
2.143601417541504,
-1.1411467790603638,
-1.738904356956482,
1.0261528491973877,
0.32593396306037903,
-0.10130132734775543,
2.374518871307373,
0.17199227213859558,
-0.9363139867782593,
0.6899719834327698,
-0.9169158339500427,
0.6387887597084045,
-0.39117467403411865,
1.3015191555023193,
0.4395521283149719,
-1.0150120258331299,
1.5694369077682495,
-0.4008166193962097,
0.4737485647201538,
-0.6817893385887146,
-0.3673637807369232,
-0.6070178151130676,
0.21058200299739838,
1.9952629804611206,
-0.14363223314285278,
1.5005847215652466,
-0.19869546592235565,
-1.5125627517700195,
-1.4093818664550781,
0.7643644213676453,
0.4837559759616852,
-0.8064207434654236,
0.19468916952610016,
-0.4650673568248749,
0.15380387008190155,
0.15771792829036713,
1.0760900974273682,
1.312220573425293,
0.7719457745552063,
-0.2578815519809723,
-0.9954714179039001,
0.024271130561828613,
-0.030933726578950882,
-0.5089064836502075,
-1.8167895078659058,
-0.24422574043273926,
0.19180616736412048,
0.6407615542411804,
-1.1903765201568604,
1.8919117450714111,
0.9181890487670898,
1.9981869459152222,
0.9628218412399292,
-0.2957485020160675,
1.6465462446212769,
0.11105149984359741,
1.8784328699111938,
-0.32707178592681885,
0.6564229726791382,
-0.5214505791664124,
-1.2535786628723145,
0.7316333651542664,
-0.3227841854095459,
-1.9693899154663086,
-0.5020586848258972,
-0.8631234765052795,
-0.11535584926605225,
-0.8839771747589111,
1.0509744882583618,
-0.2962949573993683,
-1.4119733572006226,
0.18824885785579681,
-0.7408690452575684,
0.15994030237197876,
-1.3746838569641113,
0.3236426115036011,
0.7506476044654846,
-0.7089135050773621,
0.08198735117912292,
-0.4771347641944885,
-1.3820343017578125,
-0.6138150095939636,
0.5142091512680054,
1.7617403268814087,
-0.6518451571464539,
1.0331013202667236,
1.0996030569076538,
-0.5951535701751709,
-0.012074556201696396,
0.3850843608379364,
-0.3499528765678406,
0.9022156596183777,
-1.0029997825622559,
-0.43475431203842163,
1.1997562646865845,
-0.2905850112438202,
-0.5167063474655151,
1.2884654998779297,
0.7477684617042542,
-1.0048630237579346,
-0.3110055923461914,
-0.09483716636896133,
-0.8794870972633362,
0.06957835704088211,
-1.6232984066009521,
-0.11689801514148712,
0.3715042173862457,
-1.5264861583709717,
-0.43658652901649475,
-0.022831812500953674,
1.3246606588363647,
0.012775554321706295,
1.4221174716949463,
-0.2575956881046295,
-0.04981376230716705,
-0.4752969741821289,
-0.5050217509269714,
0.208445206284523,
-0.16327598690986633,
-0.6689468622207642,
0.24066850543022156,
-0.774967610836029,
0.19469794631004333,
1.4564253091812134,
0.23199304938316345,
0.11939544975757599,
0.5272328853607178,
1.1951792240142822,
0.31005918979644775,
-0.14370517432689667,
-0.8342753648757935,
-1.740098476409912,
2.020771026611328,
-1.5305402278900146,
1.933448076248169,
0.7612962126731873,
-0.07042285054922104,
-1.7799772024154663,
-1.8614647388458252,
1.4068782329559326,
1.1001166105270386,
2.5055031776428223,
0.43672701716423035,
0.45473387837409973,
-0.8914229869842529,
-0.6982706189155579,
0.4802275002002716,
-0.7902345061302185,
-0.8729450702667236,
0.12652736902236938,
2.3664915561676025,
1.7261680364608765,
-0.35381415486335754,
-0.22055548429489136,
-0.9577634930610657,
1.4029539823532104,
-0.3654360771179199,
0.2974292039871216,
1.8445533514022827,
-0.3572908341884613,
-1.0299818515777588,
1.2883107662200928,
-2.429466724395752,
0.3513711094856262,
2.028695583343506,
0.3349739611148834,
0.15195484459400177,
-1.2275288105010986,
-0.7648412585258484,
-0.14146196842193604,
-0.46500375866889954,
-1.2360649108886719,
0.42340776324272156,
-0.25128400325775146,
-0.8801699876785278,
-1.3493165969848633,
0.021242156624794006,
-1.1892238855361938,
-1.7327251434326172,
0.3167070746421814,
1.831480622291565,
2.234429121017456,
-0.7712064981460571,
1.3851914405822754,
-0.2950729727745056,
0.32270073890686035,
1.1402050256729126,
1.246657371520996,
3.1324286460876465,
1.8938097953796387,
-1.2416743040084839,
0.6952815651893616,
-0.1058218851685524,
-0.5129402279853821,
1.2157108783721924,
-1.0754033327102661,
1.127358078956604,
-0.22892527282238007,
-1.3092126846313477,
-1.1274410486221313,
0.9650325179100037,
0.4146151542663574,
-0.07196711748838425,
-0.4350211024284363,
1.0582935810089111,
0.1389566957950592,
1.2904402017593384,
0.712586522102356,
-0.30069583654403687,
0.5418562293052673,
-0.3551414906978607,
-0.5498493313789368,
1.5208864212036133,
0.021228574216365814,
-1.5839279890060425,
-2.2480907440185547,
-0.14506755769252777,
-0.9968003034591675,
0.01744893193244934,
-0.7844141721725464,
-1.015920877456665,
1.465661883354187,
0.4239506423473358,
-0.9693703651428223,
-0.12605725228786469,
-0.37711861729621887,
-0.539742112159729,
2.609328508377075,
-1.318772792816162,
-0.2765480875968933,
-0.9670247435569763,
-0.6280799508094788,
1.5446990728378296,
-1.088191270828247,
-0.2537153959274292,
-0.9931106567382812,
-0.5045313239097595,
-1.2703883647918701,
-0.4634148180484772,
-0.0953020229935646,
-0.8168668150901794,
0.7106512784957886,
0.044624555855989456,
-1.2226423025131226,
-0.28370052576065063,
-1.0676811933517456,
0.912504255771637,
-0.23638059198856354,
-0.014478789642453194,
1.7037659883499146,
0.2661060392856598,
-0.3778058588504791,
0.8629826307296753,
1.1634184122085571,
0.6070152521133423,
-0.4536174535751343,
0.18025623261928558,
-0.5994308590888977,
0.4759385883808136,
-1.2240673303604126,
0.36897629499435425,
-2.9216718673706055,
0.6295061111450195,
0.028724901378154755,
-0.05636436119675636,
-0.18532845377922058,
-1.471092939376831,
0.9833710789680481,
2.4159579277038574,
-1.1933597326278687,
0.6866844296455383,
0.2719152569770813,
1.2184733152389526,
-1.6514707803726196,
0.04948348179459572,
-0.6274436712265015,
2.1125504970550537,
0.05118391290307045,
1.0932259559631348,
-0.5547446608543396,
-2.3714096546173096,
0.6342004537582397,
-1.2454017400741577,
-0.9734554290771484,
0.7172572016716003,
-0.924370288848877,
0.28102922439575195,
-1.1600953340530396,
-0.1573176383972168,
-0.8492670059204102,
-1.114253044128418,
0.4465425908565521,
0.02802855521440506,
0.5589236617088318,
-0.5762468576431274,
0.2891225218772888,
-2.227506399154663,
-1.3710821866989136,
-0.1767364889383316,
-0.9586613774299622,
0.5024242997169495,
-0.4631366729736328,
0.7021813988685608,
-0.11307835578918457,
0.037613313645124435,
0.24755242466926575,
1.473253607749939,
3.241323232650757,
0.0012482143938541412,
0.2596206068992615,
-0.21732774376869202,
-1.0422800779342651,
1.4942790269851685,
0.9316006302833557,
-0.3369341492652893,
-0.6291553974151611,
-0.9731912612915039,
1.403606653213501,
1.9454466104507446,
0.9875475168228149,
0.06849943846464157,
-0.8675764203071594,
-0.8326471447944641,
0.1201457679271698,
0.08448591083288193,
0.5293311476707458,
0.9663048982620239,
0.13545629382133484,
0.14224843680858612,
1.3727929592132568,
1.086909294128418,
-0.3070997893810272,
0.39203914999961853,
-0.9025907516479492,
-0.39175230264663696,
0.5518152713775635,
0.2712256908416748,
-0.0608808733522892,
0.30216363072395325,
-1.1097854375839233,
-0.21968939900398254,
-0.24713215231895447,
-0.7924286723136902,
-0.7442046999931335,
-0.361653208732605,
-0.4161815047264099,
1.7407320737838745,
0.03548585996031761,
-0.5495744347572327,
-0.04772123694419861,
-0.7773585319519043,
-0.1183139756321907,
-0.9941376447677612,
0.30065762996673584,
-0.1403287649154663,
0.04437315836548805,
-0.17308245599269867,
1.6820602416992188,
-1.002103328704834,
-2.2652153968811035,
0.14617744088172913,
0.22151343524456024,
-0.2709820866584778,
-0.014445601962506771,
1.8061763048171997,
0.5786562561988831,
1.3812662363052368,
1.5407582521438599,
1.0392094850540161,
-0.6020458340644836,
-1.2669142484664917,
0.7558231353759766,
0.9592844843864441,
-1.4196468591690063,
0.8601285219192505,
-0.17347779870033264,
-0.6281932592391968,
0.5234457850456238,
1.2875268459320068,
0.4869704246520996,
-1.9283770322799683,
0.9313250184059143,
-1.1220345497131348,
0.9191817045211792,
0.7771474123001099,
0.8662451505661011,
0.12180618941783905,
0.8866284489631653,
-1.2631622552871704,
-1.0331782102584839,
-0.589706301689148,
-0.7775546312332153,
1.8616492748260498,
-0.3387528657913208,
0.35102105140686035,
-0.2913600206375122,
-1.2899442911148071,
0.07556352764368057,
0.6942718625068665,
0.2317548245191574,
-0.35246017575263977,
0.805645227432251,
-0.7269569039344788,
-1.1500041484832764,
-1.3695684671401978,
-0.4948867857456207,
-0.9840003252029419,
-0.8957896828651428,
1.005094051361084,
0.721660315990448,
0.5183600187301636,
1.9372543096542358,
0.6917221546173096,
0.158901184797287,
-2.5793378353118896,
0.8382998108863831,
0.37276574969291687,
-0.05304286628961563,
0.7807941436767578,
0.23793388903141022,
1.185798168182373,
-0.21627503633499146,
0.6119381785392761,
-2.32240629196167,
2.1791810989379883,
-0.16442571580410004,
0.8397642374038696,
0.09892541915178299,
0.03905998542904854,
0.9787853956222534,
0.5289483070373535,
0.5995591282844543,
-1.174872636795044,
0.939003586769104,
-0.6106891632080078,
1.1396756172180176,
0.7598738670349121,
-0.8752859830856323,
0.10339362174272537,
1.2630172967910767,
0.3460220694541931,
-0.5880411267280579,
-1.026096224784851,
-0.9127723574638367,
0.9466110467910767,
1.8106471300125122,
0.037588052451610565,
0.12666518986225128,
0.7890267968177795,
0.7270988821983337,
-1.278092622756958,
-0.09965786337852478,
-0.5844338536262512,
-0.6177651286125183,
1.882010817527771,
2.1005165576934814,
-0.10724794864654541,
-0.12893183529376984,
-0.6924501061439514,
-1.5002957582473755,
0.8123618364334106,
0.14509253203868866,
-0.07312039285898209,
0.7396049499511719,
-0.6607814431190491,
1.1608405113220215,
0.7993335723876953,
0.8629376292228699,
0.19223128259181976,
0.026634670794010162,
0.3121569752693176,
-0.26583802700042725,
-1.1577202081680298,
-0.3629927635192871,
-1.0142195224761963,
-2.621070384979248,
0.37647193670272827,
-0.20245029032230377,
-1.4527887105941772,
0.19165156781673431,
-0.9703420400619507,
0.7811852693557739,
-0.4991225004196167,
-1.1535823345184326,
-1.284907341003418,
0.23947250843048096,
-0.1457352638244629,
0.7332189679145813,
-1.6510206460952759,
-0.16214825212955475,
1.2052247524261475,
1.0235298871994019,
-0.6098994016647339,
0.9142181873321533,
0.2578769624233246,
0.9253232479095459,
0.902485728263855,
-0.43728652596473694,
0.5109758973121643,
0.2499445378780365,
-1.3481884002685547,
0.37007200717926025,
1.4226927757263184,
0.1162974089384079,
1.4115030765533447,
-0.4424653947353363,
-0.10268677026033401,
0.38612234592437744,
-0.3754214942455292,
-0.5461496114730835,
-0.6566083431243896,
0.6536998152732849,
-0.13580948114395142,
-0.9696705341339111,
-0.0963893011212349,
0.0333830751478672,
-0.20471413433551788,
0.2878519594669342,
-1.516539216041565,
-0.11257801949977875,
-0.38385164737701416,
-0.652815580368042,
-1.441573977470398,
-0.10086118429899216,
1.3445097208023071,
-0.8541432023048401,
-0.07728813588619232,
0.5399020314216614,
0.1770300716161728,
0.5188150405883789,
0.6896310448646545,
-0.7457259893417358,
-0.26492154598236084,
-0.10842513293027878,
-0.4145524501800537,
0.3352700173854828,
1.2139772176742554,
-0.0624520406126976,
-0.9612938165664673,
0.5500375628471375,
-0.26032111048698425,
0.2035290002822876,
1.8461859226226807,
0.005654874257743359,
-0.8365347981452942,
0.3752235472202301,
-0.7730481028556824,
1.9158310890197754,
1.5990906953811646,
1.3031457662582397,
-0.16478145122528076,
-0.9173156023025513,
0.6305146217346191,
-0.30902233719825745,
-0.3415757715702057,
0.8392518758773804,
0.3889023959636688,
-0.2717677056789398,
-1.3885616064071655,
0.7941054105758667,
1.195024847984314,
-0.8081182241439819,
-0.721966028213501,
0.06549876928329468,
-0.8071156740188599,
1.303007960319519,
0.6330549716949463,
0.3420153856277466,
0.247379332780838,
1.7718886137008667,
0.7560323476791382,
-0.5765056014060974,
0.5055387020111084,
0.5137906670570374,
-0.15584145486354828,
-2.0076253414154053,
-1.1056870222091675,
0.26881498098373413,
-0.4842786192893982,
-1.523909091949463,
1.378791332244873,
-1.177344799041748,
-0.9905290603637695,
0.5501784086227417,
0.14457687735557556,
1.3766200542449951,
0.2987740933895111,
1.6936883926391602,
2.01706862449646,
0.9521862864494324,
0.5115041732788086,
1.1204115152359009,
-0.2129109650850296,
-0.24957866966724396,
1.665725588798523,
-0.40146851539611816,
0.6693374514579773,
1.0377976894378662,
-0.5266515612602234,
-1.2129982709884644,
-0.7822175025939941,
-1.1908507347106934,
-0.7801808714866638,
1.031411051750183,
0.12647484242916107,
-1.0999345779418945,
0.3201870918273926,
1.6389201879501343,
0.10548621416091919,
-0.11381331086158752,
0.7666236758232117,
0.3545440435409546,
-0.6544219255447388,
-0.07071266323328018,
-1.0746797323226929,
0.5869571566581726,
-0.3697517514228821,
-0.43145862221717834,
0.1808416247367859,
0.5133866667747498,
1.2342209815979004,
0.14456689357757568,
0.13489359617233276,
1.308972954750061,
-1.4242292642593384,
1.2921992540359497,
-1.0200610160827637,
0.36548811197280884,
-2.3024933338165283,
1.4003093242645264,
-0.9872983694076538,
2.0203349590301514,
-2.7003796100616455,
0.46888595819473267,
-0.5027032494544983,
-0.5616709589958191,
0.15222683548927307,
-0.19640296697616577,
0.06761880218982697,
-0.004699307959526777,
-1.0830841064453125,
-0.14037974178791046,
-0.805033266544342,
0.4999944865703583,
1.2283674478530884,
1.3720860481262207,
-0.9461585879325867,
-0.1749301254749298,
-1.6508888006210327,
-0.1786774843931198,
-0.516684889793396,
0.18373747169971466,
-1.849745273590088,
-0.1903839111328125,
-2.0165717601776123,
-2.410648822784424,
-1.241788625717163,
-0.9824944138526917,
1.3083873987197876,
0.16416260600090027,
-0.8283767104148865,
1.1724807024002075,
-0.38882651925086975,
-1.7596014738082886,
1.1850086450576782,
-2.2485313415527344
] |
https://github.com/huggingface/datasets/issues/5669 | Almost identical datasets, huge performance difference | Hi!
The first dataset stores images as bytes (the "image" column type is `datasets.Image()`) and decodes them as `PIL.Image` objects and the second dataset stores them as variable-length lists (the "image" column type is `datasets.Sequence(...)`)), so I guess going from `arrow bytes -> NumPy -> decoding as PIL.Image -> PyTorch` is faster than going from `arrow list -> NumPy -> PyTorch`.
To store image bytes in the second example, you can do the following:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
features = dataset.features.copy()
del features["image"]
features["image2"] = datasets.Image()
dataset2 = dataset.map(transform, remove_columns=["image"], features=features)
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
``` | ### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1 | 245 | 104 | Almost identical datasets, huge performance difference
### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1
Hi!
The first dataset stores images as bytes (the "image" column type is `datasets.Image()`) and decodes them as `PIL.Image` objects and the second dataset stores them as variable-length lists (the "image" column type is `datasets.Sequence(...)`)), so I guess going from `arrow bytes -> NumPy -> decoding as PIL.Image -> PyTorch` is faster than going from `arrow list -> NumPy -> PyTorch`.
To store image bytes in the second example, you can do the following:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
features = dataset.features.copy()
del features["image"]
features["image2"] = datasets.Image()
dataset2 = dataset.map(transform, remove_columns=["image"], features=features)
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
``` | [
-1.273810863494873,
-0.9348547458648682,
-0.7258482575416565,
1.456681728363037,
-0.2409791201353073,
-1.2046717405319214,
0.1873997449874878,
-1.1217832565307617,
1.6943249702453613,
-0.8898317217826843,
0.2769777476787567,
-1.6639620065689087,
0.012441408820450306,
-0.5439789891242981,
-0.7468292117118835,
-0.9084166884422302,
-0.4719732403755188,
-0.7255207896232605,
1.0883898735046387,
2.437756061553955,
1.2446399927139282,
-1.3038365840911865,
2.7072594165802,
0.7245594263076782,
-0.2081354409456253,
-0.987568736076355,
0.5169280171394348,
0.03336230665445328,
-1.3260204792022705,
-0.37967783212661743,
-0.9808410406112671,
-0.07622291892766953,
-0.5164651274681091,
-0.5843008756637573,
0.0403902642428875,
0.41402533650398254,
-0.3479202091693878,
-0.5441394448280334,
-0.5488687753677368,
-0.7024877071380615,
0.44242915511131287,
-0.38150322437286377,
0.9712207317352295,
-0.38336288928985596,
1.819389820098877,
-0.6307923197746277,
0.4893149733543396,
0.7246790528297424,
1.2442556619644165,
0.2517406642436981,
-0.010115355253219604,
0.38819611072540283,
0.4333679974079132,
0.01660880446434021,
0.5234059691429138,
1.2024677991867065,
0.6878827214241028,
0.5089425444602966,
0.8130150437355042,
-2.2099263668060303,
1.275736927986145,
-1.0526564121246338,
0.3461742699146271,
1.4060747623443604,
-0.9617971181869507,
0.40550100803375244,
-1.7419981956481934,
-0.06007534638047218,
0.5467550158500671,
-2.240072011947632,
0.29257336258888245,
-1.3446844816207886,
-0.5167103409767151,
1.0895678997039795,
0.42783239483833313,
-1.1384862661361694,
0.10872454941272736,
-0.4591893255710602,
0.9741219282150269,
0.42255014181137085,
1.1756306886672974,
-1.6993860006332397,
0.0005079256370663643,
-0.34095337986946106,
0.12074042856693268,
-1.27950918674469,
-1.5145105123519897,
0.5771159529685974,
0.6705859303474426,
0.5777559876441956,
-0.18753677606582642,
1.0850884914398193,
-1.0232330560684204,
0.6988838911056519,
-0.9713307619094849,
-1.699794054031372,
-1.4122194051742554,
-2.1811790466308594,
-2.276329517364502,
0.7146661877632141,
-0.45081254839897156,
-0.5308181047439575,
2.1314914226531982,
-1.0343377590179443,
-1.7832335233688354,
1.1165664196014404,
0.21637922525405884,
-0.07820452749729156,
2.361990451812744,
0.2731489837169647,
-0.6990976929664612,
0.43953102827072144,
-0.71662837266922,
0.7919447422027588,
-0.2957293689250946,
1.312234878540039,
0.36287230253219604,
-1.0890400409698486,
1.5899772644042969,
-0.3491275906562805,
0.5725252032279968,
-0.5994899868965149,
-0.40879037976264954,
-0.7276820540428162,
0.3116322457790375,
1.9460628032684326,
-0.323775976896286,
1.5270918607711792,
-0.3370276391506195,
-1.6163029670715332,
-1.6373175382614136,
0.8235962986946106,
0.5515825748443604,
-0.6843404173851013,
0.15247227251529694,
-0.3521437346935272,
0.07410011440515518,
0.03982439264655113,
1.1976205110549927,
1.3573238849639893,
0.8534514904022217,
-0.3947126865386963,
-0.8422448039054871,
0.13784544169902802,
-0.024459099397063255,
-0.7413334250450134,
-1.6981960535049438,
-0.40305203199386597,
0.06869872659444809,
0.5990191102027893,
-1.2093983888626099,
1.7421891689300537,
0.9416247010231018,
1.802248239517212,
0.9833520650863647,
-0.35408633947372437,
1.4179819822311401,
0.13000822067260742,
1.8277727365493774,
-0.46311870217323303,
0.7025527954101562,
-0.3530419170856476,
-1.1913100481033325,
0.8205340504646301,
-0.28851017355918884,
-2.080091714859009,
-0.7995397448539734,
-0.7907031178474426,
-0.1723160296678543,
-0.7929692268371582,
0.8987669944763184,
-0.2802196741104126,
-1.4302650690078735,
0.2049865573644638,
-0.7653760313987732,
0.091271311044693,
-1.2874468564987183,
0.2883559763431549,
0.6767283082008362,
-0.7311511039733887,
0.06771250814199448,
-0.2293446809053421,
-1.2606329917907715,
-0.3925728499889374,
0.1821964979171753,
1.9018408060073853,
-0.8180692791938782,
1.0002366304397583,
1.0549947023391724,
-0.7534657716751099,
-0.0055458019487559795,
0.26690831780433655,
-0.3164701461791992,
0.8797879815101624,
-1.083635926246643,
-0.4200785756111145,
1.2082175016403198,
-0.12465840578079224,
-0.6010347604751587,
1.4904749393463135,
0.6279405355453491,
-1.0095559358596802,
-0.24209624528884888,
-0.1270042210817337,
-0.792519748210907,
-0.015493305400013924,
-1.51620614528656,
-0.09324491024017334,
0.4707045257091522,
-1.4889622926712036,
-0.5484887957572937,
-0.2153891772031784,
1.3035048246383667,
-0.1900458186864853,
1.4772729873657227,
-0.43994295597076416,
-0.23533038794994354,
-0.3517318069934845,
-0.30969592928886414,
0.1494934856891632,
-0.14401870965957642,
-0.6483076810836792,
0.16230741143226624,
-0.8400142788887024,
0.35133716464042664,
1.447249174118042,
0.3614482581615448,
-0.008873921819031239,
0.5484287142753601,
1.0821568965911865,
0.4034801721572876,
-0.0749046802520752,
-0.891349732875824,
-1.5624816417694092,
1.943552851676941,
-1.4579312801361084,
1.9651504755020142,
0.7378036379814148,
-0.014550003223121166,
-1.817389726638794,
-1.8872712850570679,
1.3670332431793213,
1.2015056610107422,
2.4079880714416504,
0.5295572280883789,
0.41153743863105774,
-0.8228906393051147,
-0.7035925984382629,
0.3205212652683258,
-1.041227102279663,
-0.71021568775177,
0.2298402637243271,
2.3540194034576416,
1.7546321153640747,
-0.455148309469223,
-0.19657127559185028,
-1.039206624031067,
1.3344374895095825,
-0.19865021109580994,
0.16690592467784882,
1.9127604961395264,
-0.2997911870479584,
-1.094353199005127,
1.3477286100387573,
-2.2597732543945312,
0.12643489241600037,
1.9545743465423584,
0.2139279842376709,
0.0605558305978775,
-1.3195359706878662,
-0.6536860466003418,
-0.2903207242488861,
-0.4059937298297882,
-1.25496506690979,
0.4425208866596222,
-0.22540628910064697,
-0.7491703629493713,
-1.3654011487960815,
0.1610044687986374,
-1.0825917720794678,
-1.641804575920105,
0.14847742021083832,
1.869217872619629,
2.0115740299224854,
-0.8200129270553589,
1.5441311597824097,
-0.38794684410095215,
0.14215272665023804,
1.1741353273391724,
1.2475857734680176,
3.0782182216644287,
1.8535391092300415,
-1.358909010887146,
0.6776058077812195,
-0.12567968666553497,
-0.47654232382774353,
1.2358016967773438,
-1.202274203300476,
1.3199012279510498,
-0.13017192482948303,
-1.2329211235046387,
-1.2106918096542358,
0.9574214220046997,
0.45983245968818665,
0.08814476430416107,
-0.5003606677055359,
1.2269595861434937,
0.011166487820446491,
1.3814845085144043,
0.5906422138214111,
-0.3633476793766022,
0.7577803730964661,
-0.42093154788017273,
-0.4028843939304352,
1.5336973667144775,
0.1873219907283783,
-1.3490103483200073,
-2.2090420722961426,
-0.22261245548725128,
-0.8898680806159973,
0.1303367167711258,
-0.5933088064193726,
-0.9398736953735352,
1.7359473705291748,
0.4030800461769104,
-1.2148813009262085,
-0.28179216384887695,
-0.35936176776885986,
-0.5777705311775208,
2.7279181480407715,
-1.3450814485549927,
-0.18254350125789642,
-1.0033419132232666,
-0.7204740047454834,
1.6448500156402588,
-1.1515079736709595,
-0.18471989035606384,
-1.022294521331787,
-0.5105158090591431,
-1.374681830406189,
-0.6605238318443298,
0.07561559975147247,
-0.9707913994789124,
0.8622474074363708,
0.11244525015354156,
-1.1486896276474,
-0.31961849331855774,
-0.8298507928848267,
0.9378661513328552,
-0.2052050083875656,
0.13688434660434723,
1.9327677488327026,
0.4042302668094635,
-0.38142213225364685,
0.7425621151924133,
1.1586956977844238,
0.6505126357078552,
-0.6237741112709045,
0.2410433143377304,
-0.7545739412307739,
0.2609019875526428,
-1.3115984201431274,
0.1592435985803604,
-2.8066046237945557,
0.5957709550857544,
-0.04803643375635147,
0.006899752654135227,
0.03174170106649399,
-1.2662354707717896,
0.9937036037445068,
2.620534658432007,
-1.2055068016052246,
0.4445362389087677,
0.2700583338737488,
1.2087715864181519,
-1.556213140487671,
0.25882479548454285,
-0.46197089552879333,
2.041825532913208,
0.2732697129249573,
1.261229395866394,
-0.48249974846839905,
-2.2023303508758545,
0.6322841644287109,
-1.2887048721313477,
-1.1939703226089478,
0.8032041192054749,
-0.8297247290611267,
0.15160410106182098,
-1.3850678205490112,
-0.2967800498008728,
-0.7783897519111633,
-1.144765019416809,
0.6798762083053589,
0.08715926855802536,
0.4318617880344391,
-0.542178750038147,
0.3825061619281769,
-2.237886667251587,
-1.296829104423523,
-0.2823675870895386,
-0.9707985520362854,
0.4773770272731781,
-0.3237983286380768,
0.7330219149589539,
-0.24424344301223755,
0.009278233163058758,
0.3963179886341095,
1.424201250076294,
3.3851399421691895,
0.23394174873828888,
0.24170012772083282,
-0.21121929585933685,
-0.9928681254386902,
1.4880584478378296,
0.9364143013954163,
-0.14529220759868622,
-0.5479227900505066,
-1.1562944650650024,
1.1817973852157593,
1.8402833938598633,
1.0020123720169067,
-0.010034498758614063,
-0.8726378679275513,
-0.7523967027664185,
-0.030083976686000824,
0.09366023540496826,
0.43698814511299133,
0.8701921701431274,
0.12741932272911072,
0.150796577334404,
1.4774631261825562,
1.164050817489624,
-0.40897440910339355,
0.3748111426830292,
-0.8238271474838257,
-0.5565915107727051,
0.5807062387466431,
0.3290610611438751,
0.06910920888185501,
0.27967461943626404,
-1.087969183921814,
-0.22495846450328827,
-0.41209107637405396,
-0.8921844363212585,
-0.6925202012062073,
-0.3960067331790924,
-0.35958290100097656,
1.581054925918579,
0.08795105665922165,
-0.4636141359806061,
-0.08052252233028412,
-0.7806709408760071,
-0.0923391804099083,
-1.0391194820404053,
0.3691008985042572,
-0.12467843294143677,
-0.14512579143047333,
-0.1388576328754425,
1.7454140186309814,
-0.8783172965049744,
-2.002102851867676,
0.27038124203681946,
0.2240924835205078,
-0.2656155228614807,
0.23950126767158508,
1.6791346073150635,
0.6707682013511658,
1.5034892559051514,
1.336435317993164,
0.9476147294044495,
-0.6141642332077026,
-1.26321542263031,
0.6377981901168823,
0.9770200848579407,
-1.3896678686141968,
0.7510923743247986,
-0.027708128094673157,
-0.5411350727081299,
0.5594236850738525,
1.255479335784912,
0.5076774954795837,
-2.016622543334961,
0.7935637831687927,
-0.9398004412651062,
0.7387252449989319,
0.7196428179740906,
0.7343870997428894,
0.09171320497989655,
0.7806139588356018,
-1.1547939777374268,
-1.1099823713302612,
-0.7109075784683228,
-0.6278948783874512,
1.9947714805603027,
-0.2669603228569031,
0.5757717490196228,
-0.35758012533187866,
-1.3254735469818115,
-0.04168945923447609,
0.6406134963035583,
0.2963193356990814,
-0.5137771964073181,
0.7722997069358826,
-0.570025622844696,
-1.0880975723266602,
-1.3744306564331055,
-0.4369896948337555,
-1.0822135210037231,
-0.9117893576622009,
0.998904824256897,
0.7488777041435242,
0.2629145085811615,
1.838548183441162,
0.6414366960525513,
0.23314277827739716,
-2.6697213649749756,
0.8958012461662292,
0.16498424112796783,
-0.08418770879507065,
0.8676087856292725,
0.3272631764411926,
0.9637902975082397,
-0.07234703749418259,
0.5094009041786194,
-2.4743502140045166,
2.279118776321411,
-0.21181687712669373,
0.6766728758811951,
-0.006957538891583681,
-0.17132411897182465,
1.123466968536377,
0.6270312666893005,
0.5239977836608887,
-1.0753731727600098,
0.5771427154541016,
-0.6042691469192505,
1.249550461769104,
0.8503050804138184,
-0.8304344415664673,
-0.06466019153594971,
1.423645257949829,
0.43966108560562134,
-0.4825911223888397,
-0.9488743543624878,
-1.0177630186080933,
1.023533821105957,
1.7062245607376099,
-0.10360928624868393,
0.00013349391520023346,
0.7912847995758057,
0.7125470638275146,
-1.2713708877563477,
0.024030230939388275,
-0.7873343825340271,
-0.6556919813156128,
1.6471953392028809,
2.057363271713257,
-0.17486408352851868,
-0.2665475308895111,
-0.6818717122077942,
-1.298171877861023,
0.8919475674629211,
-0.01850256137549877,
0.2363491803407669,
0.7282304167747498,
-0.6409481763839722,
1.0769145488739014,
0.8906959891319275,
0.8914797306060791,
0.27028214931488037,
0.28808942437171936,
0.33855167031288147,
-0.292975515127182,
-1.2200971841812134,
-0.09299052506685257,
-0.9819261431694031,
-2.511080026626587,
0.42294690012931824,
-0.21221235394477844,
-1.438736081123352,
0.01502785924822092,
-0.9913865923881531,
0.936844527721405,
-0.5740684866905212,
-1.1540659666061401,
-1.585211992263794,
0.2059977650642395,
-0.024144602939486504,
1.0466059446334839,
-1.6005291938781738,
-0.09819598495960236,
1.2335126399993896,
0.9459249377250671,
-0.6870183348655701,
1.0058810710906982,
0.2440696507692337,
1.034201979637146,
0.8821808695793152,
-0.3522879183292389,
0.5294898152351379,
-0.021352138370275497,
-1.3579063415527344,
0.3760892152786255,
1.1098226308822632,
0.20904991030693054,
1.5090500116348267,
-0.5596991181373596,
-0.027379028499126434,
0.4225598871707916,
-0.5185356140136719,
-0.44346868991851807,
-0.5023642182350159,
0.6043316721916199,
-0.03478686884045601,
-0.9184370636940002,
-0.00268448144197464,
0.0014919731765985489,
-0.22221438586711884,
0.23436863720417023,
-1.409489393234253,
-0.07400961965322495,
-0.3913280963897705,
-0.6726855039596558,
-1.1233103275299072,
-0.1137612834572792,
1.3719555139541626,
-0.8677836060523987,
-0.14661066234111786,
0.5123729109764099,
0.19142353534698486,
0.5363879203796387,
0.6051127314567566,
-0.6823321580886841,
-0.299841970205307,
-0.17312830686569214,
-0.37195292115211487,
0.330282062292099,
1.4118021726608276,
-0.11133582144975662,
-0.9631062150001526,
0.7100241780281067,
-0.2839480936527252,
0.11155233532190323,
1.9085369110107422,
0.08744274079799652,
-0.7816386222839355,
0.26387783885002136,
-0.7352485656738281,
1.882608413696289,
1.7563737630844116,
1.3752230405807495,
-0.10053080320358276,
-0.9839544296264648,
0.5537803769111633,
-0.3506302833557129,
-0.3570490777492523,
0.8321259021759033,
0.39869973063468933,
-0.166742742061615,
-1.4464397430419922,
0.8156530261039734,
1.2775554656982422,
-0.8733161687850952,
-0.8287880420684814,
0.18170076608657837,
-0.7575796246528625,
1.0715824365615845,
0.7127741575241089,
0.37131375074386597,
0.23042364418506622,
1.6306288242340088,
0.7946974039077759,
-0.3935665786266327,
0.5531954169273376,
0.5536428093910217,
-0.1252094954252243,
-2.099047899246216,
-1.1579151153564453,
0.32216596603393555,
-0.5412030816078186,
-1.5972366333007812,
1.4031587839126587,
-1.1517269611358643,
-1.0191733837127686,
0.5572763085365295,
0.14684893190860748,
1.5021634101867676,
0.3765551447868347,
1.6091488599777222,
2.0397610664367676,
0.9087426662445068,
0.33668044209480286,
1.221975564956665,
-0.10066600888967514,
-0.42809003591537476,
1.7230325937271118,
-0.4777023494243622,
0.4422271251678467,
1.0685384273529053,
-0.2773132026195526,
-1.0716171264648438,
-0.7539401650428772,
-1.348302960395813,
-0.8540219068527222,
1.1241282224655151,
0.10044347494840622,
-1.0723462104797363,
0.21793189644813538,
1.5624641180038452,
0.11782318353652954,
-0.3645744025707245,
0.7507003545761108,
0.3983801305294037,
-0.8314099907875061,
-0.05381681025028229,
-0.8399278521537781,
0.4940912425518036,
-0.162950336933136,
-0.3691679835319519,
0.29883694648742676,
0.44473665952682495,
1.4077225923538208,
0.0037665357813239098,
0.08320845663547516,
1.1685168743133545,
-1.3685945272445679,
1.563028335571289,
-0.7018669843673706,
0.2940188944339752,
-2.380997657775879,
1.4207706451416016,
-0.8497186303138733,
1.8580653667449951,
-2.7295916080474854,
0.5190874338150024,
-0.5327107906341553,
-0.447007954120636,
0.25631213188171387,
-0.39076462388038635,
0.13899385929107666,
-0.08899860084056854,
-1.1574506759643555,
-0.08686079829931259,
-0.6775999069213867,
0.6880599856376648,
1.0942058563232422,
1.4148714542388916,
-1.2772310972213745,
-0.3226930797100067,
-1.7793452739715576,
-0.08938920497894287,
-0.7058390378952026,
0.40688541531562805,
-1.9360053539276123,
-0.22249680757522583,
-1.8389476537704468,
-2.4479176998138428,
-1.296648621559143,
-0.7873769402503967,
1.152714490890503,
0.09162936359643936,
-0.841106116771698,
1.221803069114685,
-0.40381306409835815,
-1.9654524326324463,
1.2163279056549072,
-2.219512939453125
] |
https://github.com/huggingface/datasets/issues/5669 | Almost identical datasets, huge performance difference | Thanks, @mariosasko. I could not understand why a (decoded) sequence should be MUCH slower than an encoded image (that must be decoded every time). At any rate, I tried you suggestion. It made the `map` step to run extremely slow (consumes all the 16GB of memory and starts swapping)
I tried also the easiest (as I see it) scenario, where images are kept as bytes, but it made things even worse: not only it was extremely slow, but also crashes
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"]).tobytes()
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
Resource temporarily unavailable (src/thread.cpp:269)
Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~/virtenvs/py310/lib/python3.10/site-packages/torch/utils/data/dataloader.py:1133, in _MultiProcessingDataLoaderIter._try_get_data(self, timeout)
1132 try:
-> 1133 data = self._data_queue.get(timeout=timeout)
1134 return (True, data)
File ~/virtenvs/py310/lib/python3.10/multiprocessing/queues.py:113, in Queue.get(self, block, timeout)
112 timeout = deadline - time.monotonic()
--> 113 if not self._poll(timeout):
114 raise Empty
File ~/virtenvs/py310/lib/python3.10/multiprocessing/connection.py:257, in _ConnectionBase.poll(self, timeout)
256 self._check_readable()
--> 257 return self._poll(timeout)
File ~/virtenvs/py310/lib/python3.10/multiprocessing/connection.py:424, in Connection._poll(self, timeout)
423 def _poll(self, timeout):
--> 424 r = wait([self], timeout)
425 return bool(r)
File ~/virtenvs/py310/lib/python3.10/multiprocessing/connection.py:931, in wait(object_list, timeout)
930 while True:
--> 931 ready = selector.select(timeout)
932 if ready:
...
-> 1146 raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e
1147 if isinstance(e, queue.Empty):
1148 return (False, None)
RuntimeError: DataLoader worker (pid(s) 195393) exited unexpectedly
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
```
| ### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1 | 245 | 254 | Almost identical datasets, huge performance difference
### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1
Thanks, @mariosasko. I could not understand why a (decoded) sequence should be MUCH slower than an encoded image (that must be decoded every time). At any rate, I tried you suggestion. It made the `map` step to run extremely slow (consumes all the 16GB of memory and starts swapping)
I tried also the easiest (as I see it) scenario, where images are kept as bytes, but it made things even worse: not only it was extremely slow, but also crashes
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"]).tobytes()
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
Resource temporarily unavailable (src/thread.cpp:269)
Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~/virtenvs/py310/lib/python3.10/site-packages/torch/utils/data/dataloader.py:1133, in _MultiProcessingDataLoaderIter._try_get_data(self, timeout)
1132 try:
-> 1133 data = self._data_queue.get(timeout=timeout)
1134 return (True, data)
File ~/virtenvs/py310/lib/python3.10/multiprocessing/queues.py:113, in Queue.get(self, block, timeout)
112 timeout = deadline - time.monotonic()
--> 113 if not self._poll(timeout):
114 raise Empty
File ~/virtenvs/py310/lib/python3.10/multiprocessing/connection.py:257, in _ConnectionBase.poll(self, timeout)
256 self._check_readable()
--> 257 return self._poll(timeout)
File ~/virtenvs/py310/lib/python3.10/multiprocessing/connection.py:424, in Connection._poll(self, timeout)
423 def _poll(self, timeout):
--> 424 r = wait([self], timeout)
425 return bool(r)
File ~/virtenvs/py310/lib/python3.10/multiprocessing/connection.py:931, in wait(object_list, timeout)
930 while True:
--> 931 ready = selector.select(timeout)
932 if ready:
...
-> 1146 raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e
1147 if isinstance(e, queue.Empty):
1148 return (False, None)
RuntimeError: DataLoader worker (pid(s) 195393) exited unexpectedly
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
Resource temporarily unavailable (src/thread.cpp:269)
```
| [
-1.3018686771392822,
-0.9068117141723633,
-0.7282546162605286,
1.4479296207427979,
-0.2522560954093933,
-1.1142700910568237,
0.18980686366558075,
-1.130013108253479,
1.6321943998336792,
-0.8580845594406128,
0.2584967017173767,
-1.5990269184112549,
-0.006272495724260807,
-0.5444918274879456,
-0.747087299823761,
-0.895102322101593,
-0.48680800199508667,
-0.7558037638664246,
1.1128754615783691,
2.478609085083008,
1.248695731163025,
-1.3719146251678467,
2.7319681644439697,
0.7193689346313477,
-0.1877465844154358,
-1.020758867263794,
0.5377053618431091,
0.03233446553349495,
-1.299801230430603,
-0.41476625204086304,
-0.9917392134666443,
-0.11396907269954681,
-0.5124183297157288,
-0.522483766078949,
0.019268900156021118,
0.4026664197444916,
-0.3156128227710724,
-0.5033361911773682,
-0.5904921293258667,
-0.712559163570404,
0.4746415317058563,
-0.3906504511833191,
0.9983673095703125,
-0.34391647577285767,
1.8529362678527832,
-0.6012915372848511,
0.5267361402511597,
0.7283934354782104,
1.243161916732788,
0.2677009701728821,
-0.009537747129797935,
0.40979090332984924,
0.41958704590797424,
0.0008430099114775658,
0.5595890283584595,
1.199863076210022,
0.6658422946929932,
0.4805583655834198,
0.7880441546440125,
-2.1979520320892334,
1.271785020828247,
-1.0728775262832642,
0.3363974392414093,
1.3680217266082764,
-0.9525216817855835,
0.3878422677516937,
-1.7535977363586426,
-0.07001443952322006,
0.5782790780067444,
-2.212662696838379,
0.26778727769851685,
-1.3237038850784302,
-0.5705368518829346,
1.0803229808807373,
0.42901214957237244,
-1.1812437772750854,
0.12851782143115997,
-0.4885893166065216,
1.0385422706604004,
0.3931932747364044,
1.1827497482299805,
-1.71052885055542,
0.006190124899148941,
-0.3500089645385742,
0.13065125048160553,
-1.2726114988327026,
-1.494676113128662,
0.5937440991401672,
0.6530011296272278,
0.5475575923919678,
-0.1821836233139038,
1.1260051727294922,
-1.0850403308868408,
0.739973247051239,
-1.0339641571044922,
-1.6798367500305176,
-1.4463839530944824,
-2.2439541816711426,
-2.2805376052856445,
0.7317279577255249,
-0.4464173913002014,
-0.5489610433578491,
2.1069047451019287,
-1.0089484453201294,
-1.6929181814193726,
1.124903917312622,
0.21711882948875427,
-0.030347973108291626,
2.3800928592681885,
0.2765370011329651,
-0.7229896783828735,
0.4676501452922821,
-0.7525580525398254,
0.804805338382721,
-0.2858377695083618,
1.3322216272354126,
0.3915928602218628,
-1.0785330533981323,
1.5992432832717896,
-0.33777502179145813,
0.5715274810791016,
-0.5446671843528748,
-0.4543710947036743,
-0.7437640428543091,
0.29272153973579407,
1.9377316236495972,
-0.3025665283203125,
1.5285106897354126,
-0.36896324157714844,
-1.6561098098754883,
-1.6279538869857788,
0.869482159614563,
0.5189504027366638,
-0.6708363890647888,
0.13640788197517395,
-0.4136747121810913,
0.10570321977138519,
0.007418741472065449,
1.2125210762023926,
1.3255369663238525,
0.8042545318603516,
-0.3716270327568054,
-0.8361549973487854,
0.16660483181476593,
-0.0819745734333992,
-0.7695134878158569,
-1.6942373514175415,
-0.41185665130615234,
0.045767538249492645,
0.598380982875824,
-1.2318966388702393,
1.756757378578186,
0.9233181476593018,
1.7868002653121948,
1.023505687713623,
-0.3462727963924408,
1.4778258800506592,
0.12834623456001282,
1.8103562593460083,
-0.485094279050827,
0.6336201429367065,
-0.37254488468170166,
-1.1933598518371582,
0.8130111694335938,
-0.3357853889465332,
-2.1026241779327393,
-0.8508792519569397,
-0.7441258430480957,
-0.18801845610141754,
-0.8027508854866028,
0.9005050659179688,
-0.3244055211544037,
-1.4367709159851074,
0.19662705063819885,
-0.7606369256973267,
0.11558585613965988,
-1.2279800176620483,
0.30427438020706177,
0.674922525882721,
-0.714370846748352,
0.09098031371831894,
-0.21290382742881775,
-1.206800937652588,
-0.3745962381362915,
0.16228976845741272,
1.9128550291061401,
-0.7574524283409119,
0.9656394124031067,
1.1096221208572388,
-0.7361695766448975,
-0.02631257101893425,
0.24042122066020966,
-0.3194703757762909,
0.874678909778595,
-1.0756373405456543,
-0.4820409119129181,
1.225294828414917,
-0.12842147052288055,
-0.5681576728820801,
1.4862768650054932,
0.6414110660552979,
-1.0083941221237183,
-0.2576265335083008,
-0.06719489395618439,
-0.82306307554245,
0.032473426312208176,
-1.5200364589691162,
-0.11339707672595978,
0.48927608132362366,
-1.55730402469635,
-0.5341016054153442,
-0.20185236632823944,
1.2773069143295288,
-0.2164916694164276,
1.480071783065796,
-0.48646658658981323,
-0.20614570379257202,
-0.32662472128868103,
-0.3402683734893799,
0.1425485461950302,
-0.1280967742204666,
-0.6469904184341431,
0.15180547535419464,
-0.8359115719795227,
0.3670967221260071,
1.4441113471984863,
0.39541417360305786,
-0.01325983740389347,
0.5299750566482544,
1.1061835289001465,
0.41660308837890625,
-0.07542619109153748,
-0.8377859592437744,
-1.5367885828018188,
1.971883773803711,
-1.4432642459869385,
1.9883283376693726,
0.7991986274719238,
-0.06653393805027008,
-1.7975939512252808,
-1.8412691354751587,
1.3196322917938232,
1.2150942087173462,
2.392343044281006,
0.497598797082901,
0.3874240815639496,
-0.8262134194374084,
-0.7019699215888977,
0.31447339057922363,
-1.0330795049667358,
-0.6832431554794312,
0.23388899862766266,
2.3773746490478516,
1.7717225551605225,
-0.440055251121521,
-0.20103561878204346,
-0.9950268268585205,
1.36237633228302,
-0.2319798767566681,
0.2039140909910202,
1.9034947156906128,
-0.26625221967697144,
-1.10135018825531,
1.3214749097824097,
-2.2925543785095215,
0.103485606610775,
1.9578523635864258,
0.2839321494102478,
0.05936542898416519,
-1.3483524322509766,
-0.5996730327606201,
-0.3477347493171692,
-0.39469242095947266,
-1.2168346643447876,
0.49508169293403625,
-0.23499849438667297,
-0.7863782048225403,
-1.3642630577087402,
0.1311117559671402,
-1.1331377029418945,
-1.6371766328811646,
0.17274829745292664,
1.842599868774414,
2.04708194732666,
-0.8335670232772827,
1.5355297327041626,
-0.3843483328819275,
0.14738008379936218,
1.1540091037750244,
1.246995210647583,
3.0712530612945557,
1.837833285331726,
-1.3408385515213013,
0.6365450024604797,
-0.14606542885303497,
-0.47688165307044983,
1.176215648651123,
-1.1975797414779663,
1.3396174907684326,
-0.10937651991844177,
-1.2312945127487183,
-1.185729742050171,
1.0041470527648926,
0.48725125193595886,
0.08666296303272247,
-0.47535133361816406,
1.2048048973083496,
0.017758455127477646,
1.3505587577819824,
0.591057538986206,
-0.3133753538131714,
0.7072054147720337,
-0.43074893951416016,
-0.4358660876750946,
1.5075663328170776,
0.19349046051502228,
-1.4060636758804321,
-2.176614761352539,
-0.23676474392414093,
-0.8872292041778564,
0.1046704426407814,
-0.6123117804527283,
-0.9512655735015869,
1.6868164539337158,
0.32864516973495483,
-1.2717756032943726,
-0.3013811409473419,
-0.359481543302536,
-0.6000982522964478,
2.7463786602020264,
-1.3078696727752686,
-0.2151917964220047,
-0.9527543783187866,
-0.729776918888092,
1.671273946762085,
-1.1492213010787964,
-0.18088720738887787,
-1.0081501007080078,
-0.5507153272628784,
-1.3335378170013428,
-0.6984355449676514,
0.08388864994049072,
-1.0095198154449463,
0.8129815459251404,
0.13657142221927643,
-1.1110036373138428,
-0.3203733563423157,
-0.8187012672424316,
0.9532545804977417,
-0.18676872551441193,
0.17352238297462463,
1.8855674266815186,
0.39586374163627625,
-0.40122681856155396,
0.7891366481781006,
1.211470127105713,
0.6932440400123596,
-0.6364038586616516,
0.19957849383354187,
-0.7636532783508301,
0.26484543085098267,
-1.2880759239196777,
0.2170797884464264,
-2.8141212463378906,
0.6025209426879883,
-0.04346716031432152,
-0.016099900007247925,
0.03068431094288826,
-1.2425552606582642,
0.9977704286575317,
2.5760180950164795,
-1.219003677368164,
0.4147273004055023,
0.31819841265678406,
1.1766507625579834,
-1.6069668531417847,
0.2999243140220642,
-0.4771983325481415,
2.0531742572784424,
0.3191055953502655,
1.2413123846054077,
-0.4877418279647827,
-2.2232394218444824,
0.6502443552017212,
-1.3230091333389282,
-1.224050760269165,
0.7933810353279114,
-0.9001798033714294,
0.18458552658557892,
-1.3945157527923584,
-0.30505073070526123,
-0.7582465410232544,
-1.112398386001587,
0.6651297807693481,
0.1194053515791893,
0.41887757182121277,
-0.5235832333564758,
0.37994688749313354,
-2.227905511856079,
-1.3181772232055664,
-0.2739916741847992,
-0.9906315803527832,
0.48376375436782837,
-0.37380269169807434,
0.7181032299995422,
-0.19081276655197144,
-0.01985449343919754,
0.41531988978385925,
1.4318557977676392,
3.4283642768859863,
0.26940929889678955,
0.23041555285453796,
-0.18457040190696716,
-0.9798545837402344,
1.5044701099395752,
0.9032796621322632,
-0.14191585779190063,
-0.5657180547714233,
-1.1089638471603394,
1.2382311820983887,
1.8250465393066406,
1.0145020484924316,
-0.03440752997994423,
-0.8346049189567566,
-0.7423354983329773,
-0.05600866302847862,
0.10914970934391022,
0.424981951713562,
0.8673804998397827,
0.08941679447889328,
0.1308688074350357,
1.4677700996398926,
1.1738032102584839,
-0.4500162601470947,
0.33151382207870483,
-0.8089995384216309,
-0.5268831253051758,
0.5804359912872314,
0.2493954598903656,
0.028057686984539032,
0.3455636203289032,
-1.0762146711349487,
-0.25577589869499207,
-0.4460321068763733,
-0.9112057089805603,
-0.6694509387016296,
-0.3727693557739258,
-0.33761340379714966,
1.5777512788772583,
0.10687928646802902,
-0.45553678274154663,
-0.040828850120306015,
-0.7860486507415771,
-0.15746189653873444,
-1.0863533020019531,
0.2939860224723816,
-0.10108716040849686,
-0.1466764658689499,
-0.1618914008140564,
1.776506781578064,
-0.8660013675689697,
-2.0276739597320557,
0.23318184912204742,
0.2002406269311905,
-0.21448975801467896,
0.23480220139026642,
1.6281744241714478,
0.6046193242073059,
1.4891194105148315,
1.2748353481292725,
0.9216938614845276,
-0.6121256947517395,
-1.240788221359253,
0.6896375417709351,
1.0003570318222046,
-1.3751921653747559,
0.7611036896705627,
-0.06389947235584259,
-0.521236002445221,
0.596976101398468,
1.2353798151016235,
0.5178458094596863,
-1.9660779237747192,
0.8257690072059631,
-0.9427053332328796,
0.7525658011436462,
0.6840549111366272,
0.693976640701294,
0.11665057390928268,
0.8225986361503601,
-1.1871190071105957,
-1.1525554656982422,
-0.7356131672859192,
-0.6581292748451233,
2.020608425140381,
-0.28711506724357605,
0.601999044418335,
-0.29583850502967834,
-1.3128650188446045,
-0.06007044389843941,
0.6266192197799683,
0.2863726317882538,
-0.5099732875823975,
0.8300831317901611,
-0.6528249979019165,
-1.1133853197097778,
-1.4009406566619873,
-0.37373319268226624,
-1.0974851846694946,
-0.9276032447814941,
1.0531469583511353,
0.7226867079734802,
0.2750542163848877,
1.8264858722686768,
0.6458728313446045,
0.25110989809036255,
-2.6612045764923096,
0.9115246534347534,
0.15054795145988464,
-0.06425271183252335,
0.8599358201026917,
0.3147806227207184,
0.9614535570144653,
-0.019116245210170746,
0.5126808881759644,
-2.4956560134887695,
2.2707698345184326,
-0.2104114592075348,
0.6973705291748047,
-0.004245130345225334,
-0.18449552357196808,
1.1192002296447754,
0.6684243679046631,
0.5133141279220581,
-1.068626880645752,
0.5626359581947327,
-0.5354307293891907,
1.2214367389678955,
0.8876633048057556,
-0.8026408553123474,
-0.056211940944194794,
1.4086523056030273,
0.4566202461719513,
-0.49858370423316956,
-0.961314857006073,
-0.9669473767280579,
1.0382933616638184,
1.6988691091537476,
-0.0766114741563797,
-0.028061334043741226,
0.8097944855690002,
0.6882843375205994,
-1.269493579864502,
0.034078389406204224,
-0.770195722579956,
-0.7015575170516968,
1.646795630455017,
2.1369237899780273,
-0.1831553429365158,
-0.24681872129440308,
-0.6283922791481018,
-1.2943379878997803,
0.8489556908607483,
-0.0917530506849289,
0.2796947956085205,
0.6778356432914734,
-0.6397842764854431,
1.0415865182876587,
0.8772052526473999,
0.8975203633308411,
0.26884445548057556,
0.23371845483779907,
0.3700796663761139,
-0.2500072121620178,
-1.2000025510787964,
-0.13723482191562653,
-0.9801272749900818,
-2.5645294189453125,
0.3941113352775574,
-0.22812385857105255,
-1.4194892644882202,
0.04178180545568466,
-0.9701233506202698,
0.9410900473594666,
-0.5742371678352356,
-1.095088005065918,
-1.6158567667007446,
0.21741177141666412,
0.024545174092054367,
1.0682532787322998,
-1.6212471723556519,
-0.14017868041992188,
1.2155734300613403,
0.899844229221344,
-0.6644203066825867,
1.0027854442596436,
0.2592799663543701,
1.0202399492263794,
0.8499752879142761,
-0.3571110665798187,
0.5654175877571106,
0.016321398317813873,
-1.3992525339126587,
0.37293121218681335,
1.1187958717346191,
0.14340074360370636,
1.5437928438186646,
-0.5156223773956299,
-0.003013577312231064,
0.4379759132862091,
-0.5745946764945984,
-0.44385838508605957,
-0.46302491426467896,
0.5869536399841309,
0.010798831470310688,
-0.9118252396583557,
-0.09477753937244415,
-0.015136132948100567,
-0.2696380615234375,
0.21736709773540497,
-1.414786696434021,
-0.0999641865491867,
-0.39648622274398804,
-0.6653194427490234,
-1.1513607501983643,
-0.11686623841524124,
1.3997204303741455,
-0.8840337991714478,
-0.1722993701696396,
0.48072028160095215,
0.24625030159950256,
0.5565178990364075,
0.6536986827850342,
-0.712726891040802,
-0.2915138602256775,
-0.16642245650291443,
-0.35818856954574585,
0.3177107274532318,
1.403216004371643,
-0.10444336384534836,
-0.9531098008155823,
0.6885520815849304,
-0.28949981927871704,
0.12115626782178879,
1.9062237739562988,
0.11204220354557037,
-0.7485329508781433,
0.27261993288993835,
-0.7730822563171387,
1.8854560852050781,
1.7284587621688843,
1.3972722291946411,
-0.11803574860095978,
-0.9006043076515198,
0.5758415460586548,
-0.37741729617118835,
-0.3574410378932953,
0.8151217103004456,
0.3631758689880371,
-0.16113902628421783,
-1.4416253566741943,
0.8324820399284363,
1.3078069686889648,
-0.8769795298576355,
-0.8029025793075562,
0.15712587535381317,
-0.7897262573242188,
1.1065174341201782,
0.6494402289390564,
0.36070966720581055,
0.25923535227775574,
1.6385531425476074,
0.8103495240211487,
-0.39890623092651367,
0.539139449596405,
0.5892055034637451,
-0.08728816360235214,
-2.1389071941375732,
-1.170284628868103,
0.3692949712276459,
-0.514988124370575,
-1.5661959648132324,
1.3785693645477295,
-1.1095361709594727,
-1.035479187965393,
0.5953561663627625,
0.07652825117111206,
1.4277147054672241,
0.38307565450668335,
1.5869745016098022,
2.0864171981811523,
0.8904497623443604,
0.3669167757034302,
1.243748426437378,
-0.10582894831895828,
-0.43245479464530945,
1.7328988313674927,
-0.4579164683818817,
0.46151238679885864,
1.044541597366333,
-0.2804432809352875,
-1.1084119081497192,
-0.7220363616943359,
-1.3403207063674927,
-0.7909667491912842,
1.1430612802505493,
0.07992545515298843,
-1.070889949798584,
0.22178946435451508,
1.5863512754440308,
0.12976504862308502,
-0.35798442363739014,
0.6886826753616333,
0.38083428144454956,
-0.8203880190849304,
-0.06141459196805954,
-0.8613120317459106,
0.4990963041782379,
-0.18287992477416992,
-0.3722214698791504,
0.31977561116218567,
0.4697761535644531,
1.3802659511566162,
-0.059335920959711075,
0.06034300476312637,
1.1431821584701538,
-1.4093992710113525,
1.5497082471847534,
-0.681252121925354,
0.30003711581230164,
-2.3788533210754395,
1.3608086109161377,
-0.8248414993286133,
1.8978098630905151,
-2.692105531692505,
0.525126576423645,
-0.5395979285240173,
-0.48911476135253906,
0.2682878077030182,
-0.39991772174835205,
0.1589251458644867,
-0.10026733577251434,
-1.1160894632339478,
-0.0912589281797409,
-0.6633710265159607,
0.6699177026748657,
1.0773242712020874,
1.404468059539795,
-1.243706464767456,
-0.3059530258178711,
-1.7231799364089966,
-0.08356922119855881,
-0.7131028771400452,
0.3134388327598572,
-1.9759865999221802,
-0.211561918258667,
-1.8546156883239746,
-2.408125638961792,
-1.2809906005859375,
-0.7585504651069641,
1.1479297876358032,
0.12948337197303772,
-0.8360635638237,
1.266430139541626,
-0.3950062096118927,
-1.9340918064117432,
1.164340853691101,
-2.198331117630005
] |
https://github.com/huggingface/datasets/issues/5669 | Almost identical datasets, huge performance difference | Correction: the `beans` dataset stores the image file paths, not the bytes.
For your use case, I think it makes more sense to use `with_tranform` than `map` and lazily decode images with `cv2.imread` when indexing an example/batch:
```python
import cv2
def transform(batch):
batch["image2"] = np.stack([cv2.imread(image_file_path) for image_file_path in batch["image_file_path"]])
return batch
dataset = dataset.with_transform(transform)
```
| ### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1 | 245 | 55 | Almost identical datasets, huge performance difference
### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1
Correction: the `beans` dataset stores the image file paths, not the bytes.
For your use case, I think it makes more sense to use `with_tranform` than `map` and lazily decode images with `cv2.imread` when indexing an example/batch:
```python
import cv2
def transform(batch):
batch["image2"] = np.stack([cv2.imread(image_file_path) for image_file_path in batch["image_file_path"]])
return batch
dataset = dataset.with_transform(transform)
```
| [
-1.2637009620666504,
-0.8858509063720703,
-0.761786699295044,
1.5058460235595703,
-0.19280345737934113,
-1.169984221458435,
0.206938698887825,
-1.123115062713623,
1.6738566160202026,
-0.8589508533477783,
0.27163153886795044,
-1.6066514253616333,
0.02155882492661476,
-0.5725540518760681,
-0.7312570214271545,
-0.9483239650726318,
-0.4429468810558319,
-0.7207361459732056,
1.1094691753387451,
2.421698808670044,
1.2373781204223633,
-1.3705754280090332,
2.7002830505371094,
0.7227382063865662,
-0.19633588194847107,
-1.047673225402832,
0.5084545612335205,
0.03876151889562607,
-1.2521919012069702,
-0.4083755612373352,
-0.9097194671630859,
-0.09384884685277939,
-0.5727819204330444,
-0.5661845803260803,
0.004206689074635506,
0.4541209638118744,
-0.35472267866134644,
-0.5217580199241638,
-0.5734403133392334,
-0.7462683320045471,
0.43625181913375854,
-0.3796096444129944,
0.9623294472694397,
-0.3708275258541107,
1.8296799659729004,
-0.6116238832473755,
0.5205414891242981,
0.7302438020706177,
1.2917882204055786,
0.2700680196285248,
-0.02467743493616581,
0.39118969440460205,
0.4011116623878479,
0.00298519991338253,
0.534410834312439,
1.1933671236038208,
0.6738570332527161,
0.5271223783493042,
0.7577875256538391,
-2.235344648361206,
1.2647110223770142,
-1.0952410697937012,
0.35847949981689453,
1.3737115859985352,
-0.9735127687454224,
0.35877782106399536,
-1.7329400777816772,
-0.0803353488445282,
0.5425581336021423,
-2.2227399349212646,
0.3209995925426483,
-1.351363182067871,
-0.5388128757476807,
1.1471444368362427,
0.44198739528656006,
-1.1860599517822266,
0.13632024824619293,
-0.4288378655910492,
1.059292197227478,
0.40710949897766113,
1.1688960790634155,
-1.7377045154571533,
0.0016266107559204102,
-0.3713560104370117,
0.0968569815158844,
-1.2673970460891724,
-1.488204836845398,
0.5322413444519043,
0.6293695569038391,
0.5799728035926819,
-0.1698458343744278,
1.1244572401046753,
-1.0705429315567017,
0.7137847542762756,
-1.0209764242172241,
-1.7167861461639404,
-1.3739335536956787,
-2.226120948791504,
-2.3035266399383545,
0.7103074193000793,
-0.4410763084888458,
-0.5294259786605835,
2.112412929534912,
-0.9747947454452515,
-1.7213927507400513,
1.130703330039978,
0.2399297058582306,
-0.04860049858689308,
2.3389995098114014,
0.27518385648727417,
-0.7292324304580688,
0.41309162974357605,
-0.769898533821106,
0.7977374196052551,
-0.30119070410728455,
1.340319275856018,
0.37506502866744995,
-1.1054776906967163,
1.6099121570587158,
-0.3240197002887726,
0.593737781047821,
-0.6161364316940308,
-0.4464334547519684,
-0.7428637146949768,
0.31505489349365234,
1.9309054613113403,
-0.30475789308547974,
1.5315890312194824,
-0.3290485441684723,
-1.6056174039840698,
-1.5942257642745972,
0.8954743146896362,
0.5071372985839844,
-0.663609504699707,
0.1450585573911667,
-0.34255343675613403,
0.1298016905784607,
-0.037316642701625824,
1.228033423423767,
1.315779209136963,
0.8037157654762268,
-0.46491739153862,
-0.8564344048500061,
0.15927636623382568,
-0.05613414943218231,
-0.761271595954895,
-1.6953734159469604,
-0.3923954367637634,
0.046981483697891235,
0.5823284983634949,
-1.2333695888519287,
1.7479132413864136,
0.870618999004364,
1.8044602870941162,
0.9881545305252075,
-0.3789684474468231,
1.4122495651245117,
0.12593810260295868,
1.8729265928268433,
-0.43501153588294983,
0.683294951915741,
-0.3238096237182617,
-1.2083508968353271,
0.8560145497322083,
-0.2933971881866455,
-2.067192316055298,
-0.8480963706970215,
-0.7427139282226562,
-0.1727706789970398,
-0.8104547262191772,
0.8999565839767456,
-0.30289536714553833,
-1.508087158203125,
0.17446590960025787,
-0.7586669921875,
0.11653655767440796,
-1.2880805730819702,
0.2979680597782135,
0.6547689437866211,
-0.6865624785423279,
0.10413628071546555,
-0.24918702244758606,
-1.1990357637405396,
-0.41336485743522644,
0.1858416199684143,
1.8937515020370483,
-0.8032211065292358,
0.9976249933242798,
1.0913546085357666,
-0.7733919620513916,
-0.003406294621527195,
0.25834646821022034,
-0.3291921615600586,
0.9119545221328735,
-1.120930552482605,
-0.48084738850593567,
1.2068309783935547,
-0.1290462464094162,
-0.5991769433021545,
1.5388848781585693,
0.6773958206176758,
-1.0178148746490479,
-0.21447162330150604,
-0.12163938581943512,
-0.8216115832328796,
0.03485703095793724,
-1.5372917652130127,
-0.1140989363193512,
0.5132918357849121,
-1.5352396965026855,
-0.5068197250366211,
-0.21600273251533508,
1.301024079322815,
-0.23842981457710266,
1.4844533205032349,
-0.4650843143463135,
-0.21566511690616608,
-0.2882877290248871,
-0.282117635011673,
0.11130516976118088,
-0.12512290477752686,
-0.6610155701637268,
0.17163772881031036,
-0.811225175857544,
0.36119088530540466,
1.3971258401870728,
0.35656559467315674,
-0.012825408019125462,
0.4892004728317261,
1.0967031717300415,
0.39332079887390137,
-0.0636218711733818,
-0.8864577412605286,
-1.5180444717407227,
1.9375942945480347,
-1.4081088304519653,
1.9551671743392944,
0.7860296964645386,
-0.022022929042577744,
-1.7954918146133423,
-1.8319556713104248,
1.392185926437378,
1.1782501935958862,
2.427579164505005,
0.5184350609779358,
0.4175395369529724,
-0.8462228775024414,
-0.7097371220588684,
0.29135289788246155,
-1.0467053651809692,
-0.6482506990432739,
0.2571299970149994,
2.354849100112915,
1.7646194696426392,
-0.3979457914829254,
-0.21694879233837128,
-1.00477933883667,
1.3318102359771729,
-0.2353954017162323,
0.21654030680656433,
1.9108558893203735,
-0.30332282185554504,
-1.0967768430709839,
1.3018529415130615,
-2.2874844074249268,
0.08335577696561813,
1.992805004119873,
0.23344701528549194,
0.04565385729074478,
-1.3478548526763916,
-0.6218266487121582,
-0.3046358823776245,
-0.4280163049697876,
-1.2247955799102783,
0.4750448167324066,
-0.2142423391342163,
-0.7225417494773865,
-1.3248807191848755,
0.18762783706188202,
-1.07468843460083,
-1.6401935815811157,
0.18348363041877747,
1.9074453115463257,
1.977391242980957,
-0.8481819033622742,
1.567906141281128,
-0.39433562755584717,
0.154952272772789,
1.1935522556304932,
1.2424416542053223,
3.0851361751556396,
1.8207682371139526,
-1.3695557117462158,
0.6708824634552002,
-0.12487854063510895,
-0.5065287947654724,
1.2068437337875366,
-1.2326314449310303,
1.293546438217163,
-0.1381266862154007,
-1.2106282711029053,
-1.2621018886566162,
0.948917031288147,
0.4821639657020569,
0.10636743903160095,
-0.5196547508239746,
1.199109435081482,
0.024542592465877533,
1.3482476472854614,
0.5715943574905396,
-0.35565289855003357,
0.7270548939704895,
-0.4475974440574646,
-0.42893919348716736,
1.5303269624710083,
0.1772325485944748,
-1.3313758373260498,
-2.2267167568206787,
-0.23751020431518555,
-0.9120104312896729,
0.12355129420757294,
-0.5907235741615295,
-0.9321482181549072,
1.717151403427124,
0.3777688145637512,
-1.2455472946166992,
-0.3289559781551361,
-0.3432028889656067,
-0.6063951849937439,
2.738030433654785,
-1.300368070602417,
-0.17454245686531067,
-0.9927822947502136,
-0.7410221099853516,
1.6781597137451172,
-1.1259115934371948,
-0.21475544571876526,
-0.9755926132202148,
-0.5299654006958008,
-1.3573291301727295,
-0.6659050583839417,
0.09734275937080383,
-1.0008233785629272,
0.872840166091919,
0.11963760852813721,
-1.1642612218856812,
-0.301162451505661,
-0.790440022945404,
0.963302731513977,
-0.19935251772403717,
0.1742948293685913,
1.8776201009750366,
0.44235989451408386,
-0.38010555505752563,
0.7503787279129028,
1.1529918909072876,
0.6746442317962646,
-0.6362361907958984,
0.26764994859695435,
-0.7362369298934937,
0.22549480199813843,
-1.2922190427780151,
0.18792754411697388,
-2.815823554992676,
0.5790101289749146,
-0.07905609160661697,
0.010996292345225811,
0.029234685003757477,
-1.2464512586593628,
1.0138285160064697,
2.5844194889068604,
-1.2228597402572632,
0.4044729173183441,
0.3359740972518921,
1.1656357049942017,
-1.5955796241760254,
0.30873197317123413,
-0.46826452016830444,
2.0402092933654785,
0.2843066453933716,
1.2545769214630127,
-0.44908469915390015,
-2.2203869819641113,
0.6202309131622314,
-1.3088276386260986,
-1.2214871644973755,
0.8266027569770813,
-0.8399940729141235,
0.16771575808525085,
-1.3872885704040527,
-0.3333236277103424,
-0.7623050808906555,
-1.1620956659317017,
0.6811863780021667,
0.09988705068826675,
0.4008256494998932,
-0.522731602191925,
0.39718377590179443,
-2.2194442749023438,
-1.298092246055603,
-0.2716096043586731,
-0.9916941523551941,
0.4500595033168793,
-0.3758859634399414,
0.715342104434967,
-0.21724015474319458,
0.013130630366504192,
0.4243367314338684,
1.4305994510650635,
3.436262369155884,
0.29284945130348206,
0.23471517860889435,
-0.1749875247478485,
-0.9591851234436035,
1.4965734481811523,
0.9112628698348999,
-0.10623620450496674,
-0.5507291555404663,
-1.173433542251587,
1.2130428552627563,
1.8498703241348267,
1.0255851745605469,
-0.006021668203175068,
-0.8264196515083313,
-0.7201188206672668,
-0.07108615338802338,
0.1023033931851387,
0.417492151260376,
0.8441932201385498,
0.1741945594549179,
0.09295152127742767,
1.4195746183395386,
1.1571476459503174,
-0.4153386354446411,
0.3395484387874603,
-0.8360960483551025,
-0.5069087147712708,
0.5819144248962402,
0.27564382553100586,
0.06328906118869781,
0.27526623010635376,
-1.0902620553970337,
-0.25967463850975037,
-0.45869484543800354,
-0.9063221216201782,
-0.702178955078125,
-0.4070594608783722,
-0.3271935284137726,
1.5918607711791992,
0.08175117522478104,
-0.45715218782424927,
-0.07356072217226028,
-0.7504733800888062,
-0.11254376173019409,
-1.0963664054870605,
0.31786108016967773,
-0.1415141522884369,
-0.1428137868642807,
-0.18223649263381958,
1.7743242979049683,
-0.9024279117584229,
-2.0189855098724365,
0.23214156925678253,
0.20873670279979706,
-0.24453313648700714,
0.2576725482940674,
1.6821829080581665,
0.6078498959541321,
1.4823148250579834,
1.261552095413208,
0.9060651659965515,
-0.656635046005249,
-1.2233513593673706,
0.6452399492263794,
1.006363868713379,
-1.3652935028076172,
0.73231440782547,
0.030174952000379562,
-0.5173198580741882,
0.59288489818573,
1.241945743560791,
0.518939197063446,
-2.012223720550537,
0.7863149046897888,
-0.933245837688446,
0.7260322570800781,
0.6874123215675354,
0.6873444318771362,
0.1093468964099884,
0.7976953983306885,
-1.1775627136230469,
-1.1487711668014526,
-0.722223162651062,
-0.6424310207366943,
2.006512403488159,
-0.3068343997001648,
0.6284317374229431,
-0.28086134791374207,
-1.3148021697998047,
-0.0408458486199379,
0.6688469052314758,
0.3235749900341034,
-0.5366689562797546,
0.7709214091300964,
-0.5755736827850342,
-1.0551443099975586,
-1.4093194007873535,
-0.39097151160240173,
-1.1276154518127441,
-0.9304128289222717,
1.0119513273239136,
0.7527966499328613,
0.2817743718624115,
1.8256829977035522,
0.7050157785415649,
0.23842282593250275,
-2.623328685760498,
0.8960452675819397,
0.1894211769104004,
-0.05911363661289215,
0.8717463612556458,
0.34858956933021545,
0.9815270304679871,
0.009630235843360424,
0.5114147663116455,
-2.4797983169555664,
2.2685914039611816,
-0.21420818567276,
0.6263839602470398,
-0.027340181171894073,
-0.2172938883304596,
1.1472300291061401,
0.6223217844963074,
0.4902783930301666,
-1.067480206489563,
0.593115508556366,
-0.5744175314903259,
1.2123053073883057,
0.8230896592140198,
-0.8209851384162903,
-0.09124808013439178,
1.4323647022247314,
0.4692731499671936,
-0.4887130558490753,
-0.9338963031768799,
-1.0108013153076172,
1.0201756954193115,
1.6707043647766113,
-0.0650629848241806,
-0.05791965126991272,
0.8475886583328247,
0.6916580200195312,
-1.2504938840866089,
0.03263210505247116,
-0.7511975765228271,
-0.6815112829208374,
1.6882898807525635,
2.0823543071746826,
-0.14504866302013397,
-0.27010902762413025,
-0.7282611131668091,
-1.2368762493133545,
0.8835223317146301,
-0.08960265666246414,
0.18992066383361816,
0.6856492161750793,
-0.6793838143348694,
1.0710322856903076,
0.9055405855178833,
0.8595420122146606,
0.2670794129371643,
0.22223293781280518,
0.38764816522598267,
-0.29942941665649414,
-1.2066775560379028,
-0.08947520703077316,
-1.0000144243240356,
-2.507793664932251,
0.433944970369339,
-0.22469118237495422,
-1.4202500581741333,
0.0081075644120574,
-1.0161550045013428,
0.9608293175697327,
-0.58538818359375,
-1.125506043434143,
-1.609721064567566,
0.2306986004114151,
0.003683420829474926,
1.0521444082260132,
-1.586693286895752,
-0.11023786664009094,
1.249699354171753,
0.8829801678657532,
-0.7023938298225403,
1.009906530380249,
0.21148014068603516,
1.0069442987442017,
0.867716372013092,
-0.33481985330581665,
0.55055832862854,
0.0027838684618473053,
-1.3754665851593018,
0.39753520488739014,
1.0873357057571411,
0.18456391990184784,
1.5891538858413696,
-0.5152596831321716,
0.0021821167320013046,
0.4162263870239258,
-0.5438185930252075,
-0.44241857528686523,
-0.5243597030639648,
0.6341136693954468,
-0.015262916684150696,
-0.8917807936668396,
0.03117435798048973,
-0.006062295287847519,
-0.23544564843177795,
0.2341814488172531,
-1.4192745685577393,
-0.10910073667764664,
-0.3781912624835968,
-0.6660268902778625,
-1.1361231803894043,
-0.09559076279401779,
1.357112169265747,
-0.8182859420776367,
-0.1814180314540863,
0.5324580073356628,
0.22944261133670807,
0.5259308815002441,
0.6034443378448486,
-0.6620969176292419,
-0.2927718758583069,
-0.21416155993938446,
-0.37079980969429016,
0.3626999258995056,
1.407570242881775,
-0.09034013003110886,
-0.9204923510551453,
0.7325227856636047,
-0.27512189745903015,
0.07766448706388474,
1.9179646968841553,
0.12550751864910126,
-0.7759844064712524,
0.32061412930488586,
-0.7456557154655457,
1.9351975917816162,
1.7842577695846558,
1.3854901790618896,
-0.0974055603146553,
-0.9708849787712097,
0.5440852642059326,
-0.369636207818985,
-0.3971977233886719,
0.8593278527259827,
0.3659482002258301,
-0.12974213063716888,
-1.444282054901123,
0.7890860438346863,
1.3038002252578735,
-0.8439565300941467,
-0.9068518280982971,
0.2071528434753418,
-0.7765355110168457,
1.0717862844467163,
0.673527181148529,
0.3704608976840973,
0.23812273144721985,
1.5748673677444458,
0.7944215536117554,
-0.38919660449028015,
0.5702362060546875,
0.5688462257385254,
-0.10682845860719681,
-2.1330173015594482,
-1.224105954170227,
0.3695458471775055,
-0.555146336555481,
-1.5781853199005127,
1.4079312086105347,
-1.0925172567367554,
-1.0482221841812134,
0.5874124765396118,
0.10089481621980667,
1.4492976665496826,
0.38911280035972595,
1.598245620727539,
2.0681369304656982,
0.8496068716049194,
0.3458080291748047,
1.234708547592163,
-0.14233820140361786,
-0.5144934058189392,
1.7695037126541138,
-0.49650734663009644,
0.42992886900901794,
1.0876185894012451,
-0.2403440922498703,
-1.109917163848877,
-0.7755132913589478,
-1.3678390979766846,
-0.8303491473197937,
1.127380609512329,
0.09885275363922119,
-1.0583882331848145,
0.21540673077106476,
1.5766115188598633,
0.12980115413665771,
-0.3613181412220001,
0.7012739181518555,
0.3636855483055115,
-0.8715505003929138,
-0.015535945072770119,
-0.8473989367485046,
0.5209242105484009,
-0.17178495228290558,
-0.3389769494533539,
0.31174513697624207,
0.46996259689331055,
1.412010669708252,
-0.0668889582157135,
0.09762308746576309,
1.137672781944275,
-1.3954414129257202,
1.5802884101867676,
-0.6806380748748779,
0.31916388869285583,
-2.3709230422973633,
1.3341624736785889,
-0.8083131313323975,
1.8973212242126465,
-2.7151260375976562,
0.5073056221008301,
-0.5384647250175476,
-0.4574093520641327,
0.2678860127925873,
-0.4559289216995239,
0.15753737092018127,
-0.11523392051458359,
-1.1484020948410034,
-0.12272235006093979,
-0.6820063591003418,
0.6709486842155457,
1.0993542671203613,
1.411924123764038,
-1.231307029724121,
-0.3267587125301361,
-1.747715950012207,
-0.08526553958654404,
-0.64439857006073,
0.3889090418815613,
-1.9369785785675049,
-0.1603100597858429,
-1.8528889417648315,
-2.4345829486846924,
-1.3060513734817505,
-0.7412427067756653,
1.0789425373077393,
0.09994573891162872,
-0.8280254006385803,
1.21244215965271,
-0.4281970262527466,
-1.9111897945404053,
1.1597976684570312,
-2.1791675090789795
] |
https://github.com/huggingface/datasets/issues/5669 | Almost identical datasets, huge performance difference | This is incorrect.
Did you try to run it? dataset[0] returns a tensor of numbers. dataset2[0]
returns the same tensor, but after a few long seconds. Looping over a
thousand of images cannot take 15 minutes.
On Fri, 24 Mar 2023 at 19:28 Mario Šaško ***@***.***> wrote:
> Correction: the beans dataset stores the image file paths, not the bytes.
>
> For your use case, I think it makes more sense to use with_tranform than
> map and lazily decode images with cv2.imread when accessing an
> example/batch:
>
> import cv2
> def transform(batch):
> batch["image2"] = np.stack([cv2.imread(image_file_path) for image_file_path in batch["image_file_path"]])
> return batch
> dataset = dataset.with_transform(transform)
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/5669#issuecomment-1483084347>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AASS73SHRWXIQX6SCYCJ7ITW5XDUDANCNFSM6AAAAAAWFSHWEM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
| ### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1 | 245 | 147 | Almost identical datasets, huge performance difference
### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1
This is incorrect.
Did you try to run it? dataset[0] returns a tensor of numbers. dataset2[0]
returns the same tensor, but after a few long seconds. Looping over a
thousand of images cannot take 15 minutes.
On Fri, 24 Mar 2023 at 19:28 Mario Šaško ***@***.***> wrote:
> Correction: the beans dataset stores the image file paths, not the bytes.
>
> For your use case, I think it makes more sense to use with_tranform than
> map and lazily decode images with cv2.imread when accessing an
> example/batch:
>
> import cv2
> def transform(batch):
> batch["image2"] = np.stack([cv2.imread(image_file_path) for image_file_path in batch["image_file_path"]])
> return batch
> dataset = dataset.with_transform(transform)
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/5669#issuecomment-1483084347>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AASS73SHRWXIQX6SCYCJ7ITW5XDUDANCNFSM6AAAAAAWFSHWEM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
| [
-1.2800259590148926,
-0.937232255935669,
-0.7325112819671631,
1.4220523834228516,
-0.23706656694412231,
-1.1816797256469727,
0.20481380820274353,
-1.1396234035491943,
1.6556408405303955,
-0.815902054309845,
0.2331092655658722,
-1.6104159355163574,
0.010658606886863708,
-0.5416808724403381,
-0.7265142202377319,
-0.9140569567680359,
-0.47617974877357483,
-0.7809984087944031,
1.0658445358276367,
2.471776008605957,
1.21970796585083,
-1.379089117050171,
2.730553388595581,
0.7392223477363586,
-0.19030368328094482,
-1.0252827405929565,
0.5347847938537598,
0.043939702212810516,
-1.2946912050247192,
-0.4041612148284912,
-0.9221605658531189,
-0.09897696226835251,
-0.5290936827659607,
-0.5049699544906616,
0.01171274296939373,
0.3754020035266876,
-0.2895371615886688,
-0.46429771184921265,
-0.588966965675354,
-0.7092775702476501,
0.4090575575828552,
-0.4057289659976959,
0.9613310694694519,
-0.375759482383728,
1.7922804355621338,
-0.6114771366119385,
0.5027899742126465,
0.7362851500511169,
1.297881007194519,
0.2648315131664276,
-0.021124735474586487,
0.35482165217399597,
0.42552363872528076,
-0.02809622697532177,
0.4767928421497345,
1.1745166778564453,
0.7008878588676453,
0.47611355781555176,
0.7752645611763,
-2.217198133468628,
1.2768715620040894,
-1.032205581665039,
0.4063761532306671,
1.378358244895935,
-0.9403641819953918,
0.36571043729782104,
-1.772929072380066,
-0.050084490329027176,
0.59991055727005,
-2.2643356323242188,
0.2817588150501251,
-1.3385698795318604,
-0.6098425984382629,
1.0550260543823242,
0.3802359700202942,
-1.1867725849151611,
0.1416332721710205,
-0.5004535913467407,
1.0507020950317383,
0.4174325168132782,
1.176147699356079,
-1.7598962783813477,
-0.02188883349299431,
-0.32403433322906494,
0.13278809189796448,
-1.2713959217071533,
-1.5303903818130493,
0.6022070646286011,
0.6534003019332886,
0.5725928544998169,
-0.13661813735961914,
1.0676616430282593,
-1.0498813390731812,
0.7491282224655151,
-1.0270774364471436,
-1.6967988014221191,
-1.3874847888946533,
-2.255618095397949,
-2.267294406890869,
0.6962867975234985,
-0.46285203099250793,
-0.530739963054657,
2.0831329822540283,
-1.0036054849624634,
-1.691962718963623,
1.1421023607254028,
0.2250954806804657,
-0.026578757911920547,
2.397115468978882,
0.22966733574867249,
-0.7075454592704773,
0.4110133647918701,
-0.7753300666809082,
0.8167405724525452,
-0.295437753200531,
1.3508648872375488,
0.3458535969257355,
-1.0271023511886597,
1.5931121110916138,
-0.35932251811027527,
0.5693373680114746,
-0.6070562601089478,
-0.48305127024650574,
-0.7601017355918884,
0.30214765667915344,
1.9374440908432007,
-0.3054831027984619,
1.5640305280685425,
-0.35786616802215576,
-1.6404651403427124,
-1.6130585670471191,
0.860868513584137,
0.5492585301399231,
-0.7354094386100769,
0.13506808876991272,
-0.4001130759716034,
0.10841145366430283,
-0.03744038939476013,
1.1698944568634033,
1.3273530006408691,
0.7773632407188416,
-0.39041805267333984,
-0.8671760559082031,
0.12624213099479675,
-0.0949920192360878,
-0.7905804514884949,
-1.7374922037124634,
-0.35060033202171326,
0.0504591278731823,
0.6238389015197754,
-1.2663027048110962,
1.6792839765548706,
0.8885641694068909,
1.8664361238479614,
0.9989529252052307,
-0.39876601099967957,
1.4172905683517456,
0.16031470894813538,
1.7772818803787231,
-0.5336265563964844,
0.7045354843139648,
-0.3485538363456726,
-1.1256204843521118,
0.8558180928230286,
-0.33970364928245544,
-2.0594899654388428,
-0.7832285761833191,
-0.7239347100257874,
-0.20978939533233643,
-0.81354820728302,
0.8976603746414185,
-0.28234362602233887,
-1.4358108043670654,
0.23639586567878723,
-0.7596621513366699,
0.11754865199327469,
-1.2835237979888916,
0.3208087980747223,
0.7001678347587585,
-0.6374191045761108,
0.05618252605199814,
-0.2692275941371918,
-1.2386596202850342,
-0.42154574394226074,
0.16322502493858337,
1.8906978368759155,
-0.770064115524292,
0.9533416032791138,
1.0502831935882568,
-0.7258340716362,
0.01288505271077156,
0.28341659903526306,
-0.2930109202861786,
0.8749153017997742,
-1.1248784065246582,
-0.45419442653656006,
1.162487506866455,
-0.14778989553451538,
-0.5370193719863892,
1.5256009101867676,
0.6705764532089233,
-1.03179931640625,
-0.23698171973228455,
-0.0958418920636177,
-0.803744375705719,
0.03062775731086731,
-1.580064296722412,
-0.11184011399745941,
0.4314410388469696,
-1.5779292583465576,
-0.5415796637535095,
-0.22542256116867065,
1.2910335063934326,
-0.2086375653743744,
1.4600330591201782,
-0.46563586592674255,
-0.18726959824562073,
-0.3140159845352173,
-0.27523866295814514,
0.13357827067375183,
-0.17930182814598083,
-0.6095901131629944,
0.18531185388565063,
-0.8644728660583496,
0.3380131721496582,
1.4285311698913574,
0.38822394609451294,
-0.0059206523001194,
0.4931429624557495,
1.0388193130493164,
0.4024125337600708,
-0.07257481664419174,
-0.8686515092849731,
-1.54141366481781,
1.9653713703155518,
-1.4630827903747559,
1.9716638326644897,
0.8399276733398438,
-0.033788274973630905,
-1.783279538154602,
-1.8591899871826172,
1.3289380073547363,
1.1687172651290894,
2.3899261951446533,
0.5106422901153564,
0.40812408924102783,
-0.8208063840866089,
-0.7058718800544739,
0.2578127086162567,
-1.0293359756469727,
-0.690854012966156,
0.21554309129714966,
2.368929386138916,
1.731542706489563,
-0.4556511640548706,
-0.20175141096115112,
-0.9882935285568237,
1.3402581214904785,
-0.1792801022529602,
0.2215224802494049,
1.9212197065353394,
-0.27828243374824524,
-1.1000465154647827,
1.309558629989624,
-2.2856264114379883,
0.10381460934877396,
1.9788745641708374,
0.22216227650642395,
0.08075929433107376,
-1.3295931816101074,
-0.6211330890655518,
-0.35158300399780273,
-0.404168039560318,
-1.2431615591049194,
0.4937443137168884,
-0.2353593111038208,
-0.7628729939460754,
-1.4116379022598267,
0.17311489582061768,
-1.0771546363830566,
-1.6092227697372437,
0.21441295742988586,
1.917407512664795,
2.019953489303589,
-0.8298764228820801,
1.514305830001831,
-0.40972456336021423,
0.09106505662202835,
1.1413018703460693,
1.2220264673233032,
3.078014850616455,
1.8577680587768555,
-1.3286503553390503,
0.6691656708717346,
-0.14251405000686646,
-0.46936821937561035,
1.1453487873077393,
-1.1956464052200317,
1.2912613153457642,
-0.12033294141292572,
-1.208212971687317,
-1.2038556337356567,
0.9939245581626892,
0.47356823086738586,
0.1004461795091629,
-0.5191763043403625,
1.239027500152588,
-0.010181811638176441,
1.3941655158996582,
0.5667096972465515,
-0.34461623430252075,
0.6970456838607788,
-0.4505743086338043,
-0.45879805088043213,
1.5833594799041748,
0.1896226406097412,
-1.3976695537567139,
-2.282562017440796,
-0.2646663188934326,
-0.8789846897125244,
0.1360931694507599,
-0.5955774188041687,
-0.992035984992981,
1.7399487495422363,
0.39578965306282043,
-1.2433066368103027,
-0.3454785645008087,
-0.3513715863227844,
-0.591015636920929,
2.708617687225342,
-1.365075707435608,
-0.17712000012397766,
-0.981038510799408,
-0.6810649633407593,
1.6781389713287354,
-1.1653518676757812,
-0.19860151410102844,
-1.0019832849502563,
-0.5403355956077576,
-1.3150936365127563,
-0.6277258396148682,
0.04944702237844467,
-0.9913899302482605,
0.864501953125,
0.1480204164981842,
-1.139752745628357,
-0.2770290970802307,
-0.8199516534805298,
0.9607204794883728,
-0.1548948884010315,
0.19258806109428406,
1.9034233093261719,
0.4109281003475189,
-0.398563414812088,
0.7136748433113098,
1.1761239767074585,
0.6574091911315918,
-0.6706639528274536,
0.1443035900592804,
-0.7082211375236511,
0.29653415083885193,
-1.3002246618270874,
0.2060023546218872,
-2.814741373062134,
0.6180288195610046,
-0.03753051906824112,
0.021537497639656067,
0.05335933715105057,
-1.2535879611968994,
1.0486984252929688,
2.632430076599121,
-1.2113101482391357,
0.40953347086906433,
0.3441736698150635,
1.155282735824585,
-1.5796070098876953,
0.3492676615715027,
-0.45472314953804016,
2.0732641220092773,
0.2728290259838104,
1.2211965322494507,
-0.49643611907958984,
-2.2760660648345947,
0.6184729337692261,
-1.2588139772415161,
-1.216352105140686,
0.7377350926399231,
-0.8748382329940796,
0.1176694706082344,
-1.4561545848846436,
-0.31159618496894836,
-0.8144094347953796,
-1.1606415510177612,
0.6765215396881104,
0.07510701566934586,
0.3989570438861847,
-0.56165611743927,
0.38239407539367676,
-2.2643706798553467,
-1.3228888511657715,
-0.25674936175346375,
-0.9802178740501404,
0.4809746742248535,
-0.36928001046180725,
0.7230682969093323,
-0.18285220861434937,
0.033870626240968704,
0.39664098620414734,
1.3869383335113525,
3.4270753860473633,
0.24452999234199524,
0.24720510840415955,
-0.1744879186153412,
-0.946078896522522,
1.4846006631851196,
0.9120688438415527,
-0.024120260030031204,
-0.5795189142227173,
-1.120383620262146,
1.2475565671920776,
1.915841817855835,
0.9963542819023132,
0.015223033726215363,
-0.8434012532234192,
-0.6458560824394226,
-0.03267565369606018,
0.18411830067634583,
0.4415040910243988,
0.8989529013633728,
0.1008349284529686,
0.12129312008619308,
1.4668488502502441,
1.2032941579818726,
-0.3888782262802124,
0.36476024985313416,
-0.8380025625228882,
-0.5303474068641663,
0.5768553018569946,
0.3086581826210022,
0.028762027621269226,
0.3388540744781494,
-1.0849319696426392,
-0.24289733171463013,
-0.42498570680618286,
-0.9033302068710327,
-0.6679784655570984,
-0.35762202739715576,
-0.3213033378124237,
1.5924649238586426,
0.12029110640287399,
-0.44573020935058594,
-0.037821389734745026,
-0.7601403594017029,
-0.10244017094373703,
-1.1258379220962524,
0.33535850048065186,
-0.13563749194145203,
-0.11013605445623398,
-0.17721280455589294,
1.7757073640823364,
-0.871385395526886,
-2.0344183444976807,
0.22214245796203613,
0.23384729027748108,
-0.3083893060684204,
0.24851500988006592,
1.686158299446106,
0.59544438123703,
1.5010175704956055,
1.2608944177627563,
0.9248619079589844,
-0.6544227004051208,
-1.2282770872116089,
0.6360723972320557,
0.986006498336792,
-1.3542190790176392,
0.7488753199577332,
0.012877222150564194,
-0.5661768317222595,
0.6189256310462952,
1.2787823677062988,
0.5375686883926392,
-2.0221331119537354,
0.8458077907562256,
-0.9550440907478333,
0.7584002017974854,
0.6941232085227966,
0.7395200133323669,
0.1562444567680359,
0.8335605263710022,
-1.241246223449707,
-1.1163368225097656,
-0.761587917804718,
-0.6195270419120789,
2.015214443206787,
-0.3022715747356415,
0.5963888764381409,
-0.28738677501678467,
-1.2612820863723755,
-0.05157442390918732,
0.6570752859115601,
0.3359106481075287,
-0.4704159200191498,
0.7899217009544373,
-0.5853006839752197,
-1.1144002676010132,
-1.3528189659118652,
-0.39697206020355225,
-1.0566086769104004,
-0.954351007938385,
1.0600537061691284,
0.767394483089447,
0.33948424458503723,
1.8622924089431763,
0.6187126040458679,
0.19986340403556824,
-2.6460907459259033,
0.8788348436355591,
0.19551852345466614,
-0.07170431315898895,
0.9274893999099731,
0.3474824130535126,
1.0075278282165527,
0.05310094356536865,
0.48437556624412537,
-2.4648399353027344,
2.2469823360443115,
-0.21815574169158936,
0.7021933794021606,
-0.007108579855412245,
-0.14562761783599854,
1.1276706457138062,
0.6291566491127014,
0.4894804060459137,
-1.0437957048416138,
0.6004694104194641,
-0.5398514270782471,
1.2325166463851929,
0.8438796401023865,
-0.7776541113853455,
-0.07240825891494751,
1.358310341835022,
0.46131232380867004,
-0.4922979176044464,
-0.9600992798805237,
-0.9551652669906616,
0.9759443402290344,
1.7167209386825562,
-0.06961904466152191,
-0.01622990518808365,
0.7774577736854553,
0.710299015045166,
-1.248136043548584,
0.0044563645496964455,
-0.7692834138870239,
-0.7255606651306152,
1.643676519393921,
2.0851449966430664,
-0.10069700330495834,
-0.22186854481697083,
-0.6664098501205444,
-1.271634817123413,
0.874370813369751,
-0.09974316507577896,
0.23522475361824036,
0.66584312915802,
-0.6419430375099182,
1.0252481698989868,
0.8677664399147034,
0.9065879583358765,
0.22280395030975342,
0.2936079800128937,
0.4245559871196747,
-0.3072028160095215,
-1.1565033197402954,
-0.14561372995376587,
-1.0415719747543335,
-2.4965579509735107,
0.4478296935558319,
-0.24957039952278137,
-1.4351677894592285,
-0.012055616825819016,
-0.9966326355934143,
0.9458081126213074,
-0.5928037762641907,
-1.0922352075576782,
-1.5942037105560303,
0.20631206035614014,
-0.0014708638191223145,
1.063546061515808,
-1.5668715238571167,
-0.11768601089715958,
1.210175633430481,
0.8618178367614746,
-0.6559928059577942,
1.020843744277954,
0.24322140216827393,
1.014788031578064,
0.8279732465744019,
-0.33275529742240906,
0.5123640298843384,
0.03667416423559189,
-1.3593149185180664,
0.41174986958503723,
1.1306748390197754,
0.20366966724395752,
1.542462944984436,
-0.5426099896430969,
-0.0037234737537801266,
0.4326035678386688,
-0.5098817944526672,
-0.4265863299369812,
-0.47537311911582947,
0.6273728013038635,
0.015729958191514015,
-0.9168137311935425,
-0.031274084001779556,
-0.08485293388366699,
-0.22638773918151855,
0.24007675051689148,
-1.3958704471588135,
-0.10961726307868958,
-0.4389870762825012,
-0.5955228209495544,
-1.1837397813796997,
-0.10791847109794617,
1.407901406288147,
-0.8271116018295288,
-0.15771916508674622,
0.5083332061767578,
0.3053673505783081,
0.5442115664482117,
0.637263834476471,
-0.6498498916625977,
-0.3388445973396301,
-0.21855968236923218,
-0.36477985978126526,
0.3175356686115265,
1.3511898517608643,
-0.13851788640022278,
-0.9700294733047485,
0.7159382700920105,
-0.3006707429885864,
0.09462647885084152,
1.9452770948410034,
0.14200830459594727,
-0.7402203679084778,
0.30750927329063416,
-0.7388448119163513,
1.9300211668014526,
1.7474581003189087,
1.388160228729248,
-0.13590764999389648,
-0.9509080052375793,
0.5565077066421509,
-0.3195651173591614,
-0.4116079807281494,
0.7989718914031982,
0.43151140213012695,
-0.14327886700630188,
-1.4624208211898804,
0.7508576512336731,
1.2766242027282715,
-0.9104416370391846,
-0.8600000143051147,
0.18168339133262634,
-0.765913188457489,
1.0798795223236084,
0.6656060218811035,
0.3786947429180145,
0.2225925624370575,
1.619279146194458,
0.7488481402397156,
-0.4633110463619232,
0.5180628895759583,
0.5677290558815002,
-0.12863564491271973,
-2.1353037357330322,
-1.2162777185440063,
0.34304389357566833,
-0.5048778653144836,
-1.565703272819519,
1.3929849863052368,
-1.1059339046478271,
-1.0326515436172485,
0.5208579301834106,
0.11410442739725113,
1.4280372858047485,
0.3893294930458069,
1.6267987489700317,
2.0648815631866455,
0.8776146173477173,
0.34618839621543884,
1.2993015050888062,
-0.10747028142213821,
-0.5024893283843994,
1.7634724378585815,
-0.4732857644557953,
0.4670276939868927,
1.1366775035858154,
-0.2916770279407501,
-1.0939236879348755,
-0.7544878721237183,
-1.299233078956604,
-0.7903722524642944,
1.1380398273468018,
0.08339929580688477,
-1.0877598524093628,
0.21711793541908264,
1.5833771228790283,
0.13243287801742554,
-0.34685561060905457,
0.6428813338279724,
0.39685502648353577,
-0.8419749140739441,
-0.07328155636787415,
-0.8914099335670471,
0.5280966758728027,
-0.20360782742500305,
-0.3848489224910736,
0.28774869441986084,
0.492376446723938,
1.406530737876892,
-0.08013655990362167,
0.08529236167669296,
1.1774786710739136,
-1.385316014289856,
1.5420993566513062,
-0.6301039457321167,
0.2802114188671112,
-2.385852336883545,
1.3609814643859863,
-0.7503601312637329,
1.8935141563415527,
-2.729325532913208,
0.48008742928504944,
-0.567101240158081,
-0.3976106345653534,
0.26632365584373474,
-0.4221411347389221,
0.172879159450531,
-0.12070497125387192,
-1.1176445484161377,
-0.09046396613121033,
-0.6638361215591431,
0.639960527420044,
1.0713589191436768,
1.4127687215805054,
-1.2080382108688354,
-0.2801477015018463,
-1.7492530345916748,
-0.12165713310241699,
-0.7242316603660583,
0.33828645944595337,
-1.9606596231460571,
-0.17046678066253662,
-1.8703868389129639,
-2.3949174880981445,
-1.3392620086669922,
-0.7629436254501343,
1.0618603229522705,
0.10036804527044296,
-0.8388749361038208,
1.1963924169540405,
-0.40714970231056213,
-1.8622243404388428,
1.153509259223938,
-2.1768627166748047
] |
https://github.com/huggingface/datasets/issues/5669 | Almost identical datasets, huge performance difference | I updated the transform with the NumPy -> PyTorch conversion.
I'm sharing the entire code:
```python
import cv2
import numpy as np
import datasets
import torch
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
def transform(batch):
# # Pillow decodes as RGB
# batch["image"] = torch.stack([torch.from_numpy(cv2.cvtColor(cv2.imread(image_file_path), cv2.COLOR_BGR2RGB)) for image_file_path in batch["image_file_path"]])
batch["image"] = torch.stack([torch.from_numpy(cv2.imread(image_file_path)) for image_file_path in batch["image_file_path"]])
batch["labels"] = torch.tensor(batch["labels"])
return batch
dataset2 = dataset.cast_column("image", datasets.Image(decode=False)).with_transform(transform)
for x in DataLoader(dataset2, batch_size=16, shuffle=True, num_workers=8):
pass
```
This code is ≈ 10% faster on my machine than the default decoding with Pillow and `.with_format("torch")`. | ### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1 | 245 | 97 | Almost identical datasets, huge performance difference
### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1
I updated the transform with the NumPy -> PyTorch conversion.
I'm sharing the entire code:
```python
import cv2
import numpy as np
import datasets
import torch
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
def transform(batch):
# # Pillow decodes as RGB
# batch["image"] = torch.stack([torch.from_numpy(cv2.cvtColor(cv2.imread(image_file_path), cv2.COLOR_BGR2RGB)) for image_file_path in batch["image_file_path"]])
batch["image"] = torch.stack([torch.from_numpy(cv2.imread(image_file_path)) for image_file_path in batch["image_file_path"]])
batch["labels"] = torch.tensor(batch["labels"])
return batch
dataset2 = dataset.cast_column("image", datasets.Image(decode=False)).with_transform(transform)
for x in DataLoader(dataset2, batch_size=16, shuffle=True, num_workers=8):
pass
```
This code is ≈ 10% faster on my machine than the default decoding with Pillow and `.with_format("torch")`. | [
-1.338098168373108,
-0.906507134437561,
-0.7180567383766174,
1.4876413345336914,
-0.2365434616804123,
-1.1110848188400269,
0.20218726992607117,
-1.117380142211914,
1.6023941040039062,
-0.8640917539596558,
0.23477450013160706,
-1.6081305742263794,
0.02857484668493271,
-0.5121422410011292,
-0.7207914590835571,
-0.9643382430076599,
-0.4575381278991699,
-0.7276140451431274,
1.1271239519119263,
2.4258968830108643,
1.2213473320007324,
-1.3304446935653687,
2.728977918624878,
0.734210193157196,
-0.1844685673713684,
-1.058996319770813,
0.5119320750236511,
0.08126988261938095,
-1.3024482727050781,
-0.39298146963119507,
-0.9992477893829346,
-0.10131002217531204,
-0.4803665578365326,
-0.5233104228973389,
0.046293955296278,
0.3906483054161072,
-0.32857945561408997,
-0.49747827649116516,
-0.6003891825675964,
-0.6877895593643188,
0.4060747027397156,
-0.3997740149497986,
0.9473685026168823,
-0.3524598479270935,
1.823774814605713,
-0.6199997067451477,
0.5346193909645081,
0.7322211861610413,
1.2365175485610962,
0.27746346592903137,
-0.00924383569508791,
0.39138534665107727,
0.422695130109787,
-0.005023368168622255,
0.5499876737594604,
1.2236396074295044,
0.6829038858413696,
0.48151686787605286,
0.7503886818885803,
-2.221433162689209,
1.2693763971328735,
-1.0464975833892822,
0.36259424686431885,
1.4085546731948853,
-0.9946869015693665,
0.407462477684021,
-1.705412745475769,
-0.08591192960739136,
0.5733770132064819,
-2.2363786697387695,
0.32899147272109985,
-1.3643378019332886,
-0.5935874581336975,
1.1101983785629272,
0.450483500957489,
-1.1464210748672485,
0.10739048570394516,
-0.5059295296669006,
1.0443027019500732,
0.40691444277763367,
1.170619010925293,
-1.6722172498703003,
0.001874755136668682,
-0.2962363362312317,
0.11055697500705719,
-1.281503438949585,
-1.523174524307251,
0.5893204808235168,
0.6677552461624146,
0.5805726051330566,
-0.18307016789913177,
1.1201142072677612,
-1.1035897731781006,
0.7522773146629333,
-1.029104232788086,
-1.7025717496871948,
-1.410306692123413,
-2.2753593921661377,
-2.2613120079040527,
0.7267168164253235,
-0.41611865162849426,
-0.5876401662826538,
2.124483585357666,
-1.048401951789856,
-1.726945400238037,
1.1547446250915527,
0.17902390658855438,
-0.026784013956785202,
2.381183624267578,
0.27647125720977783,
-0.7061806321144104,
0.4175090491771698,
-0.763530433177948,
0.7969042062759399,
-0.28236451745033264,
1.2917335033416748,
0.3878479599952698,
-1.037540316581726,
1.578987956047058,
-0.2957632839679718,
0.5776874423027039,
-0.5806260108947754,
-0.41710880398750305,
-0.7200408577919006,
0.31118717789649963,
1.9488024711608887,
-0.3000175654888153,
1.5302081108093262,
-0.3293563723564148,
-1.612452507019043,
-1.616005301475525,
0.8520520329475403,
0.499930739402771,
-0.6861421465873718,
0.12868979573249817,
-0.3995518982410431,
0.10463134944438934,
-0.01969580352306366,
1.217637300491333,
1.3415002822875977,
0.7979772686958313,
-0.4178936779499054,
-0.8512053489685059,
0.14515137672424316,
-0.09688138216733932,
-0.7481335997581482,
-1.694968342781067,
-0.36036908626556396,
0.033223818987607956,
0.6254407167434692,
-1.2294973134994507,
1.7226440906524658,
0.8889424204826355,
1.7808514833450317,
0.976468026638031,
-0.363374263048172,
1.4389888048171997,
0.17396141588687897,
1.8243659734725952,
-0.4989502727985382,
0.6798057556152344,
-0.3086315095424652,
-1.179243803024292,
0.8091228604316711,
-0.3136511743068695,
-2.04207181930542,
-0.8521887063980103,
-0.7572813034057617,
-0.17696897685527802,
-0.8145875930786133,
0.8851914405822754,
-0.29318511486053467,
-1.517638087272644,
0.18693482875823975,
-0.7897439002990723,
0.1336512416601181,
-1.2409775257110596,
0.28460371494293213,
0.6994410157203674,
-0.6811908483505249,
0.07005853205919266,
-0.23692433536052704,
-1.2515485286712646,
-0.3867240250110626,
0.19860005378723145,
1.9055867195129395,
-0.7760066986083984,
0.9683119058609009,
1.1038711071014404,
-0.7460963726043701,
0.009834167547523975,
0.24285434186458588,
-0.2864905893802643,
0.8844555616378784,
-1.1199116706848145,
-0.45639869570732117,
1.1730883121490479,
-0.1583690047264099,
-0.5898998975753784,
1.5474368333816528,
0.6966460347175598,
-1.0388723611831665,
-0.2712145745754242,
-0.06423328071832657,
-0.8117392659187317,
0.009195717982947826,
-1.510933518409729,
-0.13801246881484985,
0.5199503898620605,
-1.5325424671173096,
-0.5012131333351135,
-0.213837131857872,
1.2855280637741089,
-0.21739110350608826,
1.5170873403549194,
-0.46074768900871277,
-0.22380976378917694,
-0.26599255204200745,
-0.28625810146331787,
0.1584414541721344,
-0.16302555799484253,
-0.6331937313079834,
0.14366169273853302,
-0.8205903768539429,
0.36643147468566895,
1.4360162019729614,
0.38472455739974976,
-0.004625958390533924,
0.5438942313194275,
1.0967334508895874,
0.40608200430870056,
-0.09298655390739441,
-0.8750174045562744,
-1.5620630979537964,
1.927812933921814,
-1.4081552028656006,
1.9892452955245972,
0.7830678820610046,
-0.049209482967853546,
-1.7719357013702393,
-1.8429478406906128,
1.3268134593963623,
1.1741100549697876,
2.416531801223755,
0.479119211435318,
0.40221917629241943,
-0.8425034284591675,
-0.7108991146087646,
0.2644878923892975,
-1.029205560684204,
-0.6549603343009949,
0.2614021301269531,
2.3675873279571533,
1.7919578552246094,
-0.39299488067626953,
-0.19069904088974,
-0.9818383455276489,
1.3437217473983765,
-0.2642832398414612,
0.20951557159423828,
1.9392179250717163,
-0.2484949827194214,
-1.0481517314910889,
1.348392128944397,
-2.293436288833618,
0.09942968189716339,
2.020386219024658,
0.2341693490743637,
-0.006252019666135311,
-1.3434158563613892,
-0.6151025891304016,
-0.3557890057563782,
-0.39210057258605957,
-1.2345136404037476,
0.47396695613861084,
-0.2628243863582611,
-0.7517381906509399,
-1.3549628257751465,
0.1546955406665802,
-1.0645232200622559,
-1.6389483213424683,
0.16226263344287872,
1.8604564666748047,
2.0122692584991455,
-0.8255630731582642,
1.512603759765625,
-0.3828081488609314,
0.11283706873655319,
1.156890630722046,
1.2359318733215332,
3.0918283462524414,
1.8668205738067627,
-1.3557270765304565,
0.6784259080886841,
-0.1518266797065735,
-0.4714653491973877,
1.188506841659546,
-1.2373263835906982,
1.306367039680481,
-0.07376795262098312,
-1.2547794580459595,
-1.2246335744857788,
1.0287678241729736,
0.46918249130249023,
0.09488137066364288,
-0.514295220375061,
1.2367169857025146,
0.016254473477602005,
1.3735305070877075,
0.554840624332428,
-0.33940523862838745,
0.707671046257019,
-0.4260753095149994,
-0.4222673177719116,
1.5397688150405884,
0.17155373096466064,
-1.404845952987671,
-2.1765706539154053,
-0.27542030811309814,
-0.8935272693634033,
0.0980994701385498,
-0.6041863560676575,
-0.9485995173454285,
1.7251330614089966,
0.37513625621795654,
-1.2295119762420654,
-0.3015384078025818,
-0.35025379061698914,
-0.6082471609115601,
2.7626850605010986,
-1.3228551149368286,
-0.1910245418548584,
-1.0291600227355957,
-0.7067952752113342,
1.6681158542633057,
-1.1336381435394287,
-0.2032560259103775,
-1.0134308338165283,
-0.5398715138435364,
-1.3157711029052734,
-0.6844398379325867,
0.08394551277160645,
-1.04049551486969,
0.8478635549545288,
0.07672098278999329,
-1.1455000638961792,
-0.28976142406463623,
-0.7843653559684753,
0.9922349452972412,
-0.16592854261398315,
0.14896070957183838,
1.8966110944747925,
0.37555792927742004,
-0.4104308485984802,
0.7590906620025635,
1.1731195449829102,
0.6978785991668701,
-0.6602285504341125,
0.16827580332756042,
-0.742251455783844,
0.21570082008838654,
-1.287713646888733,
0.1767197847366333,
-2.827888250350952,
0.5735750198364258,
-0.059819698333740234,
-0.02205589786171913,
0.026183243840932846,
-1.2119488716125488,
1.0274600982666016,
2.6067965030670166,
-1.1975332498550415,
0.42476335167884827,
0.3359508812427521,
1.1665951013565063,
-1.576281189918518,
0.31366509199142456,
-0.4539321959018707,
2.0127294063568115,
0.30764254927635193,
1.2693504095077515,
-0.47633668780326843,
-2.2238869667053223,
0.6798180937767029,
-1.2887505292892456,
-1.1730471849441528,
0.7983291745185852,
-0.892818808555603,
0.2184107005596161,
-1.374461054801941,
-0.33355385065078735,
-0.744369387626648,
-1.1314115524291992,
0.6333211660385132,
0.07841981202363968,
0.39144590497016907,
-0.5351319909095764,
0.41029056906700134,
-2.276667594909668,
-1.294721245765686,
-0.2682344615459442,
-0.9992684721946716,
0.4582546353340149,
-0.390523225069046,
0.6925122141838074,
-0.21420039236545563,
0.030455924570560455,
0.3849989175796509,
1.4418213367462158,
3.382209300994873,
0.27840885519981384,
0.21944281458854675,
-0.1546388864517212,
-0.9839218854904175,
1.4784363508224487,
0.9040014147758484,
-0.10347694158554077,
-0.5724277496337891,
-1.1377320289611816,
1.2190994024276733,
1.8539981842041016,
1.0174440145492554,
-0.002337248530238867,
-0.8643525242805481,
-0.7272360324859619,
-0.05164447799324989,
0.09778209030628204,
0.4260963797569275,
0.9108684659004211,
0.08974296599626541,
0.13540513813495636,
1.4828550815582275,
1.183531403541565,
-0.40949952602386475,
0.3255390524864197,
-0.8730315566062927,
-0.5438645482063293,
0.5636417865753174,
0.28663888573646545,
0.05363285541534424,
0.3021632134914398,
-1.1253222227096558,
-0.22382673621177673,
-0.44550108909606934,
-0.8936167359352112,
-0.7267618179321289,
-0.36608660221099854,
-0.3114117383956909,
1.5780088901519775,
0.11527073383331299,
-0.44923385977745056,
-0.08927801251411438,
-0.755663275718689,
-0.13290256261825562,
-1.0829052925109863,
0.3134145140647888,
-0.09778296947479248,
-0.163400337100029,
-0.15308235585689545,
1.768973469734192,
-0.9015103578567505,
-1.9916210174560547,
0.21816039085388184,
0.1974084973335266,
-0.20973367989063263,
0.2385910451412201,
1.6872901916503906,
0.6268849968910217,
1.4730327129364014,
1.2483822107315063,
0.918506383895874,
-0.6029496192932129,
-1.2585844993591309,
0.651343584060669,
0.9844819903373718,
-1.3594937324523926,
0.7461301684379578,
-0.06322481483221054,
-0.5499874353408813,
0.5921370387077332,
1.276124119758606,
0.5315183997154236,
-1.9967859983444214,
0.8165274262428284,
-0.9808756709098816,
0.7125071883201599,
0.664818525314331,
0.6894882917404175,
0.07603020966053009,
0.8049150109291077,
-1.188740611076355,
-1.149275779724121,
-0.7365844249725342,
-0.6035518050193787,
1.9896137714385986,
-0.33352407813072205,
0.6165733337402344,
-0.3226998746395111,
-1.2954657077789307,
-0.02686310186982155,
0.6446321606636047,
0.31308719515800476,
-0.48787248134613037,
0.8151696920394897,
-0.5883929133415222,
-1.1300243139266968,
-1.3744841814041138,
-0.39986109733581543,
-1.0744062662124634,
-0.9277715682983398,
1.027026891708374,
0.7220657467842102,
0.27642157673835754,
1.833936095237732,
0.652531087398529,
0.2623702883720398,
-2.6307625770568848,
0.918326199054718,
0.14252853393554688,
-0.058667175471782684,
0.8635393381118774,
0.28806450963020325,
0.9872739315032959,
-0.009474893100559711,
0.45077240467071533,
-2.4861645698547363,
2.2497823238372803,
-0.21020087599754333,
0.6829725503921509,
-0.03251729905605316,
-0.16701127588748932,
1.1533429622650146,
0.6874823570251465,
0.5380153059959412,
-1.0502127408981323,
0.5763065814971924,
-0.5341488122940063,
1.2334568500518799,
0.8417994379997253,
-0.7801084518432617,
-0.09657679498195648,
1.436226725578308,
0.44028380513191223,
-0.4964100122451782,
-0.9567915797233582,
-1.0279412269592285,
1.0249282121658325,
1.700111985206604,
-0.05138879641890526,
-0.03095664456486702,
0.8049579858779907,
0.711340606212616,
-1.2277218103408813,
0.008294650353491306,
-0.7553720474243164,
-0.6552268266677856,
1.6772642135620117,
2.1076509952545166,
-0.17684219777584076,
-0.27520668506622314,
-0.6549301743507385,
-1.282767415046692,
0.8515927195549011,
-0.11596022546291351,
0.24410657584667206,
0.7435309886932373,
-0.60953289270401,
1.0177593231201172,
0.8508124351501465,
0.9252495765686035,
0.26068544387817383,
0.248130664229393,
0.35585927963256836,
-0.29272687435150146,
-1.238033652305603,
-0.14169690012931824,
-0.962470293045044,
-2.47701096534729,
0.3971584737300873,
-0.21513642370700836,
-1.447437047958374,
0.04931243509054184,
-1.018609642982483,
0.9385993480682373,
-0.5943458676338196,
-1.123154640197754,
-1.601090908050537,
0.23350901901721954,
0.015810098499059677,
1.0581172704696655,
-1.5931531190872192,
-0.1318940967321396,
1.2315667867660522,
0.9045811295509338,
-0.6566175818443298,
1.0146647691726685,
0.21722367405891418,
1.0504204034805298,
0.7938465476036072,
-0.3659753203392029,
0.5320252776145935,
-0.006807299330830574,
-1.370663046836853,
0.40922799706459045,
1.10007643699646,
0.16892598569393158,
1.5586752891540527,
-0.5260398983955383,
-0.010128317400813103,
0.46603554487228394,
-0.6035381555557251,
-0.41169920563697815,
-0.4705422520637512,
0.6415418982505798,
-0.07341735064983368,
-0.8899632096290588,
-0.04431670531630516,
-0.030668843537569046,
-0.28359001874923706,
0.22316937148571014,
-1.4106669425964355,
-0.09848663955926895,
-0.41097769141197205,
-0.6815517544746399,
-1.1699062585830688,
-0.07054674625396729,
1.391539216041565,
-0.9204648733139038,
-0.14910843968391418,
0.4621484875679016,
0.25275397300720215,
0.5211139917373657,
0.6152440905570984,
-0.6782492399215698,
-0.2720658779144287,
-0.17733880877494812,
-0.32043692469596863,
0.3469865024089813,
1.3865087032318115,
-0.13367825746536255,
-0.9484160542488098,
0.7075895667076111,
-0.26318153738975525,
0.11070282757282257,
1.9184129238128662,
0.12852567434310913,
-0.731010913848877,
0.3170366585254669,
-0.7465023398399353,
1.9239448308944702,
1.7373569011688232,
1.3939447402954102,
-0.13551373779773712,
-0.9444735050201416,
0.544499397277832,
-0.34469977021217346,
-0.3828824460506439,
0.7922600507736206,
0.3990812599658966,
-0.13616669178009033,
-1.436440110206604,
0.8449221253395081,
1.2829481363296509,
-0.8817646503448486,
-0.8531280755996704,
0.20395655930042267,
-0.7953025102615356,
1.107810378074646,
0.693606436252594,
0.3546214997768402,
0.2219138741493225,
1.6341965198516846,
0.8192904591560364,
-0.4429044723510742,
0.5677564144134521,
0.579466700553894,
-0.09612917900085449,
-2.1402978897094727,
-1.1097573041915894,
0.3530599772930145,
-0.5274680852890015,
-1.5893715620040894,
1.3984525203704834,
-1.1149426698684692,
-1.0168167352676392,
0.5436751842498779,
0.13965386152267456,
1.4241963624954224,
0.38824841380119324,
1.59671950340271,
2.076021194458008,
0.8716110587120056,
0.37366917729377747,
1.2492129802703857,
-0.10257943719625473,
-0.4949752390384674,
1.7540605068206787,
-0.49388450384140015,
0.4691164493560791,
1.076092004776001,
-0.28312546014785767,
-1.1299175024032593,
-0.736227810382843,
-1.3192994594573975,
-0.7997258305549622,
1.1152546405792236,
0.09601977467536926,
-1.0590400695800781,
0.17936435341835022,
1.4770258665084839,
0.1528695970773697,
-0.3200990557670593,
0.7033697366714478,
0.38523733615875244,
-0.8276672959327698,
-0.06685633957386017,
-0.800707995891571,
0.5254744291305542,
-0.18518215417861938,
-0.3499085009098053,
0.2874770164489746,
0.4916495084762573,
1.409250020980835,
-0.04612955078482628,
0.057211242616176605,
1.1368399858474731,
-1.431412935256958,
1.6093534231185913,
-0.651769757270813,
0.2995113730430603,
-2.4104692935943604,
1.316188931465149,
-0.8405684232711792,
1.8695547580718994,
-2.723179817199707,
0.506860613822937,
-0.5544254183769226,
-0.454807847738266,
0.24726252257823944,
-0.43922150135040283,
0.12831933796405792,
-0.05538924038410187,
-1.1673436164855957,
-0.062031958252191544,
-0.6867106556892395,
0.6762471199035645,
1.0772448778152466,
1.4303326606750488,
-1.2881839275360107,
-0.2919815182685852,
-1.732393741607666,
-0.10508551448583603,
-0.7668251991271973,
0.4048924446105957,
-1.9586296081542969,
-0.1878093183040619,
-1.8613007068634033,
-2.4067161083221436,
-1.2994098663330078,
-0.7700488567352295,
1.0869091749191284,
0.1180172711610794,
-0.8488682508468628,
1.2564523220062256,
-0.4078766703605652,
-1.9127559661865234,
1.1791561841964722,
-2.199573516845703
] |
https://github.com/huggingface/datasets/issues/5669 | Almost identical datasets, huge performance difference | Thanks, @mariosasko
My question remain unanswered though. Why is the `map`ed dataset so slow? My understanding is that a dataset of numpy arrays should be must faster than a dataset that has to decode images into numpy arrays every time one accesses an item. | ### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1 | 245 | 44 | Almost identical datasets, huge performance difference
### Describe the bug
I am struggling to understand (huge) performance difference between two datasets that are almost identical.
### Steps to reproduce the bug
# Fast (normal) dataset speed:
```python
import cv2
from datasets import load_dataset
from torch.utils.data import DataLoader
dataset = load_dataset("beans", split="train")
for x in DataLoader(dataset.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
The above pass over the dataset takes about 1.5 seconds on my computer.
However, if I re-create (almost) the same dataset, the sweep takes HUGE amount of time: 15 minutes. Steps to reproduce:
```python
def transform(example):
example["image2"] = cv2.imread(example["image_file_path"])
return example
dataset2 = dataset.map(transform, remove_columns=["image"])
for x in DataLoader(dataset2.with_format("torch"), batch_size=16, shuffle=True, num_workers=8):
pass
```
### Expected behavior
Same timings
### Environment info
python==3.10.9
datasets==2.10.1
Thanks, @mariosasko
My question remain unanswered though. Why is the `map`ed dataset so slow? My understanding is that a dataset of numpy arrays should be must faster than a dataset that has to decode images into numpy arrays every time one accesses an item. | [
-1.2630409002304077,
-0.9079484939575195,
-0.7374643683433533,
1.460392713546753,
-0.2205681949853897,
-1.1049208641052246,
0.1891547292470932,
-1.0973180532455444,
1.6455316543579102,
-0.8696475028991699,
0.2455509603023529,
-1.6417419910430908,
-0.01931416243314743,
-0.5470277667045593,
-0.7135880589485168,
-0.942783772945404,
-0.4749899208545685,
-0.7297905087471008,
1.0913807153701782,
2.5022475719451904,
1.1934014558792114,
-1.3360224962234497,
2.6764469146728516,
0.7213363647460938,
-0.19638380408287048,
-1.016423225402832,
0.5385686755180359,
0.08280216157436371,
-1.248165249824524,
-0.41724252700805664,
-0.9584312438964844,
-0.10458312183618546,
-0.5166991353034973,
-0.5446178913116455,
0.030637748539447784,
0.4023821949958801,
-0.33562806248664856,
-0.49424755573272705,
-0.5570218563079834,
-0.7159444689750671,
0.41583311557769775,
-0.39768534898757935,
0.9504327774047852,
-0.38213053345680237,
1.8811075687408447,
-0.6032079458236694,
0.4954606890678406,
0.7229570746421814,
1.2546889781951904,
0.266802579164505,
-0.003300345502793789,
0.35443314909935,
0.43489545583724976,
-0.01570916920900345,
0.5294733643531799,
1.1810250282287598,
0.6796043515205383,
0.490894079208374,
0.7567379474639893,
-2.2014777660369873,
1.2872405052185059,
-1.0717923641204834,
0.3550410568714142,
1.4195419549942017,
-0.9841668605804443,
0.40942636132240295,
-1.7221870422363281,
-0.0898190513253212,
0.5625641345977783,
-2.2526252269744873,
0.29503345489501953,
-1.3070756196975708,
-0.5806878805160522,
1.0994170904159546,
0.41685056686401367,
-1.2038774490356445,
0.11749956756830215,
-0.46325698494911194,
1.044637680053711,
0.42813941836357117,
1.1895335912704468,
-1.7066395282745361,
-0.012360915541648865,
-0.345184862613678,
0.06847836822271347,
-1.360669732093811,
-1.4726897478103638,
0.5432354211807251,
0.6448789834976196,
0.5571145415306091,
-0.16085994243621826,
1.0756176710128784,
-1.0574156045913696,
0.7100302577018738,
-1.034422755241394,
-1.6978808641433716,
-1.4149645566940308,
-2.2650668621063232,
-2.339416265487671,
0.7379269003868103,
-0.38155075907707214,
-0.5646324753761292,
2.1014466285705566,
-1.0157948732376099,
-1.7375348806381226,
1.1368865966796875,
0.22609052062034607,
-0.08838610351085663,
2.4251344203948975,
0.28424227237701416,
-0.7123725414276123,
0.39208176732063293,
-0.783357560634613,
0.7883299589157104,
-0.3015974760055542,
1.3677864074707031,
0.4187985956668854,
-1.1188886165618896,
1.5864107608795166,
-0.3323623538017273,
0.5671991109848022,
-0.6139441728591919,
-0.4679930508136749,
-0.7465808987617493,
0.2875683009624481,
1.9277591705322266,
-0.3031085431575775,
1.5604488849639893,
-0.33448031544685364,
-1.600904941558838,
-1.6046487092971802,
0.885891318321228,
0.45281559228897095,
-0.7006108164787292,
0.1622011959552765,
-0.3760962188243866,
0.09167110174894333,
-0.00412517786026001,
1.1931296586990356,
1.281014323234558,
0.7715356945991516,
-0.39815396070480347,
-0.8740211725234985,
0.1614333689212799,
-0.10803547501564026,
-0.7146136164665222,
-1.6996023654937744,
-0.4289971590042114,
0.03190990537405014,
0.5689540505409241,
-1.279714584350586,
1.7221366167068481,
0.910115659236908,
1.7620607614517212,
1.0076463222503662,
-0.3472708463668823,
1.4253038167953491,
0.12102005630731583,
1.829108715057373,
-0.46498680114746094,
0.6972842812538147,
-0.3276406526565552,
-1.1874442100524902,
0.7873270511627197,
-0.35079526901245117,
-2.064321517944336,
-0.8955971002578735,
-0.7887572646141052,
-0.17255069315433502,
-0.823035478591919,
0.8855200409889221,
-0.2802174985408783,
-1.4448755979537964,
0.21424148976802826,
-0.730246365070343,
0.13729524612426758,
-1.2802377939224243,
0.36967146396636963,
0.6992648839950562,
-0.6623141169548035,
0.05678872391581535,
-0.26026439666748047,
-1.2320942878723145,
-0.37942519783973694,
0.16336952149868011,
1.9279532432556152,
-0.7994338274002075,
0.9683788418769836,
1.049468994140625,
-0.7657909989356995,
0.006956278346478939,
0.2614514231681824,
-0.31895413994789124,
0.8856405019760132,
-1.0453088283538818,
-0.45271533727645874,
1.207448124885559,
-0.1493978649377823,
-0.615007758140564,
1.5527828931808472,
0.6880682706832886,
-1.0011626482009888,
-0.2514253854751587,
-0.1246548444032669,
-0.7908539772033691,
0.03644317016005516,
-1.5272459983825684,
-0.11783353984355927,
0.45215362310409546,
-1.5020779371261597,
-0.5036620497703552,
-0.2025694102048874,
1.315659523010254,
-0.23109833896160126,
1.4619203805923462,
-0.47163620591163635,
-0.23490045964717865,
-0.360616534948349,
-0.318963885307312,
0.15260407328605652,
-0.13256123661994934,
-0.636832594871521,
0.1970437616109848,
-0.8200268149375916,
0.37057921290397644,
1.399366021156311,
0.4201746881008148,
-0.0256093367934227,
0.5601929426193237,
1.077217698097229,
0.4003708064556122,
-0.11105331033468246,
-0.8525023460388184,
-1.5536400079727173,
1.9348506927490234,
-1.4219499826431274,
1.9613300561904907,
0.7748385667800903,
-0.029184576123952866,
-1.774490475654602,
-1.8242337703704834,
1.3360555171966553,
1.237138032913208,
2.413153648376465,
0.527518630027771,
0.39545777440071106,
-0.8385615348815918,
-0.7170536518096924,
0.24799492955207825,
-1.0684114694595337,
-0.6515786051750183,
0.26209837198257446,
2.381531238555908,
1.7600631713867188,
-0.4343007504940033,
-0.18052318692207336,
-1.0620583295822144,
1.3270447254180908,
-0.20915637910366058,
0.1759287714958191,
1.951347827911377,
-0.31324270367622375,
-1.0968971252441406,
1.2846205234527588,
-2.32639741897583,
0.0574185885488987,
1.966728687286377,
0.26521384716033936,
0.02298155426979065,
-1.3515281677246094,
-0.645098865032196,
-0.3496159315109253,
-0.41298148036003113,
-1.237894892692566,
0.4791730046272278,
-0.1911674588918686,
-0.7328713536262512,
-1.396826148033142,
0.14234696328639984,
-1.1158723831176758,
-1.6089982986450195,
0.16196385025978088,
1.8191496133804321,
2.007347822189331,
-0.8207107782363892,
1.5282334089279175,
-0.34517702460289,
0.14280690252780914,
1.1773241758346558,
1.2343738079071045,
3.1048710346221924,
1.8690526485443115,
-1.340008020401001,
0.6895822286605835,
-0.11005263030529022,
-0.5020400285720825,
1.2206041812896729,
-1.1961228847503662,
1.3380857706069946,
-0.12873607873916626,
-1.2216861248016357,
-1.273179054260254,
0.9871251583099365,
0.48676684498786926,
0.08048702776432037,
-0.5296851396560669,
1.2394369840621948,
0.02127758041024208,
1.394686222076416,
0.522473931312561,
-0.3372165560722351,
0.7126701474189758,
-0.47081756591796875,
-0.44650503993034363,
1.571346640586853,
0.2201147973537445,
-1.3839820623397827,
-2.2426013946533203,
-0.2807503938674927,
-0.874262809753418,
0.06906962394714355,
-0.6091278195381165,
-0.9418760538101196,
1.7202694416046143,
0.4079624116420746,
-1.2476357221603394,
-0.30864569544792175,
-0.3342536985874176,
-0.634006679058075,
2.783616065979004,
-1.364910364151001,
-0.19439207017421722,
-0.9725970029830933,
-0.7234117984771729,
1.6677683591842651,
-1.1484841108322144,
-0.1904740333557129,
-1.0097315311431885,
-0.5803044438362122,
-1.3326653242111206,
-0.6715710163116455,
0.03390955924987793,
-1.027061104774475,
0.8567451238632202,
0.09644883126020432,
-1.0984705686569214,
-0.2960427403450012,
-0.8238661885261536,
0.9593577980995178,
-0.16871261596679688,
0.18411469459533691,
1.8505302667617798,
0.4485527276992798,
-0.41233786940574646,
0.7241877913475037,
1.1817691326141357,
0.6777939200401306,
-0.6953736543655396,
0.20661833882331848,
-0.7814227938652039,
0.2020597606897354,
-1.2518304586410522,
0.17271924018859863,
-2.838613510131836,
0.5472293496131897,
-0.07538703829050064,
-0.02791241928935051,
0.04659407213330269,
-1.2012768983840942,
1.047871470451355,
2.574037551879883,
-1.1942408084869385,
0.40710487961769104,
0.3159111440181732,
1.1848621368408203,
-1.5987015962600708,
0.3217827379703522,
-0.46415916085243225,
2.015660524368286,
0.3086351156234741,
1.2015347480773926,
-0.4975692927837372,
-2.2117271423339844,
0.6100690364837646,
-1.3080215454101562,
-1.2153160572052002,
0.8248515725135803,
-0.8725439310073853,
0.16730743646621704,
-1.3806853294372559,
-0.2929566502571106,
-0.7121425271034241,
-1.1521110534667969,
0.6973163485527039,
0.09835726022720337,
0.4278680384159088,
-0.5082544684410095,
0.4237215518951416,
-2.2462055683135986,
-1.279128074645996,
-0.31263166666030884,
-0.9799544811248779,
0.4262179136276245,
-0.33800050616264343,
0.7073879837989807,
-0.2126694619655609,
0.03742128610610962,
0.3962309658527374,
1.3957858085632324,
3.375755786895752,
0.28976649045944214,
0.2985333502292633,
-0.13010382652282715,
-0.9953445792198181,
1.4909390211105347,
0.9136989712715149,
-0.05767306312918663,
-0.562803328037262,
-1.1168333292007446,
1.2134889364242554,
1.8166805505752563,
1.0557339191436768,
-0.011789461597800255,
-0.8250336050987244,
-0.6877764463424683,
-0.08941937237977982,
0.1494625210762024,
0.42028316855430603,
0.847907304763794,
0.05353373661637306,
0.14929795265197754,
1.4603933095932007,
1.2286125421524048,
-0.4290938675403595,
0.3541737198829651,
-0.8312998414039612,
-0.5444879531860352,
0.5738675594329834,
0.284279465675354,
0.04346858337521553,
0.3418230712413788,
-1.0842351913452148,
-0.2496899664402008,
-0.4279173016548157,
-0.9315166473388672,
-0.6950490474700928,
-0.39953458309173584,
-0.363125205039978,
1.6088916063308716,
0.08553316444158554,
-0.4432782828807831,
-0.07541434466838837,
-0.8124068379402161,
-0.11850964277982712,
-1.1315349340438843,
0.32642075419425964,
-0.08218435198068619,
-0.13632246851921082,
-0.1460544615983963,
1.8062598705291748,
-0.9085359573364258,
-2.0422825813293457,
0.24210301041603088,
0.24340152740478516,
-0.2388218343257904,
0.22195285558700562,
1.6345720291137695,
0.6065271496772766,
1.492552638053894,
1.247099757194519,
0.9775638580322266,
-0.6186476945877075,
-1.2972928285598755,
0.6723609566688538,
1.007149577140808,
-1.3491861820220947,
0.8085268139839172,
0.00028729066252708435,
-0.5365086793899536,
0.5866758823394775,
1.191935658454895,
0.49971288442611694,
-1.9621562957763672,
0.7744811177253723,
-0.9542431235313416,
0.725233793258667,
0.6878256797790527,
0.7103525996208191,
0.10641025006771088,
0.7899892330169678,
-1.181933879852295,
-1.13358473777771,
-0.7336092591285706,
-0.5864745378494263,
2.0229713916778564,
-0.28793710470199585,
0.6096700429916382,
-0.28939634561538696,
-1.3163505792617798,
0.011840843595564365,
0.678264319896698,
0.318827360868454,
-0.5030288696289062,
0.827150821685791,
-0.5725050568580627,
-1.1085494756698608,
-1.3966714143753052,
-0.3636435568332672,
-1.091261625289917,
-0.932202935218811,
1.074187994003296,
0.7470603585243225,
0.24954232573509216,
1.8105770349502563,
0.6188899874687195,
0.2777823209762573,
-2.6675808429718018,
0.8986300230026245,
0.16305583715438843,
-0.06424219906330109,
0.8161714673042297,
0.32076406478881836,
0.989799976348877,
0.003970098681747913,
0.48628687858581543,
-2.493705987930298,
2.252122640609741,
-0.20451726019382477,
0.656060516834259,
0.025750216096639633,
-0.17058224976062775,
1.1147292852401733,
0.6465858817100525,
0.5336751937866211,
-1.0478073358535767,
0.5798901915550232,
-0.5372482538223267,
1.2292659282684326,
0.9116464257240295,
-0.8179252743721008,
-0.077882781624794,
1.412918210029602,
0.48139849305152893,
-0.43797731399536133,
-0.9281525611877441,
-0.9974660277366638,
1.0298463106155396,
1.6852176189422607,
-0.07611358165740967,
-0.03332439437508583,
0.8522023558616638,
0.6972375512123108,
-1.2795051336288452,
0.05481025204062462,
-0.770970344543457,
-0.6845590472221375,
1.64569890499115,
2.102790594100952,
-0.1509110927581787,
-0.25850820541381836,
-0.6831527352333069,
-1.253537893295288,
0.8675237894058228,
-0.0593697652220726,
0.22746582329273224,
0.7270892858505249,
-0.6381460428237915,
1.0039043426513672,
0.9218214154243469,
0.8824450969696045,
0.28355392813682556,
0.2524385154247284,
0.3824314773082733,
-0.25480905175209045,
-1.2096662521362305,
-0.10023420304059982,
-0.9661867618560791,
-2.556457281112671,
0.4263994097709656,
-0.24755547940731049,
-1.3961396217346191,
0.0023149922490119934,
-1.0184575319290161,
0.9551262855529785,
-0.5919630527496338,
-1.0890179872512817,
-1.6610126495361328,
0.23408067226409912,
-0.003243615385144949,
1.0196903944015503,
-1.6127402782440186,
-0.10030253231525421,
1.240916132926941,
0.8692368268966675,
-0.6623533368110657,
1.0271821022033691,
0.27499330043792725,
1.0407544374465942,
0.8251827359199524,
-0.35081303119659424,
0.5638689398765564,
0.013066339306533337,
-1.4158867597579956,
0.411390095949173,
1.1035701036453247,
0.19875633716583252,
1.5233396291732788,
-0.6033244132995605,
-0.04845527559518814,
0.4128456115722656,
-0.5240177512168884,
-0.4223613142967224,
-0.49087944626808167,
0.6536138653755188,
0.03068043291568756,
-0.8926905393600464,
0.008668356575071812,
-0.03964690864086151,
-0.2138192355632782,
0.2374134510755539,
-1.3932524919509888,
-0.1309022158384323,
-0.41424864530563354,
-0.6646958589553833,
-1.195603609085083,
-0.09615014493465424,
1.384277105331421,
-0.8718799948692322,
-0.14719872176647186,
0.4886036813259125,
0.27427664399147034,
0.5442988872528076,
0.6264166831970215,
-0.6545607447624207,
-0.28648892045021057,
-0.20563632249832153,
-0.35128507018089294,
0.338976114988327,
1.4120899438858032,
-0.14463865756988525,
-0.9444270730018616,
0.7352824807167053,
-0.24836277961730957,
0.15335668623447418,
1.9560908079147339,
0.1558854728937149,
-0.7962067127227783,
0.281049907207489,
-0.7766348123550415,
1.8874322175979614,
1.7200708389282227,
1.4409846067428589,
-0.10174806416034698,
-0.9262299537658691,
0.560799241065979,
-0.32475578784942627,
-0.38919273018836975,
0.8333108425140381,
0.44109615683555603,
-0.15667501091957092,
-1.4103436470031738,
0.7909513711929321,
1.3054897785186768,
-0.8566455841064453,
-0.852303683757782,
0.2170686274766922,
-0.8195807933807373,
1.0974003076553345,
0.6642355918884277,
0.35869067907333374,
0.21280041337013245,
1.6183971166610718,
0.7495712637901306,
-0.43728122115135193,
0.5139025449752808,
0.5664252042770386,
-0.1133757159113884,
-2.084070920944214,
-1.131919026374817,
0.3620666563510895,
-0.5195502042770386,
-1.566065788269043,
1.3921875953674316,
-1.1180453300476074,
-0.9841278791427612,
0.5666141510009766,
0.13190676271915436,
1.4791918992996216,
0.37828323245048523,
1.574277639389038,
2.0722062587738037,
0.8736512660980225,
0.33890029788017273,
1.265105128288269,
-0.10146098583936691,
-0.43163901567459106,
1.7240670919418335,
-0.44631344079971313,
0.41012370586395264,
1.078893780708313,
-0.2366965115070343,
-1.1056139469146729,
-0.7219992280006409,
-1.297767996788025,
-0.7660653591156006,
1.1619999408721924,
0.1335989534854889,
-1.0784443616867065,
0.20006226003170013,
1.5260217189788818,
0.08770431578159332,
-0.3523949682712555,
0.6707706451416016,
0.3849807381629944,
-0.8191856145858765,
-0.023806117475032806,
-0.8812815546989441,
0.4851253032684326,
-0.15501493215560913,
-0.313606321811676,
0.28809401392936707,
0.48507803678512573,
1.3875932693481445,
0.0018169227987527847,
0.11606913059949875,
1.17318594455719,
-1.3744465112686157,
1.586364507675171,
-0.644912600517273,
0.2585919499397278,
-2.345444440841675,
1.3868595361709595,
-0.7917599081993103,
1.8425705432891846,
-2.700418472290039,
0.5024946331977844,
-0.5611069798469543,
-0.4499145746231079,
0.2734411954879761,
-0.47722819447517395,
0.1431550234556198,
-0.12477314472198486,
-1.1616524457931519,
-0.06909708678722382,
-0.6857231259346008,
0.6427003145217896,
1.063563585281372,
1.3734135627746582,
-1.2673625946044922,
-0.37548279762268066,
-1.7265350818634033,
-0.12947507202625275,
-0.7462229132652283,
0.37184619903564453,
-1.9466434717178345,
-0.21789191663265228,
-1.835411548614502,
-2.4281394481658936,
-1.2993874549865723,
-0.7631996273994446,
1.1276665925979614,
0.12033111602067947,
-0.8835306167602539,
1.2300679683685303,
-0.40552863478660583,
-1.9266735315322876,
1.1972134113311768,
-2.1771936416625977
] |
https://github.com/huggingface/datasets/issues/5660 | integration with imbalanced-learn | You can convert any dataset to pandas to be used with imbalanced-learn using `.to_pandas()`
Otherwise if you want to keep a `Dataset` object and still use e.g. [make_imbalance](https://imbalanced-learn.org/stable/references/generated/imblearn.datasets.make_imbalance.html#imblearn.datasets.make_imbalance), you just need to pass the list of rows ids and labels:
```python
row_indices = list(range(len(dataset)))
resampled_row_indices, _ = make_imbalance(
row_indices,
dataset["label"],
sampling_strategy={0: 25, 1: 50, 2: 50},
random_state=RANDOM_STATE,
)
resampled_dataset = dataset.select(resampled_row_indices)
``` | ### Feature request
Wouldn't it be great if the various class balancing operations from imbalanced-learn were available as part of datasets?
### Motivation
I'm trying to use imbalanced-learn to balance a dataset, but it's not clear how to get the two to interoperate - what would be great would be some examples. I've looked online, asked gpt-4, but so far not making much progress.
### Your contribution
If I can get this working myself I can submit a PR with example code to go in the docs | 246 | 62 | integration with imbalanced-learn
### Feature request
Wouldn't it be great if the various class balancing operations from imbalanced-learn were available as part of datasets?
### Motivation
I'm trying to use imbalanced-learn to balance a dataset, but it's not clear how to get the two to interoperate - what would be great would be some examples. I've looked online, asked gpt-4, but so far not making much progress.
### Your contribution
If I can get this working myself I can submit a PR with example code to go in the docs
You can convert any dataset to pandas to be used with imbalanced-learn using `.to_pandas()`
Otherwise if you want to keep a `Dataset` object and still use e.g. [make_imbalance](https://imbalanced-learn.org/stable/references/generated/imblearn.datasets.make_imbalance.html#imblearn.datasets.make_imbalance), you just need to pass the list of rows ids and labels:
```python
row_indices = list(range(len(dataset)))
resampled_row_indices, _ = make_imbalance(
row_indices,
dataset["label"],
sampling_strategy={0: 25, 1: 50, 2: 50},
random_state=RANDOM_STATE,
)
resampled_dataset = dataset.select(resampled_row_indices)
``` | [
-1.1699535846710205,
-0.8575047850608826,
-0.7682592272758484,
1.4321824312210083,
-0.14006513357162476,
-1.2048649787902832,
0.09599628299474716,
-1.0341155529022217,
1.6306167840957642,
-0.7840352654457092,
0.2635928690433502,
-1.6465986967086792,
0.09168066829442978,
-0.6755579710006714,
-0.725897490978241,
-0.863519549369812,
-0.4438543915748596,
-0.7017596364021301,
1.0411615371704102,
2.5769686698913574,
1.1476268768310547,
-1.4353383779525757,
2.7329983711242676,
0.7430734634399414,
-0.123747818171978,
-1.0145004987716675,
0.5730471014976501,
0.052304066717624664,
-1.259839653968811,
-0.47063538432121277,
-0.8899461030960083,
-0.03735331445932388,
-0.6067634224891663,
-0.47107911109924316,
-0.08203572034835815,
0.46352681517601013,
-0.2503237724304199,
-0.3379769027233124,
-0.5753012299537659,
-0.8341323137283325,
0.4790697693824768,
-0.4184769093990326,
0.9510529041290283,
-0.3759777843952179,
1.8214956521987915,
-0.5440955758094788,
0.49114152789115906,
0.7253891229629517,
1.2806822061538696,
0.2613241374492645,
0.013485407456755638,
0.43212541937828064,
0.3264468312263489,
-0.03218672424554825,
0.5594978332519531,
1.1286625862121582,
0.653218686580658,
0.4991031587123871,
0.6032240986824036,
-2.293858051300049,
1.284623384475708,
-1.1064952611923218,
0.28849345445632935,
1.329016089439392,
-0.9352154731750488,
0.4185854494571686,
-1.7207388877868652,
-0.1087387353181839,
0.6651787161827087,
-2.302281379699707,
0.2361842840909958,
-1.2812490463256836,
-0.5574951171875,
1.0074018239974976,
0.4310350716114044,
-1.2053570747375488,
0.13962464034557343,
-0.4386614263057709,
1.0277044773101807,
0.4444674551486969,
1.0818846225738525,
-1.6641322374343872,
0.09068180620670319,
-0.2720836400985718,
0.0468437597155571,
-1.3749369382858276,
-1.5244429111480713,
0.5745962858200073,
0.5981179475784302,
0.6155918836593628,
-0.06742554157972336,
0.977226734161377,
-1.072872519493103,
0.7895253896713257,
-0.9681253433227539,
-1.7228795289993286,
-1.4040404558181763,
-2.3501052856445312,
-2.2890405654907227,
0.7601525783538818,
-0.4010457694530487,
-0.5520219802856445,
2.071040391921997,
-0.9977167248725891,
-1.6816238164901733,
1.1655261516571045,
0.26082152128219604,
-0.02791532129049301,
2.43546724319458,
0.16182495653629303,
-0.7480764985084534,
0.4086761176586151,
-0.7921740412712097,
0.8490812182426453,
-0.4485916793346405,
1.3204997777938843,
0.4524635970592499,
-1.0721782445907593,
1.618354082107544,
-0.4521716237068176,
0.5395650267601013,
-0.6567192673683167,
-0.5329475998878479,
-0.7785357236862183,
0.33004048466682434,
1.9211751222610474,
-0.24278774857521057,
1.5982528924942017,
-0.3122835159301758,
-1.5382108688354492,
-1.5626065731048584,
0.9162344336509705,
0.4300975501537323,
-0.8544130325317383,
0.09034647792577744,
-0.46965834498405457,
0.17559099197387695,
-0.13243044912815094,
1.1521064043045044,
1.262251377105713,
0.654482901096344,
-0.3576228618621826,
-0.862518846988678,
0.13933974504470825,
-0.1073366031050682,
-0.6745386123657227,
-1.818593978881836,
-0.31914180517196655,
0.0791989341378212,
0.6089914441108704,
-1.159517526626587,
1.790533423423767,
0.9372199177742004,
1.9078768491744995,
1.043006181716919,
-0.33109283447265625,
1.4783787727355957,
0.04938667267560959,
1.9321084022521973,
-0.46325093507766724,
0.6920583248138428,
-0.3545825779438019,
-1.1144143342971802,
0.9017638564109802,
-0.4354924261569977,
-2.1171698570251465,
-0.7465341091156006,
-0.8198915123939514,
-0.22265341877937317,
-0.7024862766265869,
0.9697383642196655,
-0.25242385268211365,
-1.3710598945617676,
0.2170441746711731,
-0.7338297963142395,
0.1335841417312622,
-1.212993860244751,
0.3148796260356903,
0.774321436882019,
-0.6324059963226318,
0.04794510453939438,
-0.26908719539642334,
-1.3206117153167725,
-0.4831005930900574,
0.4111318588256836,
1.8447887897491455,
-0.7384259700775146,
0.877713680267334,
1.0167580842971802,
-0.7238151431083679,
-0.05738455057144165,
0.3538106381893158,
-0.26142629981040955,
0.8553037643432617,
-1.0468884706497192,
-0.42519548535346985,
1.1768651008605957,
-0.2818153500556946,
-0.6159164309501648,
1.4650814533233643,
0.778921365737915,
-0.9608874320983887,
-0.1863197535276413,
-0.16609637439250946,
-0.9178867340087891,
0.10499682277441025,
-1.6100311279296875,
-0.10259979218244553,
0.4370797574520111,
-1.5404925346374512,
-0.4255605638027191,
-0.12698456645011902,
1.3116415739059448,
-0.15891890227794647,
1.4123375415802002,
-0.3857855796813965,
-0.07933878153562546,
-0.36959871649742126,
-0.48255881667137146,
0.1964888870716095,
-0.15637506544589996,
-0.5103361010551453,
0.19158697128295898,
-0.7509819865226746,
0.3478526473045349,
1.3813986778259277,
0.33678871393203735,
0.05678686499595642,
0.5421953201293945,
1.0912120342254639,
0.3076751232147217,
-0.05529100447893143,
-0.7702131271362305,
-1.6041184663772583,
2.015475273132324,
-1.4160012006759644,
2.024712324142456,
0.8019880652427673,
-0.0735326036810875,
-1.8154008388519287,
-1.852306842803955,
1.3477330207824707,
1.0754865407943726,
2.3127148151397705,
0.5151112079620361,
0.41711321473121643,
-0.8523077368736267,
-0.6806126832962036,
0.35918575525283813,
-1.0175235271453857,
-0.7698981761932373,
0.15099063515663147,
2.374898672103882,
1.7244558334350586,
-0.4240097105503082,
-0.13766534626483917,
-0.9702850580215454,
1.4488390684127808,
-0.22223012149333954,
0.21829462051391602,
2.046173572540283,
-0.33109670877456665,
-1.0510176420211792,
1.2080436944961548,
-2.4411556720733643,
0.1521604061126709,
1.9703195095062256,
0.3516164720058441,
0.13902179896831512,
-1.3768532276153564,
-0.6314919590950012,
-0.3185350000858307,
-0.35669222474098206,
-1.1719826459884644,
0.5639715790748596,
-0.2221132069826126,
-0.7777854204177856,
-1.3707860708236694,
0.12809191644191742,
-1.1700687408447266,
-1.6793607473373413,
0.3335886597633362,
1.8705977201461792,
2.0518012046813965,
-0.7310473322868347,
1.5698758363723755,
-0.27725329995155334,
0.11657216399908066,
1.246167778968811,
1.3393135070800781,
3.1699087619781494,
1.860399842262268,
-1.281365156173706,
0.6306505799293518,
-0.12970437109470367,
-0.597343385219574,
1.2483285665512085,
-1.2431108951568604,
1.26694655418396,
-0.19105510413646698,
-1.178200125694275,
-1.2870209217071533,
1.01069974899292,
0.4950425922870636,
0.0621880441904068,
-0.4352022409439087,
1.154177188873291,
0.0918479859828949,
1.332301139831543,
0.5841090679168701,
-0.3729843497276306,
0.501538097858429,
-0.4611704349517822,
-0.5779955387115479,
1.5351732969284058,
0.16262759268283844,
-1.43999183177948,
-2.259782075881958,
-0.20423023402690887,
-0.859288215637207,
-0.0006635179743170738,
-0.7266958951950073,
-1.0186280012130737,
1.6234509944915771,
0.39198678731918335,
-1.221800446510315,
-0.29388147592544556,
-0.2902146875858307,
-0.6196879148483276,
2.6385576725006104,
-1.342054009437561,
-0.29648545384407043,
-0.924160361289978,
-0.6606991291046143,
1.6400885581970215,
-1.232041597366333,
-0.21848931908607483,
-0.9849721789360046,
-0.6010010838508606,
-1.2389516830444336,
-0.46174487471580505,
0.0215134359896183,
-0.9519327878952026,
0.8527252674102783,
0.17328965663909912,
-1.1593412160873413,
-0.3248167335987091,
-0.8606191277503967,
0.9154320955276489,
-0.24401451647281647,
0.3392036259174347,
1.8044512271881104,
0.38969841599464417,
-0.36384347081184387,
0.7423250675201416,
1.2010979652404785,
0.5700934529304504,
-0.6324365139007568,
0.16385899484157562,
-0.6718166470527649,
0.38208135962486267,
-1.2810280323028564,
0.2931798994541168,
-2.9092609882354736,
0.5928902626037598,
-0.013251567259430885,
-0.08874105662107468,
-0.0749165341258049,
-1.3127086162567139,
1.0726107358932495,
2.5916619300842285,
-1.226060390472412,
0.4655511975288391,
0.342020183801651,
1.198726773262024,
-1.654378056526184,
0.34321391582489014,
-0.4924234449863434,
2.101915121078491,
0.22589825093746185,
1.206592321395874,
-0.4138490855693817,
-2.3491811752319336,
0.6267539858818054,
-1.282029628753662,
-1.1347534656524658,
0.8320838212966919,
-0.9367001056671143,
0.09770634770393372,
-1.404321551322937,
-0.2492942214012146,
-0.8814990520477295,
-1.228054404258728,
0.7011606097221375,
0.15290454030036926,
0.42940255999565125,
-0.5751574635505676,
0.30881834030151367,
-2.2541344165802,
-1.3389811515808105,
-0.2711786925792694,
-0.9035043120384216,
0.48217129707336426,
-0.2836333215236664,
0.6683793663978577,
-0.09975624084472656,
0.0033227158710360527,
0.31330564618110657,
1.4347773790359497,
3.3904621601104736,
0.19827276468276978,
0.3649977147579193,
-0.23005232214927673,
-0.9203740954399109,
1.3799508810043335,
0.8358666300773621,
-0.09326233714818954,
-0.5990501046180725,
-1.0467945337295532,
1.3211981058120728,
1.9261436462402344,
1.0225127935409546,
0.05293817073106766,
-0.7339813113212585,
-0.7041918635368347,
-0.0195317305624485,
0.18425926566123962,
0.4282497465610504,
0.8659049272537231,
-0.0011800723150372505,
0.07292976975440979,
1.3405423164367676,
1.2679932117462158,
-0.432139128446579,
0.3502982556819916,
-0.853138267993927,
-0.41284656524658203,
0.5218032002449036,
0.23942561447620392,
-0.020621798932552338,
0.3920191824436188,
-1.0197843313217163,
-0.2029399275779724,
-0.3123873174190521,
-0.8713071942329407,
-0.7183330655097961,
-0.49625611305236816,
-0.34311389923095703,
1.6516284942626953,
0.152060866355896,
-0.5260195136070251,
-0.03524058312177658,
-0.7943021059036255,
-0.1489851474761963,
-1.0411633253097534,
0.20020504295825958,
-0.09358867257833481,
-0.19067633152008057,
-0.19215728342533112,
1.766119360923767,
-0.99593186378479,
-2.1092419624328613,
0.22005189955234528,
0.2020936906337738,
-0.27683183550834656,
0.18315808475017548,
1.6939295530319214,
0.4546210765838623,
1.409726619720459,
1.3204656839370728,
0.9638972878456116,
-0.6812317371368408,
-1.2941362857818604,
0.6901525259017944,
1.0539400577545166,
-1.4144617319107056,
0.7850422263145447,
-0.06522402912378311,
-0.483447402715683,
0.6760089993476868,
1.1986008882522583,
0.49737706780433655,
-1.9281214475631714,
0.7873938679695129,
-0.9772888422012329,
0.8584357500076294,
0.6718085408210754,
0.6325851082801819,
0.2447187453508377,
0.833676815032959,
-1.2679123878479004,
-1.161704659461975,
-0.8188801407814026,
-0.7055703401565552,
2.003925323486328,
-0.24968791007995605,
0.6138215065002441,
-0.10896056145429611,
-1.362028956413269,
-0.04894379526376724,
0.7337120771408081,
0.3535539209842682,
-0.4898807406425476,
0.8596529364585876,
-0.6986312866210938,
-1.1410576105117798,
-1.3926072120666504,
-0.3458996117115021,
-1.0299409627914429,
-0.8511150479316711,
1.0735169649124146,
0.7047716379165649,
0.2797483205795288,
1.903396725654602,
0.6541167497634888,
0.30097153782844543,
-2.6696245670318604,
0.8691533207893372,
0.2720578610897064,
-0.1005464419722557,
0.8343961238861084,
0.3101191520690918,
1.096483826637268,
-0.0213145911693573,
0.514000654220581,
-2.4600143432617188,
2.2825958728790283,
-0.2922496199607849,
0.7429410219192505,
-0.04836481809616089,
-0.08257491886615753,
1.0728631019592285,
0.6173300743103027,
0.49072954058647156,
-0.9764189720153809,
0.7484478950500488,
-0.5091134309768677,
1.2532169818878174,
0.921680212020874,
-0.8542361855506897,
-0.09793265908956528,
1.3954261541366577,
0.38607290387153625,
-0.49817362427711487,
-0.8934447169303894,
-0.8969247341156006,
0.9162935614585876,
1.7218536138534546,
-0.05115237832069397,
-0.006056631915271282,
0.7768447399139404,
0.6470075845718384,
-1.2381179332733154,
0.05196013301610947,
-0.8061317801475525,
-0.829856276512146,
1.6408895254135132,
2.071552038192749,
-0.11311942338943481,
-0.09526896476745605,
-0.755161702632904,
-1.2797859907150269,
0.8202102184295654,
-0.056956782937049866,
0.048786960542201996,
0.6892812848091125,
-0.6110644936561584,
1.0864112377166748,
0.8638256788253784,
0.8880020380020142,
0.14709514379501343,
0.21788610517978668,
0.38794219493865967,
-0.33903178572654724,
-1.114980697631836,
-0.2954106628894806,
-1.055934190750122,
-2.5608458518981934,
0.4188125431537628,
-0.32077693939208984,
-1.4495532512664795,
0.06138311326503754,
-1.0028767585754395,
0.9903691411018372,
-0.5788881182670593,
-1.0975964069366455,
-1.5532118082046509,
0.2456887811422348,
-0.09873101115226746,
0.9038764238357544,
-1.6142995357513428,
-0.18363651633262634,
1.1812489032745361,
0.8231950402259827,
-0.6894730925559998,
0.9778727889060974,
0.2862713634967804,
1.0530295372009277,
0.8336570858955383,
-0.3849083185195923,
0.5309425592422485,
0.062226854264736176,
-1.3669641017913818,
0.4447784125804901,
1.214280128479004,
0.06613543629646301,
1.4712402820587158,
-0.4563998579978943,
-0.09122216701507568,
0.3673396408557892,
-0.5244610905647278,
-0.37631210684776306,
-0.43895164132118225,
0.7423350811004639,
0.06761050224304199,
-0.8809890151023865,
0.006044397130608559,
-0.061463214457035065,
-0.30656248331069946,
0.16916196048259735,
-1.5165984630584717,
-0.14227579534053802,
-0.36547648906707764,
-0.5536246299743652,
-1.247314691543579,
-0.11296945810317993,
1.4406518936157227,
-0.7688974738121033,
-0.2041069120168686,
0.5583989024162292,
0.3649873733520508,
0.5496279001235962,
0.6862450242042542,
-0.6055275201797485,
-0.33350104093551636,
-0.2615883946418762,
-0.31169795989990234,
0.31754907965660095,
1.2583664655685425,
-0.10427986830472946,
-0.9559051394462585,
0.763772189617157,
-0.33934319019317627,
0.08882205188274384,
1.8761168718338013,
0.12056273967027664,
-0.8491979241371155,
0.3996739387512207,
-0.7167887687683105,
1.945360541343689,
1.7436338663101196,
1.2383536100387573,
-0.020090308040380478,
-0.957938551902771,
0.6785544157028198,
-0.38888823986053467,
-0.30765679478645325,
0.8230127096176147,
0.4555585980415344,
-0.20399710536003113,
-1.416526198387146,
0.7358946204185486,
1.2218939065933228,
-0.8144544959068298,
-0.7621629238128662,
0.12292519956827164,
-0.7345513105392456,
1.091183066368103,
0.6248519420623779,
0.4508318305015564,
0.2025395631790161,
1.6150219440460205,
0.7676191329956055,
-0.49467968940734863,
0.5543509721755981,
0.5908737182617188,
-0.1490951031446457,
-2.1272263526916504,
-1.1983529329299927,
0.37559887766838074,
-0.5025590062141418,
-1.541678786277771,
1.382124423980713,
-1.0931227207183838,
-0.9226041436195374,
0.6016676425933838,
0.05447714775800705,
1.352536916732788,
0.2978650629520416,
1.625153660774231,
2.043077230453491,
0.857920229434967,
0.4111202359199524,
1.3086071014404297,
-0.18205581605434418,
-0.41310566663742065,
1.8417621850967407,
-0.43393051624298096,
0.4585624635219574,
1.0875248908996582,
-0.34688177704811096,
-1.0210753679275513,
-0.779883086681366,
-1.2002660036087036,
-0.7269039750099182,
1.2033889293670654,
0.04018723964691162,
-1.0704785585403442,
0.1886359453201294,
1.6443217992782593,
0.09820932149887085,
-0.27859580516815186,
0.5338399410247803,
0.40703362226486206,
-0.7554985284805298,
-0.02484922483563423,
-0.9501781463623047,
0.5184857845306396,
-0.2850761413574219,
-0.34365084767341614,
0.4113285541534424,
0.41689127683639526,
1.2285676002502441,
-0.09303957223892212,
0.10601285845041275,
1.0835589170455933,
-1.4795563220977783,
1.433671474456787,
-0.6940565705299377,
0.24371002614498138,
-2.2993650436401367,
1.378204107284546,
-0.7178354263305664,
1.937272071838379,
-2.6469712257385254,
0.4297105073928833,
-0.6506267189979553,
-0.46517762541770935,
0.31279322504997253,
-0.32458874583244324,
0.1436183750629425,
-0.16115695238113403,
-1.1174453496932983,
-0.09478165954351425,
-0.68626469373703,
0.5841481685638428,
1.1363604068756104,
1.276801586151123,
-1.1293350458145142,
-0.2640562057495117,
-1.6315088272094727,
-0.18202683329582214,
-0.6376115083694458,
0.2594353258609772,
-1.947789192199707,
-0.12905345857143402,
-1.9284056425094604,
-2.344627618789673,
-1.3463027477264404,
-0.8115034699440002,
1.1369495391845703,
0.05199363827705383,
-0.8243529796600342,
1.201765775680542,
-0.37588125467300415,
-1.814795732498169,
1.1745398044586182,
-2.1593716144561768
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | @sanchit-gandhi can you please also post the logs of `pip install soundfile==0.12.1`? To check what wheel is being installed or if it's being built from source (I think it's the latter case).
Required `libsndfile` binary **should** be bundeled with `soundfile` wheel but I assume it **might not** be the case for some non standard Linux distributions.
The only solution for using `soundfile` here is to build [`libsndfile`](https://github.com/libsndfile/libsndfile) from source:
```bash
git clone https://github.com/libsndfile/libsndfile.git
cd libsndfile/
autoreconf -vif
./configure --enable-werror
make
make install
```
for this, some building libraries should be installed, for Debian/Ubuntu it's like:
```bash
apt install autoconf autogen automake build-essential libasound2-dev \
libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
libmpg123-dev pkg-config python
```
but for other Linux distributions it might be different.
When the binary is compiled, it should be put into location where `soundfile` would search for it (the directory is named `_soundfile_data`), it depends on where`libsdfile` (from the previous step) and `soundfile` were installed, might be something like this:
```bash
cp /usr/local/lib/libsndfile.so /usr/local/lib/python3.7/dist-packages/_soundfile_data/
cp /usr/local/lib/libsndfile.la /usr/local/lib/python3.7/dist-packages/_soundfile_data/
```
Another solution is to not use `soundfile` and apply custom processing function with `torchaudio` while setting `decode=False` in `Audio` feature and passing custom function to `.map`. | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 197 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
@sanchit-gandhi can you please also post the logs of `pip install soundfile==0.12.1`? To check what wheel is being installed or if it's being built from source (I think it's the latter case).
Required `libsndfile` binary **should** be bundeled with `soundfile` wheel but I assume it **might not** be the case for some non standard Linux distributions.
The only solution for using `soundfile` here is to build [`libsndfile`](https://github.com/libsndfile/libsndfile) from source:
```bash
git clone https://github.com/libsndfile/libsndfile.git
cd libsndfile/
autoreconf -vif
./configure --enable-werror
make
make install
```
for this, some building libraries should be installed, for Debian/Ubuntu it's like:
```bash
apt install autoconf autogen automake build-essential libasound2-dev \
libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
libmpg123-dev pkg-config python
```
but for other Linux distributions it might be different.
When the binary is compiled, it should be put into location where `soundfile` would search for it (the directory is named `_soundfile_data`), it depends on where`libsdfile` (from the previous step) and `soundfile` were installed, might be something like this:
```bash
cp /usr/local/lib/libsndfile.so /usr/local/lib/python3.7/dist-packages/_soundfile_data/
cp /usr/local/lib/libsndfile.la /usr/local/lib/python3.7/dist-packages/_soundfile_data/
```
Another solution is to not use `soundfile` and apply custom processing function with `torchaudio` while setting `decode=False` in `Audio` feature and passing custom function to `.map`. | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | Not sure if it may help, but you could also try updating `pip` before installing soundfile | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 16 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
Not sure if it may help, but you could also try updating `pip` before installing soundfile | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | @lhoestq @sanchit-gandhi. I encountered the same error (also on the TPU v4) when trying to run `datasets` from source.
Downgrading soundfile with `pip install soundfile==0.12.0` seems to fix the issue for me. | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 32 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
@lhoestq @sanchit-gandhi. I encountered the same error (also on the TPU v4) when trying to run `datasets` from source.
Downgrading soundfile with `pip install soundfile==0.12.0` seems to fix the issue for me. | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | Maybe let's open an issue at https://github.com/bastibe/python-soundfile/issues in case they might know why you get `OSError: cannot load library 'libsndfile.so'` ? | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 21 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
Maybe let's open an issue at https://github.com/bastibe/python-soundfile/issues in case they might know why you get `OSError: cannot load library 'libsndfile.so'` ? | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | > @sanchit-gandhi can you please also post the logs of `pip install soundfile==0.12.1`? To check what wheel is being installed or if it's being built from source (I think it's the latter case). Required `libsndfile` binary **should** be bundeled with `soundfile` wheel but I assume it **might not** be the case for some non standard Linux distributions. The only solution for using `soundfile` here is to build [`libsndfile`](https://github.com/libsndfile/libsndfile) from source:
>
> ```shell
> git clone https://github.com/libsndfile/libsndfile.git
> cd libsndfile/
> autoreconf -vif
> ./configure --enable-werror
> make
> make install
> ```
This fixed the issue for me. After installing libsndfile as described above, I had to uninstall soundfile and re-install it with this command. `pip install "soundfile>=0.12.1"` | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 119 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
> @sanchit-gandhi can you please also post the logs of `pip install soundfile==0.12.1`? To check what wheel is being installed or if it's being built from source (I think it's the latter case). Required `libsndfile` binary **should** be bundeled with `soundfile` wheel but I assume it **might not** be the case for some non standard Linux distributions. The only solution for using `soundfile` here is to build [`libsndfile`](https://github.com/libsndfile/libsndfile) from source:
>
> ```shell
> git clone https://github.com/libsndfile/libsndfile.git
> cd libsndfile/
> autoreconf -vif
> ./configure --enable-werror
> make
> make install
> ```
This fixed the issue for me. After installing libsndfile as described above, I had to uninstall soundfile and re-install it with this command. `pip install "soundfile>=0.12.1"` | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | Thank you so much for the comprehensive instructions @polinaeterna! Also confirming that they worked for me 🤗 In my case, I had to run several of these commands under "sudo" for privileges, but otherwise this workaround gave a successful `libsndfile` install:
1. Grab source code:
```
git clone https://github.com/libsndfile/libsndfile.git
```
2. Set up a build environment:
```
sudo apt install autoconf autogen automake build-essential libasound2-dev \
libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
libmpg123-dev pkg-config python
```
3. Build and test `libsndfile`:
```
autoreconf -vif
./configure --enable-werror
sudo make
sudo make check
```
4. Create `_soundfile_data` submodule (if it does not exist already):
```
sudo mkdir /usr/local/lib/python3.8/dist-packages/_soundfile_data/
```
5. Copy `libsndfile` files into submodule:
```
sudo cp /usr/local/lib/libsndfile.* /usr/local/lib/python3.8/dist-packages/_soundfile_data/
``` | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 120 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
Thank you so much for the comprehensive instructions @polinaeterna! Also confirming that they worked for me 🤗 In my case, I had to run several of these commands under "sudo" for privileges, but otherwise this workaround gave a successful `libsndfile` install:
1. Grab source code:
```
git clone https://github.com/libsndfile/libsndfile.git
```
2. Set up a build environment:
```
sudo apt install autoconf autogen automake build-essential libasound2-dev \
libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
libmpg123-dev pkg-config python
```
3. Build and test `libsndfile`:
```
autoreconf -vif
./configure --enable-werror
sudo make
sudo make check
```
4. Create `_soundfile_data` submodule (if it does not exist already):
```
sudo mkdir /usr/local/lib/python3.8/dist-packages/_soundfile_data/
```
5. Copy `libsndfile` files into submodule:
```
sudo cp /usr/local/lib/libsndfile.* /usr/local/lib/python3.8/dist-packages/_soundfile_data/
``` | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | On a different machine, I also tried separately by first upgrading pip, then installing soundfile. This worked too! Thanks @lhoestq 🙌 | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 21 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
On a different machine, I also tried separately by first upgrading pip, then installing soundfile. This worked too! Thanks @lhoestq 🙌 | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5659 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files | > @sanchit-gandhi can you please also post the logs of `pip install soundfile==0.12.1`? To check what wheel is being installed or if it's being built from source (I think it's the latter case). Required `libsndfile` binary **should** be bundeled with `soundfile` wheel but I assume it **might not** be the case for some non standard Linux distributions. The only solution for using `soundfile` here is to build [`libsndfile`](https://github.com/libsndfile/libsndfile) from source:
>
> ```shell
> git clone https://github.com/libsndfile/libsndfile.git
> cd libsndfile/
> autoreconf -vif
> ./configure --enable-werror
> make
> make install
> ```
>
> for this, some building libraries should be installed, for Debian/Ubuntu it's like:
>
> ```shell
> apt install autoconf autogen automake build-essential libasound2-dev \
> libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
> libmpg123-dev pkg-config python
> ```
>
> but for other Linux distributions it might be different.
>
> When the binary is compiled, it should be put into location where `soundfile` would search for it (the directory is named `_soundfile_data`), it depends on where`libsdfile` (from the previous step) and `soundfile` were installed, might be something like this:
>
> ```shell
> cp /usr/local/lib/libsndfile.so /usr/local/lib/python3.7/dist-packages/_soundfile_data/
> cp /usr/local/lib/libsndfile.la /usr/local/lib/python3.7/dist-packages/_soundfile_data/
> ```
>
> Another solution is to not use `soundfile` and apply custom processing function with `torchaudio` while setting `decode=False` in `Audio` feature and passing custom function to `.map`.
Thanks, the solution solved my problem.
1. Purge uninstall libsndfile, uninstall python-soundfile.
2. Build libsndfile from source code and install.
3. Build python-soundfile from source code and install
4. Well done. | ### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28 | 247 | 257 | [Audio] Soundfile/libsndfile requirements too stringent for decoding mp3 files
### Describe the bug
I'm encountering several issues trying to load mp3 audio files using `datasets` on a TPU v4.
The PR https://github.com/huggingface/datasets/pull/5573 updated the audio loading logic to rely solely on the `soundfile`/`libsndfile` libraries for loading audio samples, regardless of their file type.
The installation guide suggests that `libsndfile` is bundled in when `soundfile` is pip installed:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/docs/source/installation.md?plain=1#L70-L71
However, just pip installing `soundfile==0.12.1` throws an error that `libsndfile` is missing:
```
pip install soundfile==0.12.1
```
Then:
```python
>>> soundfile
>>> soundfile.__libsndfile_version__
```
<details>
<summary> Traceback (most recent call last): </summary>
```
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 161, in <module>
import _soundfile_data # ImportError if this doesn't exist
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 170, in <module>
raise OSError('sndfile library not found using ctypes.util.find_library')
OSError: sndfile library not found using ctypes.util.find_library
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/soundfile.py", line 192, in <module>
_snd = _ffi.dlopen(_explicit_libname)
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory
```
</details>
Thus, I've followed the official instructions for installing the `soundfile` package from https://github.com/bastibe/python-soundfile#installation, which states that `libsndfile` needs to be installed separately as:
```
pip install --upgrade soundfile
sudo apt install libsndfile1
```
We can now import `soundfile`:
```python
>>> import soundfile
>>> soundfile.__version__
'0.12.1'
>>> soundfile.__libsndfile_version__
'1.0.28'
```
We see that we have `soundfile==0.12.1`, which matches the `datasets[audio]` package constraints:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/setup.py#L144-L147
But we have `libsndfile==1.0.28`, which is too low for decoding mp3 files:
https://github.com/huggingface/datasets/blob/e1af108015e43f9df8734a1faeeaeb9eafce3971/src/datasets/config.py#L136-L138
Updating/upgrading the `libsndfile` doesn't change this:
```
sudo apt-get update
sudo apt-get upgrade
```
Is there any other suggestion for how to get a compatible `libsndfile` version? Currently, the version bundled with Ubuntu `apt-get` is too low for decoding mp3 files.
Maybe we could add this under `setup.py` such that we install the correct `libsndfile` version when we do `pip install datasets[audio]`? IMO this would help circumvent such version issues.
### Steps to reproduce the bug
Environment described above. Loading mp3 files:
```python
from datasets import load_dataset
common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
print(next(iter(common_voice_es)))
```
```python
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 2
1 common_voice_es = load_dataset("common_voice", "es", split="validation", streaming=True)
----> 2 print(next(iter(common_voice_es)))
File ~/datasets/src/datasets/iterable_dataset.py:941, in IterableDataset.__iter__(self)
937 for key, example in ex_iterable:
938 if self.features:
939 # `IterableDataset` automatically fills missing columns with None.
940 # This is done with `_apply_feature_types_on_example`.
--> 941 yield _apply_feature_types_on_example(
942 example, self.features, token_per_repo_id=self._token_per_repo_id
943 )
944 else:
945 yield example
File ~/datasets/src/datasets/iterable_dataset.py:700, in _apply_feature_types_on_example(example, features, token_per_repo_id)
698 encoded_example = features.encode_example(example)
699 # Decode example for Audio feature, e.g.
--> 700 decoded_example = features.decode_example(encoded_example, token_per_repo_id=token_per_repo_id)
701 return decoded_example
File ~/datasets/src/datasets/features/features.py:1864, in Features.decode_example(self, example, token_per_repo_id)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
-> 1864 return {
1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1865, in <dictcomp>(.0)
1850 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1851 """Decode example with custom feature decoding.
1852
1853 Args:
(...)
1861 `dict[str, Any]`
1862 """
1864 return {
-> 1865 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1866 if self._column_requires_decoding[column_name]
1867 else value
1868 for column_name, (feature, value) in zip_dict(
1869 {key: value for key, value in self.items() if key in example}, example
1870 )
1871 }
File ~/datasets/src/datasets/features/features.py:1308, in decode_nested_example(schema, obj, token_per_repo_id)
1305 elif isinstance(schema, (Audio, Image)):
1306 # we pass the token to read and decode files from private repositories in streaming mode
1307 if obj is not None and schema.decode:
-> 1308 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1309 return obj
File ~/datasets/src/datasets/features/audio.py:167, in Audio.decode_example(self, value, token_per_repo_id)
162 raise RuntimeError(
163 "Decoding 'opus' files requires system library 'libsndfile'>=1.0.31, "
164 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
165 )
166 elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
--> 167 raise RuntimeError(
168 "Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, "
169 'You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '
170 )
172 if file is None:
173 token_per_repo_id = token_per_repo_id or {}
RuntimeError: Decoding 'mp3' files requires system library 'libsndfile'>=1.1.0, You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`.
```
### Expected behavior
Load mp3 files!
### Environment info
- `datasets` version: 2.10.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.13.1
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Soundfile version: 0.12.1
- Libsndfile version: 1.0.28
> @sanchit-gandhi can you please also post the logs of `pip install soundfile==0.12.1`? To check what wheel is being installed or if it's being built from source (I think it's the latter case). Required `libsndfile` binary **should** be bundeled with `soundfile` wheel but I assume it **might not** be the case for some non standard Linux distributions. The only solution for using `soundfile` here is to build [`libsndfile`](https://github.com/libsndfile/libsndfile) from source:
>
> ```shell
> git clone https://github.com/libsndfile/libsndfile.git
> cd libsndfile/
> autoreconf -vif
> ./configure --enable-werror
> make
> make install
> ```
>
> for this, some building libraries should be installed, for Debian/Ubuntu it's like:
>
> ```shell
> apt install autoconf autogen automake build-essential libasound2-dev \
> libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
> libmpg123-dev pkg-config python
> ```
>
> but for other Linux distributions it might be different.
>
> When the binary is compiled, it should be put into location where `soundfile` would search for it (the directory is named `_soundfile_data`), it depends on where`libsdfile` (from the previous step) and `soundfile` were installed, might be something like this:
>
> ```shell
> cp /usr/local/lib/libsndfile.so /usr/local/lib/python3.7/dist-packages/_soundfile_data/
> cp /usr/local/lib/libsndfile.la /usr/local/lib/python3.7/dist-packages/_soundfile_data/
> ```
>
> Another solution is to not use `soundfile` and apply custom processing function with `torchaudio` while setting `decode=False` in `Audio` feature and passing custom function to `.map`.
Thanks, the solution solved my problem.
1. Purge uninstall libsndfile, uninstall python-soundfile.
2. Build libsndfile from source code and install.
3. Build python-soundfile from source code and install
4. Well done. | [
-1.1538589000701904,
-0.8874154090881348,
-0.6962687373161316,
1.4572086334228516,
-0.11665768176317215,
-1.3150376081466675,
0.1670101135969162,
-1.0751490592956543,
1.6065880060195923,
-0.652106523513794,
0.3076169490814209,
-1.6806532144546509,
-0.04429515823721886,
-0.6160948276519775,
-0.7710502743721008,
-0.8599127531051636,
-0.33699020743370056,
-0.6804304718971252,
0.9735190272331238,
2.5930593013763428,
1.309494972229004,
-1.3158208131790161,
2.793769598007202,
0.7036699056625366,
-0.27662432193756104,
-0.9221533536911011,
0.5785939693450928,
-0.009885010309517384,
-1.281356930732727,
-0.44611141085624695,
-0.935242772102356,
-0.015230923891067505,
-0.6221243143081665,
-0.5173202753067017,
0.0010708514600992203,
0.40833425521850586,
-0.3301027715206146,
-0.40078529715538025,
-0.6809774041175842,
-0.756357729434967,
0.5127570629119873,
-0.41073599457740784,
1.0326305627822876,
-0.32158923149108887,
1.674477458000183,
-0.5361570119857788,
0.4314780533313751,
0.7658387422561646,
1.411150336265564,
0.2333660125732422,
-0.007920622825622559,
0.35886046290397644,
0.4100823402404785,
-0.0717458426952362,
0.4943448603153229,
1.192574381828308,
0.6708306670188904,
0.4401822090148926,
0.7481876611709595,
-2.19726300239563,
1.2472920417785645,
-0.9954733848571777,
0.1571144461631775,
1.2218941450119019,
-0.8333099484443665,
0.36038634181022644,
-1.7972619533538818,
0.0027584899216890335,
0.5586488842964172,
-2.3260834217071533,
0.266362726688385,
-1.3322763442993164,
-0.49943798780441284,
0.9184509515762329,
0.3402911424636841,
-1.3069400787353516,
0.08439715206623077,
-0.38074585795402527,
1.069682240486145,
0.4826667904853821,
1.1718395948410034,
-1.7432000637054443,
-0.006012467667460442,
-0.21447734534740448,
0.14695464074611664,
-1.1508240699768066,
-1.5567039251327515,
0.4886789321899414,
0.5638499855995178,
0.6311286091804504,
-0.10408269613981247,
1.0110621452331543,
-0.9297746419906616,
0.7568987011909485,
-0.9726786613464355,
-1.7506041526794434,
-1.3840941190719604,
-2.156648635864258,
-2.216240167617798,
0.7916699051856995,
-0.5290966033935547,
-0.4781738221645355,
2.0026743412017822,
-0.8897569179534912,
-1.8398182392120361,
1.0044000148773193,
0.2935042083263397,
-0.034426845610141754,
2.3760128021240234,
0.3136533498764038,
-0.7282810807228088,
0.48576098680496216,
-0.7420980334281921,
0.7610158324241638,
-0.434071809053421,
1.4158203601837158,
0.4207663834095001,
-1.0723376274108887,
1.5156267881393433,
-0.4671306610107422,
0.5835387706756592,
-0.699221670627594,
-0.5111886858940125,
-0.7300717830657959,
0.2803031802177429,
1.842502474784851,
-0.43634361028671265,
1.5342227220535278,
-0.31757837533950806,
-1.5384039878845215,
-1.593579888343811,
0.9374669194221497,
0.4962265193462372,
-0.769322395324707,
0.0551193431019783,
-0.38970622420310974,
0.11794162541627884,
-0.03888900950551033,
0.9836809039115906,
1.2433085441589355,
0.7142621874809265,
-0.24318411946296692,
-0.8057842254638672,
0.262599915266037,
-0.05322513356804848,
-0.6783568263053894,
-1.8385316133499146,
-0.2520105540752411,
0.13844697177410126,
0.6633767485618591,
-1.2473509311676025,
1.7407175302505493,
0.8456066846847534,
1.9418747425079346,
0.9681995511054993,
-0.40119218826293945,
1.5686664581298828,
0.010199029929935932,
1.9437276124954224,
-0.550599992275238,
0.61074298620224,
-0.3317776024341583,
-1.1318761110305786,
0.8208802938461304,
-0.34781625866889954,
-2.0270862579345703,
-0.6733986735343933,
-0.7651358842849731,
-0.1777573972940445,
-0.7433661222457886,
0.9301719069480896,
-0.23122183978557587,
-1.3019638061523438,
0.1565658450126648,
-0.8255724906921387,
0.058556489646434784,
-1.26450514793396,
0.2541641891002655,
0.6946620345115662,
-0.6522966623306274,
0.07035888731479645,
-0.30680492520332336,
-1.2136062383651733,
-0.5317371487617493,
0.3676140308380127,
1.8473228216171265,
-0.7132851481437683,
0.896515965461731,
1.0238765478134155,
-0.8033022880554199,
0.07042767107486725,
0.3438713252544403,
-0.23820731043815613,
0.8739069700241089,
-1.1063072681427002,
-0.4146254360675812,
1.2750234603881836,
-0.14210885763168335,
-0.6694878339767456,
1.4891918897628784,
0.7674838304519653,
-1.1419259309768677,
-0.26645627617836,
-0.15281708538532257,
-0.8153887391090393,
0.0706418827176094,
-1.669311285018921,
-0.12109342962503433,
0.3654576241970062,
-1.4873875379562378,
-0.44866642355918884,
-0.30828845500946045,
1.3336869478225708,
-0.09342779219150543,
1.4372936487197876,
-0.2347937822341919,
-0.07407929003238678,
-0.36918607354164124,
-0.3663693070411682,
0.08070217072963715,
-0.29182863235473633,
-0.5600491762161255,
0.2215905338525772,
-0.8026708364486694,
0.3990445137023926,
1.4687682390213013,
0.2121388465166092,
0.008203799836337566,
0.4265938103199005,
1.0175318717956543,
0.43072909116744995,
-0.08758847415447235,
-0.8694384098052979,
-1.4903842210769653,
2.019298791885376,
-1.4370441436767578,
1.9801490306854248,
0.8492427468299866,
-0.021929383277893066,
-1.785326361656189,
-1.9763514995574951,
1.3302973508834839,
1.1278536319732666,
2.3984758853912354,
0.6135387420654297,
0.3421047329902649,
-0.7958829998970032,
-0.6278297305107117,
0.31204190850257874,
-0.9574042558670044,
-0.741425096988678,
0.16096000373363495,
2.458231210708618,
1.8002115488052368,
-0.40812477469444275,
-0.29528331756591797,
-1.021243929862976,
1.2960221767425537,
-0.10171810537576675,
0.1855657994747162,
2.0352864265441895,
-0.21872453391551971,
-1.0585379600524902,
1.314207911491394,
-2.3049635887145996,
0.1717737466096878,
2.0432140827178955,
0.28475192189216614,
0.1505492925643921,
-1.5024609565734863,
-0.7369136214256287,
-0.2992568612098694,
-0.4553038775920868,
-1.1924750804901123,
0.5344429016113281,
-0.26413673162460327,
-0.7853698134422302,
-1.4860436916351318,
0.2330176830291748,
-1.0397109985351562,
-1.715729832649231,
0.23198451101779938,
1.9630117416381836,
2.000049352645874,
-0.8287841081619263,
1.5370992422103882,
-0.4065532684326172,
0.06937773525714874,
1.262732744216919,
1.2257766723632812,
3.175168752670288,
1.9346368312835693,
-1.31587815284729,
0.698818564414978,
-0.16628970205783844,
-0.4530303180217743,
1.0901328325271606,
-1.1920307874679565,
1.1560559272766113,
-0.26994845271110535,
-1.2000236511230469,
-1.2227414846420288,
0.9252524375915527,
0.42035430669784546,
0.021846428513526917,
-0.5596384406089783,
1.1085246801376343,
0.10619692504405975,
1.4079675674438477,
0.6036799550056458,
-0.34532734751701355,
0.6164101958274841,
-0.307199627161026,
-0.5261391401290894,
1.6370643377304077,
0.27891817688941956,
-1.3670047521591187,
-2.3644886016845703,
-0.1790754497051239,
-0.8731377124786377,
0.11501900106668472,
-0.5590808987617493,
-1.006242036819458,
1.6600675582885742,
0.413810670375824,
-1.268520712852478,
-0.3498062491416931,
-0.33218708634376526,
-0.43520674109458923,
2.6259899139404297,
-1.49794340133667,
-0.17520388960838318,
-0.9962084293365479,
-0.5053635835647583,
1.6115248203277588,
-1.1690757274627686,
-0.2760382294654846,
-1.042826533317566,
-0.5581227540969849,
-1.3043947219848633,
-0.5152778029441833,
0.03414582833647728,
-0.8744027018547058,
0.7981202006340027,
0.2879953682422638,
-1.1814631223678589,
-0.31316855549812317,
-0.8468225598335266,
0.9911692142486572,
-0.17455139756202698,
0.27768614888191223,
1.925344705581665,
0.5118604302406311,
-0.3889760375022888,
0.7212444543838501,
1.118131160736084,
0.5640318393707275,
-0.6646800637245178,
0.20463521778583527,
-0.7357761263847351,
0.28179091215133667,
-1.397178053855896,
0.22788026928901672,
-2.8377649784088135,
0.6206686496734619,
-0.12647248804569244,
-0.03846088796854019,
-0.07594701647758484,
-1.355128526687622,
1.0962127447128296,
2.601226568222046,
-1.1909877061843872,
0.5610597133636475,
0.3270784020423889,
1.1696338653564453,
-1.5835222005844116,
0.29450201988220215,
-0.3232904076576233,
2.1252453327178955,
0.08744043111801147,
1.3076658248901367,
-0.4750046133995056,
-2.292121648788452,
0.6194289922714233,
-1.2438218593597412,
-1.158014178276062,
0.7779115438461304,
-0.7793982625007629,
0.0007659932598471642,
-1.4424138069152832,
-0.1963263750076294,
-0.8694416284561157,
-1.2463616132736206,
0.7792384624481201,
0.05536894500255585,
0.4236767888069153,
-0.6181949377059937,
0.38379234075546265,
-2.1076016426086426,
-1.3261862993240356,
-0.21712306141853333,
-0.950782299041748,
0.48434528708457947,
-0.3366875648498535,
0.5936537384986877,
-0.17466503381729126,
-0.028956178575754166,
0.33113929629325867,
1.3769670724868774,
3.474348545074463,
0.20565375685691833,
0.3473747670650482,
-0.13844074308872223,
-0.9668084383010864,
1.3725531101226807,
0.8770689368247986,
-0.1812971532344818,
-0.5779284238815308,
-1.0983498096466064,
1.2034997940063477,
1.9519634246826172,
1.031063199043274,
0.1408185064792633,
-0.9635795950889587,
-0.8569775223731995,
-0.027484141290187836,
0.16344532370567322,
0.5466504693031311,
0.9177125692367554,
0.04477044939994812,
0.021125763654708862,
1.2905750274658203,
1.2132799625396729,
-0.3375552296638489,
0.4877000153064728,
-0.8625608086585999,
-0.4259927272796631,
0.4647175669670105,
0.30518364906311035,
-0.011977055110037327,
0.3547894060611725,
-1.041976809501648,
-0.24908459186553955,
-0.43770068883895874,
-0.881547212600708,
-0.7783151865005493,
-0.40450412034988403,
-0.28089988231658936,
1.6403025388717651,
0.14494377374649048,
-0.526595950126648,
-0.013668577186763287,
-0.6572170853614807,
-0.08801047503948212,
-1.0396174192428589,
0.2628744840621948,
-0.14263878762722015,
-0.09610117226839066,
-0.007908242754638195,
1.6551780700683594,
-0.9176961779594421,
-2.0267062187194824,
0.2314162254333496,
0.2911885380744934,
-0.42584502696990967,
0.29742932319641113,
1.6411036252975464,
0.6388137340545654,
1.3705992698669434,
1.38789701461792,
0.9429047107696533,
-0.6941124796867371,
-1.2357743978500366,
0.632210373878479,
0.9942443370819092,
-1.3308396339416504,
0.8455345630645752,
-0.030320558696985245,
-0.4530118405818939,
0.6219765543937683,
1.3347089290618896,
0.48038557171821594,
-2.0335583686828613,
0.7424075603485107,
-0.7564765810966492,
0.793938398361206,
0.6736641526222229,
0.7267397046089172,
0.26991015672683716,
0.7507438063621521,
-1.2326704263687134,
-1.0637484788894653,
-0.736719012260437,
-0.6793072819709778,
1.9428948163986206,
-0.23558959364891052,
0.5720683336257935,
-0.18549025058746338,
-1.3183034658432007,
-0.17656396329402924,
0.7143505811691284,
0.42997869849205017,
-0.5598970651626587,
0.7277981638908386,
-0.6430889964103699,
-1.0737920999526978,
-1.324798583984375,
-0.5111545920372009,
-0.9350266456604004,
-0.9449290037155151,
1.0330114364624023,
0.7902792692184448,
0.3205992579460144,
1.8958196640014648,
0.6724109053611755,
0.182573139667511,
-2.650686025619507,
0.8999843001365662,
0.37046143412590027,
-0.0984690710902214,
0.9212527871131897,
0.3737978935241699,
0.952233076095581,
-0.03671329841017723,
0.5451067090034485,
-2.3599421977996826,
2.2736897468566895,
-0.27171748876571655,
0.6579450368881226,
0.020580973476171494,
-0.2290562093257904,
1.0856248140335083,
0.5071833729743958,
0.5699223279953003,
-1.0630067586898804,
0.7289983034133911,
-0.6233167052268982,
1.184558629989624,
0.9213595986366272,
-0.8564708828926086,
0.04720699414610863,
1.384838342666626,
0.46549174189567566,
-0.48586922883987427,
-0.908111035823822,
-0.9668788313865662,
0.9448619484901428,
1.7986539602279663,
-0.06377924233675003,
0.02546892687678337,
0.8656824827194214,
0.6907832622528076,
-1.3128119707107544,
0.07883856445550919,
-0.7433441877365112,
-0.7724153995513916,
1.7089084386825562,
2.035862684249878,
-0.12215281277894974,
-0.3348637819290161,
-0.8201754093170166,
-1.312938928604126,
0.8837594389915466,
0.03487366810441017,
0.06782216578722,
0.6650651693344116,
-0.6497173309326172,
1.2032257318496704,
0.704532265663147,
0.9484716057777405,
0.18600285053253174,
0.3855023682117462,
0.42597696185112,
-0.4687061905860901,
-1.1501116752624512,
-0.29187771677970886,
-1.2298985719680786,
-2.4400479793548584,
0.4460492432117462,
-0.2518281042575836,
-1.3606425523757935,
0.039612799882888794,
-1.015519618988037,
0.8766465783119202,
-0.5565981268882751,
-1.0757673978805542,
-1.4116703271865845,
0.27713945508003235,
-0.18904291093349457,
0.9212267398834229,
-1.7296980619430542,
-0.17637407779693604,
1.214459776878357,
0.9084394574165344,
-0.6555737257003784,
0.8771930932998657,
0.18006235361099243,
1.0437424182891846,
0.8457160592079163,
-0.3346182107925415,
0.5003558397293091,
-0.016932865604758263,
-1.3302823305130005,
0.5126593708992004,
1.2594512701034546,
0.2104533612728119,
1.5246763229370117,
-0.49972963333129883,
0.014855940826237202,
0.29378992319107056,
-0.5410983562469482,
-0.5299469232559204,
-0.5489979386329651,
0.7271691560745239,
0.040105465799570084,
-0.9869934916496277,
0.016494326293468475,
-0.060909345746040344,
-0.1420009285211563,
0.05495820194482803,
-1.5180248022079468,
-0.15819323062896729,
-0.3091300129890442,
-0.5523343086242676,
-1.2463189363479614,
-0.07988961040973663,
1.2680387496948242,
-0.681064248085022,
-0.2317269742488861,
0.5007743239402771,
0.34227755665779114,
0.4715026617050171,
0.5842232704162598,
-0.7627568244934082,
-0.44579702615737915,
-0.3336620628833771,
-0.35688239336013794,
0.35435545444488525,
1.3380789756774902,
-0.05581246316432953,
-0.9798257350921631,
0.6585630774497986,
-0.4498159885406494,
0.18716710805892944,
1.9577240943908691,
0.02546677738428116,
-0.7972967624664307,
0.28584158420562744,
-0.6971361041069031,
1.8513648509979248,
1.7889338731765747,
1.299118161201477,
-0.13058289885520935,
-0.9889913201332092,
0.697758138179779,
-0.3666312098503113,
-0.34310999512672424,
0.92449951171875,
0.4605695903301239,
-0.22406697273254395,
-1.4266492128372192,
0.4945455491542816,
1.3573001623153687,
-0.8751242756843567,
-0.8530365228652954,
0.023077342659235,
-0.7986374497413635,
1.1121957302093506,
0.693462073802948,
0.3186016082763672,
0.2655208706855774,
1.55768620967865,
0.7239446640014648,
-0.38384199142456055,
0.6349275708198547,
0.42545509338378906,
-0.23316039144992828,
-2.1349079608917236,
-1.1808977127075195,
0.2918110191822052,
-0.3253193199634552,
-1.6517713069915771,
1.4246034622192383,
-1.1045424938201904,
-0.9175776243209839,
0.5148930549621582,
0.09932860732078552,
1.4954346418380737,
0.24740681052207947,
1.585455298423767,
2.1212477684020996,
0.8393979668617249,
0.3675680458545685,
1.2460367679595947,
-0.1745397448539734,
-0.5529097318649292,
1.8483017683029175,
-0.4728717505931854,
0.47490349411964417,
1.070300579071045,
-0.3515772521495819,
-1.062461018562317,
-0.8534803986549377,
-1.2979154586791992,
-0.7861526608467102,
1.2625960111618042,
0.04768747463822365,
-1.092726469039917,
0.31753456592559814,
1.634763479232788,
0.12202397733926773,
-0.3022148907184601,
0.677410364151001,
0.43882545828819275,
-0.7790704965591431,
0.000704851932823658,
-0.9637743234634399,
0.5099613666534424,
-0.10190387815237045,
-0.34792494773864746,
0.24007855355739594,
0.3597906827926636,
1.2701363563537598,
0.0310845747590065,
0.11835964769124985,
1.1057928800582886,
-1.3200492858886719,
1.5766454935073853,
-0.6011151671409607,
0.25729385018348694,
-2.4025065898895264,
1.454623818397522,
-0.7594830989837646,
1.9048234224319458,
-2.5560171604156494,
0.4431718587875366,
-0.4636791944503784,
-0.38202235102653503,
0.31229057908058167,
-0.40784400701522827,
0.18021555244922638,
-0.1764563024044037,
-1.1246918439865112,
-0.1755339801311493,
-0.7116507291793823,
0.6270898580551147,
1.1456350088119507,
1.3665844202041626,
-1.0334227085113525,
-0.14953698217868805,
-1.8595223426818848,
-0.14220042526721954,
-0.662045955657959,
0.35075822472572327,
-1.93759024143219,
-0.18580323457717896,
-1.961857557296753,
-2.358095407485962,
-1.2424829006195068,
-0.7867047786712646,
0.9594332575798035,
0.18351691961288452,
-0.9351742267608643,
1.1434376239776611,
-0.3414933383464813,
-1.856011152267456,
1.0895636081695557,
-2.2053256034851074
] |
https://github.com/huggingface/datasets/issues/5654 | Offset overflow when executing Dataset.map | Upd. the above code works if we replace `25` with `1`, but the result value at key "hr" is not a tensor but a list of lists of lists of uint8.
Adding `train_data.set_format("torch")` after map fixes this, but the original issue remains
| ### Describe the bug
Hi, I'm trying to use `.map` method to cache multiple random crops from the image to speed up data processing during training, as the image size is too big.
The map function executes all iterations, and then returns the following error:
```bash
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3353, in _map_single
writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 582, in finalize
self.write_examples_on_file()
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 446, in write_examples_on_file
self.write_batch(batch_examples=batch_examples)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 555, in write_batch
self.write_table(pa_table, writer_batch_size)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 567, in write_table
pa_table = pa_table.combine_chunks()
File "pyarrow/table.pxi", line 3315, in pyarrow.lib.Table.combine_chunks
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays
```
Here is the minimal code (`/home/datasets/DIV2K_train_HR` is just a folder of images that can be replaced by any appropriate):
### Steps to reproduce the bug
```python
from glob import glob
import torch
from datasets import Dataset, Image
from torchvision.transforms import PILToTensor, RandomCrop
file_paths = glob("/home/datasets/DIV2K_train_HR/*")
to_tensor = PILToTensor()
crop_transf = RandomCrop(size=256)
def prepare_data(example):
tensor = to_tensor(example["image"].convert("RGB"))
return {"hr": torch.stack([crop_transf(tensor) for _ in range(25)])}
train_data = Dataset.from_dict({"image": file_paths}).cast_column("image", Image())
train_data = train_data.map(
prepare_data,
cache_file_name="/home/datasets/DIV2K_train_HR_crops.tmp",
desc="Caching multiple random crops of image",
remove_columns="image",
)
print(train_data[0].keys(), train_data[0]["hr"].shape)
```
### Expected behavior
Cached file is stored at `"/home/datasets/DIV2K_train_HR_crops.tmp"`, output is `dict_keys(['hr']) torch.Size([25, 3, 256, 256])`
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.10
- Python version: 3.8.16
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Pytorch version: 2.0.0+cu117
- torchvision version: 0.15.1+cu117 | 248 | 42 | Offset overflow when executing Dataset.map
### Describe the bug
Hi, I'm trying to use `.map` method to cache multiple random crops from the image to speed up data processing during training, as the image size is too big.
The map function executes all iterations, and then returns the following error:
```bash
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3353, in _map_single
writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 582, in finalize
self.write_examples_on_file()
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 446, in write_examples_on_file
self.write_batch(batch_examples=batch_examples)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 555, in write_batch
self.write_table(pa_table, writer_batch_size)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 567, in write_table
pa_table = pa_table.combine_chunks()
File "pyarrow/table.pxi", line 3315, in pyarrow.lib.Table.combine_chunks
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays
```
Here is the minimal code (`/home/datasets/DIV2K_train_HR` is just a folder of images that can be replaced by any appropriate):
### Steps to reproduce the bug
```python
from glob import glob
import torch
from datasets import Dataset, Image
from torchvision.transforms import PILToTensor, RandomCrop
file_paths = glob("/home/datasets/DIV2K_train_HR/*")
to_tensor = PILToTensor()
crop_transf = RandomCrop(size=256)
def prepare_data(example):
tensor = to_tensor(example["image"].convert("RGB"))
return {"hr": torch.stack([crop_transf(tensor) for _ in range(25)])}
train_data = Dataset.from_dict({"image": file_paths}).cast_column("image", Image())
train_data = train_data.map(
prepare_data,
cache_file_name="/home/datasets/DIV2K_train_HR_crops.tmp",
desc="Caching multiple random crops of image",
remove_columns="image",
)
print(train_data[0].keys(), train_data[0]["hr"].shape)
```
### Expected behavior
Cached file is stored at `"/home/datasets/DIV2K_train_HR_crops.tmp"`, output is `dict_keys(['hr']) torch.Size([25, 3, 256, 256])`
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.10
- Python version: 3.8.16
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Pytorch version: 2.0.0+cu117
- torchvision version: 0.15.1+cu117
Upd. the above code works if we replace `25` with `1`, but the result value at key "hr" is not a tensor but a list of lists of lists of uint8.
Adding `train_data.set_format("torch")` after map fixes this, but the original issue remains
| [
-1.1419036388397217,
-0.9015933871269226,
-0.674741804599762,
1.4203581809997559,
-0.08344558626413345,
-1.2954553365707397,
0.11724597960710526,
-1.11049485206604,
1.5052343606948853,
-0.7047635316848755,
0.17623287439346313,
-1.6150672435760498,
-0.08084351569414139,
-0.423324853181839,
-0.6788772344589233,
-0.9198555946350098,
-0.37300220131874084,
-0.9543673992156982,
1.0332118272781372,
2.558710813522339,
1.324643850326538,
-1.3202589750289917,
2.7931272983551025,
0.6716219186782837,
-0.2761255204677582,
-1.032772183418274,
0.5690174698829651,
0.041247766464948654,
-1.138435959815979,
-0.47546321153640747,
-0.9229650497436523,
-0.029189949855208397,
-0.5637543797492981,
-0.3579438626766205,
0.1088547483086586,
0.4451163709163666,
-0.3225398063659668,
-0.29832687973976135,
-0.6807606816291809,
-0.6901657581329346,
0.5764622688293457,
-0.3719836175441742,
0.9756468534469604,
-0.33434250950813293,
1.7536845207214355,
-0.5817937254905701,
0.4389147460460663,
0.7218191623687744,
1.311896800994873,
0.17465820908546448,
0.07827892899513245,
0.24634480476379395,
0.3157341778278351,
0.017843572422862053,
0.6123179197311401,
1.1521443128585815,
0.6095799207687378,
0.5402560234069824,
0.6433554291725159,
-2.2067224979400635,
1.2826896905899048,
-0.9069381952285767,
0.1661093533039093,
1.252009391784668,
-0.7527182102203369,
0.3131611943244934,
-1.7695449590682983,
-0.04693330079317093,
0.6333665251731873,
-2.2967724800109863,
0.28456658124923706,
-1.24558687210083,
-0.4723377823829651,
0.9335542321205139,
0.3332861363887787,
-1.2215321063995361,
0.18774446845054626,
-0.536781907081604,
1.1260972023010254,
0.4876478910446167,
1.066771149635315,
-1.6825505495071411,
0.0003651808947324753,
-0.14705729484558105,
0.07363083958625793,
-1.271820068359375,
-1.6979765892028809,
0.5363665819168091,
0.5119110345840454,
0.6520853638648987,
-0.016470570117235184,
1.0216902494430542,
-1.1384810209274292,
0.8040755987167358,
-0.982394278049469,
-1.5618979930877686,
-1.3475959300994873,
-2.4439198970794678,
-2.270505666732788,
0.763610303401947,
-0.5817214250564575,
-0.5060024857521057,
2.0832467079162598,
-0.9584029316902161,
-1.6897755861282349,
1.0992412567138672,
0.25750088691711426,
0.1659432351589203,
2.379396915435791,
0.20127183198928833,
-0.7424690127372742,
0.4966941773891449,
-0.7172593474388123,
0.7744436264038086,
-0.3423922657966614,
1.3238033056259155,
0.41188594698905945,
-1.0032073259353638,
1.6407054662704468,
-0.42085736989974976,
0.6237404942512512,
-0.6522539258003235,
-0.5044907927513123,
-0.8585336804389954,
0.2671152949333191,
1.8365308046340942,
-0.35812073945999146,
1.5002931356430054,
-0.3039965033531189,
-1.4905115365982056,
-1.538122296333313,
0.8277525305747986,
0.47501325607299805,
-0.8859316110610962,
0.04584091529250145,
-0.49016526341438293,
0.207609623670578,
0.02661990374326706,
1.11504065990448,
1.2205226421356201,
0.7128005027770996,
-0.329324334859848,
-0.8985145688056946,
0.22214582562446594,
-0.29414546489715576,
-0.6872003078460693,
-1.824386477470398,
-0.3177071809768677,
0.19053494930267334,
0.6414642333984375,
-1.2913823127746582,
1.7873868942260742,
0.8782558441162109,
2.026278257369995,
0.9284113645553589,
-0.4014768600463867,
1.4055927991867065,
-0.02982601895928383,
1.8208600282669067,
-0.44468533992767334,
0.5803451538085938,
-0.3176769018173218,
-1.1968448162078857,
0.821928858757019,
-0.41254299879074097,
-1.9521762132644653,
-0.8610246181488037,
-0.6407325267791748,
-0.23635467886924744,
-0.7025758624076843,
0.8497569561004639,
-0.37499895691871643,
-1.4953536987304688,
0.08913149684667587,
-0.6656729578971863,
0.13993990421295166,
-1.268739104270935,
0.21043488383293152,
0.7049342393875122,
-0.7612029314041138,
-0.010769970715045929,
-0.277647465467453,
-1.285865068435669,
-0.5702416300773621,
0.26164010167121887,
2.0257344245910645,
-0.6297450065612793,
0.9611911177635193,
1.0578149557113647,
-0.7400752305984497,
0.1568065881729126,
0.23126092553138733,
-0.4011858403682709,
0.7828513383865356,
-1.1715697050094604,
-0.4807358980178833,
1.2204424142837524,
-0.2957984507083893,
-0.7890396118164062,
1.407913327217102,
0.7734926342964172,
-1.1475275754928589,
-0.32349976897239685,
-0.1927689015865326,
-0.8871365785598755,
0.11076494306325912,
-1.5032374858856201,
-0.18737190961837769,
0.4347803294658661,
-1.5545194149017334,
-0.307367742061615,
-0.15569981932640076,
1.4231407642364502,
-0.19599419832229614,
1.463587999343872,
-0.3023071587085724,
-0.14620113372802734,
-0.2531031370162964,
-0.45086804032325745,
0.20980188250541687,
-0.145626038312912,
-0.5739368796348572,
0.20748171210289001,
-0.8582455515861511,
0.31464844942092896,
1.4606597423553467,
0.34148821234703064,
0.12019512802362442,
0.39639538526535034,
1.0396190881729126,
0.3671465516090393,
-0.05237211659550667,
-0.8628460764884949,
-1.5772660970687866,
1.9578282833099365,
-1.3897349834442139,
2.009589910507202,
0.8642393946647644,
-0.09994471818208694,
-1.8168668746948242,
-1.7967690229415894,
1.191200852394104,
1.053208827972412,
2.3196969032287598,
0.5046657919883728,
0.412443608045578,
-0.7573567032814026,
-0.7656424641609192,
0.2698071002960205,
-0.9903837442398071,
-0.6729345917701721,
0.23399242758750916,
2.3477656841278076,
1.7260242700576782,
-0.4478648900985718,
-0.219089537858963,
-0.8677995800971985,
1.2617191076278687,
-0.24025824666023254,
0.2872411012649536,
1.9929438829421997,
-0.24347922205924988,
-1.0194437503814697,
1.2882856130599976,
-2.455214262008667,
0.25934967398643494,
2.0896458625793457,
0.24487271904945374,
0.17010489106178284,
-1.4517951011657715,
-0.6978915929794312,
-0.3109629452228546,
-0.4239619970321655,
-1.2243455648422241,
0.5943768620491028,
-0.272194504737854,
-0.9372236132621765,
-1.4141396284103394,
0.0552746057510376,
-1.23618745803833,
-1.8058067560195923,
0.3456893563270569,
2.080303430557251,
2.131866216659546,
-0.774057149887085,
1.4412883520126343,
-0.2182767391204834,
-0.01863446831703186,
1.2715413570404053,
1.3672422170639038,
3.0330302715301514,
1.779886245727539,
-1.2983129024505615,
0.6901822686195374,
-0.21125385165214539,
-0.46932730078697205,
1.132032036781311,
-1.1696832180023193,
1.0569207668304443,
-0.1431504786014557,
-1.2304742336273193,
-1.217055082321167,
1.0336507558822632,
0.5089273452758789,
-0.029272273182868958,
-0.4485516846179962,
1.3052616119384766,
0.156521737575531,
1.3243170976638794,
0.5528918504714966,
-0.35942763090133667,
0.5432316660881042,
-0.3312133252620697,
-0.5798144936561584,
1.6776424646377563,
0.13414731621742249,
-1.5363377332687378,
-2.369004011154175,
-0.28621724247932434,
-0.9435715675354004,
-0.00909662526100874,
-0.5962001085281372,
-1.0622562170028687,
1.630303978919983,
0.4030734598636627,
-1.18410325050354,
-0.2872768044471741,
-0.2422543466091156,
-0.47982731461524963,
2.6925976276397705,
-1.240139365196228,
-0.15018638968467712,
-0.9230738282203674,
-0.5246002674102783,
1.597629427909851,
-1.2584868669509888,
-0.2829113006591797,
-0.9893190264701843,
-0.6476419568061829,
-1.2932300567626953,
-0.46802791953086853,
0.06455818563699722,
-0.9992730021476746,
0.7660961151123047,
0.3287241458892822,
-1.1180833578109741,
-0.33962851762771606,
-0.9184057712554932,
1.0807459354400635,
-0.011341605335474014,
0.21388626098632812,
1.8561979532241821,
0.33391720056533813,
-0.47403448820114136,
0.787304699420929,
1.1917308568954468,
0.6167877912521362,
-0.6319718956947327,
0.0229073204100132,
-0.6080323457717896,
0.39491039514541626,
-1.4110041856765747,
0.2439514696598053,
-3.007650136947632,
0.7516820430755615,
-0.2498059868812561,
-0.14500287175178528,
-0.0986141487956047,
-1.2287415266036987,
1.0743894577026367,
2.6538379192352295,
-1.1552181243896484,
0.45075926184654236,
0.4738227128982544,
1.1410865783691406,
-1.578615665435791,
0.3343278467655182,
-0.4713137447834015,
2.063464879989624,
0.1877315640449524,
1.2152514457702637,
-0.5321264266967773,
-2.2450954914093018,
0.6429458856582642,
-1.2153412103652954,
-1.0432084798812866,
0.7741263508796692,
-0.867898166179657,
0.29215049743652344,
-1.4079108238220215,
-0.17274853587150574,
-0.9441843628883362,
-1.2880284786224365,
0.6711469292640686,
0.086606964468956,
0.3971702754497528,
-0.5149405002593994,
0.314278244972229,
-2.1487555503845215,
-1.388288140296936,
-0.19283655285835266,
-1.0145306587219238,
0.5570642352104187,
-0.40695515275001526,
0.6332821846008301,
-0.0914938747882843,
0.1370660960674286,
0.31131070852279663,
1.484718918800354,
3.480081796646118,
0.12180093675851822,
0.13266822695732117,
-0.18309324979782104,
-1.0180466175079346,
1.4451544284820557,
0.8326904773712158,
-0.17915090918540955,
-0.6389041543006897,
-1.0474354028701782,
1.299835205078125,
2.0237042903900146,
1.0284075736999512,
0.19939035177230835,
-0.8093906044960022,
-0.7003390789031982,
0.021059634163975716,
0.18717366456985474,
0.5391556024551392,
0.9805456399917603,
-0.009673808701336384,
-0.02411026880145073,
1.4108786582946777,
1.1515719890594482,
-0.291873961687088,
0.3336581885814667,
-0.9543558359146118,
-0.3344705104827881,
0.3973461985588074,
0.13856813311576843,
0.05648113787174225,
0.4662221372127533,
-0.962091863155365,
-0.2571069002151489,
-0.2867090404033661,
-0.8639850616455078,
-0.7515288591384888,
-0.3684696555137634,
-0.422649085521698,
1.6172963380813599,
0.10769613832235336,
-0.45696592330932617,
0.10450777411460876,
-0.6380931735038757,
-0.11103271692991257,
-1.0689653158187866,
0.11590280383825302,
-0.1445005238056183,
-0.12635594606399536,
-0.17505258321762085,
1.6940314769744873,
-0.8682612180709839,
-2.096261978149414,
0.14592218399047852,
0.30434760451316833,
-0.2600798010826111,
0.26812657713890076,
1.7432007789611816,
0.4474199116230011,
1.4148191213607788,
1.2337826490402222,
0.8716574311256409,
-0.603141725063324,
-1.2059686183929443,
0.7438895106315613,
0.9609299302101135,
-1.3852486610412598,
0.9393905401229858,
-0.23023787140846252,
-0.5054386854171753,
0.6367042064666748,
1.337061882019043,
0.4543505609035492,
-1.9682599306106567,
0.942534327507019,
-0.9188716411590576,
0.7950945496559143,
0.7792986035346985,
0.7171233892440796,
0.2251128852367401,
0.8946206569671631,
-1.215936541557312,
-1.1705137491226196,
-0.6737934947013855,
-0.6261355876922607,
1.9798524379730225,
-0.3228576183319092,
0.6108620166778564,
-0.13048729300498962,
-1.1974066495895386,
-0.14691337943077087,
0.7305076718330383,
0.3753122389316559,
-0.4007490575313568,
0.9858233332633972,
-0.6549562811851501,
-0.9697300791740417,
-1.264818787574768,
-0.4279916286468506,
-1.1257555484771729,
-0.8687691688537598,
1.052940011024475,
0.7592307329177856,
0.4666139781475067,
1.914159893989563,
0.6153295636177063,
0.3277973234653473,
-2.6667301654815674,
0.832010805606842,
0.31027063727378845,
-0.09668704122304916,
0.9081847667694092,
0.19739016890525818,
1.1299967765808105,
0.03602055832743645,
0.6056788563728333,
-2.368835210800171,
2.2369673252105713,
-0.17932897806167603,
0.6067410111427307,
0.04306119307875633,
-0.22749915719032288,
1.1047395467758179,
0.6067987680435181,
0.5935099124908447,
-1.1113851070404053,
0.6853543519973755,
-0.5779621005058289,
1.1798547506332397,
0.9598143100738525,
-0.9628496766090393,
0.07408969849348068,
1.4529565572738647,
0.487155556678772,
-0.44257813692092896,
-0.9421192407608032,
-0.891510009765625,
0.9148660898208618,
1.7604405879974365,
-0.030944086611270905,
-0.033667679876089096,
0.829529345035553,
0.63970547914505,
-1.2348970174789429,
0.0288892462849617,
-0.7081753015518188,
-0.7772815227508545,
1.6998498439788818,
2.0990257263183594,
-0.1291341781616211,
-0.2086438536643982,
-0.709568440914154,
-1.2969146966934204,
0.8287466168403625,
-0.21442225575447083,
0.05938853323459625,
0.5711574554443359,
-0.6540424227714539,
1.0253396034240723,
0.625797688961029,
1.0735622644424438,
0.05383600294589996,
0.27332603931427,
0.34238573908805847,
-0.4582996368408203,
-1.1179927587509155,
-0.2819300591945648,
-1.1325253248214722,
-2.5895497798919678,
0.3140318691730499,
-0.25898006558418274,
-1.5653163194656372,
0.11144983023405075,
-1.0229012966156006,
0.9122591018676758,
-0.5251320600509644,
-1.1560533046722412,
-1.3671287298202515,
0.2967901825904846,
-0.16548174619674683,
0.9520407915115356,
-1.6559550762176514,
-0.20492374897003174,
1.2993252277374268,
0.8656919598579407,
-0.5634041428565979,
0.9197123646736145,
0.2138325273990631,
0.9649266600608826,
0.7626258134841919,
-0.3515280783176422,
0.6316097974777222,
-0.024319401010870934,
-1.2969043254852295,
0.4016650319099426,
1.2337740659713745,
0.19418227672576904,
1.402892827987671,
-0.38188886642456055,
0.09453316777944565,
0.3923340439796448,
-0.7384844422340393,
-0.5130091905593872,
-0.3630467355251312,
0.7378540635108948,
0.028669200837612152,
-0.9903314709663391,
-0.1553160548210144,
-0.08922667801380157,
-0.2783595025539398,
0.18833842873573303,
-1.4907947778701782,
-0.35177144408226013,
-0.33227217197418213,
-0.43622344732284546,
-1.401495337486267,
-0.003700525965541601,
1.2721961736679077,
-0.7596662640571594,
-0.2506583034992218,
0.34376025199890137,
0.41022345423698425,
0.6285408735275269,
0.5927888751029968,
-0.8369166851043701,
-0.3400948643684387,
-0.30474239587783813,
-0.3198462724685669,
0.2749408781528473,
1.2308564186096191,
-0.042503438889980316,
-0.938648521900177,
0.667951762676239,
-0.29980477690696716,
0.21901339292526245,
1.990878939628601,
0.030075442045927048,
-0.7024016380310059,
0.36117976903915405,
-0.7344646453857422,
1.7475095987319946,
1.690842628479004,
1.2486375570297241,
-0.12627214193344116,
-0.7610958814620972,
0.5722519159317017,
-0.3020978569984436,
-0.3213278651237488,
0.9478383660316467,
0.4710526764392853,
-0.23562005162239075,
-1.4231176376342773,
0.6549779176712036,
1.2173360586166382,
-0.7174131870269775,
-0.7232736349105835,
0.0841507613658905,
-0.8726638555526733,
1.2975544929504395,
0.5282701253890991,
0.3115101456642151,
0.25514498353004456,
1.522966980934143,
0.8201467394828796,
-0.49221503734588623,
0.469727486371994,
0.576682984828949,
-0.23898205161094666,
-2.103775978088379,
-1.0275185108184814,
0.2638353109359741,
-0.39738890528678894,
-1.5570844411849976,
1.416525959968567,
-1.0906072854995728,
-0.9839913249015808,
0.5769091844558716,
0.07367342710494995,
1.2154265642166138,
0.33633774518966675,
1.691817045211792,
2.1352994441986084,
0.8963263630867004,
0.357265830039978,
1.216523289680481,
-0.05276961252093315,
-0.5141337513923645,
1.843973159790039,
-0.3948904275894165,
0.5508029460906982,
1.0781593322753906,
-0.36428484320640564,
-1.0694180727005005,
-0.8670538067817688,
-1.0839648246765137,
-0.659286618232727,
1.1842159032821655,
0.07893822342157364,
-1.0757639408111572,
0.17077836394309998,
1.607255458831787,
0.13210594654083252,
-0.1819101870059967,
0.6776005029678345,
0.39229753613471985,
-0.7278373837471008,
-0.12229275703430176,
-0.7880978584289551,
0.45395663380622864,
-0.17444860935211182,
-0.3232940137386322,
0.29070761799812317,
0.5371101498603821,
1.2976518869400024,
-0.12072700262069702,
0.10670289397239685,
1.0618011951446533,
-1.5189858675003052,
1.5188614130020142,
-0.6138664484024048,
0.416197270154953,
-2.469735622406006,
1.3803812265396118,
-0.756422221660614,
1.9856514930725098,
-2.5098049640655518,
0.5031332969665527,
-0.5261217355728149,
-0.5337443947792053,
0.21196824312210083,
-0.47844594717025757,
0.09904004633426666,
-0.16783687472343445,
-0.9089393019676208,
-0.021153438836336136,
-0.7550162672996521,
0.6092717051506042,
1.188137173652649,
1.3717849254608154,
-1.096179485321045,
-0.20403867959976196,
-1.6781202554702759,
-0.1945044994354248,
-0.8006681799888611,
0.3394424021244049,
-1.971735954284668,
-0.27130240201950073,
-2.0106775760650635,
-2.31785249710083,
-1.3279417753219604,
-0.8753008842468262,
1.0596299171447754,
0.2287183701992035,
-0.943642795085907,
1.2471591234207153,
-0.35858023166656494,
-1.7961609363555908,
1.1885188817977905,
-2.258922576904297
] |
https://github.com/huggingface/datasets/issues/5654 | Offset overflow when executing Dataset.map | As a workaround, one can replace
`return {"hr": torch.stack([crop_transf(tensor) for _ in range(25)])}`
with
`return {f"hr_crop_{i}": crop_transf(tensor) for i in range(25)}`
and then choose appropriate crop randomly in further processing, but I still don't understand why the original approach doesn't work(
| ### Describe the bug
Hi, I'm trying to use `.map` method to cache multiple random crops from the image to speed up data processing during training, as the image size is too big.
The map function executes all iterations, and then returns the following error:
```bash
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3353, in _map_single
writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 582, in finalize
self.write_examples_on_file()
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 446, in write_examples_on_file
self.write_batch(batch_examples=batch_examples)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 555, in write_batch
self.write_table(pa_table, writer_batch_size)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 567, in write_table
pa_table = pa_table.combine_chunks()
File "pyarrow/table.pxi", line 3315, in pyarrow.lib.Table.combine_chunks
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays
```
Here is the minimal code (`/home/datasets/DIV2K_train_HR` is just a folder of images that can be replaced by any appropriate):
### Steps to reproduce the bug
```python
from glob import glob
import torch
from datasets import Dataset, Image
from torchvision.transforms import PILToTensor, RandomCrop
file_paths = glob("/home/datasets/DIV2K_train_HR/*")
to_tensor = PILToTensor()
crop_transf = RandomCrop(size=256)
def prepare_data(example):
tensor = to_tensor(example["image"].convert("RGB"))
return {"hr": torch.stack([crop_transf(tensor) for _ in range(25)])}
train_data = Dataset.from_dict({"image": file_paths}).cast_column("image", Image())
train_data = train_data.map(
prepare_data,
cache_file_name="/home/datasets/DIV2K_train_HR_crops.tmp",
desc="Caching multiple random crops of image",
remove_columns="image",
)
print(train_data[0].keys(), train_data[0]["hr"].shape)
```
### Expected behavior
Cached file is stored at `"/home/datasets/DIV2K_train_HR_crops.tmp"`, output is `dict_keys(['hr']) torch.Size([25, 3, 256, 256])`
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.10
- Python version: 3.8.16
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Pytorch version: 2.0.0+cu117
- torchvision version: 0.15.1+cu117 | 248 | 41 | Offset overflow when executing Dataset.map
### Describe the bug
Hi, I'm trying to use `.map` method to cache multiple random crops from the image to speed up data processing during training, as the image size is too big.
The map function executes all iterations, and then returns the following error:
```bash
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3353, in _map_single
writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 582, in finalize
self.write_examples_on_file()
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 446, in write_examples_on_file
self.write_batch(batch_examples=batch_examples)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 555, in write_batch
self.write_table(pa_table, writer_batch_size)
File "/home/ubuntu/miniconda3/envs/enhancement/lib/python3.8/site-packages/datasets/arrow_writer.py", line 567, in write_table
pa_table = pa_table.combine_chunks()
File "pyarrow/table.pxi", line 3315, in pyarrow.lib.Table.combine_chunks
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays
```
Here is the minimal code (`/home/datasets/DIV2K_train_HR` is just a folder of images that can be replaced by any appropriate):
### Steps to reproduce the bug
```python
from glob import glob
import torch
from datasets import Dataset, Image
from torchvision.transforms import PILToTensor, RandomCrop
file_paths = glob("/home/datasets/DIV2K_train_HR/*")
to_tensor = PILToTensor()
crop_transf = RandomCrop(size=256)
def prepare_data(example):
tensor = to_tensor(example["image"].convert("RGB"))
return {"hr": torch.stack([crop_transf(tensor) for _ in range(25)])}
train_data = Dataset.from_dict({"image": file_paths}).cast_column("image", Image())
train_data = train_data.map(
prepare_data,
cache_file_name="/home/datasets/DIV2K_train_HR_crops.tmp",
desc="Caching multiple random crops of image",
remove_columns="image",
)
print(train_data[0].keys(), train_data[0]["hr"].shape)
```
### Expected behavior
Cached file is stored at `"/home/datasets/DIV2K_train_HR_crops.tmp"`, output is `dict_keys(['hr']) torch.Size([25, 3, 256, 256])`
### Environment info
- `datasets` version: 2.10.1
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.10
- Python version: 3.8.16
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
- Pytorch version: 2.0.0+cu117
- torchvision version: 0.15.1+cu117
As a workaround, one can replace
`return {"hr": torch.stack([crop_transf(tensor) for _ in range(25)])}`
with
`return {f"hr_crop_{i}": crop_transf(tensor) for i in range(25)}`
and then choose appropriate crop randomly in further processing, but I still don't understand why the original approach doesn't work(
| [
-1.1419036388397217,
-0.9015933871269226,
-0.674741804599762,
1.4203581809997559,
-0.08344558626413345,
-1.2954553365707397,
0.11724597960710526,
-1.11049485206604,
1.5052343606948853,
-0.7047635316848755,
0.17623287439346313,
-1.6150672435760498,
-0.08084351569414139,
-0.423324853181839,
-0.6788772344589233,
-0.9198555946350098,
-0.37300220131874084,
-0.9543673992156982,
1.0332118272781372,
2.558710813522339,
1.324643850326538,
-1.3202589750289917,
2.7931272983551025,
0.6716219186782837,
-0.2761255204677582,
-1.032772183418274,
0.5690174698829651,
0.041247766464948654,
-1.138435959815979,
-0.47546321153640747,
-0.9229650497436523,
-0.029189949855208397,
-0.5637543797492981,
-0.3579438626766205,
0.1088547483086586,
0.4451163709163666,
-0.3225398063659668,
-0.29832687973976135,
-0.6807606816291809,
-0.6901657581329346,
0.5764622688293457,
-0.3719836175441742,
0.9756468534469604,
-0.33434250950813293,
1.7536845207214355,
-0.5817937254905701,
0.4389147460460663,
0.7218191623687744,
1.311896800994873,
0.17465820908546448,
0.07827892899513245,
0.24634480476379395,
0.3157341778278351,
0.017843572422862053,
0.6123179197311401,
1.1521443128585815,
0.6095799207687378,
0.5402560234069824,
0.6433554291725159,
-2.2067224979400635,
1.2826896905899048,
-0.9069381952285767,
0.1661093533039093,
1.252009391784668,
-0.7527182102203369,
0.3131611943244934,
-1.7695449590682983,
-0.04693330079317093,
0.6333665251731873,
-2.2967724800109863,
0.28456658124923706,
-1.24558687210083,
-0.4723377823829651,
0.9335542321205139,
0.3332861363887787,
-1.2215321063995361,
0.18774446845054626,
-0.536781907081604,
1.1260972023010254,
0.4876478910446167,
1.066771149635315,
-1.6825505495071411,
0.0003651808947324753,
-0.14705729484558105,
0.07363083958625793,
-1.271820068359375,
-1.6979765892028809,
0.5363665819168091,
0.5119110345840454,
0.6520853638648987,
-0.016470570117235184,
1.0216902494430542,
-1.1384810209274292,
0.8040755987167358,
-0.982394278049469,
-1.5618979930877686,
-1.3475959300994873,
-2.4439198970794678,
-2.270505666732788,
0.763610303401947,
-0.5817214250564575,
-0.5060024857521057,
2.0832467079162598,
-0.9584029316902161,
-1.6897755861282349,
1.0992412567138672,
0.25750088691711426,
0.1659432351589203,
2.379396915435791,
0.20127183198928833,
-0.7424690127372742,
0.4966941773891449,
-0.7172593474388123,
0.7744436264038086,
-0.3423922657966614,
1.3238033056259155,
0.41188594698905945,
-1.0032073259353638,
1.6407054662704468,
-0.42085736989974976,
0.6237404942512512,
-0.6522539258003235,
-0.5044907927513123,
-0.8585336804389954,
0.2671152949333191,
1.8365308046340942,
-0.35812073945999146,
1.5002931356430054,
-0.3039965033531189,
-1.4905115365982056,
-1.538122296333313,
0.8277525305747986,
0.47501325607299805,
-0.8859316110610962,
0.04584091529250145,
-0.49016526341438293,
0.207609623670578,
0.02661990374326706,
1.11504065990448,
1.2205226421356201,
0.7128005027770996,
-0.329324334859848,
-0.8985145688056946,
0.22214582562446594,
-0.29414546489715576,
-0.6872003078460693,
-1.824386477470398,
-0.3177071809768677,
0.19053494930267334,
0.6414642333984375,
-1.2913823127746582,
1.7873868942260742,
0.8782558441162109,
2.026278257369995,
0.9284113645553589,
-0.4014768600463867,
1.4055927991867065,
-0.02982601895928383,
1.8208600282669067,
-0.44468533992767334,
0.5803451538085938,
-0.3176769018173218,
-1.1968448162078857,
0.821928858757019,
-0.41254299879074097,
-1.9521762132644653,
-0.8610246181488037,
-0.6407325267791748,
-0.23635467886924744,
-0.7025758624076843,
0.8497569561004639,
-0.37499895691871643,
-1.4953536987304688,
0.08913149684667587,
-0.6656729578971863,
0.13993990421295166,
-1.268739104270935,
0.21043488383293152,
0.7049342393875122,
-0.7612029314041138,
-0.010769970715045929,
-0.277647465467453,
-1.285865068435669,
-0.5702416300773621,
0.26164010167121887,
2.0257344245910645,
-0.6297450065612793,
0.9611911177635193,
1.0578149557113647,
-0.7400752305984497,
0.1568065881729126,
0.23126092553138733,
-0.4011858403682709,
0.7828513383865356,
-1.1715697050094604,
-0.4807358980178833,
1.2204424142837524,
-0.2957984507083893,
-0.7890396118164062,
1.407913327217102,
0.7734926342964172,
-1.1475275754928589,
-0.32349976897239685,
-0.1927689015865326,
-0.8871365785598755,
0.11076494306325912,
-1.5032374858856201,
-0.18737190961837769,
0.4347803294658661,
-1.5545194149017334,
-0.307367742061615,
-0.15569981932640076,
1.4231407642364502,
-0.19599419832229614,
1.463587999343872,
-0.3023071587085724,
-0.14620113372802734,
-0.2531031370162964,
-0.45086804032325745,
0.20980188250541687,
-0.145626038312912,
-0.5739368796348572,
0.20748171210289001,
-0.8582455515861511,
0.31464844942092896,
1.4606597423553467,
0.34148821234703064,
0.12019512802362442,
0.39639538526535034,
1.0396190881729126,
0.3671465516090393,
-0.05237211659550667,
-0.8628460764884949,
-1.5772660970687866,
1.9578282833099365,
-1.3897349834442139,
2.009589910507202,
0.8642393946647644,
-0.09994471818208694,
-1.8168668746948242,
-1.7967690229415894,
1.191200852394104,
1.053208827972412,
2.3196969032287598,
0.5046657919883728,
0.412443608045578,
-0.7573567032814026,
-0.7656424641609192,
0.2698071002960205,
-0.9903837442398071,
-0.6729345917701721,
0.23399242758750916,
2.3477656841278076,
1.7260242700576782,
-0.4478648900985718,
-0.219089537858963,
-0.8677995800971985,
1.2617191076278687,
-0.24025824666023254,
0.2872411012649536,
1.9929438829421997,
-0.24347922205924988,
-1.0194437503814697,
1.2882856130599976,
-2.455214262008667,
0.25934967398643494,
2.0896458625793457,
0.24487271904945374,
0.17010489106178284,
-1.4517951011657715,
-0.6978915929794312,
-0.3109629452228546,
-0.4239619970321655,
-1.2243455648422241,
0.5943768620491028,
-0.272194504737854,
-0.9372236132621765,
-1.4141396284103394,
0.0552746057510376,
-1.23618745803833,
-1.8058067560195923,
0.3456893563270569,
2.080303430557251,
2.131866216659546,
-0.774057149887085,
1.4412883520126343,
-0.2182767391204834,
-0.01863446831703186,
1.2715413570404053,
1.3672422170639038,
3.0330302715301514,
1.779886245727539,
-1.2983129024505615,
0.6901822686195374,
-0.21125385165214539,
-0.46932730078697205,
1.132032036781311,
-1.1696832180023193,
1.0569207668304443,
-0.1431504786014557,
-1.2304742336273193,
-1.217055082321167,
1.0336507558822632,
0.5089273452758789,
-0.029272273182868958,
-0.4485516846179962,
1.3052616119384766,
0.156521737575531,
1.3243170976638794,
0.5528918504714966,
-0.35942763090133667,
0.5432316660881042,
-0.3312133252620697,
-0.5798144936561584,
1.6776424646377563,
0.13414731621742249,
-1.5363377332687378,
-2.369004011154175,
-0.28621724247932434,
-0.9435715675354004,
-0.00909662526100874,
-0.5962001085281372,
-1.0622562170028687,
1.630303978919983,
0.4030734598636627,
-1.18410325050354,
-0.2872768044471741,
-0.2422543466091156,
-0.47982731461524963,
2.6925976276397705,
-1.240139365196228,
-0.15018638968467712,
-0.9230738282203674,
-0.5246002674102783,
1.597629427909851,
-1.2584868669509888,
-0.2829113006591797,
-0.9893190264701843,
-0.6476419568061829,
-1.2932300567626953,
-0.46802791953086853,
0.06455818563699722,
-0.9992730021476746,
0.7660961151123047,
0.3287241458892822,
-1.1180833578109741,
-0.33962851762771606,
-0.9184057712554932,
1.0807459354400635,
-0.011341605335474014,
0.21388626098632812,
1.8561979532241821,
0.33391720056533813,
-0.47403448820114136,
0.787304699420929,
1.1917308568954468,
0.6167877912521362,
-0.6319718956947327,
0.0229073204100132,
-0.6080323457717896,
0.39491039514541626,
-1.4110041856765747,
0.2439514696598053,
-3.007650136947632,
0.7516820430755615,
-0.2498059868812561,
-0.14500287175178528,
-0.0986141487956047,
-1.2287415266036987,
1.0743894577026367,
2.6538379192352295,
-1.1552181243896484,
0.45075926184654236,
0.4738227128982544,
1.1410865783691406,
-1.578615665435791,
0.3343278467655182,
-0.4713137447834015,
2.063464879989624,
0.1877315640449524,
1.2152514457702637,
-0.5321264266967773,
-2.2450954914093018,
0.6429458856582642,
-1.2153412103652954,
-1.0432084798812866,
0.7741263508796692,
-0.867898166179657,
0.29215049743652344,
-1.4079108238220215,
-0.17274853587150574,
-0.9441843628883362,
-1.2880284786224365,
0.6711469292640686,
0.086606964468956,
0.3971702754497528,
-0.5149405002593994,
0.314278244972229,
-2.1487555503845215,
-1.388288140296936,
-0.19283655285835266,
-1.0145306587219238,
0.5570642352104187,
-0.40695515275001526,
0.6332821846008301,
-0.0914938747882843,
0.1370660960674286,
0.31131070852279663,
1.484718918800354,
3.480081796646118,
0.12180093675851822,
0.13266822695732117,
-0.18309324979782104,
-1.0180466175079346,
1.4451544284820557,
0.8326904773712158,
-0.17915090918540955,
-0.6389041543006897,
-1.0474354028701782,
1.299835205078125,
2.0237042903900146,
1.0284075736999512,
0.19939035177230835,
-0.8093906044960022,
-0.7003390789031982,
0.021059634163975716,
0.18717366456985474,
0.5391556024551392,
0.9805456399917603,
-0.009673808701336384,
-0.02411026880145073,
1.4108786582946777,
1.1515719890594482,
-0.291873961687088,
0.3336581885814667,
-0.9543558359146118,
-0.3344705104827881,
0.3973461985588074,
0.13856813311576843,
0.05648113787174225,
0.4662221372127533,
-0.962091863155365,
-0.2571069002151489,
-0.2867090404033661,
-0.8639850616455078,
-0.7515288591384888,
-0.3684696555137634,
-0.422649085521698,
1.6172963380813599,
0.10769613832235336,
-0.45696592330932617,
0.10450777411460876,
-0.6380931735038757,
-0.11103271692991257,
-1.0689653158187866,
0.11590280383825302,
-0.1445005238056183,
-0.12635594606399536,
-0.17505258321762085,
1.6940314769744873,
-0.8682612180709839,
-2.096261978149414,
0.14592218399047852,
0.30434760451316833,
-0.2600798010826111,
0.26812657713890076,
1.7432007789611816,
0.4474199116230011,
1.4148191213607788,
1.2337826490402222,
0.8716574311256409,
-0.603141725063324,
-1.2059686183929443,
0.7438895106315613,
0.9609299302101135,
-1.3852486610412598,
0.9393905401229858,
-0.23023787140846252,
-0.5054386854171753,
0.6367042064666748,
1.337061882019043,
0.4543505609035492,
-1.9682599306106567,
0.942534327507019,
-0.9188716411590576,
0.7950945496559143,
0.7792986035346985,
0.7171233892440796,
0.2251128852367401,
0.8946206569671631,
-1.215936541557312,
-1.1705137491226196,
-0.6737934947013855,
-0.6261355876922607,
1.9798524379730225,
-0.3228576183319092,
0.6108620166778564,
-0.13048729300498962,
-1.1974066495895386,
-0.14691337943077087,
0.7305076718330383,
0.3753122389316559,
-0.4007490575313568,
0.9858233332633972,
-0.6549562811851501,
-0.9697300791740417,
-1.264818787574768,
-0.4279916286468506,
-1.1257555484771729,
-0.8687691688537598,
1.052940011024475,
0.7592307329177856,
0.4666139781475067,
1.914159893989563,
0.6153295636177063,
0.3277973234653473,
-2.6667301654815674,
0.832010805606842,
0.31027063727378845,
-0.09668704122304916,
0.9081847667694092,
0.19739016890525818,
1.1299967765808105,
0.03602055832743645,
0.6056788563728333,
-2.368835210800171,
2.2369673252105713,
-0.17932897806167603,
0.6067410111427307,
0.04306119307875633,
-0.22749915719032288,
1.1047395467758179,
0.6067987680435181,
0.5935099124908447,
-1.1113851070404053,
0.6853543519973755,
-0.5779621005058289,
1.1798547506332397,
0.9598143100738525,
-0.9628496766090393,
0.07408969849348068,
1.4529565572738647,
0.487155556678772,
-0.44257813692092896,
-0.9421192407608032,
-0.891510009765625,
0.9148660898208618,
1.7604405879974365,
-0.030944086611270905,
-0.033667679876089096,
0.829529345035553,
0.63970547914505,
-1.2348970174789429,
0.0288892462849617,
-0.7081753015518188,
-0.7772815227508545,
1.6998498439788818,
2.0990257263183594,
-0.1291341781616211,
-0.2086438536643982,
-0.709568440914154,
-1.2969146966934204,
0.8287466168403625,
-0.21442225575447083,
0.05938853323459625,
0.5711574554443359,
-0.6540424227714539,
1.0253396034240723,
0.625797688961029,
1.0735622644424438,
0.05383600294589996,
0.27332603931427,
0.34238573908805847,
-0.4582996368408203,
-1.1179927587509155,
-0.2819300591945648,
-1.1325253248214722,
-2.5895497798919678,
0.3140318691730499,
-0.25898006558418274,
-1.5653163194656372,
0.11144983023405075,
-1.0229012966156006,
0.9122591018676758,
-0.5251320600509644,
-1.1560533046722412,
-1.3671287298202515,
0.2967901825904846,
-0.16548174619674683,
0.9520407915115356,
-1.6559550762176514,
-0.20492374897003174,
1.2993252277374268,
0.8656919598579407,
-0.5634041428565979,
0.9197123646736145,
0.2138325273990631,
0.9649266600608826,
0.7626258134841919,
-0.3515280783176422,
0.6316097974777222,
-0.024319401010870934,
-1.2969043254852295,
0.4016650319099426,
1.2337740659713745,
0.19418227672576904,
1.402892827987671,
-0.38188886642456055,
0.09453316777944565,
0.3923340439796448,
-0.7384844422340393,
-0.5130091905593872,
-0.3630467355251312,
0.7378540635108948,
0.028669200837612152,
-0.9903314709663391,
-0.1553160548210144,
-0.08922667801380157,
-0.2783595025539398,
0.18833842873573303,
-1.4907947778701782,
-0.35177144408226013,
-0.33227217197418213,
-0.43622344732284546,
-1.401495337486267,
-0.003700525965541601,
1.2721961736679077,
-0.7596662640571594,
-0.2506583034992218,
0.34376025199890137,
0.41022345423698425,
0.6285408735275269,
0.5927888751029968,
-0.8369166851043701,
-0.3400948643684387,
-0.30474239587783813,
-0.3198462724685669,
0.2749408781528473,
1.2308564186096191,
-0.042503438889980316,
-0.938648521900177,
0.667951762676239,
-0.29980477690696716,
0.21901339292526245,
1.990878939628601,
0.030075442045927048,
-0.7024016380310059,
0.36117976903915405,
-0.7344646453857422,
1.7475095987319946,
1.690842628479004,
1.2486375570297241,
-0.12627214193344116,
-0.7610958814620972,
0.5722519159317017,
-0.3020978569984436,
-0.3213278651237488,
0.9478383660316467,
0.4710526764392853,
-0.23562005162239075,
-1.4231176376342773,
0.6549779176712036,
1.2173360586166382,
-0.7174131870269775,
-0.7232736349105835,
0.0841507613658905,
-0.8726638555526733,
1.2975544929504395,
0.5282701253890991,
0.3115101456642151,
0.25514498353004456,
1.522966980934143,
0.8201467394828796,
-0.49221503734588623,
0.469727486371994,
0.576682984828949,
-0.23898205161094666,
-2.103775978088379,
-1.0275185108184814,
0.2638353109359741,
-0.39738890528678894,
-1.5570844411849976,
1.416525959968567,
-1.0906072854995728,
-0.9839913249015808,
0.5769091844558716,
0.07367342710494995,
1.2154265642166138,
0.33633774518966675,
1.691817045211792,
2.1352994441986084,
0.8963263630867004,
0.357265830039978,
1.216523289680481,
-0.05276961252093315,
-0.5141337513923645,
1.843973159790039,
-0.3948904275894165,
0.5508029460906982,
1.0781593322753906,
-0.36428484320640564,
-1.0694180727005005,
-0.8670538067817688,
-1.0839648246765137,
-0.659286618232727,
1.1842159032821655,
0.07893822342157364,
-1.0757639408111572,
0.17077836394309998,
1.607255458831787,
0.13210594654083252,
-0.1819101870059967,
0.6776005029678345,
0.39229753613471985,
-0.7278373837471008,
-0.12229275703430176,
-0.7880978584289551,
0.45395663380622864,
-0.17444860935211182,
-0.3232940137386322,
0.29070761799812317,
0.5371101498603821,
1.2976518869400024,
-0.12072700262069702,
0.10670289397239685,
1.0618011951446533,
-1.5189858675003052,
1.5188614130020142,
-0.6138664484024048,
0.416197270154953,
-2.469735622406006,
1.3803812265396118,
-0.756422221660614,
1.9856514930725098,
-2.5098049640655518,
0.5031332969665527,
-0.5261217355728149,
-0.5337443947792053,
0.21196824312210083,
-0.47844594717025757,
0.09904004633426666,
-0.16783687472343445,
-0.9089393019676208,
-0.021153438836336136,
-0.7550162672996521,
0.6092717051506042,
1.188137173652649,
1.3717849254608154,
-1.096179485321045,
-0.20403867959976196,
-1.6781202554702759,
-0.1945044994354248,
-0.8006681799888611,
0.3394424021244049,
-1.971735954284668,
-0.27130240201950073,
-2.0106775760650635,
-2.31785249710083,
-1.3279417753219604,
-0.8753008842468262,
1.0596299171447754,
0.2287183701992035,
-0.943642795085907,
1.2471591234207153,
-0.35858023166656494,
-1.7961609363555908,
1.1885188817977905,
-2.258922576904297
] |
https://github.com/huggingface/datasets/issues/5651 | expanduser in save_to_disk | Hello,
It says `save_to_disk` is deprecated in 2.8.0, so the alternative to this will be `storage_options`?
https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset.save_to_disk | ### Describe the bug
save_to_disk() does not expand `~`
1. `dataset = load_datasets("any dataset")`
2. `dataset.save_to_disk("~/data")`
3. a folder named "~" created in current folder
4. FileNotFoundError is raised, because the expanded path does not exist (`/home/<user>/data`)
related issue https://github.com/huggingface/transformers/issues/10628
### Steps to reproduce the bug
As described above.
### Expected behavior
expanduser correctly
### Environment info
- datasets 2.10.1
- python 3.10 | 250 | 17 | expanduser in save_to_disk
### Describe the bug
save_to_disk() does not expand `~`
1. `dataset = load_datasets("any dataset")`
2. `dataset.save_to_disk("~/data")`
3. a folder named "~" created in current folder
4. FileNotFoundError is raised, because the expanded path does not exist (`/home/<user>/data`)
related issue https://github.com/huggingface/transformers/issues/10628
### Steps to reproduce the bug
As described above.
### Expected behavior
expanduser correctly
### Environment info
- datasets 2.10.1
- python 3.10
Hello,
It says `save_to_disk` is deprecated in 2.8.0, so the alternative to this will be `storage_options`?
https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset.save_to_disk | [
-1.0576820373535156,
-0.927256166934967,
-0.7667570114135742,
1.5916049480438232,
-0.13244694471359253,
-1.294582724571228,
0.16829988360404968,
-1.0108109712600708,
1.6749076843261719,
-0.7757883071899414,
0.2886429727077484,
-1.6766926050186157,
-0.0746159702539444,
-0.6652974486351013,
-0.6757482886314392,
-0.9141940474510193,
-0.358799546957016,
-0.7021095156669617,
0.922261118888855,
2.583293914794922,
1.2657238245010376,
-1.2032324075698853,
2.69480299949646,
0.6341385841369629,
-0.19171345233917236,
-1.004098892211914,
0.5257852077484131,
0.021510563790798187,
-1.2476500272750854,
-0.47836989164352417,
-0.9447601437568665,
-0.0727808028459549,
-0.41489678621292114,
-0.5560832023620605,
0.06972413510084152,
0.4662357270717621,
-0.35098811984062195,
-0.39936184883117676,
-0.5988590121269226,
-0.8774399161338806,
0.41338494420051575,
-0.3937636613845825,
1.018720269203186,
-0.4211373031139374,
1.808342695236206,
-0.6901888251304626,
0.4449448883533478,
0.7053361535072327,
1.3062185049057007,
0.14034762978553772,
0.024748969823122025,
0.2863081097602844,
0.42514944076538086,
0.04207996651530266,
0.4825444221496582,
1.0465154647827148,
0.6063398122787476,
0.5919117331504822,
0.6638608574867249,
-2.208996057510376,
1.256730556488037,
-0.9629353284835815,
0.13366353511810303,
1.3573347330093384,
-0.9853547215461731,
0.3407723903656006,
-1.712357997894287,
-0.10641345381736755,
0.6727818846702576,
-2.172722816467285,
0.23560291528701782,
-1.3453657627105713,
-0.48742035031318665,
0.9725316166877747,
0.42219552397727966,
-1.2618858814239502,
0.06445873528718948,
-0.3953569233417511,
0.9798493385314941,
0.4785061776638031,
1.0512484312057495,
-1.740310549736023,
-0.022352144122123718,
-0.2307993471622467,
-0.024353113025426865,
-1.374196171760559,
-1.5523512363433838,
0.5595676898956299,
0.6047469973564148,
0.6931934952735901,
-0.09045320004224777,
0.9299641251564026,
-0.8584089875221252,
0.6910650134086609,
-0.9846840500831604,
-1.7663813829421997,
-1.3711848258972168,
-2.391695976257324,
-2.361940860748291,
0.7156180739402771,
-0.4388570487499237,
-0.47974443435668945,
1.9998847246170044,
-0.9981045722961426,
-1.7977527379989624,
1.0137630701065063,
0.17310845851898193,
0.01484268344938755,
2.390995740890503,
0.31183844804763794,
-0.6482664346694946,
0.41641920804977417,
-0.6845489144325256,
0.6677631735801697,
-0.37106072902679443,
1.313974380493164,
0.44913390278816223,
-1.1927838325500488,
1.67212975025177,
-0.4577715992927551,
0.5778281688690186,
-0.7431012392044067,
-0.4403964877128601,
-0.8680459856987,
0.21991300582885742,
1.8908958435058594,
-0.3688576817512512,
1.5222926139831543,
-0.3424617648124695,
-1.5600545406341553,
-1.6788671016693115,
0.8548275828361511,
0.32690349221229553,
-0.7219644784927368,
0.10238946229219437,
-0.4223552346229553,
0.12330158799886703,
-0.06431865692138672,
1.239682912826538,
1.2734227180480957,
0.5439253449440002,
-0.4135840833187103,
-0.8065369725227356,
0.22207817435264587,
-0.023039795458316803,
-0.7306712865829468,
-1.7988698482513428,
-0.2966250777244568,
0.26650142669677734,
0.5923218727111816,
-1.1164071559906006,
1.8159278631210327,
0.7978112101554871,
1.8856453895568848,
1.0455974340438843,
-0.2814317047595978,
1.3569583892822266,
0.04020119830965996,
1.9976884126663208,
-0.5558768510818481,
0.622006356716156,
-0.3108522295951843,
-1.1364471912384033,
0.8361335396766663,
-0.39632317423820496,
-1.9586772918701172,
-0.8308719396591187,
-0.8552205562591553,
-0.17018267512321472,
-0.6937815546989441,
1.0092540979385376,
-0.24489447474479675,
-1.332953691482544,
0.20859163999557495,
-0.7766841650009155,
0.14671620726585388,
-1.223630666732788,
0.2401011884212494,
0.7811574339866638,
-0.691925048828125,
0.0030903834849596024,
-0.23852890729904175,
-1.3400042057037354,
-0.44543081521987915,
0.39080458879470825,
1.984285593032837,
-0.7507346272468567,
1.0005549192428589,
0.9251096844673157,
-0.6889973282814026,
0.014106381684541702,
0.2837722599506378,
-0.3512730300426483,
0.8172299861907959,
-1.111419677734375,
-0.29776740074157715,
1.220003604888916,
-0.3034178614616394,
-0.7645993828773499,
1.5043723583221436,
0.6998814940452576,
-1.0387272834777832,
-0.14940783381462097,
-0.2012624442577362,
-0.8574492335319519,
0.05558968335390091,
-1.6597421169281006,
-0.10435297340154648,
0.390938401222229,
-1.4134151935577393,
-0.4635039269924164,
-0.16059675812721252,
1.4818823337554932,
-0.08068141341209412,
1.3350143432617188,
-0.2722429633140564,
-0.35230740904808044,
-0.3741512894630432,
-0.4385819733142853,
0.12245523184537888,
-0.19754910469055176,
-0.597420871257782,
0.22720491886138916,
-0.7829756140708923,
0.3310348093509674,
1.421817660331726,
0.2833799719810486,
0.10973192751407623,
0.6022946238517761,
1.096792459487915,
0.3178570866584778,
-0.12795497477054596,
-0.8558080792427063,
-1.6668787002563477,
1.9755855798721313,
-1.2515898942947388,
2.0122480392456055,
0.7106281518936157,
-0.11651020497083664,
-1.8109726905822754,
-1.9220494031906128,
1.2869316339492798,
1.1353849172592163,
2.368037223815918,
0.5686110258102417,
0.39423683285713196,
-0.810342013835907,
-0.7069052457809448,
0.2761913239955902,
-0.9526726603507996,
-0.6874169111251831,
0.16485735774040222,
2.3696963787078857,
1.7608327865600586,
-0.4861815273761749,
-0.1860877275466919,
-1.135811448097229,
1.2514249086380005,
-0.22708573937416077,
0.2000332772731781,
2.0769503116607666,
-0.3171175718307495,
-0.9776819944381714,
1.3026070594787598,
-2.3280861377716064,
0.21580034494400024,
2.104677677154541,
0.16472962498664856,
0.08935768157243729,
-1.5036982297897339,
-0.7545550465583801,
-0.35244739055633545,
-0.32219621539115906,
-1.277541995048523,
0.5781463980674744,
-0.2895089387893677,
-0.870978593826294,
-1.4226329326629639,
0.09565939009189606,
-0.9988670945167542,
-1.66880464553833,
0.2688746154308319,
1.8558595180511475,
1.9830830097198486,
-0.7853854894638062,
1.466997504234314,
-0.16749447584152222,
0.10910739004611969,
1.396527886390686,
1.2798594236373901,
3.121938467025757,
1.9607082605361938,
-1.308969259262085,
0.8716891407966614,
-0.086441770195961,
-0.37484949827194214,
1.2851566076278687,
-1.1427054405212402,
1.3090167045593262,
-0.29560133814811707,
-1.3022464513778687,
-1.3870679140090942,
0.974234402179718,
0.5370634198188782,
-0.0020439280197024345,
-0.49872398376464844,
1.328188180923462,
0.0908653661608696,
1.3271607160568237,
0.6044880151748657,
-0.4906170070171356,
0.6422545909881592,
-0.39662644267082214,
-0.45482540130615234,
1.5824090242385864,
0.3358535170555115,
-1.5416220426559448,
-2.335679531097412,
-0.24358311295509338,
-0.9461900591850281,
-0.17901238799095154,
-0.585955023765564,
-0.9654712677001953,
1.6589996814727783,
0.4133165776729584,
-1.161277174949646,
-0.32531189918518066,
-0.2490350902080536,
-0.509758710861206,
2.819308280944824,
-1.3244683742523193,
-0.18660709261894226,
-1.1198468208312988,
-0.6144763827323914,
1.7089757919311523,
-1.2927141189575195,
-0.2430550754070282,
-1.0791202783584595,
-0.6212730407714844,
-1.3013848066329956,
-0.45473483204841614,
0.07854243367910385,
-0.9413934350013733,
0.8137621283531189,
0.046581659466028214,
-1.1785168647766113,
-0.2643241286277771,
-0.9288032650947571,
0.9844567179679871,
-0.19624117016792297,
0.2499370276927948,
1.927764654159546,
0.45043349266052246,
-0.5322012305259705,
0.6711142063140869,
1.1062748432159424,
0.5818220973014832,
-0.7272084951400757,
0.26691290736198425,
-0.6701528429985046,
0.22880351543426514,
-1.3493821620941162,
0.27888959646224976,
-2.944544553756714,
0.5506055355072021,
-0.16547644138336182,
-0.03995241969823837,
0.043871521949768066,
-1.2758139371871948,
1.0544661283493042,
2.519840717315674,
-1.2525272369384766,
0.458252489566803,
0.30994880199432373,
1.1756858825683594,
-1.5749133825302124,
0.39673998951911926,
-0.4006931483745575,
2.0321080684661865,
0.22771623730659485,
1.1176902055740356,
-0.3963155448436737,
-1.987408995628357,
0.6617224216461182,
-1.2626593112945557,
-1.0896432399749756,
0.7625930905342102,
-0.8252967000007629,
0.07922327518463135,
-1.3687241077423096,
-0.10293487459421158,
-0.781213641166687,
-1.3530044555664062,
0.748853862285614,
0.04057910665869713,
0.4292416572570801,
-0.43211492896080017,
0.35085955262184143,
-2.1433558464050293,
-1.2712914943695068,
-0.21653655171394348,
-0.9424095153808594,
0.4338114559650421,
-0.270609974861145,
0.7355487942695618,
-0.22515803575515747,
0.08761060237884521,
0.255934476852417,
1.4386234283447266,
3.4297919273376465,
0.21409174799919128,
0.24887654185295105,
-0.1266084611415863,
-0.9553931355476379,
1.4501698017120361,
0.8927359580993652,
-0.11126018315553665,
-0.5076976418495178,
-1.0004146099090576,
1.2784903049468994,
1.95608651638031,
1.037759780883789,
0.14577418565750122,
-0.9502680897712708,
-0.8143184781074524,
-0.06867841631174088,
0.15604737401008606,
0.48758143186569214,
0.8632994294166565,
0.06243804097175598,
-0.02548423409461975,
1.4323290586471558,
1.2196264266967773,
-0.316753625869751,
0.34655794501304626,
-0.9273728728294373,
-0.31821712851524353,
0.502752423286438,
0.2884833812713623,
0.09105316549539566,
0.3758877217769623,
-1.0185737609863281,
-0.21722573041915894,
-0.37031322717666626,
-0.8929190039634705,
-0.7854750156402588,
-0.51424640417099,
-0.3836655020713806,
1.5261417627334595,
0.090022511780262,
-0.478439062833786,
-0.09567403048276901,
-0.7108344435691833,
-0.14125779271125793,
-1.0120749473571777,
0.2860715091228485,
-0.1061931923031807,
-0.13232295215129852,
-0.0922369435429573,
1.6885502338409424,
-1.0232049226760864,
-2.1777913570404053,
0.29221197962760925,
0.25307607650756836,
-0.38779187202453613,
0.23852938413619995,
1.5911242961883545,
0.6472514271736145,
1.399186134338379,
1.3203688859939575,
0.9988939166069031,
-0.7145164012908936,
-1.370410442352295,
0.6567456722259521,
0.9567854404449463,
-1.5313562154769897,
0.8804792761802673,
-0.10451759397983551,
-0.48852047324180603,
0.6551939249038696,
1.1608890295028687,
0.42771828174591064,
-1.8376580476760864,
0.7247186303138733,
-0.8296918272972107,
0.7875961661338806,
0.7497970461845398,
0.8265343904495239,
0.2249252200126648,
0.7853381037712097,
-1.234005331993103,
-1.1742560863494873,
-0.6628413200378418,
-0.6127249598503113,
1.8831703662872314,
-0.2693991959095001,
0.5936465263366699,
-0.2651611864566803,
-1.2803322076797485,
-0.05492766201496124,
0.782147228717804,
0.35959914326667786,
-0.4648568034172058,
0.8406551480293274,
-0.6214264035224915,
-0.9885540008544922,
-1.2599451541900635,
-0.49353864789009094,
-1.0701687335968018,
-0.9717884659767151,
1.0448745489120483,
0.7462252974510193,
0.402174174785614,
1.8688645362854004,
0.5675082206726074,
0.3488449454307556,
-2.6832921504974365,
0.9250527024269104,
0.22539681196212769,
0.035637274384498596,
0.8912534713745117,
0.30753302574157715,
1.145471453666687,
-0.07136218249797821,
0.5829007625579834,
-2.4565579891204834,
2.2939112186431885,
-0.2602001428604126,
0.5518458485603333,
-0.046760279685258865,
-0.1916586458683014,
1.098956823348999,
0.5151688456535339,
0.5815074443817139,
-1.0983161926269531,
0.7525472640991211,
-0.5481082201004028,
1.095994234085083,
0.8074588179588318,
-0.9656928777694702,
-0.024487901479005814,
1.442948818206787,
0.5893610715866089,
-0.4244665801525116,
-0.8625081181526184,
-0.9048523306846619,
0.9273267984390259,
1.6474522352218628,
0.05055105686187744,
-0.0627318024635315,
0.9927350878715515,
0.5231579542160034,
-1.2617605924606323,
0.1140519306063652,
-0.6876971125602722,
-0.574338436126709,
1.6615447998046875,
2.004103899002075,
-0.07356352359056473,
-0.1590101718902588,
-0.7751665711402893,
-1.0905678272247314,
0.8420639634132385,
0.05371423810720444,
-0.008793285116553307,
0.7574822306632996,
-0.6100056767463684,
1.0843981504440308,
0.6906833052635193,
1.0646414756774902,
0.11648393422365189,
0.40447476506233215,
0.4381932318210602,
-0.3757150173187256,
-1.222792387008667,
-0.3155965805053711,
-1.0998985767364502,
-2.481740951538086,
0.43145114183425903,
-0.3048020899295807,
-1.4615046977996826,
0.11968187242746353,
-1.0713794231414795,
0.8776920437812805,
-0.5565809011459351,
-1.1633365154266357,
-1.4991557598114014,
0.1997241973876953,
-0.2056398093700409,
0.962773323059082,
-1.554203987121582,
-0.08624834567308426,
1.3025288581848145,
0.7982786893844604,
-0.6542375087738037,
0.9231277108192444,
0.1884656548500061,
1.0423455238342285,
0.7739440202713013,
-0.30444613099098206,
0.4964413344860077,
0.02784838154911995,
-1.4198250770568848,
0.48943665623664856,
1.1237728595733643,
0.1864699125289917,
1.4842476844787598,
-0.5563750863075256,
0.11377769708633423,
0.4183520972728729,
-0.5828196406364441,
-0.5360795855522156,
-0.473328173160553,
0.7342833280563354,
0.1335906982421875,
-0.9060220718383789,
-0.040195927023887634,
-0.029972100630402565,
-0.1874885857105255,
0.11637047678232193,
-1.48094642162323,
-0.1332497000694275,
-0.31383007764816284,
-0.6879615187644958,
-1.1748126745224,
-0.053167421370744705,
1.277801752090454,
-0.7314486503601074,
-0.13352730870246887,
0.5546563267707825,
0.2850680947303772,
0.5165548920631409,
0.5737278461456299,
-0.6478719711303711,
-0.17264032363891602,
-0.37932735681533813,
-0.27482566237449646,
0.31220999360084534,
1.3256072998046875,
-0.059876956045627594,
-1.0335696935653687,
0.8192203640937805,
-0.4719516634941101,
0.16400539875030518,
2.021449089050293,
0.044400427490472794,
-0.7919338345527649,
0.242963969707489,
-0.7012791037559509,
1.981203556060791,
1.650936484336853,
1.3246876001358032,
-0.013249783776700497,
-0.9656451344490051,
0.5691400766372681,
-0.2632180452346802,
-0.3490067720413208,
0.876437783241272,
0.44271254539489746,
-0.2314395010471344,
-1.2403876781463623,
0.6571292281150818,
1.2463655471801758,
-0.8349311351776123,
-0.7751495242118835,
0.18145030736923218,
-0.9094035625457764,
1.051051378250122,
0.6988391876220703,
0.44024133682250977,
0.2894120514392853,
1.4347965717315674,
0.6653235554695129,
-0.4910047948360443,
0.4052852392196655,
0.5120224952697754,
-0.13900592923164368,
-1.974478840827942,
-1.029920220375061,
0.38260912895202637,
-0.5375291109085083,
-1.5741277933120728,
1.3446948528289795,
-1.2571256160736084,
-0.9069695472717285,
0.4913497865200043,
0.2212633192539215,
1.4128351211547852,
0.35685020685195923,
1.5354915857315063,
2.1011881828308105,
0.9237998723983765,
0.39413517713546753,
1.3358100652694702,
-0.0335400253534317,
-0.4831749498844147,
1.8076412677764893,
-0.3474808633327484,
0.566220760345459,
1.041153907775879,
-0.3754730224609375,
-1.1331415176391602,
-0.8009169697761536,
-1.2042832374572754,
-0.5767831206321716,
1.1219719648361206,
0.18978211283683777,
-1.0901753902435303,
0.2084534764289856,
1.4923456907272339,
0.1468714475631714,
-0.3001422882080078,
0.6539722681045532,
0.3751002550125122,
-0.7562806010246277,
-0.0107167549431324,
-0.8547152876853943,
0.5796470046043396,
-0.17626389861106873,
-0.2922224998474121,
0.3649722933769226,
0.4433605670928955,
1.3161240816116333,
-0.07825508713722229,
0.2193625271320343,
1.297276496887207,
-1.3445194959640503,
1.6332197189331055,
-0.586783230304718,
0.1808180809020996,
-2.4030613899230957,
1.4118971824645996,
-0.705345869064331,
1.8393912315368652,
-2.6376006603240967,
0.4014433026313782,
-0.4976625442504883,
-0.435024231672287,
0.2102426290512085,
-0.28541100025177,
0.05783484876155853,
-0.23146995902061462,
-1.16110098361969,
-0.0438493937253952,
-0.7483048439025879,
0.5998993515968323,
1.224210500717163,
1.3474053144454956,
-1.1800603866577148,
-0.26236507296562195,
-1.8775951862335205,
-0.13965550065040588,
-0.8444336652755737,
0.34376057982444763,
-1.9388203620910645,
-0.1364055871963501,
-1.8806413412094116,
-2.545200824737549,
-1.3545030355453491,
-0.7298821806907654,
1.0424413681030273,
0.1976335644721985,
-0.9618067145347595,
1.2180423736572266,
-0.3025674819946289,
-1.7941181659698486,
1.0446891784667969,
-2.244337558746338
] |
https://github.com/huggingface/datasets/issues/5651 | expanduser in save_to_disk | @ashikshafi08 I think you misunderstood the warning. The method `save_to_disk` is not deprecated only the optional parameter `fs`.
Also @benjaminbrown038 as I cannot find your PR I would like to work on this if you don't mind. | ### Describe the bug
save_to_disk() does not expand `~`
1. `dataset = load_datasets("any dataset")`
2. `dataset.save_to_disk("~/data")`
3. a folder named "~" created in current folder
4. FileNotFoundError is raised, because the expanded path does not exist (`/home/<user>/data`)
related issue https://github.com/huggingface/transformers/issues/10628
### Steps to reproduce the bug
As described above.
### Expected behavior
expanduser correctly
### Environment info
- datasets 2.10.1
- python 3.10 | 250 | 37 | expanduser in save_to_disk
### Describe the bug
save_to_disk() does not expand `~`
1. `dataset = load_datasets("any dataset")`
2. `dataset.save_to_disk("~/data")`
3. a folder named "~" created in current folder
4. FileNotFoundError is raised, because the expanded path does not exist (`/home/<user>/data`)
related issue https://github.com/huggingface/transformers/issues/10628
### Steps to reproduce the bug
As described above.
### Expected behavior
expanduser correctly
### Environment info
- datasets 2.10.1
- python 3.10
@ashikshafi08 I think you misunderstood the warning. The method `save_to_disk` is not deprecated only the optional parameter `fs`.
Also @benjaminbrown038 as I cannot find your PR I would like to work on this if you don't mind. | [
-1.1272523403167725,
-0.9754670262336731,
-0.8069787621498108,
1.5878663063049316,
-0.1684221476316452,
-1.2639816999435425,
0.15103262662887573,
-1.084669828414917,
1.6760002374649048,
-0.7810794115066528,
0.31201061606407166,
-1.646477222442627,
-0.05643539875745773,
-0.6805170774459839,
-0.707025945186615,
-0.9246087074279785,
-0.34462276101112366,
-0.6983464360237122,
0.980958104133606,
2.5435492992401123,
1.1706335544586182,
-1.19253408908844,
2.740886688232422,
0.6367564797401428,
-0.1501035988330841,
-1.017033338546753,
0.5384038686752319,
-0.023639606311917305,
-1.210515022277832,
-0.5297026634216309,
-0.9933278560638428,
-0.0964798703789711,
-0.45266345143318176,
-0.6030839085578918,
0.06894960254430771,
0.39958062767982483,
-0.340726375579834,
-0.4277583062648773,
-0.5395171642303467,
-0.9077975749969482,
0.4081170856952667,
-0.39983004331588745,
0.9890210628509521,
-0.4240298569202423,
1.8396680355072021,
-0.680064857006073,
0.41826683282852173,
0.7222493886947632,
1.3961440324783325,
0.1840442717075348,
0.019432444125413895,
0.2990689277648926,
0.45438146591186523,
0.046752236783504486,
0.46604758501052856,
1.0251692533493042,
0.5811260342597961,
0.6088302731513977,
0.6970716118812561,
-2.1993143558502197,
1.264327049255371,
-0.9881483912467957,
0.13076624274253845,
1.3457914590835571,
-1.0312609672546387,
0.3766492009162903,
-1.7098058462142944,
-0.07444953918457031,
0.5910305380821228,
-2.184704303741455,
0.2476121187210083,
-1.302154779434204,
-0.48343023657798767,
1.027815818786621,
0.43263378739356995,
-1.3043164014816284,
0.035602014511823654,
-0.3837473690509796,
1.016213059425354,
0.4582459628582001,
1.0951557159423828,
-1.7176496982574463,
-0.032784510403871536,
-0.2322569340467453,
0.005167270079255104,
-1.351447343826294,
-1.5239334106445312,
0.5374601483345032,
0.5990657806396484,
0.6128223538398743,
-0.07893764227628708,
0.9596409201622009,
-0.9053293466567993,
0.724481999874115,
-0.968552827835083,
-1.7704274654388428,
-1.3477051258087158,
-2.321202278137207,
-2.3275346755981445,
0.7111033797264099,
-0.45640650391578674,
-0.4860445559024811,
2.028470039367676,
-1.0710649490356445,
-1.7928991317749023,
1.082068681716919,
0.15054158866405487,
0.029276959598064423,
2.3752591609954834,
0.3157096207141876,
-0.6190651655197144,
0.41286200284957886,
-0.6991429924964905,
0.688460111618042,
-0.39899104833602905,
1.3102930784225464,
0.4092390835285187,
-1.0986348390579224,
1.7110497951507568,
-0.41185054183006287,
0.5802799463272095,
-0.7419127225875854,
-0.4283864498138428,
-0.8625487685203552,
0.2486349642276764,
1.933746099472046,
-0.34804272651672363,
1.541640281677246,
-0.40779179334640503,
-1.6148759126663208,
-1.6849066019058228,
0.8364850878715515,
0.3528811037540436,
-0.7056129574775696,
0.1894344687461853,
-0.3531179428100586,
0.13638725876808167,
-0.011810513213276863,
1.2453504800796509,
1.3296144008636475,
0.5812675356864929,
-0.3772205710411072,
-0.8301494121551514,
0.218057319521904,
0.04340844601392746,
-0.7204149961471558,
-1.7464163303375244,
-0.36119136214256287,
0.2235683649778366,
0.6649633646011353,
-1.0981013774871826,
1.7918671369552612,
0.8355311155319214,
1.8529253005981445,
1.0961484909057617,
-0.26155605912208557,
1.3894091844558716,
0.07364091277122498,
2.002448081970215,
-0.508158266544342,
0.6394350528717041,
-0.3190491795539856,
-1.129683017730713,
0.785966157913208,
-0.4020736515522003,
-1.9779101610183716,
-0.8139953017234802,
-0.8466688990592957,
-0.19963431358337402,
-0.7053308486938477,
1.0171387195587158,
-0.3102554976940155,
-1.3723584413528442,
0.2792421281337738,
-0.7964014410972595,
0.11577946692705154,
-1.1932865381240845,
0.30205804109573364,
0.7576932311058044,
-0.7245189547538757,
0.04818311706185341,
-0.2681851387023926,
-1.3323396444320679,
-0.411484032869339,
0.33641931414604187,
1.9893604516983032,
-0.7925928831100464,
1.0184623003005981,
0.9140059351921082,
-0.6874489784240723,
-0.03151719272136688,
0.3674040734767914,
-0.34776371717453003,
0.8375554084777832,
-1.1391204595565796,
-0.3050462305545807,
1.2310229539871216,
-0.2909865379333496,
-0.7169603109359741,
1.4303404092788696,
0.6980938911437988,
-1.0255999565124512,
-0.12924350798130035,
-0.1795927733182907,
-0.8538655042648315,
0.015754491090774536,
-1.6641342639923096,
-0.13513481616973877,
0.35412201285362244,
-1.4273426532745361,
-0.46740102767944336,
-0.15956665575504303,
1.4483517408370972,
-0.062292084097862244,
1.3374160528182983,
-0.3005351126194,
-0.3426465392112732,
-0.4396313428878784,
-0.48918718099594116,
0.1403607726097107,
-0.20509713888168335,
-0.6094152331352234,
0.2012658566236496,
-0.739990770816803,
0.3351803719997406,
1.404181957244873,
0.29422512650489807,
0.1096118614077568,
0.5936429500579834,
1.122101902961731,
0.28872427344322205,
-0.11661907285451889,
-0.8726641535758972,
-1.656495213508606,
1.9746172428131104,
-1.3276290893554688,
2.0045177936553955,
0.715752363204956,
-0.14619965851306915,
-1.7835009098052979,
-1.9373037815093994,
1.3357114791870117,
1.1741490364074707,
2.342198371887207,
0.5794031620025635,
0.3955126106739044,
-0.7866307497024536,
-0.7044408321380615,
0.298921138048172,
-1.0140864849090576,
-0.7586468458175659,
0.08684131503105164,
2.39194917678833,
1.7286049127578735,
-0.45821791887283325,
-0.2089879810810089,
-1.1505012512207031,
1.2569931745529175,
-0.17921356856822968,
0.18606719374656677,
2.0364620685577393,
-0.2731349766254425,
-1.0567508935928345,
1.2704991102218628,
-2.2707936763763428,
0.1638844609260559,
2.0576555728912354,
0.1826833337545395,
0.08391908556222916,
-1.4623697996139526,
-0.7634782791137695,
-0.2592008411884308,
-0.33396732807159424,
-1.2826403379440308,
0.5824733972549438,
-0.27109992504119873,
-0.8348862528800964,
-1.3925071954727173,
0.06814314424991608,
-1.0245953798294067,
-1.6642531156539917,
0.24589908123016357,
1.877373218536377,
1.9899545907974243,
-0.798717200756073,
1.5149282217025757,
-0.14176145195960999,
0.13676278293132782,
1.3563504219055176,
1.2300498485565186,
3.161959648132324,
1.9446020126342773,
-1.3054574728012085,
0.788912296295166,
-0.08159934729337692,
-0.37855321168899536,
1.2648828029632568,
-1.1174979209899902,
1.33103609085083,
-0.28100019693374634,
-1.2641379833221436,
-1.3500392436981201,
0.9287862777709961,
0.49624577164649963,
-0.0349864587187767,
-0.43130064010620117,
1.2989654541015625,
0.09512509405612946,
1.309979796409607,
0.5773662328720093,
-0.4613237679004669,
0.7282008528709412,
-0.3915208578109741,
-0.4189407527446747,
1.608161449432373,
0.31527942419052124,
-1.502984642982483,
-2.287182569503784,
-0.15766972303390503,
-0.9369393587112427,
-0.11185725778341293,
-0.5425427556037903,
-0.9370157718658447,
1.610535979270935,
0.4365888237953186,
-1.1971831321716309,
-0.32928967475891113,
-0.33952534198760986,
-0.6231926083564758,
2.771955728530884,
-1.3643890619277954,
-0.26890653371810913,
-1.0810949802398682,
-0.6240480542182922,
1.6868054866790771,
-1.3001478910446167,
-0.2472502887248993,
-1.0494329929351807,
-0.5802850127220154,
-1.2808178663253784,
-0.4697984457015991,
0.08092671632766724,
-0.9601040482521057,
0.8390090465545654,
0.06263957172632217,
-1.2147586345672607,
-0.2238590121269226,
-0.9184098839759827,
0.905180037021637,
-0.16974081099033356,
0.28775638341903687,
1.9502770900726318,
0.4119317829608917,
-0.5206544995307922,
0.7005206346511841,
1.1088273525238037,
0.5505382418632507,
-0.6874953508377075,
0.32186558842658997,
-0.6623372435569763,
0.2844361960887909,
-1.3288017511367798,
0.2944997251033783,
-2.9079525470733643,
0.630596399307251,
-0.137200266122818,
-0.10295874625444412,
0.034946754574775696,
-1.2957135438919067,
1.0404455661773682,
2.5483343601226807,
-1.2620748281478882,
0.44914576411247253,
0.2414628267288208,
1.256553292274475,
-1.5947093963623047,
0.37700772285461426,
-0.3686179518699646,
2.0571377277374268,
0.2759138345718384,
1.146980881690979,
-0.38423871994018555,
-2.0459370613098145,
0.6758484244346619,
-1.214220643043518,
-1.167212963104248,
0.7488551735877991,
-0.7717515230178833,
0.003376568667590618,
-1.330235242843628,
-0.13369426131248474,
-0.7626736760139465,
-1.3232331275939941,
0.7315093278884888,
0.10406007617712021,
0.48781436681747437,
-0.4563314914703369,
0.30264052748680115,
-2.1452367305755615,
-1.2644332647323608,
-0.2038370668888092,
-0.948415994644165,
0.3783249855041504,
-0.32180255651474,
0.7368088960647583,
-0.26668670773506165,
0.10606682300567627,
0.26508426666259766,
1.4482876062393188,
3.441403865814209,
0.24405202269554138,
0.28502750396728516,
-0.16067957878112793,
-0.9179933071136475,
1.4614851474761963,
0.8737987875938416,
-0.13307231664657593,
-0.5489861965179443,
-1.024882435798645,
1.2622839212417603,
1.9470478296279907,
0.9439027309417725,
0.17392098903656006,
-0.8992527723312378,
-0.7519016265869141,
-0.09045340120792389,
0.11820828169584274,
0.49542245268821716,
0.921954870223999,
0.059629492461681366,
0.001856708899140358,
1.4646183252334595,
1.1957411766052246,
-0.35120734572410583,
0.3510396182537079,
-0.8772265315055847,
-0.3221776485443115,
0.517041027545929,
0.31958097219467163,
0.13683751225471497,
0.23870490491390228,
-0.9749517440795898,
-0.21457967162132263,
-0.37046176195144653,
-0.9263380169868469,
-0.8199610710144043,
-0.396391361951828,
-0.3257405757904053,
1.514111876487732,
0.08898778259754181,
-0.47329211235046387,
-0.16154855489730835,
-0.7277500033378601,
-0.09280213713645935,
-0.9735649824142456,
0.2666971683502197,
-0.08539092540740967,
-0.18541786074638367,
-0.05411383509635925,
1.6977406740188599,
-1.0732637643814087,
-2.178483724594116,
0.32110586762428284,
0.2056008279323578,
-0.3637225031852722,
0.24316346645355225,
1.539304256439209,
0.6726529598236084,
1.4103474617004395,
1.325897455215454,
1.0219253301620483,
-0.7165418267250061,
-1.3285874128341675,
0.6540396213531494,
0.8732452392578125,
-1.4926881790161133,
0.8218231797218323,
-0.03423990309238434,
-0.4668682813644409,
0.6459296941757202,
1.1943882703781128,
0.4432033896446228,
-1.845605731010437,
0.6929615139961243,
-0.8351792693138123,
0.7680203914642334,
0.7259644865989685,
0.7874706387519836,
0.2129724770784378,
0.8532816767692566,
-1.1929473876953125,
-1.188735842704773,
-0.6576904058456421,
-0.6298908591270447,
1.911464810371399,
-0.2741160988807678,
0.5447718501091003,
-0.2530982196331024,
-1.324275016784668,
-0.0739252120256424,
0.7320431470870972,
0.308295875787735,
-0.44747215509414673,
0.7998948693275452,
-0.7070450186729431,
-1.0086965560913086,
-1.3364628553390503,
-0.46888020634651184,
-1.0557719469070435,
-0.9782760739326477,
1.0153647661209106,
0.7815601825714111,
0.32962775230407715,
1.8972707986831665,
0.5512523651123047,
0.33921360969543457,
-2.6988584995269775,
0.9467751979827881,
0.2345535308122635,
0.028624791651964188,
0.9293352961540222,
0.3065222501754761,
1.0985034704208374,
-0.04251578822731972,
0.5906815528869629,
-2.4601871967315674,
2.327986240386963,
-0.2906803488731384,
0.5649642944335938,
-0.041140295565128326,
-0.18938149511814117,
1.1188743114471436,
0.5005447268486023,
0.6412533521652222,
-1.0460649728775024,
0.7581152319908142,
-0.5799070000648499,
1.1450586318969727,
0.8900514245033264,
-0.940113365650177,
-0.006242798175662756,
1.4347673654556274,
0.5404637455940247,
-0.49497947096824646,
-0.8823232650756836,
-0.9567258358001709,
0.9460214376449585,
1.7358918190002441,
0.06645636260509491,
-0.0626530721783638,
0.8978185057640076,
0.5418553948402405,
-1.2777972221374512,
0.0941687524318695,
-0.7344852685928345,
-0.6729249358177185,
1.6352417469024658,
2.0402798652648926,
-0.11368729919195175,
-0.20885810256004333,
-0.7607650756835938,
-1.1191664934158325,
0.8362908959388733,
0.11969555169343948,
0.05790238082408905,
0.7750160694122314,
-0.639157235622406,
1.0963850021362305,
0.7812807559967041,
1.0376635789871216,
0.18692678213119507,
0.37356647849082947,
0.43630146980285645,
-0.3194907009601593,
-1.1837007999420166,
-0.2847856283187866,
-1.07398521900177,
-2.480213165283203,
0.40996548533439636,
-0.290496289730072,
-1.4572514295578003,
0.10679164528846741,
-1.046474814414978,
0.8414245247840881,
-0.5592215061187744,
-1.1485649347305298,
-1.5551830530166626,
0.19464486837387085,
-0.178523987531662,
0.9440808892250061,
-1.5407263040542603,
-0.053325626999139786,
1.2852418422698975,
0.8979445099830627,
-0.6880870461463928,
0.9304817318916321,
0.12995360791683197,
1.0624728202819824,
0.8313239216804504,
-0.3537474274635315,
0.45723992586135864,
0.05907462537288666,
-1.3689593076705933,
0.4873635768890381,
1.1486903429031372,
0.1738162636756897,
1.5369740724563599,
-0.553379237651825,
0.09130789339542389,
0.40455642342567444,
-0.5287236571311951,
-0.5734140872955322,
-0.518291711807251,
0.6836315989494324,
0.1250758171081543,
-0.8782723546028137,
0.009535078890621662,
-0.0181803647428751,
-0.17044174671173096,
0.154926136136055,
-1.5154900550842285,
-0.14220179617404938,
-0.33151769638061523,
-0.7305856347084045,
-1.1372352838516235,
-0.06157488748431206,
1.2724030017852783,
-0.7106940150260925,
-0.15799596905708313,
0.5370189547538757,
0.2934691309928894,
0.4785168766975403,
0.5213449001312256,
-0.671325147151947,
-0.2512020468711853,
-0.3466421961784363,
-0.2841130495071411,
0.2965027093887329,
1.319189429283142,
-0.08384387940168381,
-1.0380539894104004,
0.7802179455757141,
-0.46054771542549133,
0.14939738810062408,
1.9716805219650269,
-0.02291104942560196,
-0.8187443017959595,
0.19814318418502808,
-0.7145101428031921,
2.0065829753875732,
1.6540782451629639,
1.3552297353744507,
-0.006520761176943779,
-1.0003823041915894,
0.6068481206893921,
-0.23907876014709473,
-0.3849834203720093,
0.9004073739051819,
0.42834535241127014,
-0.23301716148853302,
-1.2671418190002441,
0.6544355154037476,
1.1983691453933716,
-0.810703456401825,
-0.7875927090644836,
0.1117318868637085,
-0.8950965404510498,
1.0128077268600464,
0.6961776614189148,
0.48906999826431274,
0.22413788735866547,
1.4642071723937988,
0.7004449963569641,
-0.48148053884506226,
0.4654832184314728,
0.5026251673698425,
-0.13623298704624176,
-1.9981191158294678,
-1.1318376064300537,
0.3578501343727112,
-0.4886521100997925,
-1.6367396116256714,
1.3742893934249878,
-1.2551381587982178,
-0.8899385929107666,
0.48421117663383484,
0.20858533680438995,
1.4095122814178467,
0.3259264826774597,
1.5076818466186523,
2.0860679149627686,
0.9322304725646973,
0.43213164806365967,
1.331172227859497,
-0.0915544182062149,
-0.46428582072257996,
1.7572866678237915,
-0.3789033889770508,
0.5446589589118958,
1.0533612966537476,
-0.36288392543792725,
-1.1275348663330078,
-0.7805371284484863,
-1.1853759288787842,
-0.6376423835754395,
1.0942816734313965,
0.20800475776195526,
-1.1053506135940552,
0.21087610721588135,
1.5059762001037598,
0.12539930641651154,
-0.30075356364250183,
0.6500243544578552,
0.3894379436969757,
-0.7558065056800842,
0.039126619696617126,
-0.8517150282859802,
0.5654218792915344,
-0.18116411566734314,
-0.36057114601135254,
0.4020610451698303,
0.37623777985572815,
1.333457112312317,
-0.052243202924728394,
0.15588106215000153,
1.3371455669403076,
-1.337591290473938,
1.6488536596298218,
-0.6075507402420044,
0.20670126378536224,
-2.3877735137939453,
1.3929105997085571,
-0.7496552467346191,
1.8018195629119873,
-2.6274967193603516,
0.4219324588775635,
-0.5362098813056946,
-0.4159112274646759,
0.2399342954158783,
-0.26874083280563354,
0.10969845205545425,
-0.2534864544868469,
-1.1307374238967896,
-0.05461104214191437,
-0.7097300887107849,
0.5596411824226379,
1.2199501991271973,
1.3040019273757935,
-1.1401704549789429,
-0.2337823510169983,
-1.8800795078277588,
-0.1014864593744278,
-0.7748680114746094,
0.3408683240413666,
-2.0387918949127197,
-0.19828037917613983,
-1.9003868103027344,
-2.5073421001434326,
-1.255193829536438,
-0.7081510424613953,
1.0917932987213135,
0.21404509246349335,
-0.9285807609558105,
1.2353062629699707,
-0.3164931535720825,
-1.778696060180664,
1.040123462677002,
-2.194620132446289
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > Can you post a reproducible code snippet of what you tried to do?
>
>
```python
from datasets import load_dataset
dataset = load_dataset("my_folder_name", split="train")
``` | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 26 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> Can you post a reproducible code snippet of what you tried to do?
>
>
```python
from datasets import load_dataset
dataset = load_dataset("my_folder_name", split="train")
``` | [
-1.2013336420059204,
-1.0052695274353027,
-0.772676944732666,
1.5287882089614868,
-0.16347981989383698,
-1.176393985748291,
0.19591024518013,
-1.1448971033096313,
1.6954517364501953,
-0.9504185914993286,
0.3071989417076111,
-1.672231674194336,
-0.05329584330320358,
-0.3899010121822357,
-0.7265116572380066,
-1.0449475049972534,
-0.49657124280929565,
-0.7900310158729553,
1.0741370916366577,
2.3469350337982178,
1.2499645948410034,
-1.264854073524475,
2.6871519088745117,
0.637665867805481,
-0.20829133689403534,
-1.1033484935760498,
0.6543779969215393,
-0.009622172452509403,
-1.0557804107666016,
-0.47774767875671387,
-0.9315977096557617,
-0.08470745384693146,
-0.5091424584388733,
-0.5995886325836182,
-0.14841651916503906,
0.45681291818618774,
-0.3986072242259979,
-0.3225156366825104,
-0.5431075692176819,
-0.8103150129318237,
0.48296645283699036,
-0.3337182104587555,
0.8811637759208679,
-0.5361032485961914,
1.8552093505859375,
-0.5136130452156067,
0.44268113374710083,
0.6868431568145752,
1.3257066011428833,
0.171840637922287,
-0.05059518292546272,
0.20547904074192047,
0.4956549406051636,
-0.11854784935712814,
0.35520607233047485,
1.294859528541565,
0.42793822288513184,
0.6997964382171631,
0.7693549990653992,
-2.2708497047424316,
1.271905541419983,
-1.0307804346084595,
0.3056386113166809,
1.254530668258667,
-0.9075974225997925,
0.2558256983757019,
-1.7472895383834839,
-0.0882362425327301,
0.47289785742759705,
-2.2447338104248047,
0.261913925409317,
-1.2678570747375488,
-0.542413592338562,
0.9408906102180481,
0.39724934101104736,
-1.2245357036590576,
0.0898447260260582,
-0.31426873803138733,
1.020932674407959,
0.5763556361198425,
1.1124727725982666,
-1.6559425592422485,
0.03873634338378906,
-0.2937436103820801,
0.01708468422293663,
-1.3578541278839111,
-1.460992455482483,
0.5755882859230042,
0.5563580989837646,
0.7147787809371948,
-0.1311493068933487,
1.1086689233779907,
-1.014747977256775,
0.6955500841140747,
-0.994479238986969,
-1.4509488344192505,
-1.367438554763794,
-2.310081958770752,
-2.3292644023895264,
0.739686131477356,
-0.6334362030029297,
-0.5932943224906921,
2.060230016708374,
-1.0898981094360352,
-1.7719846963882446,
1.2050564289093018,
0.22436298429965973,
0.10418619960546494,
2.3809735774993896,
0.3180621564388275,
-0.6683918833732605,
0.47946563363075256,
-0.7847917675971985,
0.9101566076278687,
-0.33696070313453674,
1.4379469156265259,
0.5271235704421997,
-0.9467543363571167,
1.7450491189956665,
-0.3200249671936035,
0.7398294806480408,
-0.5200222134590149,
-0.6354672908782959,
-0.8649427890777588,
0.3778049945831299,
1.8478916883468628,
-0.3374609351158142,
1.6036207675933838,
-0.2662162482738495,
-1.5050352811813354,
-1.7342300415039062,
1.0001949071884155,
0.45256030559539795,
-0.7742248773574829,
0.14819712936878204,
-0.35550788044929504,
0.006526019424200058,
0.05294472351670265,
1.2261013984680176,
1.2936303615570068,
0.8342207074165344,
-0.3925773501396179,
-0.8829497694969177,
0.14308103919029236,
-0.09751994907855988,
-0.6054742932319641,
-1.7670787572860718,
-0.48808160424232483,
0.1334732174873352,
0.5732740759849548,
-1.0960667133331299,
1.6653733253479004,
1.0433802604675293,
2.004476547241211,
0.95127934217453,
-0.3292473256587982,
1.3819458484649658,
0.018056869506835938,
1.8369804620742798,
-0.39265894889831543,
0.5576720237731934,
-0.29949891567230225,
-1.2246514558792114,
0.9075489044189453,
-0.35019651055336,
-1.9388049840927124,
-0.9358963370323181,
-0.9170658588409424,
-0.10232669115066528,
-0.8097265362739563,
0.9966558814048767,
-0.31163308024406433,
-1.4415215253829956,
0.2731344401836395,
-0.5966400504112244,
0.08694588392972946,
-1.2654458284378052,
0.43089842796325684,
0.701305091381073,
-0.6362791061401367,
-0.0902782753109932,
-0.19564682245254517,
-1.2604588270187378,
-0.4677961468696594,
0.17322859168052673,
2.0126707553863525,
-0.7920036911964417,
0.8948374390602112,
1.0343858003616333,
-0.8187054395675659,
-0.01932685449719429,
0.18281468749046326,
-0.18647998571395874,
0.6968951225280762,
-0.9677111506462097,
-0.37696051597595215,
1.2462462186813354,
-0.264350950717926,
-0.7028905749320984,
1.48232901096344,
0.6624148488044739,
-0.9483646750450134,
-0.1149316355586052,
-0.26397794485092163,
-0.720905601978302,
-0.11712707579135895,
-1.4200551509857178,
-0.037096817046403885,
0.3540686368942261,
-1.4294675588607788,
-0.5027146935462952,
-0.15021613240242004,
1.3532819747924805,
-0.2616732716560364,
1.3362270593643188,
-0.37155815958976746,
-0.28125742077827454,
-0.3857297897338867,
-0.516155481338501,
0.19971634447574615,
-0.20680132508277893,
-0.6665111780166626,
0.14164291322231293,
-0.8404466509819031,
0.3185296356678009,
1.4719183444976807,
0.40683653950691223,
0.05874161794781685,
0.5060927867889404,
1.1207889318466187,
0.4575447142124176,
-0.0707622542977333,
-0.8674119114875793,
-1.419461727142334,
1.9421411752700806,
-1.4813199043273926,
1.9633023738861084,
0.5842188000679016,
-0.21971558034420013,
-1.8001980781555176,
-1.8879257440567017,
1.3261901140213013,
1.34488046169281,
2.3117153644561768,
0.5599939227104187,
0.34532788395881653,
-0.8239292502403259,
-0.804705023765564,
0.34021052718162537,
-1.1319489479064941,
-0.5704535245895386,
0.1070789098739624,
2.2207162380218506,
1.6837178468704224,
-0.6322563290596008,
-0.1241622343659401,
-1.0108071565628052,
1.3745126724243164,
-0.10225500166416168,
0.2966967523097992,
1.8815919160842896,
-0.4078778028488159,
-1.1913038492202759,
1.2443599700927734,
-2.2483174800872803,
0.06214068457484245,
2.0430991649627686,
0.34268513321876526,
0.11371845006942749,
-1.3629608154296875,
-0.583236575126648,
-0.3003520369529724,
-0.5547917485237122,
-1.3484838008880615,
0.5717064142227173,
-0.23791883885860443,
-0.7843174338340759,
-1.3621724843978882,
0.21443621814250946,
-1.0393975973129272,
-1.6088613271713257,
0.3905310332775116,
1.990307331085205,
2.1565089225769043,
-0.7595190405845642,
1.50979483127594,
-0.26944342255592346,
0.16449953615665436,
1.1424401998519897,
1.2310842275619507,
2.999051809310913,
1.9046493768692017,
-1.2467286586761475,
0.6078219413757324,
-0.11951150745153427,
-0.6068045496940613,
1.2726037502288818,
-1.0920251607894897,
1.329336404800415,
-0.20139320194721222,
-1.073749303817749,
-1.285729169845581,
0.8980951309204102,
0.395885169506073,
0.13958758115768433,
-0.5226520895957947,
1.2526111602783203,
0.10896369069814682,
1.3054527044296265,
0.5484060645103455,
-0.3392932713031769,
0.7102129459381104,
-0.4444207549095154,
-0.617104709148407,
1.5824122428894043,
0.30900517106056213,
-1.5126299858093262,
-2.2782673835754395,
-0.2110319435596466,
-0.8471968173980713,
0.05137905478477478,
-0.4606795608997345,
-1.0350311994552612,
1.6827424764633179,
0.4359258711338043,
-1.2552690505981445,
-0.307525634765625,
-0.2943158447742462,
-0.6125006079673767,
2.8249337673187256,
-1.2140358686447144,
-0.21788203716278076,
-0.864967942237854,
-0.662945032119751,
1.7607641220092773,
-1.239222764968872,
-0.0869741141796112,
-0.9887802004814148,
-0.500938892364502,
-1.4217219352722168,
-0.5332687497138977,
0.01573929935693741,
-0.9397012591362,
0.8665422797203064,
0.22808513045310974,
-1.167952060699463,
-0.31299346685409546,
-0.7817457318305969,
0.9307278394699097,
-0.19803480803966522,
0.30078932642936707,
1.8825135231018066,
0.36895281076431274,
-0.3820529282093048,
0.7779594659805298,
1.2394838333129883,
0.5817325711250305,
-0.634876012802124,
0.15100589394569397,
-0.7204829454421997,
0.32052361965179443,
-1.336465835571289,
0.17590847611427307,
-3.0214366912841797,
0.6994924545288086,
-0.05465961620211601,
-0.2332887500524521,
-0.03536719083786011,
-1.3871843814849854,
1.0893336534500122,
2.5185816287994385,
-1.3190507888793945,
0.4625076651573181,
0.3201856315135956,
1.1554317474365234,
-1.5200639963150024,
0.30788514018058777,
-0.5767369866371155,
2.081803560256958,
0.2695961594581604,
1.2381902933120728,
-0.5381433367729187,
-2.204073905944824,
0.6004531979560852,
-1.2451273202896118,
-1.2275776863098145,
0.7949463725090027,
-0.9561183452606201,
0.10524424910545349,
-1.3781391382217407,
-0.10601550340652466,
-0.9113398194313049,
-1.2033759355545044,
0.7787124514579773,
0.24230366945266724,
0.3736429214477539,
-0.49062395095825195,
0.4199017584323883,
-2.2577688694000244,
-1.4500762224197388,
-0.29493024945259094,
-1.028656244277954,
0.5329965949058533,
-0.44510403275489807,
0.7182165384292603,
-0.2123449146747589,
0.10188817232847214,
0.4524175226688385,
1.422741174697876,
3.391710042953491,
0.1981717050075531,
0.2823079824447632,
-0.13620102405548096,
-0.9419676661491394,
1.712554693222046,
0.9722891449928284,
0.030978064984083176,
-0.48551735281944275,
-1.0203455686569214,
1.1822253465652466,
1.9701006412506104,
0.9407306909561157,
-0.13254284858703613,
-0.829092264175415,
-0.5525938868522644,
-0.14239905774593353,
0.17631469666957855,
0.5299513936042786,
0.9209300875663757,
0.11925659328699112,
0.11950799077749252,
1.3636215925216675,
1.1875579357147217,
-0.39715665578842163,
0.32870370149612427,
-0.8633308410644531,
-0.5288553833961487,
0.4972769021987915,
0.362642765045166,
0.06746692210435867,
0.46021032333374023,
-0.9280984401702881,
-0.30083540081977844,
-0.3098377585411072,
-0.7916302680969238,
-0.7031093239784241,
-0.41655728220939636,
-0.39051660895347595,
1.5626431703567505,
0.019329752773046494,
-0.6016214489936829,
0.02191372588276863,
-0.8312972187995911,
-0.10774685442447662,
-1.2572104930877686,
0.24408337473869324,
-0.07798109203577042,
-0.173275426030159,
-0.09137105196714401,
1.7200061082839966,
-1.0027917623519897,
-2.1457135677337646,
0.3167102336883545,
0.45267266035079956,
-0.33630526065826416,
0.1480911523103714,
1.5356028079986572,
0.5084422826766968,
1.399880051612854,
1.2904554605484009,
1.0389039516448975,
-0.7265034317970276,
-1.207335114479065,
0.7231361865997314,
0.8293331265449524,
-1.3563286066055298,
0.8275129199028015,
0.04471277445554733,
-0.5061922669410706,
0.6146466732025146,
1.0782185792922974,
0.5247085094451904,
-1.9293185472488403,
0.8382298350334167,
-0.9191031455993652,
0.8172392249107361,
0.6752289533615112,
0.7009937167167664,
0.23039759695529938,
0.9265553951263428,
-1.0571576356887817,
-1.208240270614624,
-0.7321663498878479,
-0.8023136258125305,
1.8330479860305786,
-0.3778518736362457,
0.6747353672981262,
-0.2694293260574341,
-1.2163094282150269,
-0.041465677320957184,
0.7338261008262634,
0.25613322854042053,
-0.41372713446617126,
0.8213972449302673,
-0.5807157754898071,
-1.0945332050323486,
-1.4101570844650269,
-0.3215225040912628,
-1.1937501430511475,
-1.0668221712112427,
1.0790135860443115,
0.6988779306411743,
0.2999020218849182,
1.9275580644607544,
0.658534049987793,
0.3366198241710663,
-2.5831570625305176,
0.8952731490135193,
0.2785702347755432,
0.018824376165866852,
0.8008725643157959,
0.3744978904724121,
1.031062364578247,
-0.1257476955652237,
0.5669008493423462,
-2.3226022720336914,
2.2846689224243164,
-0.33637455105781555,
0.6394391059875488,
0.07900352776050568,
-0.23161722719669342,
1.0793383121490479,
0.6231525540351868,
0.5724045634269714,
-1.1785919666290283,
0.674113929271698,
-0.5299283266067505,
1.1648749113082886,
0.9099446535110474,
-0.8033474683761597,
0.16592971980571747,
1.4139645099639893,
0.5628579258918762,
-0.45081618428230286,
-0.9413489103317261,
-0.9571101665496826,
0.9261699914932251,
1.5607104301452637,
-0.12660664319992065,
0.007777455262839794,
0.7827894687652588,
0.5975308418273926,
-1.3233249187469482,
0.028811000287532806,
-0.6858097910881042,
-0.6661235690116882,
1.678055763244629,
2.0617966651916504,
-0.1599648892879486,
-0.14138714969158173,
-0.656630277633667,
-1.2589584589004517,
0.9140170216560364,
0.02363969013094902,
0.14095774292945862,
0.5574496388435364,
-0.7100380063056946,
1.0160845518112183,
0.7929390072822571,
0.7887619137763977,
0.1932723969221115,
0.3778628706932068,
0.5271131992340088,
-0.21810539066791534,
-1.0461424589157104,
-0.19674870371818542,
-1.0550657510757446,
-2.575836181640625,
0.3932098150253296,
-0.3794543743133545,
-1.2657891511917114,
-0.026831146329641342,
-1.042717456817627,
0.9422422051429749,
-0.5562642812728882,
-0.9329350590705872,
-1.6599079370498657,
0.05880545452237129,
0.011032394133508205,
0.9123300313949585,
-1.6046792268753052,
-0.2209891825914383,
1.348797082901001,
0.9332109689712524,
-0.847914457321167,
1.1588727235794067,
0.3117813467979431,
1.0489885807037354,
0.7398135662078857,
-0.5567106604576111,
0.6514211297035217,
-0.07057760655879974,
-1.38254714012146,
0.478158563375473,
1.260573148727417,
0.13298186659812927,
1.4235695600509644,
-0.5223749876022339,
0.03748803958296776,
0.3881455063819885,
-0.6342835426330566,
-0.6170226335525513,
-0.44766685366630554,
0.6672449111938477,
0.08529836684465408,
-0.9460359811782837,
0.13852590322494507,
-0.10780956596136093,
-0.25914400815963745,
0.3106452226638794,
-1.4665106534957886,
-0.26012954115867615,
-0.5031014084815979,
-0.49665606021881104,
-1.3454558849334717,
0.014996497891843319,
1.4966850280761719,
-0.7379145622253418,
-0.07961399108171463,
0.3817812502384186,
0.3744061291217804,
0.5724790096282959,
0.47534945607185364,
-0.7041102051734924,
-0.2272304743528366,
-0.433037668466568,
-0.25457292795181274,
0.40391406416893005,
1.2903798818588257,
-0.203599750995636,
-0.8959540128707886,
0.7197471857070923,
-0.19428439438343048,
-0.04685381054878235,
1.9532976150512695,
0.0654330626130104,
-0.7198191285133362,
0.19281481206417084,
-0.7447094321250916,
1.7955045700073242,
1.6391559839248657,
1.4091622829437256,
-0.10246004164218903,
-0.7682161331176758,
0.5268265008926392,
-0.21410603821277618,
-0.4056255519390106,
0.8595791459083557,
0.3835306465625763,
-0.19678905606269836,
-1.5540258884429932,
0.747753381729126,
1.25835120677948,
-0.8576471209526062,
-0.7248872518539429,
0.0487600602209568,
-0.7299543619155884,
1.0657610893249512,
0.621530294418335,
0.5090079307556152,
0.38426271080970764,
1.6764346361160278,
0.7819649577140808,
-0.42936405539512634,
0.47129711508750916,
0.6178063750267029,
-0.0870453491806984,
-2.0071520805358887,
-1.1802175045013428,
0.4685680568218231,
-0.5223047137260437,
-1.5458219051361084,
1.4558205604553223,
-1.131393313407898,
-1.0764316320419312,
0.5609874129295349,
0.1143370121717453,
1.4458742141723633,
0.32699713110923767,
1.6074634790420532,
1.9948855638504028,
0.8301018476486206,
0.37866461277008057,
1.3127537965774536,
-0.17893466353416443,
-0.4361813962459564,
1.7781418561935425,
-0.3766137957572937,
0.32095158100128174,
1.1213737726211548,
-0.2829282879829407,
-1.1540417671203613,
-0.8338090181350708,
-1.219254493713379,
-0.6118372678756714,
1.0681796073913574,
0.1701315939426422,
-1.2338387966156006,
0.17458446323871613,
1.6005384922027588,
0.12458387762308121,
-0.32483646273612976,
0.5803182721138,
0.36641615629196167,
-0.7896653413772583,
0.053948190063238144,
-1.0518368482589722,
0.5048044323921204,
-0.22605057060718536,
-0.4546918570995331,
0.3021809160709381,
0.4107597768306732,
1.331730842590332,
-0.18717701733112335,
0.21511074900627136,
1.1560550928115845,
-1.4088966846466064,
1.3805614709854126,
-0.6703044772148132,
0.2237738072872162,
-2.2909977436065674,
1.3921369314193726,
-0.6218695044517517,
1.9520790576934814,
-2.7351717948913574,
0.4633292853832245,
-0.6850934028625488,
-0.5236361622810364,
0.3203813433647156,
-0.4417567849159241,
0.09974601119756699,
-0.22691577672958374,
-1.017382025718689,
0.04108994081616402,
-0.6703827381134033,
0.6141950488090515,
1.0216068029403687,
1.341282844543457,
-1.0732908248901367,
-0.4173811078071594,
-1.670492172241211,
-0.0919298604130745,
-0.6867277026176453,
0.3365269601345062,
-2.1331963539123535,
-0.33447033166885376,
-1.9585731029510498,
-2.299089193344116,
-1.1864949464797974,
-0.8088640570640564,
1.0861378908157349,
0.09352611750364304,
-0.8525387048721313,
1.2589970827102661,
-0.3358885645866394,
-1.9093210697174072,
1.1744033098220825,
-2.0845248699188232
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | hi @WiNE-iNEFF ! can you please also tell a bit more about how your data is structured (directory structure and filenames patterns)? | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 22 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
hi @WiNE-iNEFF ! can you please also tell a bit more about how your data is structured (directory structure and filenames patterns)? | [
-1.3366752862930298,
-1.0756405591964722,
-0.806158721446991,
1.422105073928833,
-0.1623847484588623,
-1.1846239566802979,
0.1652746945619583,
-1.1485731601715088,
1.7155921459197998,
-1.0141164064407349,
0.2789773643016815,
-1.6147305965423584,
-0.11525898426771164,
-0.382564902305603,
-0.736319363117218,
-0.9791921973228455,
-0.5483466386795044,
-0.8010312914848328,
1.1271848678588867,
2.4298853874206543,
1.2097761631011963,
-1.3085949420928955,
2.749295473098755,
0.6625458002090454,
-0.21087124943733215,
-1.0683239698410034,
0.5921314358711243,
-0.016797643154859543,
-1.0758085250854492,
-0.4482588469982147,
-1.0151304006576538,
0.02314356155693531,
-0.5201759934425354,
-0.5270405411720276,
-0.14286205172538757,
0.3373136520385742,
-0.2703864276409149,
-0.35217469930648804,
-0.47347506880760193,
-0.7207027673721313,
0.49688467383384705,
-0.342404305934906,
0.8975419402122498,
-0.4649021625518799,
1.9413416385650635,
-0.42740345001220703,
0.4004115164279938,
0.6848739385604858,
1.354697346687317,
0.18786075711250305,
0.03172696381807327,
0.22748494148254395,
0.5116821527481079,
-0.15244059264659882,
0.34512677788734436,
1.2781347036361694,
0.3888799846172333,
0.6141372323036194,
0.7919114828109741,
-2.2039294242858887,
1.2883025407791138,
-1.0032715797424316,
0.30971044301986694,
1.2627562284469604,
-0.9435837864875793,
0.28883346915245056,
-1.7170158624649048,
-0.06709898263216019,
0.553011417388916,
-2.1663472652435303,
0.23576855659484863,
-1.1587872505187988,
-0.5065588355064392,
0.9078320860862732,
0.38267242908477783,
-1.3153828382492065,
0.054886430501937866,
-0.3886016309261322,
0.9244308471679688,
0.47758790850639343,
1.1679162979125977,
-1.6616690158843994,
0.10525968670845032,
-0.28198814392089844,
0.03889703005552292,
-1.3888821601867676,
-1.448162317276001,
0.5117542743682861,
0.5292285084724426,
0.733989953994751,
-0.11890207976102829,
0.9782201051712036,
-1.074359655380249,
0.7314177751541138,
-0.8764450550079346,
-1.4076604843139648,
-1.3977103233337402,
-2.4151761531829834,
-2.2909162044525146,
0.7642308473587036,
-0.5373311638832092,
-0.6388359069824219,
2.1011288166046143,
-1.0755505561828613,
-1.7662118673324585,
1.2778289318084717,
0.21245388686656952,
0.12407046556472778,
2.371058702468872,
0.29355987906455994,
-0.726570188999176,
0.4707918167114258,
-0.7467702031135559,
0.9513561725616455,
-0.4401622712612152,
1.4702444076538086,
0.49042487144470215,
-0.9115551710128784,
1.7047441005706787,
-0.414741575717926,
0.683194100856781,
-0.5331240892410278,
-0.5899040102958679,
-0.9048164486885071,
0.41937869787216187,
1.7708253860473633,
-0.29546526074409485,
1.562564492225647,
-0.37293708324432373,
-1.5844597816467285,
-1.7405818700790405,
0.9517739415168762,
0.5070514678955078,
-0.7738093137741089,
0.1554913967847824,
-0.39915189146995544,
-0.02949519455432892,
0.11517388373613358,
1.088580846786499,
1.3389956951141357,
0.79420405626297,
-0.3344518840312958,
-0.9545296430587769,
0.15024110674858093,
-0.175323486328125,
-0.6419888138771057,
-1.7540769577026367,
-0.4013685882091522,
0.12942488491535187,
0.5845237970352173,
-1.173051118850708,
1.6422033309936523,
1.1274064779281616,
2.0218703746795654,
0.9042515754699707,
-0.26696228981018066,
1.3767669200897217,
0.024609770625829697,
1.786969542503357,
-0.39110076427459717,
0.6098064184188843,
-0.26471999287605286,
-1.2484430074691772,
0.8088240027427673,
-0.404994934797287,
-1.9416706562042236,
-0.9600329399108887,
-0.8962056040763855,
-0.14188463985919952,
-0.8070523738861084,
0.9850257635116577,
-0.2699277102947235,
-1.4492260217666626,
0.3196050524711609,
-0.5688616037368774,
0.10552293062210083,
-1.252785563468933,
0.4064352810382843,
0.6484456658363342,
-0.6444463729858398,
-0.09483179450035095,
-0.14148028194904327,
-1.3016358613967896,
-0.4122062027454376,
0.2010309100151062,
1.9706685543060303,
-0.879104733467102,
0.8911333680152893,
1.0349143743515015,
-0.7877320647239685,
0.05269879847764969,
0.19725820422172546,
-0.2528899908065796,
0.7321121096611023,
-0.9476185441017151,
-0.31426894664764404,
1.2500207424163818,
-0.23554611206054688,
-0.627103865146637,
1.4810764789581299,
0.6372066736221313,
-0.9560664892196655,
-0.09390386939048767,
-0.22010007500648499,
-0.7819780111312866,
-0.059169404208660126,
-1.4559595584869385,
-0.12198475748300552,
0.18127569556236267,
-1.390905499458313,
-0.490203320980072,
-0.251264750957489,
1.434271216392517,
-0.14288786053657532,
1.3737586736679077,
-0.3640047013759613,
-0.24343129992485046,
-0.42330747842788696,
-0.5588715076446533,
0.332592636346817,
-0.1561020016670227,
-0.5529223084449768,
0.1957944929599762,
-0.8603832125663757,
0.28747671842575073,
1.4661797285079956,
0.41899827122688293,
0.11914615333080292,
0.48943933844566345,
1.0313026905059814,
0.4011322557926178,
-0.10037878155708313,
-0.8301124572753906,
-1.5003578662872314,
1.9740794897079468,
-1.5334866046905518,
2.024059772491455,
0.6210010647773743,
-0.22051919996738434,
-1.7953749895095825,
-1.9089406728744507,
1.3470218181610107,
1.3897416591644287,
2.3180530071258545,
0.4519622325897217,
0.296046644449234,
-0.7933079600334167,
-0.8138236403465271,
0.3066061735153198,
-1.1225179433822632,
-0.6398776173591614,
0.0859626829624176,
2.1462061405181885,
1.623092532157898,
-0.6065220236778259,
-0.07544217258691788,
-1.0771197080612183,
1.3539749383926392,
-0.12199761718511581,
0.30728012323379517,
1.7934397459030151,
-0.4161004424095154,
-1.2225334644317627,
1.2018918991088867,
-2.336672782897949,
0.050973329693078995,
1.9789109230041504,
0.36542123556137085,
0.10222633928060532,
-1.3455445766448975,
-0.6964138150215149,
-0.29599010944366455,
-0.5838027000427246,
-1.2555218935012817,
0.6602954864501953,
-0.22731535136699677,
-0.8783071637153625,
-1.4037474393844604,
0.16796573996543884,
-1.084405541419983,
-1.593776822090149,
0.4553487300872803,
1.9117650985717773,
2.1698367595672607,
-0.8996772766113281,
1.5840072631835938,
-0.11021215468645096,
0.16892443597316742,
1.0973411798477173,
1.1944079399108887,
3.033785820007324,
1.8358469009399414,
-1.2445865869522095,
0.5806040167808533,
-0.10831522941589355,
-0.6310486793518066,
1.205457091331482,
-1.0968831777572632,
1.403098702430725,
-0.15631888806819916,
-1.0250556468963623,
-1.2222042083740234,
0.9147742986679077,
0.44863995909690857,
0.07471589744091034,
-0.4698667526245117,
1.1963375806808472,
0.10794520378112793,
1.3393484354019165,
0.4512944221496582,
-0.26504525542259216,
0.6478720903396606,
-0.45398181676864624,
-0.6252321004867554,
1.6003470420837402,
0.26962345838546753,
-1.545051097869873,
-2.2948598861694336,
-0.19443942606449127,
-0.8582832217216492,
0.09230376034975052,
-0.49188703298568726,
-0.9844299554824829,
1.6204686164855957,
0.4652375280857086,
-1.1654000282287598,
-0.3291189670562744,
-0.3751617968082428,
-0.6444490551948547,
2.7139437198638916,
-1.277845025062561,
-0.2137831151485443,
-0.7929942607879639,
-0.6153947710990906,
1.7210092544555664,
-1.2374825477600098,
-0.11003905534744263,
-1.0195422172546387,
-0.5585971474647522,
-1.4489679336547852,
-0.5661150813102722,
0.013742201030254364,
-0.9798936247825623,
0.7436429858207703,
0.2492596060037613,
-1.0853571891784668,
-0.3035617172718048,
-0.7723338603973389,
0.8775999546051025,
-0.09785062819719315,
0.3325176537036896,
1.823464035987854,
0.3691394329071045,
-0.367866575717926,
0.7949451804161072,
1.2766737937927246,
0.5411829352378845,
-0.6405872702598572,
0.12789307534694672,
-0.736086905002594,
0.38369202613830566,
-1.257633090019226,
0.24578236043453217,
-3.0520877838134766,
0.7473517060279846,
-0.06882181018590927,
-0.23333445191383362,
-0.09353689849376678,
-1.378359079360962,
1.1240209341049194,
2.49746036529541,
-1.2700026035308838,
0.4664114713668823,
0.3103017210960388,
1.2343109846115112,
-1.5047811269760132,
0.28894129395484924,
-0.5564221739768982,
2.0968377590179443,
0.26996955275535583,
1.2471150159835815,
-0.5217200517654419,
-2.225216865539551,
0.6307758688926697,
-1.2691758871078491,
-1.1699849367141724,
0.7710879445075989,
-0.9664213061332703,
0.09861871600151062,
-1.3690130710601807,
-0.06380312144756317,
-0.9172088503837585,
-1.1723674535751343,
0.5654798746109009,
0.3212067186832428,
0.42877379059791565,
-0.567591667175293,
0.38016438484191895,
-2.2372121810913086,
-1.377292275428772,
-0.23347845673561096,
-1.0283563137054443,
0.5375381112098694,
-0.42722803354263306,
0.6727349758148193,
-0.2636758089065552,
0.1645495593547821,
0.44486531615257263,
1.3235012292861938,
3.400430917739868,
0.1672697812318802,
0.34561312198638916,
-0.07523185759782791,
-0.9428755044937134,
1.714665412902832,
1.038737416267395,
-0.011324241757392883,
-0.6254818439483643,
-1.0808719396591187,
1.1631057262420654,
1.952379584312439,
0.9662932753562927,
-0.10360448062419891,
-0.7438241839408875,
-0.4929022192955017,
-0.12802082300186157,
0.19541345536708832,
0.49220362305641174,
0.9590471386909485,
0.07050550729036331,
0.11719094961881638,
1.4684830904006958,
1.2627335786819458,
-0.5219219326972961,
0.3693118691444397,
-0.8459643125534058,
-0.5294654965400696,
0.3917153477668762,
0.3618781268596649,
0.049827173352241516,
0.4304482042789459,
-0.8646373748779297,
-0.32859963178634644,
-0.21040451526641846,
-0.8299177885055542,
-0.6885667443275452,
-0.362571120262146,
-0.44960448145866394,
1.6127204895019531,
0.13386762142181396,
-0.5496291518211365,
-0.024303771555423737,
-0.7891388535499573,
-0.04059373587369919,
-1.1794689893722534,
0.2652777433395386,
-0.046624090522527695,
-0.07185985147953033,
-0.10799708217382431,
1.7489595413208008,
-0.9790160655975342,
-2.233339309692383,
0.3370261490345001,
0.404462605714798,
-0.32565826177597046,
0.1115376427769661,
1.50551176071167,
0.4639832377433777,
1.532192587852478,
1.3223000764846802,
0.9510380029678345,
-0.686528205871582,
-1.2041515111923218,
0.8086651563644409,
0.8345711827278137,
-1.4029455184936523,
0.8356658220291138,
0.04457276687026024,
-0.5477221608161926,
0.6585814356803894,
1.0925565958023071,
0.4514177441596985,
-1.9038002490997314,
0.8577800989151001,
-0.9681572318077087,
0.8831773400306702,
0.6468561291694641,
0.65912264585495,
0.1553148627281189,
0.9025617241859436,
-1.0523762702941895,
-1.2514760494232178,
-0.7548379898071289,
-0.8390645980834961,
1.958620309829712,
-0.3624666929244995,
0.6442855000495911,
-0.2514263391494751,
-1.1709131002426147,
-0.05139987915754318,
0.6256353855133057,
0.12262725830078125,
-0.3613666892051697,
0.8528238534927368,
-0.721522867679596,
-1.1860756874084473,
-1.5195963382720947,
-0.30333462357521057,
-1.1474663019180298,
-1.0083703994750977,
1.0666700601577759,
0.7192169427871704,
0.23376286029815674,
1.966741681098938,
0.585598349571228,
0.36373963952064514,
-2.561167001724243,
0.894432783126831,
0.32363441586494446,
-0.01328938640654087,
0.8680968880653381,
0.2219938486814499,
1.0311137437820435,
-0.09744319319725037,
0.5278949737548828,
-2.336582899093628,
2.2583518028259277,
-0.3828740417957306,
0.7531484365463257,
0.10268090665340424,
-0.17968305945396423,
1.150286316871643,
0.6641483902931213,
0.6286112666130066,
-1.2335795164108276,
0.78729647397995,
-0.5170533061027527,
1.2219001054763794,
0.9455482363700867,
-0.8199594020843506,
0.09686877578496933,
1.3316662311553955,
0.5767379999160767,
-0.39250171184539795,
-0.8697052001953125,
-1.0082931518554688,
0.8978855609893799,
1.616676688194275,
-0.16422045230865479,
0.13040947914123535,
0.6958433389663696,
0.6088846325874329,
-1.3273266553878784,
-0.053496118634939194,
-0.8067914843559265,
-0.6712450385093689,
1.6661876440048218,
2.155900478363037,
-0.00728183938190341,
-0.10820375382900238,
-0.6009458303451538,
-1.3173716068267822,
0.9264688491821289,
-0.068092480301857,
0.27694764733314514,
0.5616305470466614,
-0.7252617478370667,
0.9905059337615967,
0.8329797387123108,
0.746635913848877,
0.1629704087972641,
0.20696358382701874,
0.5339465737342834,
-0.11085040122270584,
-1.0004371404647827,
-0.20716358721256256,
-1.0161685943603516,
-2.503640651702881,
0.34560704231262207,
-0.3125239610671997,
-1.372969627380371,
0.021297838538885117,
-0.9820525646209717,
0.8956853151321411,
-0.5145219564437866,
-0.9330095052719116,
-1.6476258039474487,
0.06139915809035301,
-0.01803193986415863,
0.8495574593544006,
-1.5897842645645142,
-0.15517181158065796,
1.4445834159851074,
0.9091880321502686,
-0.7900263071060181,
1.257418155670166,
0.3435208201408386,
1.0293564796447754,
0.8022304773330688,
-0.5376358032226562,
0.5959460735321045,
-0.033052198588848114,
-1.3312952518463135,
0.5208916664123535,
1.2611207962036133,
0.10183637589216232,
1.467086672782898,
-0.5545980930328369,
0.05064493417739868,
0.4132261574268341,
-0.6834503412246704,
-0.6541609764099121,
-0.45633062720298767,
0.6870560646057129,
0.06396588683128357,
-0.9162368178367615,
0.11239071935415268,
-0.1329379677772522,
-0.26998424530029297,
0.3589385151863098,
-1.5241202116012573,
-0.254921019077301,
-0.5275977849960327,
-0.45768603682518005,
-1.3593714237213135,
0.06785085052251816,
1.486981987953186,
-0.7605054974555969,
-0.09307482093572617,
0.32023289799690247,
0.4761512875556946,
0.6145548820495605,
0.5991016030311584,
-0.6873473525047302,
-0.23654016852378845,
-0.4313451945781708,
-0.22893211245536804,
0.36252570152282715,
1.2442328929901123,
-0.22406677901744843,
-0.8600344657897949,
0.7115601897239685,
-0.23280023038387299,
0.024182450026273727,
1.8978257179260254,
0.031703975051641464,
-0.6793054342269897,
0.24567244946956635,
-0.8499485850334167,
1.8642510175704956,
1.5513194799423218,
1.3410983085632324,
-0.04222951456904411,
-0.8566470146179199,
0.5578678250312805,
-0.20136256515979767,
-0.3869389593601227,
0.877882182598114,
0.43615755438804626,
-0.22151580452919006,
-1.5476312637329102,
0.6882345676422119,
1.2033805847167969,
-0.8762177228927612,
-0.6362320184707642,
-0.05021822452545166,
-0.7094107866287231,
1.0930031538009644,
0.7392517924308777,
0.4858799874782562,
0.29332175850868225,
1.6722289323806763,
0.8199957609176636,
-0.5127590894699097,
0.37581878900527954,
0.5775810480117798,
-0.019713420420885086,
-1.9721063375473022,
-1.047529935836792,
0.38052046298980713,
-0.4446873366832733,
-1.4859801530838013,
1.389562726020813,
-1.0317511558532715,
-1.0701556205749512,
0.5217430591583252,
-0.017750270664691925,
1.3631713390350342,
0.37618565559387207,
1.6153956651687622,
2.067309617996216,
0.8746960163116455,
0.3041662275791168,
1.2984503507614136,
-0.14197011291980743,
-0.3895953297615051,
1.831351637840271,
-0.2882629930973053,
0.30417516827583313,
1.1941697597503662,
-0.29814231395721436,
-1.0410311222076416,
-0.8264402151107788,
-1.1249585151672363,
-0.5838848948478699,
1.0809553861618042,
0.24554581940174103,
-1.2077414989471436,
0.20025011897087097,
1.5922355651855469,
0.15708641707897186,
-0.37823402881622314,
0.5241423845291138,
0.4628578722476959,
-0.7494724988937378,
-0.0471574105322361,
-1.0653719902038574,
0.4363308846950531,
-0.2966015636920929,
-0.575491189956665,
0.3249974548816681,
0.41864094138145447,
1.3427484035491943,
-0.23926377296447754,
0.23671364784240723,
1.1984455585479736,
-1.4759600162506104,
1.3691928386688232,
-0.7169359922409058,
0.22055919468402863,
-2.258936882019043,
1.3770049810409546,
-0.6363036632537842,
1.990297555923462,
-2.838770627975464,
0.495415061712265,
-0.6838229298591614,
-0.5723245739936829,
0.37529462575912476,
-0.37338563799858093,
0.14168505370616913,
-0.23335175216197968,
-1.0547715425491333,
-0.08986056596040726,
-0.6351951360702515,
0.5703200101852417,
1.0548752546310425,
1.2556577920913696,
-1.0067392587661743,
-0.3618188798427582,
-1.5540523529052734,
-0.1430237591266632,
-0.6795932054519653,
0.3608908951282501,
-2.183839797973633,
-0.34636637568473816,
-1.9336539506912231,
-2.2494356632232666,
-1.2498034238815308,
-0.8382183313369751,
1.2322582006454468,
0.10717761516571045,
-0.8882793188095093,
1.2401537895202637,
-0.43808478116989136,
-1.8745416402816772,
1.1264047622680664,
-2.1224863529205322
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > hi @WiNE-iNEFF ! can you please also tell a bit more about how your data is structured (directory structure and filenames patterns)?
All file have format .png converted in RGBA.
In main folder "MyData" contain 4 folder with images. In function load_dataset i use folder "MyData" | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 47 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> hi @WiNE-iNEFF ! can you please also tell a bit more about how your data is structured (directory structure and filenames patterns)?
All file have format .png converted in RGBA.
In main folder "MyData" contain 4 folder with images. In function load_dataset i use folder "MyData" | [
-1.224746823310852,
-1.0786768198013306,
-0.8314867615699768,
1.486602544784546,
-0.13651810586452484,
-1.2220699787139893,
0.15682370960712433,
-1.1456458568572998,
1.6998454332351685,
-1.0276753902435303,
0.3047844171524048,
-1.6269419193267822,
-0.04920589551329613,
-0.34454596042633057,
-0.687792956829071,
-1.0415294170379639,
-0.47027701139450073,
-0.837893009185791,
1.1810250282287598,
2.403791904449463,
1.207159161567688,
-1.2859450578689575,
2.7705111503601074,
0.671248197555542,
-0.2352004498243332,
-1.0840407609939575,
0.6670382618904114,
0.05762188136577606,
-1.093082308769226,
-0.45418643951416016,
-0.9569509625434875,
0.010490715503692627,
-0.47342991828918457,
-0.4739149808883667,
-0.1308613121509552,
0.33197540044784546,
-0.32443809509277344,
-0.31059736013412476,
-0.4901057481765747,
-0.7948821187019348,
0.4730823040008545,
-0.36209142208099365,
0.9324671626091003,
-0.4900943636894226,
1.8865770101547241,
-0.423936665058136,
0.38160163164138794,
0.7398829460144043,
1.3329764604568481,
0.194387286901474,
0.014850091189146042,
0.14379775524139404,
0.5273503661155701,
-0.10991211980581284,
0.3699575662612915,
1.2585361003875732,
0.35999852418899536,
0.6179144382476807,
0.7378979325294495,
-2.2220332622528076,
1.2661458253860474,
-0.9843236804008484,
0.3049631714820862,
1.2508713006973267,
-0.8274978399276733,
0.31425923109054565,
-1.7477476596832275,
-0.11513030529022217,
0.5779455304145813,
-2.2018964290618896,
0.25814688205718994,
-1.2416130304336548,
-0.4722117781639099,
0.9302641749382019,
0.30780112743377686,
-1.2333872318267822,
0.04179020971059799,
-0.35562413930892944,
0.9441039562225342,
0.4975307583808899,
1.1744319200515747,
-1.6370772123336792,
0.01533801294863224,
-0.26168370246887207,
0.0003740750253200531,
-1.3659870624542236,
-1.413647174835205,
0.5032690167427063,
0.539337694644928,
0.7468748688697815,
-0.08981312066316605,
1.0233911275863647,
-1.0949872732162476,
0.7524389624595642,
-0.8590400218963623,
-1.4391517639160156,
-1.37118661403656,
-2.35500431060791,
-2.355421781539917,
0.7523157596588135,
-0.5985820889472961,
-0.6154049634933472,
2.0973167419433594,
-1.1198292970657349,
-1.696578860282898,
1.2908432483673096,
0.1801428645849228,
0.16150973737239838,
2.406419038772583,
0.28615087270736694,
-0.693777859210968,
0.5019265413284302,
-0.7778866291046143,
0.8809712529182434,
-0.44236987829208374,
1.4549660682678223,
0.44878697395324707,
-0.9123244881629944,
1.7147663831710815,
-0.39880144596099854,
0.6644365787506104,
-0.5496623516082764,
-0.5786445736885071,
-0.9481629729270935,
0.4104398488998413,
1.7557315826416016,
-0.3237665891647339,
1.5665010213851929,
-0.3147696852684021,
-1.6132378578186035,
-1.7043424844741821,
0.9257596731185913,
0.5238372087478638,
-0.7503434419631958,
0.07030334323644638,
-0.3808314800262451,
0.006929698400199413,
0.12329956889152527,
1.115174412727356,
1.2473748922348022,
0.8578742742538452,
-0.40379518270492554,
-0.9363493919372559,
0.20060041546821594,
-0.1754893958568573,
-0.6325533986091614,
-1.831784963607788,
-0.3768637776374817,
0.1626831591129303,
0.608920156955719,
-1.1947327852249146,
1.6438552141189575,
1.121999979019165,
2.055966854095459,
0.9008206129074097,
-0.23095016181468964,
1.4377257823944092,
0.05950602889060974,
1.7897685766220093,
-0.32112377882003784,
0.5682093501091003,
-0.2925240397453308,
-1.2036093473434448,
0.8237748146057129,
-0.38535022735595703,
-1.854994297027588,
-0.9769885540008545,
-0.8878535628318787,
-0.1526898592710495,
-0.8361324071884155,
0.9533399939537048,
-0.32223284244537354,
-1.4437638521194458,
0.32378244400024414,
-0.5830783247947693,
0.06374738365411758,
-1.2488486766815186,
0.4158690571784973,
0.6392238736152649,
-0.6493646502494812,
-0.0007173819467425346,
-0.12273471057415009,
-1.3251491785049438,
-0.4216391444206238,
0.1760752648115158,
2.0546040534973145,
-0.8558034896850586,
0.8691195249557495,
1.0641400814056396,
-0.7505753040313721,
0.034482818096876144,
0.20722432434558868,
-0.33655667304992676,
0.6579310297966003,
-0.9749754071235657,
-0.3302047848701477,
1.2492488622665405,
-0.28314709663391113,
-0.653333306312561,
1.4396992921829224,
0.6702775359153748,
-0.9675040245056152,
-0.15700280666351318,
-0.2411867082118988,
-0.6986634135246277,
-0.06290385127067566,
-1.4605540037155151,
-0.10226645320653915,
0.2555212378501892,
-1.3855841159820557,
-0.4383341073989868,
-0.23311257362365723,
1.352594256401062,
-0.2097523957490921,
1.3553498983383179,
-0.3655235171318054,
-0.3058381676673889,
-0.4068250060081482,
-0.5429567694664001,
0.30030685663223267,
-0.17534533143043518,
-0.615632951259613,
0.17060844600200653,
-0.8087782263755798,
0.2998483180999756,
1.420659065246582,
0.4065113663673401,
0.06705091893672943,
0.48870134353637695,
1.0549671649932861,
0.46610331535339355,
-0.10262510180473328,
-0.8388208746910095,
-1.4580799341201782,
2.0013554096221924,
-1.518134593963623,
1.9835834503173828,
0.6619774699211121,
-0.16484573483467102,
-1.8127315044403076,
-1.9594987630844116,
1.28333580493927,
1.3388540744781494,
2.3394346237182617,
0.44937020540237427,
0.32838791608810425,
-0.8042752742767334,
-0.8067576885223389,
0.28571194410324097,
-1.1809256076812744,
-0.632798969745636,
0.13085101544857025,
2.20015811920166,
1.6172646284103394,
-0.5834181308746338,
-0.07088026404380798,
-0.9766183495521545,
1.3593319654464722,
-0.08587579429149628,
0.29202187061309814,
1.8841809034347534,
-0.40681010484695435,
-1.177863359451294,
1.0889497995376587,
-2.3179850578308105,
0.042587827891111374,
1.9411145448684692,
0.27402180433273315,
0.10571926832199097,
-1.3747559785842896,
-0.6310341954231262,
-0.30044025182724,
-0.572777509689331,
-1.2580134868621826,
0.6914870142936707,
-0.23230862617492676,
-0.8850449919700623,
-1.4454563856124878,
0.2053977996110916,
-1.0700846910476685,
-1.6238958835601807,
0.3741171360015869,
1.9111498594284058,
2.2470498085021973,
-0.9456257820129395,
1.5554918050765991,
-0.158601313829422,
0.17777517437934875,
1.0697797536849976,
1.1662139892578125,
3.055931806564331,
1.8558498620986938,
-1.2118260860443115,
0.529148280620575,
-0.10727346688508987,
-0.5948905348777771,
1.1306413412094116,
-1.070499300956726,
1.3747469186782837,
-0.1763588935136795,
-1.0616505146026611,
-1.2506530284881592,
0.9164733290672302,
0.44121986627578735,
0.05010329931974411,
-0.4064081311225891,
1.2315877676010132,
0.14328838884830475,
1.3761701583862305,
0.44391655921936035,
-0.23698222637176514,
0.6854994297027588,
-0.44418197870254517,
-0.5887200832366943,
1.5770221948623657,
0.21800000965595245,
-1.5663129091262817,
-2.32023286819458,
-0.2539082169532776,
-0.8186562061309814,
0.04741393029689789,
-0.46748852729797363,
-1.0191727876663208,
1.628722906112671,
0.4075937271118164,
-1.223300576210022,
-0.3869244456291199,
-0.33292466402053833,
-0.6401707530021667,
2.7500524520874023,
-1.228066325187683,
-0.21697458624839783,
-0.7779701948165894,
-0.624771237373352,
1.7877957820892334,
-1.2546683549880981,
-0.08880170434713364,
-0.9572228789329529,
-0.5455616116523743,
-1.4502867460250854,
-0.6246826648712158,
0.0651850551366806,
-1.02668297290802,
0.753575325012207,
0.3057299256324768,
-1.0402241945266724,
-0.3241177797317505,
-0.8652665019035339,
0.896856963634491,
-0.0762343779206276,
0.3624798655509949,
1.8397961854934692,
0.38985109329223633,
-0.3895496129989624,
0.7870165109634399,
1.221145510673523,
0.5446475148200989,
-0.7008972764015198,
0.09624552726745605,
-0.8148525357246399,
0.40217018127441406,
-1.2681776285171509,
0.2464754730463028,
-3.043804883956909,
0.7495402693748474,
-0.0648527592420578,
-0.2031487673521042,
-0.05493937432765961,
-1.3581665754318237,
1.1893889904022217,
2.536257743835449,
-1.2315402030944824,
0.4849831461906433,
0.2927687168121338,
1.2510738372802734,
-1.5550857782363892,
0.33851057291030884,
-0.4568015933036804,
2.0936827659606934,
0.22104719281196594,
1.2861647605895996,
-0.504174530506134,
-2.2660930156707764,
0.6887286305427551,
-1.3095275163650513,
-1.1807509660720825,
0.7593215107917786,
-1.0410761833190918,
0.1317620873451233,
-1.413377046585083,
-0.12587907910346985,
-0.8906206488609314,
-1.1846189498901367,
0.5995376706123352,
0.26419752836227417,
0.4261332154273987,
-0.5230490565299988,
0.3838961124420166,
-2.254507303237915,
-1.4406362771987915,
-0.23355986177921295,
-1.082115888595581,
0.46455132961273193,
-0.40084218978881836,
0.7462855577468872,
-0.2552916407585144,
0.1385040432214737,
0.47497767210006714,
1.3784161806106567,
3.467250347137451,
0.18791790306568146,
0.34672218561172485,
-0.12945789098739624,
-0.9804189205169678,
1.6134480237960815,
0.9367165565490723,
-0.03097524307668209,
-0.5573413968086243,
-1.0585368871688843,
1.1715725660324097,
1.99112868309021,
0.9283816814422607,
-0.10804592818021774,
-0.7425845265388489,
-0.5514819622039795,
-0.13583123683929443,
0.20888246595859528,
0.5859860777854919,
0.9567187428474426,
0.058345794677734375,
0.09187644720077515,
1.5208823680877686,
1.2363317012786865,
-0.5364667773246765,
0.33184993267059326,
-0.891864538192749,
-0.5484141707420349,
0.3913789987564087,
0.28967005014419556,
-0.016064077615737915,
0.39299869537353516,
-0.8413360714912415,
-0.336057186126709,
-0.2720964550971985,
-0.8267764449119568,
-0.6845658421516418,
-0.32193827629089355,
-0.417341411113739,
1.5518982410430908,
0.09516174346208572,
-0.4770843982696533,
0.05338355153799057,
-0.7522289156913757,
-0.06635624170303345,
-1.208318829536438,
0.2213006317615509,
-0.0728452131152153,
-0.13955700397491455,
-0.10919415205717087,
1.8377052545547485,
-0.9351248145103455,
-2.113630771636963,
0.3246692419052124,
0.3602350950241089,
-0.2865391969680786,
0.18719089031219482,
1.5733435153961182,
0.47584545612335205,
1.5037901401519775,
1.3151901960372925,
0.9747357964515686,
-0.7258248329162598,
-1.2508808374404907,
0.7742581963539124,
0.8406987190246582,
-1.3158459663391113,
0.8218238949775696,
-0.005753704346716404,
-0.5188249349594116,
0.6282937526702881,
1.0995596647262573,
0.5250269770622253,
-1.9175740480422974,
0.8602378964424133,
-0.9575520753860474,
0.8330808877944946,
0.7101497650146484,
0.7151527404785156,
0.18029670417308807,
0.884681224822998,
-1.0161646604537964,
-1.1835733652114868,
-0.8045066595077515,
-0.8204777836799622,
1.8655040264129639,
-0.3340568542480469,
0.5986267328262329,
-0.1733092963695526,
-1.2226980924606323,
-0.03162689134478569,
0.6255490779876709,
0.15100613236427307,
-0.2940226197242737,
0.843413770198822,
-0.696957528591156,
-1.1636741161346436,
-1.562078833580017,
-0.24283796548843384,
-1.2069600820541382,
-1.0485024452209473,
1.0567387342453003,
0.7584717869758606,
0.21268059313297272,
1.9383450746536255,
0.6405782103538513,
0.3927309513092041,
-2.608962059020996,
0.9661266207695007,
0.2815341353416443,
-0.0046637654304504395,
0.822996973991394,
0.27346503734588623,
1.0987168550491333,
-0.08497033268213272,
0.4895592927932739,
-2.3305418491363525,
2.227881908416748,
-0.3693142533302307,
0.7346619963645935,
0.10614955425262451,
-0.2429656982421875,
1.0898469686508179,
0.607341468334198,
0.6561194062232971,
-1.1807806491851807,
0.7569347023963928,
-0.5162373185157776,
1.1921740770339966,
0.9571422338485718,
-0.795470654964447,
0.08844849467277527,
1.3087944984436035,
0.652484655380249,
-0.41859620809555054,
-0.8862305283546448,
-1.0215102434158325,
0.9017607569694519,
1.6094692945480347,
-0.17274492979049683,
0.018245140090584755,
0.6794096827507019,
0.573441743850708,
-1.3353843688964844,
-0.09567893296480179,
-0.7613895535469055,
-0.609324038028717,
1.6956682205200195,
2.1390159130096436,
-0.03718208521604538,
-0.23654794692993164,
-0.6760579347610474,
-1.2776634693145752,
0.9388212561607361,
-0.12307857722043991,
0.23307420313358307,
0.5253579616546631,
-0.7494862675666809,
0.962582528591156,
0.8631336688995361,
0.805537760257721,
0.19151368737220764,
0.25662505626678467,
0.47571802139282227,
-0.1945323348045349,
-0.9674562811851501,
-0.1875533163547516,
-1.0687474012374878,
-2.5637948513031006,
0.3683154582977295,
-0.3503585457801819,
-1.3044599294662476,
0.017849979922175407,
-1.004660964012146,
0.9877280592918396,
-0.4827919006347656,
-0.8449828028678894,
-1.586744785308838,
0.08936148136854172,
-0.08582732826471329,
0.8793834447860718,
-1.5248476266860962,
-0.1785869300365448,
1.4286532402038574,
0.995772659778595,
-0.8094475269317627,
1.2478668689727783,
0.3180195093154907,
1.0280892848968506,
0.7475390434265137,
-0.5720718502998352,
0.6475476622581482,
-0.04905388504266739,
-1.3210479021072388,
0.4383821487426758,
1.1925044059753418,
0.1406238079071045,
1.4222019910812378,
-0.587680995464325,
0.05055777356028557,
0.44974440336227417,
-0.6716040372848511,
-0.6297502517700195,
-0.40236908197402954,
0.7351951599121094,
-0.008458664640784264,
-0.9270285964012146,
0.12421900033950806,
-0.16536854207515717,
-0.2814239263534546,
0.33864402770996094,
-1.5255986452102661,
-0.3579099178314209,
-0.4455414414405823,
-0.5005276203155518,
-1.3782366514205933,
0.09542122483253479,
1.483137845993042,
-0.7730377912521362,
-0.06931808590888977,
0.31691664457321167,
0.4387925863265991,
0.5706974267959595,
0.6042581796646118,
-0.7209226489067078,
-0.266487181186676,
-0.4847727417945862,
-0.16552752256393433,
0.39374619722366333,
1.2894474267959595,
-0.19194622337818146,
-0.8785629868507385,
0.6989396214485168,
-0.22201228141784668,
-0.00633639469742775,
1.94334876537323,
0.03218098729848862,
-0.7415319085121155,
0.2116689831018448,
-0.842853844165802,
1.8374791145324707,
1.5868127346038818,
1.3860983848571777,
-0.011260392144322395,
-0.7646922469139099,
0.5245159268379211,
-0.20460228621959686,
-0.3627420663833618,
0.9340365529060364,
0.49652498960494995,
-0.14867980778217316,
-1.541599988937378,
0.6946024894714355,
1.1654889583587646,
-0.8417127132415771,
-0.6844121813774109,
0.05660509318113327,
-0.7100266814231873,
1.121282696723938,
0.7644870281219482,
0.5401101112365723,
0.301949679851532,
1.6166325807571411,
0.8420949578285217,
-0.542326033115387,
0.3537367582321167,
0.5436019897460938,
-0.0863792821764946,
-1.9633392095565796,
-1.034294843673706,
0.3719058036804199,
-0.4360300898551941,
-1.4880893230438232,
1.4480900764465332,
-1.0613046884536743,
-1.0396807193756104,
0.5721798539161682,
-0.01894799992442131,
1.3606822490692139,
0.36914271116256714,
1.6043899059295654,
2.0057244300842285,
0.8972989916801453,
0.29029417037963867,
1.2966548204421997,
-0.173294335603714,
-0.44899094104766846,
1.8248188495635986,
-0.36070019006729126,
0.30268847942352295,
1.1106561422348022,
-0.35949283838272095,
-1.0355349779129028,
-0.8846295475959778,
-1.0775644779205322,
-0.6299242377281189,
1.0727872848510742,
0.2799490690231323,
-1.2276216745376587,
0.18295025825500488,
1.5951212644577026,
0.1313350796699524,
-0.37480413913726807,
0.5666617751121521,
0.45044374465942383,
-0.717480480670929,
-0.048783183097839355,
-0.9927342534065247,
0.4852563738822937,
-0.21602605283260345,
-0.5073086023330688,
0.3538062572479248,
0.3883875608444214,
1.3507603406906128,
-0.25186052918434143,
0.20597796142101288,
1.1552454233169556,
-1.3837215900421143,
1.3352755308151245,
-0.6538023352622986,
0.23896732926368713,
-2.246943712234497,
1.330133080482483,
-0.7078757286071777,
1.982712984085083,
-2.794637441635132,
0.48657935857772827,
-0.685173511505127,
-0.5072693824768066,
0.2920891046524048,
-0.4376078248023987,
0.1507800817489624,
-0.24951425194740295,
-1.07169771194458,
-0.043263208121061325,
-0.6850144267082214,
0.6163741946220398,
1.0538982152938843,
1.2430438995361328,
-0.974842369556427,
-0.44595301151275635,
-1.5648071765899658,
-0.16845601797103882,
-0.709518313407898,
0.2634317874908447,
-2.1453757286071777,
-0.35833877325057983,
-1.931862711906433,
-2.2108161449432373,
-1.2677310705184937,
-0.8407140374183655,
1.1752500534057617,
0.1531076282262802,
-0.8587686419487,
1.2907168865203857,
-0.3650936484336853,
-1.8830443620681763,
1.2274954319000244,
-2.0992915630340576
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF I'm sorry there is still not enough information to answer your question :( For now I can only assume that your [filenames contain split names](https://huggingface.co/docs/datasets/repository_structure#splits-and-file-names) which are somehow incorrectly parsed.
What would be the output if you omit `split` while loading? Like just
```python
ds = load_dataset("MyData")
print(ds)
```
| I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 50 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
@WiNE-iNEFF I'm sorry there is still not enough information to answer your question :( For now I can only assume that your [filenames contain split names](https://huggingface.co/docs/datasets/repository_structure#splits-and-file-names) which are somehow incorrectly parsed.
What would be the output if you omit `split` while loading? Like just
```python
ds = load_dataset("MyData")
print(ds)
```
| [
-1.1661033630371094,
-0.9757630825042725,
-0.8253628015518188,
1.4959150552749634,
-0.09429442137479782,
-1.2394623756408691,
0.13362351059913635,
-1.0889220237731934,
1.7591294050216675,
-0.9418777227401733,
0.40737050771713257,
-1.6725064516067505,
-0.02389911562204361,
-0.47072604298591614,
-0.7938492894172668,
-0.937447726726532,
-0.40126627683639526,
-0.8596124649047852,
1.0556801557540894,
2.4345664978027344,
1.2156091928482056,
-1.3539488315582275,
2.71606707572937,
0.6069428324699402,
-0.2039063572883606,
-1.0972940921783447,
0.6249387860298157,
-0.011992145329713821,
-1.152583360671997,
-0.4501299262046814,
-0.9402779936790466,
0.006564886309206486,
-0.5609835386276245,
-0.5875864028930664,
-0.04596325382590294,
0.43957313895225525,
-0.30098143219947815,
-0.3589577078819275,
-0.4773642122745514,
-0.8018578290939331,
0.5205585956573486,
-0.370429128408432,
0.9345796704292297,
-0.46653854846954346,
1.9127347469329834,
-0.548019289970398,
0.3233530819416046,
0.6014035940170288,
1.3411725759506226,
0.17802384495735168,
-0.07078500837087631,
0.24121803045272827,
0.42646336555480957,
0.003114852122962475,
0.4194163680076599,
1.2374589443206787,
0.45608457922935486,
0.6381058096885681,
0.7821659445762634,
-2.2120585441589355,
1.2710447311401367,
-1.0034711360931396,
0.27655500173568726,
1.2358083724975586,
-0.9480279684066772,
0.2688395082950592,
-1.7371277809143066,
-0.09678436815738678,
0.5074372291564941,
-2.238389730453491,
0.22962062060832977,
-1.2463043928146362,
-0.5349918603897095,
0.9786859750747681,
0.3582267761230469,
-1.3246206045150757,
0.06806104630231857,
-0.3461073338985443,
0.9510000944137573,
0.47448885440826416,
1.1343234777450562,
-1.6636507511138916,
0.021032359451055527,
-0.34630194306373596,
-0.006230399012565613,
-1.3131202459335327,
-1.4732632637023926,
0.5531444549560547,
0.6109418869018555,
0.7023670673370361,
-0.15511924028396606,
1.0162816047668457,
-1.0684633255004883,
0.7680925726890564,
-0.9116991758346558,
-1.5971938371658325,
-1.3582453727722168,
-2.298555374145508,
-2.2541990280151367,
0.7812990546226501,
-0.5452244281768799,
-0.5751966238021851,
2.0662307739257812,
-1.0913112163543701,
-1.7803441286087036,
1.1868497133255005,
0.21896541118621826,
0.08105343580245972,
2.346623182296753,
0.2665706276893616,
-0.751488983631134,
0.45398494601249695,
-0.7586260437965393,
0.8826135396957397,
-0.35808077454566956,
1.4157845973968506,
0.4810320734977722,
-0.9984837174415588,
1.693029761314392,
-0.38734450936317444,
0.5855265855789185,
-0.5832532644271851,
-0.540046751499176,
-0.8112156987190247,
0.3738150894641876,
1.9064650535583496,
-0.35201725363731384,
1.5775421857833862,
-0.2450237274169922,
-1.5679205656051636,
-1.6552094221115112,
0.9227519631385803,
0.48999708890914917,
-0.7970741391181946,
0.16376130282878876,
-0.36898183822631836,
0.009070049040019512,
0.06563708931207657,
1.2006200551986694,
1.2256804704666138,
0.7297804951667786,
-0.3429167568683624,
-0.8972178101539612,
0.2540377080440521,
-0.09853564947843552,
-0.6292356848716736,
-1.805536150932312,
-0.44444531202316284,
0.1737298220396042,
0.6148733496665955,
-1.1638116836547852,
1.7479345798492432,
1.0036420822143555,
1.9765574932098389,
0.9661216735839844,
-0.2013837844133377,
1.4687366485595703,
0.04439385607838631,
1.8462706804275513,
-0.3760335445404053,
0.6611491441726685,
-0.3356305956840515,
-1.2133965492248535,
0.846644401550293,
-0.4170835614204407,
-1.917565941810608,
-0.8359482884407043,
-0.9344775080680847,
-0.08630970120429993,
-0.8164416551589966,
0.9440866708755493,
-0.3543175160884857,
-1.4935542345046997,
0.2664507329463959,
-0.6708333492279053,
0.08496713638305664,
-1.2571038007736206,
0.36089903116226196,
0.7233150005340576,
-0.7102817296981812,
-0.10009817034006119,
-0.2216017246246338,
-1.2634022235870361,
-0.4537585973739624,
0.25074607133865356,
1.9808144569396973,
-0.8249980807304382,
0.9445010423660278,
1.0417464971542358,
-0.7695814371109009,
0.08608032763004303,
0.32833319902420044,
-0.3849915564060211,
0.8061319589614868,
-1.0141750574111938,
-0.4032004773616791,
1.2021485567092896,
-0.24094215035438538,
-0.6922366619110107,
1.472203016281128,
0.7102307677268982,
-0.9594139456748962,
-0.1300780326128006,
-0.20524021983146667,
-0.7141879796981812,
-0.04405360296368599,
-1.4673166275024414,
-0.10963308066129684,
0.2888391315937042,
-1.4023666381835938,
-0.5168161988258362,
-0.20163467526435852,
1.3078036308288574,
-0.16569900512695312,
1.3503954410552979,
-0.35812076926231384,
-0.2427925318479538,
-0.3802483081817627,
-0.5026203393936157,
0.22343182563781738,
-0.1912660300731659,
-0.7030594348907471,
0.2630598843097687,
-0.8080373406410217,
0.2881271243095398,
1.415477991104126,
0.38531360030174255,
0.10081340372562408,
0.5764686465263367,
1.1440564393997192,
0.37366652488708496,
-0.04523836448788643,
-0.8967869281768799,
-1.5259562730789185,
2.0638537406921387,
-1.484021782875061,
2.0429441928863525,
0.7390310764312744,
-0.16828212141990662,
-1.7669607400894165,
-1.8679102659225464,
1.4405875205993652,
1.2921072244644165,
2.3163397312164307,
0.5370235443115234,
0.35802873969078064,
-0.7915611863136292,
-0.7896071672439575,
0.38049638271331787,
-1.0860910415649414,
-0.6454401016235352,
0.03895473852753639,
2.2454583644866943,
1.754745602607727,
-0.5689355134963989,
-0.18826693296432495,
-1.0016648769378662,
1.3550082445144653,
-0.20116183161735535,
0.23029056191444397,
1.908178448677063,
-0.36387595534324646,
-1.184657096862793,
1.2180454730987549,
-2.288780927658081,
0.12974466383457184,
2.0315957069396973,
0.314263254404068,
0.04997306317090988,
-1.4269154071807861,
-0.6182260513305664,
-0.23028112947940826,
-0.47714054584503174,
-1.2818127870559692,
0.5781022906303406,
-0.26481959223747253,
-0.8416737914085388,
-1.4166204929351807,
0.23028723895549774,
-1.1158995628356934,
-1.6798125505447388,
0.4279727041721344,
1.8953887224197388,
2.154935359954834,
-0.8244165778160095,
1.571921944618225,
-0.18587298691272736,
0.2510361969470978,
1.1718538999557495,
1.1604502201080322,
3.1038520336151123,
1.8347746133804321,
-1.2462767362594604,
0.5689640045166016,
-0.09061902016401291,
-0.615532398223877,
1.2875752449035645,
-1.0341871976852417,
1.2743605375289917,
-0.2330489456653595,
-1.1116886138916016,
-1.2706915140151978,
0.9473569393157959,
0.4242587089538574,
0.024145886301994324,
-0.505058765411377,
1.177595853805542,
0.08001189678907394,
1.2807551622390747,
0.4974897801876068,
-0.30229002237319946,
0.661501944065094,
-0.42770302295684814,
-0.5406886339187622,
1.5805124044418335,
0.20609821379184723,
-1.4872950315475464,
-2.262352466583252,
-0.20032048225402832,
-0.8676544427871704,
0.11846685409545898,
-0.5542202591896057,
-1.0011366605758667,
1.6288135051727295,
0.4242073893547058,
-1.2926466464996338,
-0.28242552280426025,
-0.3395316004753113,
-0.6817461848258972,
2.6714577674865723,
-1.3171136379241943,
-0.22277823090553284,
-0.9431363344192505,
-0.6090147495269775,
1.6934999227523804,
-1.2164709568023682,
-0.11347799003124237,
-1.0072439908981323,
-0.5627740621566772,
-1.4097387790679932,
-0.5592206120491028,
-0.007856360636651516,
-0.9337946772575378,
0.7597752809524536,
0.16624987125396729,
-1.1184601783752441,
-0.3173182010650635,
-0.8349571824073792,
0.9239557981491089,
-0.14396549761295319,
0.25511589646339417,
1.8030149936676025,
0.3971098065376282,
-0.48326677083969116,
0.7498774528503418,
1.2038652896881104,
0.6311879754066467,
-0.630907416343689,
0.2137552946805954,
-0.6524724960327148,
0.27958375215530396,
-1.414513349533081,
0.2665344476699829,
-2.952120065689087,
0.7604984641075134,
-0.011693588458001614,
-0.1800435483455658,
-0.038337863981723785,
-1.338452696800232,
1.080944299697876,
2.5502827167510986,
-1.2466187477111816,
0.43383148312568665,
0.2671474814414978,
1.1981226205825806,
-1.60011625289917,
0.28932997584342957,
-0.4302811622619629,
2.1464359760284424,
0.17884299159049988,
1.2624129056930542,
-0.48168081045150757,
-2.1818413734436035,
0.6404607892036438,
-1.3132283687591553,
-1.0941872596740723,
0.7619402408599854,
-0.92088782787323,
0.12241175770759583,
-1.3630197048187256,
-0.08540502935647964,
-0.8688896894454956,
-1.1575186252593994,
0.7305306196212769,
0.21203602850437164,
0.37775856256484985,
-0.5556921362876892,
0.3681996464729309,
-2.140815496444702,
-1.4191107749938965,
-0.22624585032463074,
-0.9911150336265564,
0.4529452323913574,
-0.34922271966934204,
0.6637216806411743,
-0.2198241949081421,
0.10614689439535141,
0.47090691328048706,
1.3930708169937134,
3.450435161590576,
0.15755786001682281,
0.3543621003627777,
-0.120945043861866,
-0.9443483948707581,
1.5682541131973267,
0.9294027090072632,
-0.08549822121858597,
-0.5726736783981323,
-1.0640655755996704,
1.3079890012741089,
1.9337493181228638,
0.9811967015266418,
0.03581317514181137,
-0.7575147747993469,
-0.6825005412101746,
-0.1407013088464737,
0.20306725800037384,
0.5797320008277893,
0.8490702509880066,
0.10440829396247864,
0.14469119906425476,
1.3933180570602417,
1.178365707397461,
-0.45269837975502014,
0.3954917788505554,
-0.8862075209617615,
-0.5041240453720093,
0.42641279101371765,
0.37294408679008484,
0.002100948244333267,
0.3634341061115265,
-0.975906491279602,
-0.3626861274242401,
-0.24544328451156616,
-0.8367627859115601,
-0.7340993881225586,
-0.45457175374031067,
-0.40738940238952637,
1.5876151323318481,
0.024011962115764618,
-0.5568150877952576,
-0.029265116900205612,
-0.8268035054206848,
-0.13217411935329437,
-1.141314148902893,
0.19554927945137024,
-0.10322624444961548,
-0.1268427073955536,
-0.09678137302398682,
1.7446008920669556,
-0.9822032451629639,
-2.1757616996765137,
0.27652063965797424,
0.291320264339447,
-0.35637491941452026,
0.10360241681337357,
1.5938286781311035,
0.5194247961044312,
1.354645013809204,
1.3066675662994385,
0.9913744926452637,
-0.6182476878166199,
-1.2249900102615356,
0.7091314792633057,
0.8940324783325195,
-1.3943207263946533,
0.9058354496955872,
-0.01680542156100273,
-0.47316664457321167,
0.6628640294075012,
1.2056289911270142,
0.5512836575508118,
-1.853071689605713,
0.8110087513923645,
-0.872520923614502,
0.7968602180480957,
0.7446734309196472,
0.701193630695343,
0.20535695552825928,
0.9203972220420837,
-1.2165228128433228,
-1.174655556678772,
-0.8353603482246399,
-0.7375406622886658,
1.8804268836975098,
-0.24642720818519592,
0.5370031595230103,
-0.2176811248064041,
-1.2417395114898682,
-0.06775058060884476,
0.6656364798545837,
0.226827472448349,
-0.3573961555957794,
0.8327345252037048,
-0.6725550889968872,
-1.0772489309310913,
-1.449620246887207,
-0.33239129185676575,
-1.0781828165054321,
-0.9825286269187927,
1.0730550289154053,
0.7694298028945923,
0.3229849338531494,
1.9608733654022217,
0.6885423064231873,
0.2734335660934448,
-2.508159875869751,
0.8967812657356262,
0.2829323709011078,
0.0004556998610496521,
0.8205083012580872,
0.2558530867099762,
1.1089295148849487,
-0.06711957603693008,
0.5655432343482971,
-2.292095899581909,
2.2471628189086914,
-0.30281150341033936,
0.7242546081542969,
0.06928020715713501,
-0.2804087698459625,
1.1471117734909058,
0.5970335602760315,
0.5993245244026184,
-1.1477402448654175,
0.7360055446624756,
-0.6025757789611816,
1.1850106716156006,
0.9870038032531738,
-0.8832347989082336,
0.1331731528043747,
1.3957406282424927,
0.5051847696304321,
-0.4812065660953522,
-0.9148483276367188,
-0.9661341309547424,
0.8994427919387817,
1.6825522184371948,
-0.08103285729885101,
0.011430670507252216,
0.8471261858940125,
0.6815189719200134,
-1.2910940647125244,
0.051234170794487,
-0.6899757385253906,
-0.6949336528778076,
1.7697315216064453,
2.1404306888580322,
-0.09223917871713638,
-0.19320879876613617,
-0.7133941054344177,
-1.2563844919204712,
0.8967397212982178,
0.007634875364601612,
0.08328261226415634,
0.6998830437660217,
-0.7697991728782654,
1.0409585237503052,
0.9304977059364319,
0.8666347861289978,
0.1076379343867302,
0.27692607045173645,
0.4919978082180023,
-0.2313832938671112,
-1.1076651811599731,
-0.26271018385887146,
-1.081946849822998,
-2.608325958251953,
0.41312292218208313,
-0.29652929306030273,
-1.3323827981948853,
-0.013546166010200977,
-1.082529067993164,
0.8930291533470154,
-0.6117618680000305,
-0.9391453862190247,
-1.530498743057251,
0.1532401442527771,
-0.0880153551697731,
0.8517271876335144,
-1.57377028465271,
-0.14171355962753296,
1.3516918420791626,
0.9360314607620239,
-0.6832374334335327,
1.0932813882827759,
0.19443808495998383,
1.0670225620269775,
0.8490898013114929,
-0.4704502820968628,
0.6363171339035034,
0.0387432724237442,
-1.339982271194458,
0.42984750866889954,
1.2065553665161133,
0.13978135585784912,
1.3912855386734009,
-0.4939049780368805,
0.08311207592487335,
0.42308783531188965,
-0.5805005431175232,
-0.5827655792236328,
-0.5875112414360046,
0.7200737595558167,
0.04460784047842026,
-0.8866642713546753,
0.12920935451984406,
-0.08151902258396149,
-0.2763809859752655,
0.33584702014923096,
-1.559351921081543,
-0.22535064816474915,
-0.3566741943359375,
-0.5367334485054016,
-1.3530280590057373,
-0.02102140709757805,
1.4481576681137085,
-0.7795079350471497,
-0.10633951425552368,
0.3964231610298157,
0.3889932930469513,
0.548460841178894,
0.5677168965339661,
-0.7172670960426331,
-0.3314817547798157,
-0.37720537185668945,
-0.31818071007728577,
0.3527399003505707,
1.2554130554199219,
-0.151956245303154,
-0.8565413951873779,
0.683525562286377,
-0.24936503171920776,
0.0345495380461216,
1.9356749057769775,
-0.005643956363201141,
-0.7771739363670349,
0.23054301738739014,
-0.7351284027099609,
1.8988120555877686,
1.6095857620239258,
1.356849193572998,
-0.03703390806913376,
-0.8158761262893677,
0.6070348024368286,
-0.19712130725383759,
-0.40043529868125916,
0.929715096950531,
0.4012607932090759,
-0.19361358880996704,
-1.4772855043411255,
0.7146607637405396,
1.3076472282409668,
-0.8802701234817505,
-0.762830376625061,
0.03950407728552818,
-0.8227102756500244,
1.0575939416885376,
0.6725207567214966,
0.5140496492385864,
0.28924456238746643,
1.6513501405715942,
0.7518925666809082,
-0.47968921065330505,
0.39480122923851013,
0.5445938110351562,
-0.11491206288337708,
-2.0504326820373535,
-1.0469813346862793,
0.386117160320282,
-0.4824567437171936,
-1.5938386917114258,
1.3889037370681763,
-1.1601226329803467,
-0.9361491203308105,
0.5341364145278931,
0.0241239033639431,
1.370167851448059,
0.26181331276893616,
1.679476261138916,
1.9339998960494995,
0.8308601975440979,
0.3307971954345703,
1.2708261013031006,
-0.17128537595272064,
-0.3783857822418213,
1.7565340995788574,
-0.4180961549282074,
0.45828306674957275,
1.1597579717636108,
-0.3099974989891052,
-1.1259113550186157,
-0.8256097435951233,
-1.1111609935760498,
-0.6389303207397461,
1.0846197605133057,
0.19936245679855347,
-1.2207081317901611,
0.10215017944574356,
1.57553231716156,
0.13845352828502655,
-0.23798643052577972,
0.6252493858337402,
0.42330920696258545,
-0.736300528049469,
-0.025340486317873,
-0.9939904808998108,
0.4999878704547882,
-0.17692646384239197,
-0.43324658274650574,
0.35100051760673523,
0.427358478307724,
1.3331576585769653,
-0.13763763010501862,
0.17950522899627686,
1.2547556161880493,
-1.4162238836288452,
1.3760493993759155,
-0.703974723815918,
0.2368767261505127,
-2.3783342838287354,
1.4079546928405762,
-0.7458987832069397,
1.956592321395874,
-2.670180082321167,
0.4372684061527252,
-0.6708757281303406,
-0.5175760984420776,
0.30474647879600525,
-0.4021002948284149,
0.11885467171669006,
-0.1840846687555313,
-1.09079110622406,
-0.04131035506725311,
-0.7175881266593933,
0.5732230544090271,
1.1455262899398804,
1.3532764911651611,
-1.0201830863952637,
-0.3652447462081909,
-1.689780592918396,
-0.14943744242191315,
-0.6641297340393066,
0.2729538679122925,
-2.1124300956726074,
-0.22747783362865448,
-1.9358423948287964,
-2.3123390674591064,
-1.3085922002792358,
-0.8276596665382385,
1.081185221672058,
0.11245398223400116,
-0.8132040500640869,
1.1691923141479492,
-0.3820900022983551,
-1.8114666938781738,
1.075907826423645,
-2.1234323978424072
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF I'm sorry there is still not enough information to answer your question :( For now I can only assume that your [filenames contain split names](https://huggingface.co/docs/datasets/repository_structure#splits-and-file-names) which are somehow incorrectly parsed.
> What would be the output if you omit `split` while loading? Like just
> ```python
> ds = load_dataset("MyData")
> print(ds)
> ```
>
>
```python
Dataset({
features: ['image', 'label'],
num_rows: 4
})
``` | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 67 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> @WiNE-iNEFF I'm sorry there is still not enough information to answer your question :( For now I can only assume that your [filenames contain split names](https://huggingface.co/docs/datasets/repository_structure#splits-and-file-names) which are somehow incorrectly parsed.
> What would be the output if you omit `split` while loading? Like just
> ```python
> ds = load_dataset("MyData")
> print(ds)
> ```
>
>
```python
Dataset({
features: ['image', 'label'],
num_rows: 4
})
``` | [
-1.1651487350463867,
-1.0005125999450684,
-0.8378556966781616,
1.5311158895492554,
-0.12222650647163391,
-1.271843671798706,
0.08721789717674255,
-1.0936161279678345,
1.7424579858779907,
-0.8886017799377441,
0.4073145091533661,
-1.7135213613510132,
-0.025572530925273895,
-0.5275366306304932,
-0.8266782164573669,
-0.9356548190116882,
-0.3927910029888153,
-0.8640355467796326,
0.9996262192726135,
2.420764446258545,
1.2401783466339111,
-1.3597291707992554,
2.661072254180908,
0.5994275212287903,
-0.22722066938877106,
-1.083248496055603,
0.6202558279037476,
-0.0641193762421608,
-1.1045947074890137,
-0.4462111294269562,
-0.9300897121429443,
-0.01939629204571247,
-0.6207286715507507,
-0.6242929100990295,
-0.06199866533279419,
0.45193278789520264,
-0.32580986618995667,
-0.3257020115852356,
-0.4740111827850342,
-0.8112976551055908,
0.5173818469047546,
-0.3846546709537506,
0.9494534134864807,
-0.4281781315803528,
1.8041020631790161,
-0.5639541149139404,
0.3589250445365906,
0.623594343662262,
1.3584939241409302,
0.2016027718782425,
-0.11160197108983994,
0.22673605382442474,
0.40572354197502136,
-0.007504038512706757,
0.4136063754558563,
1.2067400217056274,
0.5126264691352844,
0.5866605639457703,
0.8358555436134338,
-2.259265184402466,
1.2526018619537354,
-1.0172234773635864,
0.25973570346832275,
1.2616634368896484,
-0.895129919052124,
0.30896618962287903,
-1.7301777601242065,
-0.04530704766511917,
0.5819039940834045,
-2.228869676589966,
0.2446865737438202,
-1.3152093887329102,
-0.4758085608482361,
0.9499578475952148,
0.36742886900901794,
-1.3090835809707642,
0.036878734827041626,
-0.310869425535202,
0.973928689956665,
0.48630669713020325,
1.0987647771835327,
-1.7462053298950195,
0.05434881150722504,
-0.34845075011253357,
0.11245552450418472,
-1.2510151863098145,
-1.4972881078720093,
0.565276026725769,
0.6356894969940186,
0.6743309497833252,
-0.16528873145580292,
1.0192670822143555,
-0.9921478033065796,
0.6705778241157532,
-0.8987604975700378,
-1.59259033203125,
-1.3161921501159668,
-2.2183754444122314,
-2.2177820205688477,
0.7103209495544434,
-0.5700039863586426,
-0.5635093450546265,
2.083404064178467,
-1.0909223556518555,
-1.8484758138656616,
1.1588720083236694,
0.25786250829696655,
0.09061058610677719,
2.324451208114624,
0.23520512878894806,
-0.7425787448883057,
0.5056084990501404,
-0.7614574432373047,
0.8224144577980042,
-0.35257595777511597,
1.4182779788970947,
0.47280892729759216,
-0.9771179556846619,
1.7201266288757324,
-0.449358195066452,
0.5905884504318237,
-0.6075521111488342,
-0.536622941493988,
-0.7657356262207031,
0.37928465008735657,
1.8962457180023193,
-0.35197964310646057,
1.579782247543335,
-0.24645285308361053,
-1.546557903289795,
-1.6414940357208252,
0.9233136177062988,
0.4737924039363861,
-0.8686439394950867,
0.19754278659820557,
-0.378385066986084,
0.04918144643306732,
0.02519199065864086,
1.1721705198287964,
1.269274115562439,
0.7707127332687378,
-0.3209001123905182,
-0.9153412580490112,
0.23298710584640503,
-0.02935810200870037,
-0.65792316198349,
-1.8052772283554077,
-0.3877692222595215,
0.14663657546043396,
0.6536794304847717,
-1.1593388319015503,
1.7292428016662598,
0.9254294037818909,
1.9817348718643188,
0.9720370769500732,
-0.25986555218696594,
1.4820109605789185,
0.07183215022087097,
1.8659265041351318,
-0.40868306159973145,
0.6841458678245544,
-0.3621276617050171,
-1.194835901260376,
0.8695635199546814,
-0.39291951060295105,
-1.8793222904205322,
-0.777080237865448,
-0.9398597478866577,
-0.10466466844081879,
-0.8555080890655518,
0.945082426071167,
-0.3151393532752991,
-1.4691967964172363,
0.3572598099708557,
-0.7050032019615173,
0.10522980242967606,
-1.2280064821243286,
0.36522239446640015,
0.6964848637580872,
-0.6517706513404846,
-0.07742775231599808,
-0.24281461536884308,
-1.2683281898498535,
-0.46502846479415894,
0.24892115592956543,
1.9832245111465454,
-0.8361313343048096,
0.9104253053665161,
1.004406213760376,
-0.7228283882141113,
0.010103249922394753,
0.3078137934207916,
-0.2843875288963318,
0.7846978306770325,
-1.043853998184204,
-0.38860809803009033,
1.2028056383132935,
-0.18954907357692719,
-0.6422967314720154,
1.485472559928894,
0.7044697999954224,
-0.9892851710319519,
-0.1257573366165161,
-0.21095216274261475,
-0.6722837686538696,
-0.026346975937485695,
-1.5354562997817993,
-0.07401998341083527,
0.3666021227836609,
-1.4224352836608887,
-0.5143641233444214,
-0.16294322907924652,
1.328866720199585,
-0.15294437110424042,
1.3296475410461426,
-0.36188748478889465,
-0.21973787248134613,
-0.3518112003803253,
-0.49755963683128357,
0.18106280267238617,
-0.19050441682338715,
-0.6678043007850647,
0.20282675325870514,
-0.8293339014053345,
0.3012188673019409,
1.3957253694534302,
0.34504371881484985,
0.05626906454563141,
0.519251823425293,
1.1910650730133057,
0.37165799736976624,
0.003304467536509037,
-0.9224109649658203,
-1.4995648860931396,
2.0355632305145264,
-1.477059006690979,
2.0422720909118652,
0.6579229235649109,
-0.11323409527540207,
-1.7833799123764038,
-1.9073635339736938,
1.434197187423706,
1.279062032699585,
2.2928318977355957,
0.5813032388687134,
0.34042173624038696,
-0.819139838218689,
-0.7230098247528076,
0.3358219563961029,
-1.0638221502304077,
-0.6750392913818359,
0.07117579877376556,
2.254807233810425,
1.7177844047546387,
-0.559094250202179,
-0.18571333587169647,
-0.9758663773536682,
1.34934401512146,
-0.1693103015422821,
0.23090407252311707,
1.9017159938812256,
-0.31960535049438477,
-1.2307021617889404,
1.2588592767715454,
-2.310406446456909,
0.13808810710906982,
2.0129075050354004,
0.25157713890075684,
0.1080983504652977,
-1.3706227540969849,
-0.6740822196006775,
-0.2148716002702713,
-0.49283352494239807,
-1.2895675897598267,
0.527780294418335,
-0.2554209530353546,
-0.7883077263832092,
-1.4215329885482788,
0.25316962599754333,
-1.0375574827194214,
-1.660038948059082,
0.3406531810760498,
1.917938232421875,
2.1460304260253906,
-0.8681687712669373,
1.5877277851104736,
-0.23757502436637878,
0.23226964473724365,
1.2251406908035278,
1.1720385551452637,
3.114198684692383,
1.826431155204773,
-1.267515778541565,
0.5733935236930847,
-0.11406882852315903,
-0.5782558917999268,
1.3580821752548218,
-1.0969780683517456,
1.2006237506866455,
-0.2892291247844696,
-1.1795860528945923,
-1.2487192153930664,
0.9340305328369141,
0.4045960605144501,
0.028183603659272194,
-0.5054801106452942,
1.1904348134994507,
0.009862525388598442,
1.3010414838790894,
0.5294601321220398,
-0.31016042828559875,
0.6479185223579407,
-0.43007034063339233,
-0.5161758065223694,
1.5553117990493774,
0.23364341259002686,
-1.4671670198440552,
-2.3214173316955566,
-0.18401476740837097,
-0.8707269430160522,
0.11627539247274399,
-0.522243082523346,
-1.0381436347961426,
1.6527987718582153,
0.4162680208683014,
-1.2562153339385986,
-0.31006741523742676,
-0.36769336462020874,
-0.5849958658218384,
2.680643081665039,
-1.3550602197647095,
-0.2285008281469345,
-0.9769282937049866,
-0.632750391960144,
1.7000195980072021,
-1.2432794570922852,
-0.16268159449100494,
-1.0059161186218262,
-0.5241175889968872,
-1.4652152061462402,
-0.5796483755111694,
-0.024487938731908798,
-0.9243174195289612,
0.7493530511856079,
0.25006338953971863,
-1.153928518295288,
-0.2973668575286865,
-0.8372812271118164,
0.8904688358306885,
-0.18805630505084991,
0.29938650131225586,
1.9007577896118164,
0.3879159092903137,
-0.4499748945236206,
0.7384589910507202,
1.177296757698059,
0.6265910863876343,
-0.6481254696846008,
0.20983381569385529,
-0.6411595940589905,
0.3278096914291382,
-1.430659532546997,
0.22194607555866241,
-2.937967538833618,
0.7680588364601135,
0.04551982134580612,
-0.1080927774310112,
-0.020878734067082405,
-1.3976384401321411,
1.0681296586990356,
2.5742862224578857,
-1.2601752281188965,
0.42780178785324097,
0.25602859258651733,
1.2320384979248047,
-1.6210559606552124,
0.24947118759155273,
-0.42896053194999695,
2.21089243888855,
0.16820856928825378,
1.305935025215149,
-0.3706877529621124,
-2.297011613845825,
0.6055406332015991,
-1.2865031957626343,
-1.123152494430542,
0.7401689291000366,
-0.8742367029190063,
0.023228613659739494,
-1.4303597211837769,
-0.13001999258995056,
-0.9182326793670654,
-1.1103482246398926,
0.788616418838501,
0.17056618630886078,
0.36153796315193176,
-0.5744445323944092,
0.3801335096359253,
-2.147989511489868,
-1.42313814163208,
-0.18975600600242615,
-0.9953592419624329,
0.481230229139328,
-0.3267214596271515,
0.6963332891464233,
-0.23162326216697693,
0.08316700905561447,
0.4562648832798004,
1.4271810054779053,
3.466221332550049,
0.2010822296142578,
0.3503531515598297,
-0.1809307038784027,
-0.95068359375,
1.5304791927337646,
0.8923884034156799,
-0.1368420571088791,
-0.513174831867218,
-1.0515174865722656,
1.3238575458526611,
1.9379017353057861,
0.9359436631202698,
0.028999565169215202,
-0.7918830513954163,
-0.6686164736747742,
-0.10659028589725494,
0.19885465502738953,
0.556985080242157,
0.8449534177780151,
0.14644411206245422,
0.10082030296325684,
1.3164587020874023,
1.1643099784851074,
-0.40865838527679443,
0.4112522304058075,
-0.8951258659362793,
-0.4840781092643738,
0.5152727365493774,
0.3342618942260742,
0.03507816046476364,
0.3943115472793579,
-0.9351997375488281,
-0.3413911461830139,
-0.25295156240463257,
-0.8144031167030334,
-0.735085129737854,
-0.4600485861301422,
-0.3355478346347809,
1.5812318325042725,
0.04287414997816086,
-0.5852263569831848,
-0.03444124013185501,
-0.7913950085639954,
-0.12068315595388412,
-1.1522729396820068,
0.15650810301303864,
-0.14060038328170776,
-0.12484560161828995,
-0.09046076983213425,
1.669478178024292,
-0.9142289161682129,
-2.080824375152588,
0.31292328238487244,
0.34575170278549194,
-0.45406463742256165,
0.17041103541851044,
1.629460096359253,
0.5393258929252625,
1.3706789016723633,
1.3419519662857056,
1.022090196609497,
-0.652630090713501,
-1.1670500040054321,
0.666692316532135,
0.889455258846283,
-1.3961628675460815,
0.905829131603241,
0.02261977083981037,
-0.5041847229003906,
0.5877116918563843,
1.213786005973816,
0.5608122944831848,
-1.8998850584030151,
0.7675461173057556,
-0.8610594868659973,
0.8337225914001465,
0.7200238108634949,
0.7679202556610107,
0.22533221542835236,
0.8558642268180847,
-1.193186640739441,
-1.1189277172088623,
-0.8221938610076904,
-0.7332432270050049,
1.8579132556915283,
-0.25390490889549255,
0.5342507362365723,
-0.25626713037490845,
-1.2451533079147339,
-0.11793483048677444,
0.6720057725906372,
0.24237295985221863,
-0.40059345960617065,
0.8021935820579529,
-0.638069212436676,
-1.072346806526184,
-1.3739988803863525,
-0.3968309462070465,
-1.0234708786010742,
-0.9925928711891174,
1.044331431388855,
0.7972473502159119,
0.3117596209049225,
1.9449490308761597,
0.6274964809417725,
0.1765974760055542,
-2.535952568054199,
0.9169676303863525,
0.2655367851257324,
-0.04034695029258728,
0.8331791162490845,
0.32146281003952026,
1.078136682510376,
-0.10664668679237366,
0.5902711749076843,
-2.3094043731689453,
2.20080304145813,
-0.28675851225852966,
0.7143900990486145,
0.04553066939115524,
-0.2499389499425888,
1.0833452939987183,
0.5390092730522156,
0.5674070119857788,
-1.1686903238296509,
0.7360863089561462,
-0.6356196403503418,
1.1931382417678833,
0.9305225610733032,
-0.9212207794189453,
0.10812702775001526,
1.4001264572143555,
0.4857867658138275,
-0.556458592414856,
-0.9480642080307007,
-0.9130900502204895,
0.9169775247573853,
1.6643418073654175,
-0.10082866251468658,
0.021935079246759415,
0.81400066614151,
0.671485424041748,
-1.2918082475662231,
0.06654907763004303,
-0.7031490206718445,
-0.6814326047897339,
1.8088431358337402,
2.0499000549316406,
-0.1185782179236412,
-0.17033807933330536,
-0.7593736052513123,
-1.2739014625549316,
0.9232937693595886,
0.07958181202411652,
0.03919866681098938,
0.6617019176483154,
-0.7389656901359558,
1.0910964012145996,
0.869509756565094,
0.8602678775787354,
0.1495688557624817,
0.36554524302482605,
0.5258447527885437,
-0.3013324737548828,
-1.03427255153656,
-0.20919819176197052,
-1.1358381509780884,
-2.5527679920196533,
0.465616375207901,
-0.29618149995803833,
-1.2982932329177856,
-0.032445259392261505,
-1.0308539867401123,
0.9249000549316406,
-0.6320174336433411,
-0.9465038776397705,
-1.4878323078155518,
0.20293404161930084,
-0.031968481838703156,
0.8685302734375,
-1.575364112854004,
-0.046756744384765625,
1.358747124671936,
0.9896734356880188,
-0.7591084837913513,
1.0568492412567139,
0.2704296410083771,
1.0691324472427368,
0.8860036730766296,
-0.48456037044525146,
0.6246567368507385,
0.0035793492570519447,
-1.3104639053344727,
0.48582300543785095,
1.2137459516525269,
0.17822247743606567,
1.4242064952850342,
-0.4813195466995239,
0.03202594816684723,
0.3899082839488983,
-0.5696827173233032,
-0.55350261926651,
-0.6103100180625916,
0.673977792263031,
0.08716282248497009,
-0.908444344997406,
0.10007291287183762,
-0.03211091458797455,
-0.2226337194442749,
0.3403627574443817,
-1.564955472946167,
-0.16167901456356049,
-0.3594677448272705,
-0.504335343837738,
-1.297878623008728,
-0.12489590793848038,
1.4647624492645264,
-0.7405268549919128,
-0.09520455449819565,
0.4618123471736908,
0.31829607486724854,
0.5047183632850647,
0.5438868999481201,
-0.6621842384338379,
-0.3644174337387085,
-0.4142340123653412,
-0.35592350363731384,
0.3240727186203003,
1.2458513975143433,
-0.13468590378761292,
-0.9116145372390747,
0.6957734227180481,
-0.26622551679611206,
0.028778182342648506,
1.862338662147522,
0.012297669425606728,
-0.779363751411438,
0.2164873331785202,
-0.7184221744537354,
1.9215251207351685,
1.6733200550079346,
1.3207361698150635,
-0.036938197910785675,
-0.8929410576820374,
0.6500957012176514,
-0.25347357988357544,
-0.44438666105270386,
0.8710227012634277,
0.39483442902565,
-0.1967584788799286,
-1.470689058303833,
0.7210726141929626,
1.3090192079544067,
-0.8876248598098755,
-0.7834604382514954,
0.022303162142634392,
-0.7326915264129639,
1.018620252609253,
0.6567691564559937,
0.47813332080841064,
0.3219245970249176,
1.6872066259384155,
0.7212034463882446,
-0.46997225284576416,
0.4441114366054535,
0.5060564279556274,
-0.11984142661094666,
-2.056806802749634,
-1.1115508079528809,
0.3627546429634094,
-0.46771129965782166,
-1.6321797370910645,
1.3706727027893066,
-1.155909538269043,
-0.9269030690193176,
0.5373749732971191,
0.08691272884607315,
1.3976740837097168,
0.2745235860347748,
1.6681268215179443,
1.9562302827835083,
0.7960396409034729,
0.3312583267688751,
1.2376160621643066,
-0.14769038558006287,
-0.36163195967674255,
1.7716844081878662,
-0.40223702788352966,
0.47774407267570496,
1.1814582347869873,
-0.2911345958709717,
-1.1549532413482666,
-0.8979479074478149,
-1.2302699089050293,
-0.7016819715499878,
1.104674220085144,
0.22715353965759277,
-1.2327449321746826,
0.17415140569210052,
1.6830230951309204,
0.08454734086990356,
-0.3284112811088562,
0.6536176204681396,
0.4139241576194763,
-0.7474031448364258,
-0.029460225254297256,
-1.0116157531738281,
0.5100581645965576,
-0.1429019272327423,
-0.3864462971687317,
0.3906586766242981,
0.42016637325286865,
1.3059875965118408,
-0.05227290838956833,
0.16612152755260468,
1.2366617918014526,
-1.3917862176895142,
1.422207236289978,
-0.7065577507019043,
0.2433958649635315,
-2.361774444580078,
1.4030792713165283,
-0.7462860345840454,
1.991790771484375,
-2.6707563400268555,
0.42249876260757446,
-0.6547974348068237,
-0.4809753894805908,
0.27896764874458313,
-0.41784024238586426,
0.1162477657198906,
-0.1889253854751587,
-1.0901139974594116,
-0.040422312915325165,
-0.6863164901733398,
0.572741687297821,
1.1378822326660156,
1.4003033638000488,
-1.0892857313156128,
-0.33046120405197144,
-1.7353754043579102,
-0.11785431206226349,
-0.6297921538352966,
0.2757205069065094,
-2.0807595252990723,
-0.16752612590789795,
-1.9676947593688965,
-2.3437914848327637,
-1.3154672384262085,
-0.7917323708534241,
1.060560703277588,
0.05300421267747879,
-0.8083282113075256,
1.1834206581115723,
-0.34964901208877563,
-1.7932616472244263,
1.111802339553833,
-2.126772880554199
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF My only guess is that 4 images in your data have `"train"` string in their names (something like `"train_image_0.png"`) and others do not and the loader ignores all the files that do not contain split name in filename. If it's true, please try to remove "train" from filenames. Or maybe they are inside a directory named "train", then the directory should be renamed (unless you want to put only these 4 specific images to the train but apparently you do not).
If there is a bug I cannot investigate it unfortunately because I cannot reproduce your case without some data samples. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 102 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
@WiNE-iNEFF My only guess is that 4 images in your data have `"train"` string in their names (something like `"train_image_0.png"`) and others do not and the loader ignores all the files that do not contain split name in filename. If it's true, please try to remove "train" from filenames. Or maybe they are inside a directory named "train", then the directory should be renamed (unless you want to put only these 4 specific images to the train but apparently you do not).
If there is a bug I cannot investigate it unfortunately because I cannot reproduce your case without some data samples. | [
-1.2320698499679565,
-1.0163124799728394,
-0.771569550037384,
1.4469125270843506,
-0.15219849348068237,
-1.1895784139633179,
0.08186699450016022,
-1.173828125,
1.6954021453857422,
-0.9668379426002502,
0.38509199023246765,
-1.6455564498901367,
0.06662152707576752,
-0.5059229731559753,
-0.7823770046234131,
-1.00491201877594,
-0.4684823751449585,
-0.8878107070922852,
0.9978348016738892,
2.4315712451934814,
1.273756742477417,
-1.3926688432693481,
2.685882091522217,
0.6913741230964661,
-0.1807522475719452,
-1.082465410232544,
0.6273756623268127,
-0.01618131622672081,
-1.136844277381897,
-0.46961233019828796,
-1.0342425107955933,
-0.032440103590488434,
-0.5380686521530151,
-0.5950870513916016,
-0.0663873702287674,
0.35589927434921265,
-0.29534098505973816,
-0.27742627263069153,
-0.5516641736030579,
-0.7854997515678406,
0.4667970836162567,
-0.42239388823509216,
1.0192538499832153,
-0.49751535058021545,
1.9089783430099487,
-0.49604102969169617,
0.422299325466156,
0.6912655234336853,
1.354772925376892,
0.2502783536911011,
-0.07356137782335281,
0.18889330327510834,
0.518123209476471,
-0.09366891533136368,
0.3608241081237793,
1.1282570362091064,
0.4753851592540741,
0.5554390549659729,
0.8152603507041931,
-2.1713411808013916,
1.2676055431365967,
-1.0040408372879028,
0.13202309608459473,
1.3027266263961792,
-0.8882105946540833,
0.3159846067428589,
-1.7952357530593872,
-0.08411283046007156,
0.5567625164985657,
-2.2576920986175537,
0.18149663507938385,
-1.2814781665802002,
-0.5119552612304688,
1.0161449909210205,
0.3379160165786743,
-1.2339714765548706,
0.09716158360242844,
-0.39787790179252625,
0.9061431288719177,
0.521376371383667,
1.1619644165039062,
-1.6536732912063599,
-0.06182463467121124,
-0.306621789932251,
0.06351114809513092,
-1.359281301498413,
-1.4474178552627563,
0.5687981843948364,
0.6059492826461792,
0.5677523612976074,
-0.0642036721110344,
1.0868146419525146,
-1.0143351554870605,
0.7883369326591492,
-0.9527177810668945,
-1.5308902263641357,
-1.3810069561004639,
-2.3311705589294434,
-2.2820188999176025,
0.8178669214248657,
-0.5971351861953735,
-0.6053910851478577,
2.093116283416748,
-1.1060118675231934,
-1.6585729122161865,
1.166032314300537,
0.13967613875865936,
0.11580024659633636,
2.402208089828491,
0.20356379449367523,
-0.719230592250824,
0.3948120176792145,
-0.7051100730895996,
0.8397183418273926,
-0.36523357033729553,
1.442302942276001,
0.4739478528499603,
-0.9772678017616272,
1.725655436515808,
-0.4087411165237427,
0.5632855892181396,
-0.536102294921875,
-0.5828253626823425,
-0.8310742974281311,
0.4096744954586029,
1.8894315958023071,
-0.37428420782089233,
1.5833890438079834,
-0.30659934878349304,
-1.5905441045761108,
-1.7172878980636597,
0.9120000600814819,
0.48276907205581665,
-0.801895797252655,
0.0867493748664856,
-0.28194645047187805,
0.07995019853115082,
0.011037363670766354,
1.1120243072509766,
1.289023756980896,
0.7852847576141357,
-0.395364373922348,
-0.9553760290145874,
0.17397254705429077,
-0.1728888750076294,
-0.6927019357681274,
-1.7791866064071655,
-0.4777941405773163,
0.14332330226898193,
0.658026397228241,
-1.1497248411178589,
1.7147129774093628,
1.0485966205596924,
1.9628692865371704,
0.9692422151565552,
-0.2842104732990265,
1.4080524444580078,
0.042225778102874756,
1.8206181526184082,
-0.43830594420433044,
0.656821072101593,
-0.366956502199173,
-1.18434476852417,
0.7854719758033752,
-0.3397373855113983,
-1.9137109518051147,
-0.8498498797416687,
-0.8152610659599304,
-0.14790013432502747,
-0.7541130185127258,
0.9297683835029602,
-0.3188132047653198,
-1.3199552297592163,
0.3765898644924164,
-0.5860209465026855,
-0.007698157802224159,
-1.2272181510925293,
0.3916296064853668,
0.6457436084747314,
-0.690098226070404,
0.058515410870313644,
-0.1821690946817398,
-1.2509034872055054,
-0.49268147349357605,
0.1486644446849823,
2.0381369590759277,
-0.8620637059211731,
0.8788825273513794,
1.0097123384475708,
-0.7462385892868042,
0.031057242304086685,
0.3774150609970093,
-0.2663809061050415,
0.7241432666778564,
-1.054941177368164,
-0.33069610595703125,
1.216946005821228,
-0.2778668701648712,
-0.5922712683677673,
1.4034078121185303,
0.7290002703666687,
-0.9926437139511108,
-0.12997087836265564,
-0.22736932337284088,
-0.7442498207092285,
0.029322661459445953,
-1.4832366704940796,
-0.1447991132736206,
0.25277623534202576,
-1.4457310438156128,
-0.4167259633541107,
-0.17549248039722443,
1.3457781076431274,
-0.14112034440040588,
1.3800930976867676,
-0.4567151665687561,
-0.33763542771339417,
-0.3423667848110199,
-0.4997747838497162,
0.2051297128200531,
-0.165751650929451,
-0.6532716751098633,
0.21891164779663086,
-0.7886576056480408,
0.292301744222641,
1.4106683731079102,
0.4449499845504761,
0.06472291052341461,
0.4582751989364624,
1.0609427690505981,
0.40269267559051514,
-0.01503807958215475,
-0.9055129885673523,
-1.481453776359558,
2.048860549926758,
-1.484702467918396,
2.019415855407715,
0.7447706460952759,
-0.1623840630054474,
-1.7892014980316162,
-1.8373966217041016,
1.3279608488082886,
1.288332223892212,
2.28082537651062,
0.5335783362388611,
0.3587374687194824,
-0.82500821352005,
-0.7238029837608337,
0.4741591215133667,
-1.0875263214111328,
-0.6803431510925293,
0.047542374581098557,
2.266386032104492,
1.692590355873108,
-0.5431133508682251,
-0.10391662269830704,
-1.010156512260437,
1.3853904008865356,
-0.08693268895149231,
0.23418843746185303,
1.9141088724136353,
-0.36165428161621094,
-1.2294602394104004,
1.2265422344207764,
-2.264545202255249,
0.024136610329151154,
1.9904218912124634,
0.29861918091773987,
0.053774069994688034,
-1.3727874755859375,
-0.6764782071113586,
-0.3220643699169159,
-0.47307464480400085,
-1.2375988960266113,
0.5934505462646484,
-0.337561696767807,
-0.7575963735580444,
-1.5118526220321655,
0.20812632143497467,
-1.1948350667953491,
-1.6520220041275024,
0.3404742479324341,
1.9328534603118896,
2.096318006515503,
-0.8020461201667786,
1.5363140106201172,
-0.16401517391204834,
0.17741738259792328,
1.1926809549331665,
1.192598581314087,
3.1610965728759766,
1.8903814554214478,
-1.2076771259307861,
0.5566190481185913,
-0.13574741780757904,
-0.5003226399421692,
1.1751468181610107,
-1.0983284711837769,
1.2896983623504639,
-0.1546473652124405,
-1.0988366603851318,
-1.1936883926391602,
0.894014298915863,
0.3900584578514099,
0.030540209263563156,
-0.4659750163555145,
1.2188841104507446,
0.11280950903892517,
1.2986265420913696,
0.44551077485084534,
-0.25489360094070435,
0.7069976925849915,
-0.4416623115539551,
-0.636909008026123,
1.5734074115753174,
0.27469390630722046,
-1.5169459581375122,
-2.289036750793457,
-0.25770434737205505,
-0.84414142370224,
0.05787229165434837,
-0.5068717002868652,
-0.9847971200942993,
1.6687228679656982,
0.38440805673599243,
-1.3215981721878052,
-0.36027848720550537,
-0.37744492292404175,
-0.6617553234100342,
2.718127727508545,
-1.3071998357772827,
-0.21876700222492218,
-0.8879503011703491,
-0.6921867728233337,
1.6664026975631714,
-1.2611441612243652,
-0.133101224899292,
-1.0199306011199951,
-0.49176090955734253,
-1.4453239440917969,
-0.5547938942909241,
-0.04672844707965851,
-0.8669060468673706,
0.7470724582672119,
0.35033029317855835,
-1.0854148864746094,
-0.3745347857475281,
-0.8640407919883728,
0.8209342360496521,
-0.08794631063938141,
0.28204673528671265,
1.889439582824707,
0.4298504889011383,
-0.3899311125278473,
0.6438491344451904,
1.1878920793533325,
0.5592535138130188,
-0.5728363990783691,
0.12343726307153702,
-0.7330664396286011,
0.32100731134414673,
-1.2981115579605103,
0.31868085265159607,
-2.9161784648895264,
0.7467315793037415,
-0.07383693009614944,
-0.2518177926540375,
-0.023813217878341675,
-1.2993085384368896,
1.0752862691879272,
2.5982205867767334,
-1.2170404195785522,
0.41355571150779724,
0.24317790567874908,
1.1797674894332886,
-1.6129716634750366,
0.3867188096046448,
-0.34630414843559265,
2.147897243499756,
0.24423249065876007,
1.2210696935653687,
-0.5095417499542236,
-2.2693045139312744,
0.6790611743927002,
-1.1749275922775269,
-1.1843247413635254,
0.7079495191574097,
-0.86745685338974,
0.04048444703221321,
-1.3997350931167603,
-0.09348732233047485,
-0.8645915389060974,
-1.2219504117965698,
0.755525529384613,
0.18405470252037048,
0.43468233942985535,
-0.519720733165741,
0.3263292908668518,
-2.2076032161712646,
-1.4310871362686157,
-0.26836147904396057,
-0.9812087416648865,
0.48058512806892395,
-0.33591964840888977,
0.7412182688713074,
-0.26282772421836853,
0.09271469712257385,
0.4664228558540344,
1.4005109071731567,
3.5015881061553955,
0.2100469172000885,
0.39893990755081177,
-0.13806270062923431,
-0.9176886677742004,
1.6225154399871826,
0.9013252258300781,
-0.06401366740465164,
-0.4840412139892578,
-1.0924159288406372,
1.180364727973938,
1.9569087028503418,
0.9126017093658447,
0.010867043398320675,
-0.7387033104896545,
-0.6628268957138062,
-0.11723203212022781,
0.1267661303281784,
0.5241432785987854,
0.8948623538017273,
0.02530168741941452,
0.012188390828669071,
1.5541130304336548,
1.2415211200714111,
-0.52102130651474,
0.22211144864559174,
-0.8062419891357422,
-0.4897821843624115,
0.4766443371772766,
0.35542067885398865,
0.022072192281484604,
0.38008418679237366,
-0.8375526070594788,
-0.2751634120941162,
-0.37236934900283813,
-0.8827188611030579,
-0.6610544919967651,
-0.44608715176582336,
-0.34810957312583923,
1.616172194480896,
0.12000387161970139,
-0.5612894296646118,
-0.02259412780404091,
-0.846977174282074,
-0.10381320863962173,
-1.1968865394592285,
0.2439395636320114,
-0.062074773013591766,
-0.17346961796283722,
-0.08701084554195404,
1.7766120433807373,
-0.9551945924758911,
-2.12844181060791,
0.3606813848018646,
0.3086595833301544,
-0.35868406295776367,
0.24566741287708282,
1.550066351890564,
0.4903624355792999,
1.4353092908859253,
1.3166983127593994,
0.9306796789169312,
-0.7363898754119873,
-1.1902453899383545,
0.7473676800727844,
0.7854520082473755,
-1.5015650987625122,
0.8602007031440735,
0.04905092343688011,
-0.4568030834197998,
0.6476501822471619,
1.188789963722229,
0.5056703686714172,
-1.899665355682373,
0.845361590385437,
-0.8315800428390503,
0.7365022897720337,
0.6618537306785583,
0.62635338306427,
0.14895470440387726,
0.8624844551086426,
-1.0626187324523926,
-1.226481556892395,
-0.7656280994415283,
-0.7247922420501709,
1.9363667964935303,
-0.300558477640152,
0.6018176078796387,
-0.25596076250076294,
-1.2528821229934692,
-0.03788105398416519,
0.6051583886146545,
0.26186269521713257,
-0.36229202151298523,
0.8228759169578552,
-0.6934434175491333,
-1.1815192699432373,
-1.558220386505127,
-0.34970623254776,
-1.1190669536590576,
-1.0034451484680176,
1.0629674196243286,
0.7155870795249939,
0.20841549336910248,
2.006620407104492,
0.6683637499809265,
0.2898956835269928,
-2.547581195831299,
0.961055338382721,
0.2613462507724762,
0.028875816613435745,
0.9691038131713867,
0.25609123706817627,
1.008814811706543,
-0.1259501874446869,
0.5279729962348938,
-2.3481271266937256,
2.3075225353240967,
-0.3693678677082062,
0.7154541611671448,
0.00773035641759634,
-0.2880929410457611,
1.125245451927185,
0.6391991376876831,
0.6043720245361328,
-1.1738065481185913,
0.6626942157745361,
-0.5680672526359558,
1.1293175220489502,
0.9443113803863525,
-0.8520277142524719,
0.11396433413028717,
1.319783329963684,
0.5738914608955383,
-0.5066207051277161,
-0.9067376255989075,
-1.0180538892745972,
0.8828026652336121,
1.6616365909576416,
-0.08758331090211868,
-0.00036156969144940376,
0.8166795372962952,
0.6197425127029419,
-1.2818489074707031,
0.07977963238954544,
-0.7485320568084717,
-0.7536863088607788,
1.666593313217163,
2.111581802368164,
-0.018186796456575394,
-0.23597735166549683,
-0.6487998962402344,
-1.2623060941696167,
0.9216840863227844,
0.002733101136982441,
0.18347382545471191,
0.5867465734481812,
-0.7204505801200867,
1.0861024856567383,
0.9580910801887512,
0.9028825759887695,
0.26296305656433105,
0.3206077516078949,
0.5364663004875183,
-0.30895963311195374,
-0.9864487051963806,
-0.19894742965698242,
-1.0951006412506104,
-2.458786725997925,
0.5101336240768433,
-0.28333011269569397,
-1.3669257164001465,
0.0046739717945456505,
-0.9839491248130798,
0.894138514995575,
-0.48121732473373413,
-0.9779207706451416,
-1.5492620468139648,
0.09036136418581009,
-0.10078868269920349,
0.9234851598739624,
-1.553615689277649,
-0.13656146824359894,
1.4131979942321777,
0.9581732749938965,
-0.7464327812194824,
1.0848137140274048,
0.23979146778583527,
1.1359164714813232,
0.8111444115638733,
-0.4754450023174286,
0.545850396156311,
-0.029252860695123672,
-1.358636736869812,
0.42991331219673157,
1.1475470066070557,
0.20614539086818695,
1.432378888130188,
-0.5168097019195557,
0.15189588069915771,
0.3330250680446625,
-0.6085152626037598,
-0.5568836331367493,
-0.5338035821914673,
0.7075481414794922,
0.07764802128076553,
-0.8339514136314392,
0.15681035816669464,
-0.13710637390613556,
-0.24374349415302277,
0.23362921178340912,
-1.4808909893035889,
-0.189380943775177,
-0.36674270033836365,
-0.49481892585754395,
-1.2698343992233276,
-0.08338478207588196,
1.4567193984985352,
-0.7912784814834595,
-0.06073669344186783,
0.425209105014801,
0.43967583775520325,
0.5062145590782166,
0.5490671396255493,
-0.7005349397659302,
-0.32395797967910767,
-0.2981926202774048,
-0.2876095771789551,
0.3452205955982208,
1.2115747928619385,
-0.11896245926618576,
-0.8913853764533997,
0.6786470413208008,
-0.2563348710536957,
0.013071159832179546,
1.8969370126724243,
-0.020162366330623627,
-0.6994624137878418,
0.23434633016586304,
-0.7470159530639648,
1.889730453491211,
1.7045106887817383,
1.307626724243164,
-0.06290801614522934,
-0.8675684332847595,
0.6067616939544678,
-0.2677741050720215,
-0.3400421440601349,
0.9372957944869995,
0.38974958658218384,
-0.16061490774154663,
-1.5003873109817505,
0.6374255418777466,
1.1844661235809326,
-0.8705153465270996,
-0.6577355861663818,
0.03171398118138313,
-0.7340210676193237,
1.008758544921875,
0.7084440588951111,
0.5705493688583374,
0.31867682933807373,
1.7750743627548218,
0.8010738492012024,
-0.4878367483615875,
0.4332389533519745,
0.536525309085846,
-0.13952109217643738,
-2.0710554122924805,
-1.1128473281860352,
0.37145188450813293,
-0.5380776524543762,
-1.5347071886062622,
1.438490390777588,
-1.1122416257858276,
-0.9833450317382812,
0.5415531396865845,
-0.0007758950814604759,
1.4052969217300415,
0.32057467103004456,
1.614699363708496,
2.0346593856811523,
0.8694936633110046,
0.34346115589141846,
1.2850145101547241,
-0.12588895857334137,
-0.4062838554382324,
1.819807529449463,
-0.34554892778396606,
0.3786747455596924,
1.1564252376556396,
-0.29032739996910095,
-1.141854166984558,
-0.811514675617218,
-1.130734920501709,
-0.6415810585021973,
1.088940143585205,
0.14587275683879852,
-1.202475905418396,
0.15390737354755402,
1.622188687324524,
0.0839940533041954,
-0.3651905953884125,
0.48738300800323486,
0.3875783085823059,
-0.730697751045227,
-0.026190489530563354,
-0.9675759077072144,
0.5430384278297424,
-0.23384812474250793,
-0.45664334297180176,
0.37584659457206726,
0.3860807716846466,
1.4153631925582886,
-0.17459696531295776,
0.19096964597702026,
1.2556089162826538,
-1.4156441688537598,
1.4224975109100342,
-0.6611267924308777,
0.1629868894815445,
-2.2845942974090576,
1.405375361442566,
-0.7318050861358643,
2.01126766204834,
-2.700989007949829,
0.48440220952033997,
-0.6610093712806702,
-0.5525295734405518,
0.338457852602005,
-0.4405466616153717,
0.159515380859375,
-0.2162221521139145,
-1.0474106073379517,
-0.07174030691385269,
-0.6100654602050781,
0.5754740834236145,
1.1228222846984863,
1.3991588354110718,
-1.0273008346557617,
-0.3707328140735626,
-1.727362036705017,
-0.11366170644760132,
-0.6833134889602661,
0.3173125386238098,
-2.077387571334839,
-0.2324402928352356,
-1.9184330701828003,
-2.3311545848846436,
-1.3842488527297974,
-0.8271641135215759,
1.101019024848938,
0.13087555766105652,
-0.8450782895088196,
1.1807903051376343,
-0.35518983006477356,
-1.8785003423690796,
1.1548811197280884,
-2.100764513015747
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF My only guess is that 4 images in your data have `"train"` string in their names (something like `"train_image_0.png"`) and others do not and the loader ignores all the files that do not contain split name in filename. If it's true, please try to remove "train" from filenames. Or maybe they are inside a directory named "train", then the directory should be renamed (unless you want to put only these 4 specific images to the train but apparently you do not).
>
> If there is a bug I cannot investigate it unfortunately because I cannot reproduce your case without some data samples.
I checked my files and some of them do have the words train, valid and test in their names, but the number of such images is more than 500, not 4. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 136 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> @WiNE-iNEFF My only guess is that 4 images in your data have `"train"` string in their names (something like `"train_image_0.png"`) and others do not and the loader ignores all the files that do not contain split name in filename. If it's true, please try to remove "train" from filenames. Or maybe they are inside a directory named "train", then the directory should be renamed (unless you want to put only these 4 specific images to the train but apparently you do not).
>
> If there is a bug I cannot investigate it unfortunately because I cannot reproduce your case without some data samples.
I checked my files and some of them do have the words train, valid and test in their names, but the number of such images is more than 500, not 4. | [
-1.2220211029052734,
-1.0099375247955322,
-0.7680302858352661,
1.4345805644989014,
-0.17977747321128845,
-1.2132883071899414,
0.06923849135637283,
-1.1734426021575928,
1.6795011758804321,
-0.9920465350151062,
0.35229358077049255,
-1.6324089765548706,
0.03779195249080658,
-0.504047691822052,
-0.8229085803031921,
-1.0509661436080933,
-0.49105799198150635,
-0.8918689489364624,
0.9781671762466431,
2.4838690757751465,
1.2699079513549805,
-1.3710248470306396,
2.724458694458008,
0.689291775226593,
-0.17471489310264587,
-1.1039000749588013,
0.6302013397216797,
-0.05042163282632828,
-1.1583924293518066,
-0.4649311602115631,
-0.991587221622467,
-0.03001050092279911,
-0.5810489058494568,
-0.5747175812721252,
-0.08406943082809448,
0.3474460542201996,
-0.31382447481155396,
-0.2913201153278351,
-0.48325034976005554,
-0.8314946293830872,
0.47924092411994934,
-0.4464849531650543,
1.031698226928711,
-0.5044119358062744,
1.8661285638809204,
-0.48241958022117615,
0.4116016626358032,
0.7003211379051208,
1.3811885118484497,
0.27509811520576477,
-0.08764967322349548,
0.19590061902999878,
0.49137237668037415,
-0.06481337547302246,
0.3903181552886963,
1.1569137573242188,
0.5036993622779846,
0.5452979803085327,
0.8234155178070068,
-2.1806695461273193,
1.280696988105774,
-1.0018460750579834,
0.16084390878677368,
1.3076947927474976,
-0.8650103807449341,
0.3230581283569336,
-1.809843897819519,
-0.08922525495290756,
0.5904062390327454,
-2.2899491786956787,
0.19517934322357178,
-1.320705533027649,
-0.4770217537879944,
0.9891181588172913,
0.3147296905517578,
-1.2258179187774658,
0.12891298532485962,
-0.39683645963668823,
0.9347245097160339,
0.5859842300415039,
1.1721776723861694,
-1.6996428966522217,
-0.08042755722999573,
-0.2515735328197479,
0.11045216023921967,
-1.3491493463516235,
-1.462524652481079,
0.5739779472351074,
0.6192708015441895,
0.5585463047027588,
-0.05158589035272598,
1.0690339803695679,
-1.031326174736023,
0.7458227276802063,
-0.9490481615066528,
-1.5639114379882812,
-1.407064437866211,
-2.2766189575195312,
-2.2912111282348633,
0.7801306247711182,
-0.6163709163665771,
-0.5986306071281433,
2.0780842304229736,
-1.1175955533981323,
-1.6545788049697876,
1.183898687362671,
0.15914186835289001,
0.11286088824272156,
2.3942906856536865,
0.18677660822868347,
-0.7202434539794922,
0.3984476625919342,
-0.6893845796585083,
0.822615385055542,
-0.3975137770175934,
1.4182448387145996,
0.41334494948387146,
-0.9479908347129822,
1.7128753662109375,
-0.4206424057483673,
0.5554020404815674,
-0.532604455947876,
-0.5198519229888916,
-0.7850915789604187,
0.42920657992362976,
1.8374444246292114,
-0.37268325686454773,
1.6151610612869263,
-0.29754728078842163,
-1.5711605548858643,
-1.7375844717025757,
0.9294073581695557,
0.4671439528465271,
-0.8229062557220459,
0.07875461876392365,
-0.27512064576148987,
0.07348371297121048,
0.009282736107707024,
1.0974540710449219,
1.2816132307052612,
0.786773681640625,
-0.36851727962493896,
-0.9392680525779724,
0.20187750458717346,
-0.18396565318107605,
-0.7255240678787231,
-1.7651475667953491,
-0.45551738142967224,
0.14627420902252197,
0.6592803001403809,
-1.129951000213623,
1.7066962718963623,
1.0652596950531006,
1.991458535194397,
1.0088571310043335,
-0.3328537940979004,
1.3984266519546509,
0.06691604107618332,
1.8172261714935303,
-0.46985459327697754,
0.678230881690979,
-0.4206731915473938,
-1.1985944509506226,
0.795120120048523,
-0.3566160798072815,
-1.9169976711273193,
-0.8052146434783936,
-0.8478955030441284,
-0.16236892342567444,
-0.7833706140518188,
0.9698821902275085,
-0.30072155594825745,
-1.3233710527420044,
0.3464706540107727,
-0.6280328035354614,
-0.007478133775293827,
-1.264805793762207,
0.38896864652633667,
0.6690575480461121,
-0.6367882490158081,
0.039828360080718994,
-0.19754180312156677,
-1.2622482776641846,
-0.4578685760498047,
0.15302497148513794,
1.9921263456344604,
-0.8474481105804443,
0.8804273009300232,
0.9786556363105774,
-0.734652042388916,
-0.022477509453892708,
0.3558914065361023,
-0.2639610171318054,
0.6988849639892578,
-1.0154609680175781,
-0.3299354314804077,
1.2406877279281616,
-0.29388415813446045,
-0.5787755846977234,
1.4057893753051758,
0.7416362166404724,
-0.9620034694671631,
-0.12034247815608978,
-0.19938841462135315,
-0.760748565196991,
0.032058052718639374,
-1.4992494583129883,
-0.13343191146850586,
0.3021702170372009,
-1.459441900253296,
-0.3918313980102539,
-0.173228919506073,
1.3330214023590088,
-0.16751694679260254,
1.4390407800674438,
-0.4927290976047516,
-0.2814796566963196,
-0.3276918828487396,
-0.4931102991104126,
0.20740368962287903,
-0.16731491684913635,
-0.5991383790969849,
0.20327913761138916,
-0.8054884076118469,
0.31216156482696533,
1.3755172491073608,
0.42243853211402893,
0.07653485238552094,
0.4483060836791992,
1.063016414642334,
0.4082653522491455,
-0.02480417676270008,
-0.9361708760261536,
-1.4548577070236206,
2.1015703678131104,
-1.488059401512146,
2.0717926025390625,
0.7650183439254761,
-0.16135373711585999,
-1.7349547147750854,
-1.8296064138412476,
1.3107106685638428,
1.2656358480453491,
2.266497850418091,
0.5275979042053223,
0.3636094927787781,
-0.8223351836204529,
-0.7307068705558777,
0.42552119493484497,
-1.1068869829177856,
-0.6997926235198975,
0.025092896074056625,
2.267566680908203,
1.7073802947998047,
-0.527977466583252,
-0.11137319356203079,
-0.993324875831604,
1.446144700050354,
-0.12375528365373611,
0.21752548217773438,
1.8936158418655396,
-0.3080466687679291,
-1.2185423374176025,
1.223584532737732,
-2.270294666290283,
0.013517292216420174,
2.002544641494751,
0.29656487703323364,
0.046767815947532654,
-1.3658387660980225,
-0.6738707423210144,
-0.3109561502933502,
-0.4532409608364105,
-1.2195520401000977,
0.5732861757278442,
-0.346805602312088,
-0.8120856285095215,
-1.5035057067871094,
0.2014312446117401,
-1.1730268001556396,
-1.6681877374649048,
0.34810560941696167,
1.9325357675552368,
2.082850933074951,
-0.7895683646202087,
1.5909446477890015,
-0.15258920192718506,
0.17829811573028564,
1.1660592555999756,
1.1944053173065186,
3.170646905899048,
1.8938578367233276,
-1.2300926446914673,
0.5280988812446594,
-0.15313798189163208,
-0.48991844058036804,
1.161924123764038,
-1.100362777709961,
1.2901691198349,
-0.14362764358520508,
-1.1200345754623413,
-1.1976996660232544,
0.9076899290084839,
0.3732061982154846,
0.076592817902565,
-0.5064058303833008,
1.196131944656372,
0.09734747558832169,
1.3005707263946533,
0.49450477957725525,
-0.22591087222099304,
0.7020730376243591,
-0.4219500422477722,
-0.6241099834442139,
1.580769658088684,
0.3014548718929291,
-1.4940203428268433,
-2.2901344299316406,
-0.2891378402709961,
-0.8205234408378601,
0.059978678822517395,
-0.4901699721813202,
-1.0014570951461792,
1.7037814855575562,
0.3771637976169586,
-1.3005578517913818,
-0.3959656059741974,
-0.41550493240356445,
-0.6582908630371094,
2.732041120529175,
-1.309891700744629,
-0.2206113338470459,
-0.8774862289428711,
-0.6553701162338257,
1.6531773805618286,
-1.2822006940841675,
-0.06498558819293976,
-1.0054233074188232,
-0.47593405842781067,
-1.4461843967437744,
-0.5747142434120178,
-0.06368684768676758,
-0.8615071773529053,
0.7296915054321289,
0.3685774505138397,
-1.0966869592666626,
-0.393025666475296,
-0.870625913143158,
0.7985596060752869,
-0.107515849173069,
0.271574467420578,
1.8906595706939697,
0.38049888610839844,
-0.388184517621994,
0.6312242150306702,
1.1876193284988403,
0.5784822702407837,
-0.5765917301177979,
0.13379037380218506,
-0.7189712524414062,
0.3387153446674347,
-1.3007208108901978,
0.27296823263168335,
-2.896944999694824,
0.7254215478897095,
-0.11769343167543411,
-0.2395797073841095,
-0.03382934629917145,
-1.3079777956008911,
1.1008836030960083,
2.611999034881592,
-1.1799474954605103,
0.4153940677642822,
0.2614772915840149,
1.219731092453003,
-1.647101879119873,
0.3979495167732239,
-0.3745909631252289,
2.204347610473633,
0.21839797496795654,
1.2353239059448242,
-0.48369261622428894,
-2.3223609924316406,
0.6639183163642883,
-1.1948516368865967,
-1.1826324462890625,
0.7013644576072693,
-0.8680013418197632,
-0.008835436776280403,
-1.41120183467865,
-0.10783517360687256,
-0.8981075286865234,
-1.1676026582717896,
0.7564945220947266,
0.16659563779830933,
0.4259878993034363,
-0.5253861546516418,
0.3261793255805969,
-2.2036795616149902,
-1.4374970197677612,
-0.27014291286468506,
-0.970130205154419,
0.462258517742157,
-0.3525262773036957,
0.7359073758125305,
-0.27070990204811096,
0.027386877685785294,
0.4771772623062134,
1.41092050075531,
3.4722516536712646,
0.21267589926719666,
0.37833601236343384,
-0.1840497851371765,
-0.9312578439712524,
1.5923036336898804,
0.8682942986488342,
-0.10268041491508484,
-0.4794291853904724,
-1.0208768844604492,
1.2156628370285034,
1.994089961051941,
0.899329662322998,
-0.016914810985326767,
-0.720918595790863,
-0.6181917190551758,
-0.1018945574760437,
0.12041736394166946,
0.5353074669837952,
0.8982306122779846,
0.01779056526720524,
0.010241018608212471,
1.5193120241165161,
1.226446270942688,
-0.5291179418563843,
0.2921631336212158,
-0.792242169380188,
-0.4693049490451813,
0.46755969524383545,
0.34419748187065125,
0.01976754516363144,
0.37929287552833557,
-0.8285252451896667,
-0.24527019262313843,
-0.394695907831192,
-0.8374707102775574,
-0.675240159034729,
-0.45364850759506226,
-0.3091449439525604,
1.6638450622558594,
0.11164306104183197,
-0.5620691776275635,
0.02276303805410862,
-0.8010625839233398,
-0.08832558989524841,
-1.1984950304031372,
0.24858811497688293,
-0.10330626368522644,
-0.15443259477615356,
-0.10771320760250092,
1.7650411128997803,
-0.9391626715660095,
-2.1191933155059814,
0.31773999333381653,
0.27747592329978943,
-0.39752405881881714,
0.22385114431381226,
1.556427240371704,
0.4755828082561493,
1.4453455209732056,
1.3683958053588867,
0.9201123714447021,
-0.7526755928993225,
-1.1772217750549316,
0.7770910859107971,
0.7947573661804199,
-1.4772143363952637,
0.8834819793701172,
0.0584917813539505,
-0.5230193138122559,
0.6775773167610168,
1.1580536365509033,
0.48361900448799133,
-1.9442001581192017,
0.852783203125,
-0.8429598808288574,
0.7137410044670105,
0.6561881899833679,
0.6062808036804199,
0.1816592812538147,
0.8499599099159241,
-1.0716888904571533,
-1.2253775596618652,
-0.7751433849334717,
-0.7122670412063599,
1.947767734527588,
-0.2763224244117737,
0.5950050354003906,
-0.21643194556236267,
-1.244430661201477,
-0.0382082425057888,
0.6411702632904053,
0.2701868414878845,
-0.35985949635505676,
0.8259482383728027,
-0.7128456830978394,
-1.2160838842391968,
-1.5350062847137451,
-0.3498135805130005,
-1.104337453842163,
-0.9783257842063904,
1.0603543519973755,
0.7173860669136047,
0.22403526306152344,
2.0036115646362305,
0.6948127150535583,
0.25609490275382996,
-2.535712957382202,
0.9201169610023499,
0.2408764660358429,
-0.012413118034601212,
0.9565685391426086,
0.2662143409252167,
0.9899341464042664,
-0.11172189563512802,
0.5277153849601746,
-2.3973281383514404,
2.2779524326324463,
-0.32994258403778076,
0.7192835211753845,
0.019634556025266647,
-0.2665509879589081,
1.09285569190979,
0.6529408693313599,
0.5901330709457397,
-1.1945335865020752,
0.6897760033607483,
-0.5415698289871216,
1.1466872692108154,
0.9623032212257385,
-0.8419679999351501,
0.0983121320605278,
1.3364773988723755,
0.5857535600662231,
-0.5428650975227356,
-0.9616597890853882,
-1.0098987817764282,
0.8238367438316345,
1.6583691835403442,
-0.09556031227111816,
-0.01577189564704895,
0.8138310313224792,
0.6529438495635986,
-1.2591232061386108,
0.08241197466850281,
-0.7300278544425964,
-0.7808045148849487,
1.6521100997924805,
2.1052095890045166,
-0.039635755121707916,
-0.18351054191589355,
-0.6227463483810425,
-1.3029897212982178,
0.8737344145774841,
-0.008223623037338257,
0.18309524655342102,
0.6052290797233582,
-0.692471444606781,
1.0966951847076416,
0.9311378598213196,
0.8491842746734619,
0.28639641404151917,
0.297882616519928,
0.5423985719680786,
-0.30849993228912354,
-0.944278359413147,
-0.1795388162136078,
-1.100766658782959,
-2.447420358657837,
0.5417513251304626,
-0.2756306827068329,
-1.3886181116104126,
-0.03372222185134888,
-0.9501625895500183,
0.8777419924736023,
-0.5081309080123901,
-0.9547839164733887,
-1.4948593378067017,
0.10958829522132874,
-0.04308285564184189,
0.9229069352149963,
-1.5587801933288574,
-0.1287611573934555,
1.3551578521728516,
0.8879405856132507,
-0.7039569020271301,
1.1026017665863037,
0.2556142508983612,
1.1230721473693848,
0.8184534311294556,
-0.49024686217308044,
0.5393072366714478,
-0.026477234438061714,
-1.3744492530822754,
0.464253693819046,
1.1297121047973633,
0.17431849241256714,
1.4202427864074707,
-0.46691781282424927,
0.10395218431949615,
0.34176695346832275,
-0.5881815552711487,
-0.5285857319831848,
-0.5507599115371704,
0.717365562915802,
0.06323738396167755,
-0.8116594552993774,
0.15558961033821106,
-0.18075299263000488,
-0.2605498135089874,
0.25212040543556213,
-1.476943850517273,
-0.1612127721309662,
-0.41116267442703247,
-0.46886569261550903,
-1.2592284679412842,
-0.08883389830589294,
1.493396520614624,
-0.778581976890564,
-0.0948403924703598,
0.48787373304367065,
0.4639514088630676,
0.5170493721961975,
0.5547520518302917,
-0.6670476794242859,
-0.35336801409721375,
-0.29641905426979065,
-0.29303810000419617,
0.3365100920200348,
1.2368613481521606,
-0.12833184003829956,
-0.8859946727752686,
0.676023006439209,
-0.26733195781707764,
-0.028857111930847168,
1.9310262203216553,
-0.00018912088125944138,
-0.7017810344696045,
0.24635204672813416,
-0.7498565316200256,
1.9073606729507446,
1.6959949731826782,
1.3102459907531738,
-0.06940527260303497,
-0.8691595792770386,
0.6047868728637695,
-0.29624423384666443,
-0.37048205733299255,
0.8947950005531311,
0.389636754989624,
-0.17108967900276184,
-1.535244107246399,
0.6145167350769043,
1.151202917098999,
-0.8982292413711548,
-0.6897814273834229,
0.018167732283473015,
-0.753144383430481,
1.0217771530151367,
0.7125340104103088,
0.5421915054321289,
0.27734044194221497,
1.7955447435379028,
0.8413801789283752,
-0.49225902557373047,
0.4216586649417877,
0.5313042998313904,
-0.17809012532234192,
-2.0909483432769775,
-1.102290153503418,
0.3230758309364319,
-0.4911881685256958,
-1.5337272882461548,
1.3954334259033203,
-1.1333869695663452,
-1.0227394104003906,
0.5239354968070984,
-0.017005741596221924,
1.3815044164657593,
0.34980717301368713,
1.623772382736206,
2.0231869220733643,
0.909000813961029,
0.35315653681755066,
1.3199008703231812,
-0.1246391162276268,
-0.4178127944469452,
1.7950736284255981,
-0.3300362229347229,
0.3589646816253662,
1.1592344045639038,
-0.32825469970703125,
-1.1449987888336182,
-0.8286254405975342,
-1.134986400604248,
-0.6191110610961914,
1.1275566816329956,
0.13263225555419922,
-1.2009382247924805,
0.20267623662948608,
1.6555778980255127,
0.08089922368526459,
-0.4019290804862976,
0.4866272807121277,
0.4338512420654297,
-0.7225608825683594,
0.012750765308737755,
-0.9673345685005188,
0.525231122970581,
-0.19307392835617065,
-0.46670642495155334,
0.41838234663009644,
0.39493027329444885,
1.3994898796081543,
-0.16338250041007996,
0.21927165985107422,
1.2488223314285278,
-1.3653411865234375,
1.3806283473968506,
-0.6937074661254883,
0.15939289331436157,
-2.2583539485931396,
1.3783637285232544,
-0.7226227521896362,
2.0223536491394043,
-2.683077573776245,
0.45958688855171204,
-0.6854437589645386,
-0.5530687570571899,
0.3581339716911316,
-0.439501017332077,
0.1720396876335144,
-0.19910374283790588,
-1.0479755401611328,
-0.06778493523597717,
-0.6189627647399902,
0.5674009919166565,
1.0960713624954224,
1.427860975265503,
-1.043813943862915,
-0.3636116087436676,
-1.7220607995986938,
-0.11388734728097916,
-0.6919524669647217,
0.3033415675163269,
-2.0606703758239746,
-0.2006264626979828,
-1.9454264640808105,
-2.277080535888672,
-1.385467290878296,
-0.804673969745636,
1.0763678550720215,
0.11114396154880524,
-0.8014866709709167,
1.182065725326538,
-0.35318705439567566,
-1.8548626899719238,
1.184904932975769,
-2.0566627979278564
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF Probably they are named inconsistently so that the correct pattern for which files should correspond to which split cannot be inferred. You can make it clearer to the loader by removing split names from filenames and putting files in separate folder for each split (you can take a look at the [documentation for imagefolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder)):
```
Fuaimeanna2/
├─ test
│ ├─ label_0
│ │ ├── filename_0.jpg
│ │ └── filename_1.jpg
│ │ └── ...
│ ├─ label_1
│ │ └── ...
│ ├─ label_2
│ │ └── ...
│ └─ label_3
│ └── ...
├─ train
│ ├─ label_0
│ │ └── ...
│ ├─ label_1
│ │ └── ...
│ ├─ label_2
│ │ └── ...
│ └─ label_3
│ └── ...
└── validation
├─ label_0
│ └── ...
├─ label_1
│ └── ...
├─ label_2
│ └── ...
└─ label_3
└── ...
``` | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 145 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
@WiNE-iNEFF Probably they are named inconsistently so that the correct pattern for which files should correspond to which split cannot be inferred. You can make it clearer to the loader by removing split names from filenames and putting files in separate folder for each split (you can take a look at the [documentation for imagefolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder)):
```
Fuaimeanna2/
├─ test
│ ├─ label_0
│ │ ├── filename_0.jpg
│ │ └── filename_1.jpg
│ │ └── ...
│ ├─ label_1
│ │ └── ...
│ ├─ label_2
│ │ └── ...
│ └─ label_3
│ └── ...
├─ train
│ ├─ label_0
│ │ └── ...
│ ├─ label_1
│ │ └── ...
│ ├─ label_2
│ │ └── ...
│ └─ label_3
│ └── ...
└── validation
├─ label_0
│ └── ...
├─ label_1
│ └── ...
├─ label_2
│ └── ...
└─ label_3
└── ...
``` | [
-1.1818019151687622,
-0.8434721827507019,
-0.5300893783569336,
1.5498661994934082,
-0.17069368064403534,
-1.206636667251587,
0.3287712037563324,
-0.9684962630271912,
1.5956308841705322,
-0.9240733981132507,
0.2908012270927429,
-1.5570191144943237,
0.181788370013237,
-0.33304134011268616,
-0.7034974694252014,
-1.1155236959457397,
-0.591238260269165,
-0.7559373378753662,
1.0065182447433472,
2.468130111694336,
1.1428303718566895,
-1.282612681388855,
2.6237637996673584,
0.5827957391738892,
-0.3360752463340759,
-1.183586835861206,
0.5258084535598755,
0.08948563784360886,
-1.3638578653335571,
-0.38116568326950073,
-0.9654353260993958,
0.00809797365218401,
-0.5868135690689087,
-0.5688464045524597,
0.2638814151287079,
0.3657417297363281,
-0.3792629539966583,
-0.2966781258583069,
-0.6193373203277588,
-0.6670811176300049,
0.4940953552722931,
-0.506752073764801,
0.956917941570282,
-0.33642956614494324,
1.8999645709991455,
-0.6204836368560791,
0.5154616236686707,
0.7402049899101257,
1.3084720373153687,
0.10169685631990433,
0.06685766577720642,
0.248366579413414,
0.4700219929218292,
0.17157946527004242,
0.289215087890625,
1.2077299356460571,
0.615867018699646,
0.361953467130661,
0.6419464945793152,
-2.200917959213257,
1.3465341329574585,
-1.0117661952972412,
0.1840175837278366,
1.4254804849624634,
-0.8878607153892517,
0.3844004273414612,
-1.6978027820587158,
0.005343656986951828,
0.6525524854660034,
-2.2830777168273926,
0.005436006002128124,
-1.3599853515625,
-0.3115430176258087,
1.0673377513885498,
0.3049176037311554,
-1.2397404909133911,
0.23667410016059875,
-0.4974990785121918,
0.9894925951957703,
0.47392237186431885,
1.1093093156814575,
-1.5695995092391968,
-0.06392142921686172,
-0.292310893535614,
0.038038477301597595,
-1.2036783695220947,
-1.4548684358596802,
0.5180876851081848,
0.727701723575592,
0.5335693955421448,
-0.1454198658466339,
1.0563825368881226,
-1.0729401111602783,
0.8207272887229919,
-0.8387487530708313,
-1.631085753440857,
-1.4306989908218384,
-2.392162799835205,
-2.32704758644104,
0.6218421459197998,
-0.3964359760284424,
-0.5101382732391357,
1.9302144050598145,
-1.0479739904403687,
-1.5605677366256714,
1.0399752855300903,
0.1719583421945572,
0.16500431299209595,
2.342514991760254,
0.22293621301651,
-0.7657938599586487,
0.23563331365585327,
-0.7520149946212769,
0.8548889756202698,
-0.46073243021965027,
1.343515396118164,
0.4915662705898285,
-1.0590975284576416,
1.4367649555206299,
-0.279535174369812,
0.5691462159156799,
-0.717366099357605,
-0.4323585033416748,
-0.9613509178161621,
0.26615551114082336,
1.793460726737976,
-0.3867379128932953,
1.6760611534118652,
-0.11521662771701813,
-1.4729734659194946,
-1.6094543933868408,
0.7275930047035217,
0.509833574295044,
-0.7584041357040405,
-0.009044063277542591,
-0.4430139362812042,
-0.06008278951048851,
0.1914081871509552,
1.1430418491363525,
1.2727681398391724,
0.8085483908653259,
-0.5017319917678833,
-1.0122350454330444,
0.22096151113510132,
-0.1571769416332245,
-0.7204223275184631,
-2.041680335998535,
-0.3888993263244629,
0.13601598143577576,
0.6418820023536682,
-1.1901236772537231,
1.4791299104690552,
0.9259951114654541,
1.9987707138061523,
1.064136028289795,
-0.5167504549026489,
1.666391372680664,
-0.053947411477565765,
1.8783202171325684,
-0.531470000743866,
0.6555065512657166,
-0.28023457527160645,
-1.334920883178711,
0.7565895318984985,
-0.21346448361873627,
-2.173008441925049,
-0.7275511622428894,
-0.8763486742973328,
-0.12141203135251999,
-0.7273584604263306,
0.8470302224159241,
-0.27509790658950806,
-1.5410338640213013,
0.37006211280822754,
-0.6177316308021545,
-0.048895180225372314,
-1.2004847526550293,
0.31331178545951843,
0.7567270398139954,
-0.5358372926712036,
-0.08214689046144485,
-0.24436518549919128,
-1.3191190958023071,
-0.37459567189216614,
0.29894572496414185,
1.6275320053100586,
-0.72605299949646,
0.9089452624320984,
1.0167156457901,
-0.5651637315750122,
0.2603118121623993,
0.08697284013032913,
-0.37360289692878723,
0.7953930497169495,
-1.100939393043518,
-0.38620758056640625,
1.2075625658035278,
-0.2876458466053009,
-0.6147949695587158,
1.4962700605392456,
0.7414212822914124,
-0.9908155202865601,
-0.24309366941452026,
-0.21224047243595123,
-0.8142884373664856,
0.1668335348367691,
-1.6676584482192993,
-0.14535436034202576,
0.32646432518959045,
-1.4379361867904663,
-0.4142971932888031,
-0.16741907596588135,
1.462733507156372,
-0.16824498772621155,
1.4636908769607544,
-0.36581331491470337,
-0.3449297547340393,
-0.47752588987350464,
-0.504802942276001,
0.36232367157936096,
-0.26647698879241943,
-0.6399464011192322,
0.3655396103858948,
-0.8518286943435669,
0.35747405886650085,
1.3261386156082153,
0.3441990315914154,
0.10285768657922745,
0.6191303730010986,
1.035056233406067,
0.35557812452316284,
-0.04252750799059868,
-0.8784425258636475,
-1.751551628112793,
2.1694412231445312,
-1.3746601343154907,
1.9587968587875366,
0.7413018941879272,
-0.03630121797323227,
-1.7405949831008911,
-1.849732756614685,
1.2027747631072998,
1.0893625020980835,
2.4529507160186768,
0.515438437461853,
0.33244189620018005,
-0.7766045331954956,
-0.8585822582244873,
0.4893060326576233,
-1.073575496673584,
-0.5059266090393066,
0.15489526093006134,
2.3083057403564453,
1.7061219215393066,
-0.3048599660396576,
-0.09807907044887543,
-1.0633959770202637,
1.3968881368637085,
-0.016724565997719765,
0.24108190834522247,
2.0057320594787598,
-0.11406562477350235,
-1.193336009979248,
1.1478601694107056,
-2.200253486633301,
0.3166758418083191,
1.9621849060058594,
0.3396861255168915,
-0.04364117607474327,
-1.5769835710525513,
-0.6119219064712524,
-0.38606441020965576,
-0.4636792540550232,
-1.2777037620544434,
0.564815878868103,
-0.3550742268562317,
-0.8522716164588928,
-1.5573536157608032,
0.06499885022640228,
-1.1959028244018555,
-1.691679835319519,
0.2883346974849701,
1.82550048828125,
1.9833358526229858,
-0.5593667030334473,
1.4181081056594849,
-0.2991575300693512,
-0.02069532871246338,
1.0991791486740112,
1.1698697805404663,
3.1067442893981934,
2.0152382850646973,
-1.1672303676605225,
0.7366039156913757,
-0.13350458443164825,
-0.427209734916687,
0.9471559524536133,
-1.2712830305099487,
1.3255445957183838,
-0.12951214611530304,
-1.2223323583602905,
-1.1882888078689575,
1.1490206718444824,
0.3670167922973633,
-0.01725374162197113,
-0.4815550446510315,
1.426283836364746,
0.049296461045742035,
1.4791593551635742,
0.4699135422706604,
-0.24461698532104492,
0.5897477865219116,
-0.5729326605796814,
-0.5602912306785583,
1.5239262580871582,
0.36353111267089844,
-1.4928919076919556,
-2.2868988513946533,
-0.37666189670562744,
-0.7625745534896851,
0.020852774381637573,
-0.5021865963935852,
-0.9540722370147705,
1.8402231931686401,
0.2888479232788086,
-1.2990713119506836,
-0.27438050508499146,
-0.39413854479789734,
-0.5232823491096497,
2.768472194671631,
-1.4464647769927979,
0.01938018947839737,
-0.9476750493049622,
-0.6512181758880615,
1.4062559604644775,
-1.2257239818572998,
-0.21808306872844696,
-0.9805933237075806,
-0.6266343593597412,
-1.2651118040084839,
-0.6109126806259155,
0.0476570650935173,
-0.920181155204773,
0.6013204455375671,
0.19788938760757446,
-1.0174505710601807,
-0.42984330654144287,
-0.8099073171615601,
1.0164200067520142,
0.00948487501591444,
0.14150024950504303,
1.9160280227661133,
0.3582663834095001,
-0.24908140301704407,
0.6766219735145569,
1.1433442831039429,
0.7404686212539673,
-0.579529345035553,
-0.04801485314965248,
-0.7928941249847412,
0.1197340190410614,
-1.1962571144104004,
0.2692713439464569,
-2.833796501159668,
0.6258015632629395,
-0.09771840274333954,
0.0514548234641552,
-0.14674259722232819,
-1.2247703075408936,
1.0534029006958008,
2.7092018127441406,
-1.1434985399246216,
0.365003764629364,
0.31614741683006287,
0.9634754061698914,
-1.4810672998428345,
0.351107656955719,
-0.3684563934803009,
2.0318033695220947,
0.23748168349266052,
1.2527823448181152,
-0.5307708382606506,
-2.1996302604675293,
0.6164124011993408,
-1.1403913497924805,
-0.9925686120986938,
0.9253183603286743,
-0.7002280950546265,
0.07555419951677322,
-1.2427185773849487,
-0.29040107131004333,
-0.7917076945304871,
-1.4273180961608887,
0.4427472949028015,
0.23409542441368103,
0.5193238258361816,
-0.4638192355632782,
0.31351515650749207,
-2.235870599746704,
-1.368506908416748,
-0.25866520404815674,
-1.1834418773651123,
0.496672660112381,
-0.2831604480743408,
0.7490411400794983,
-0.0635947436094284,
0.19919434189796448,
0.43134796619415283,
1.4864771366119385,
3.4017553329467773,
0.1438504010438919,
0.21367371082305908,
-0.029982097446918488,
-1.0915992259979248,
1.3116638660430908,
0.8701809644699097,
-0.04445323720574379,
-0.617896318435669,
-0.8627333045005798,
1.1574267148971558,
2.0248820781707764,
1.2005281448364258,
0.07417111098766327,
-0.932752788066864,
-0.8945474624633789,
0.0473545677959919,
0.09148015081882477,
0.5954853296279907,
0.8123136758804321,
0.13734032213687897,
0.0803012028336525,
1.5745922327041626,
1.3448771238327026,
-0.45679518580436707,
0.31599360704421997,
-0.8238131403923035,
-0.3782895803451538,
0.5383558869361877,
0.3788190186023712,
0.046605050563812256,
0.5080843567848206,
-0.9761958718299866,
-0.013468075543642044,
-0.45825034379959106,
-0.8975802063941956,
-0.7144981622695923,
-0.30073148012161255,
-0.33940330147743225,
1.6885533332824707,
0.21882100403308868,
-0.41524845361709595,
-0.003638069611042738,
-0.6927288174629211,
-0.2802255153656006,
-1.0460600852966309,
0.35534361004829407,
-0.018990930169820786,
0.03495492786169052,
-0.13723337650299072,
1.6935882568359375,
-0.8050569295883179,
-2.110366106033325,
0.22573184967041016,
0.17995572090148926,
-0.5457358360290527,
0.20314347743988037,
1.5711798667907715,
0.6494696736335754,
1.4178178310394287,
1.1903504133224487,
0.9634789824485779,
-0.7156363129615784,
-1.3500840663909912,
0.5318969488143921,
0.9167114496231079,
-1.5375040769577026,
0.784290611743927,
-0.04827738180756569,
-0.3799840807914734,
0.7473894953727722,
1.2596343755722046,
0.4157911539077759,
-2.197801113128662,
0.9457386136054993,
-0.9210923910140991,
0.6555274128913879,
0.7571499347686768,
0.6164116859436035,
0.12019902467727661,
0.7049449682235718,
-1.2161684036254883,
-1.0431673526763916,
-0.8030354380607605,
-0.6011132001876831,
1.9793974161148071,
-0.21883246302604675,
0.5977007150650024,
-0.1159583330154419,
-1.3667426109313965,
0.05579918622970581,
0.5849778652191162,
0.34164711833000183,
-0.3912138342857361,
1.0250599384307861,
-0.7826433181762695,
-1.1700996160507202,
-1.488254189491272,
-0.5217140913009644,
-1.0711559057235718,
-1.0438791513442993,
1.1809669733047485,
0.7317670583724976,
0.5037533044815063,
1.874654769897461,
0.576997697353363,
0.1941361129283905,
-2.86191463470459,
0.831790030002594,
0.18194681406021118,
0.03003842756152153,
0.8800778985023499,
0.14202368259429932,
1.0840930938720703,
-0.230815127491951,
0.5996289253234863,
-2.3435232639312744,
2.346996784210205,
-0.23691274225711823,
0.8867982625961304,
0.2369030863046646,
-0.1038283109664917,
0.9652820825576782,
0.6470425128936768,
0.8610092997550964,
-1.2386177778244019,
0.9262210726737976,
-0.7402088046073914,
1.2920724153518677,
0.8917244672775269,
-0.7423103451728821,
-0.13407684862613678,
1.3703150749206543,
0.40332791209220886,
-0.4550432562828064,
-0.8509565591812134,
-1.0541406869888306,
0.6542018055915833,
1.812822937965393,
-0.18123267590999603,
-0.008636062033474445,
0.7497472763061523,
0.6645346879959106,
-1.248113989830017,
0.07901356369256973,
-0.8825326561927795,
-0.7668365836143494,
1.5465155839920044,
2.156547784805298,
-0.1493939757347107,
-0.17424410581588745,
-0.7205440402030945,
-1.0755215883255005,
0.6137863397598267,
0.03823778033256531,
0.17619332671165466,
0.43308573961257935,
-0.7360251545906067,
1.0835745334625244,
0.6845495700836182,
0.9167104363441467,
0.24418707191944122,
0.35633111000061035,
0.2392156422138214,
-0.22576002776622772,
-1.1040042638778687,
-0.499575674533844,
-0.9017719626426697,
-2.589081048965454,
0.4995105564594269,
-0.31173568964004517,
-1.5029908418655396,
0.0027473745867609978,
-0.9741321206092834,
0.8569168448448181,
-0.5486085414886475,
-1.0632561445236206,
-1.4711006879806519,
0.2208249866962433,
-0.09200850129127502,
0.9373641610145569,
-1.6387683153152466,
-0.017936985939741135,
1.3558372259140015,
0.9681373238563538,
-0.4829200804233551,
1.2173362970352173,
0.3207740783691406,
0.9230977892875671,
0.9110938906669617,
-0.243800550699234,
0.42174777388572693,
0.2551351487636566,
-1.164118766784668,
0.5086172819137573,
1.067496657371521,
0.2231767177581787,
1.3874527215957642,
-0.6214094758033752,
0.05988878011703491,
0.269342303276062,
-0.5738457441329956,
-0.4230685830116272,
-0.3999011814594269,
0.7787618041038513,
0.038819923996925354,
-1.0206040143966675,
0.23606404662132263,
-0.460589736700058,
-0.05248444527387619,
0.24952997267246246,
-1.417241096496582,
-0.19552737474441528,
-0.2366388887166977,
-0.505007266998291,
-1.2917075157165527,
-0.11531957238912582,
1.4304744005203247,
-0.7740124464035034,
-0.061603616923093796,
0.31772881746292114,
0.5044234991073608,
0.7740641832351685,
0.7878504991531372,
-0.7142980694770813,
-0.4637303054332733,
-0.3697507381439209,
-0.3432343900203705,
0.4927895963191986,
1.233849287033081,
-0.2236381322145462,
-0.9573407769203186,
0.8008278608322144,
-0.40376925468444824,
0.05681394040584564,
2.081610918045044,
0.21402783691883087,
-0.716015100479126,
0.48815038800239563,
-0.8282085061073303,
1.7379127740859985,
1.7643214464187622,
1.3507879972457886,
-0.16580167412757874,
-1.0878807306289673,
0.5567100048065186,
-0.3443944454193115,
-0.45327016711235046,
0.804516077041626,
0.38077107071876526,
-0.3230803906917572,
-1.2473678588867188,
0.5679630041122437,
1.2035185098648071,
-0.9874678254127502,
-0.5949112176895142,
0.15785671770572662,
-0.7965477705001831,
1.2165064811706543,
0.7108682990074158,
0.5152046084403992,
0.14378538727760315,
1.7018548250198364,
0.790455162525177,
-0.5185880064964294,
0.511437177658081,
0.47709569334983826,
-0.31540611386299133,
-1.8903309106826782,
-1.1290621757507324,
0.4155427813529968,
-0.6279875636100769,
-1.6132228374481201,
1.4075473546981812,
-1.180064082145691,
-1.0244133472442627,
0.4716409742832184,
0.11064177006483078,
1.455247402191162,
0.19974227249622345,
1.6966743469238281,
2.056938648223877,
1.0585215091705322,
0.3617788553237915,
1.3533493280410767,
-0.0028401766903698444,
-0.5569448471069336,
1.76613187789917,
-0.441326767206192,
0.33724817633628845,
1.2670150995254517,
-0.4081120193004608,
-0.9522284865379333,
-0.7909976840019226,
-0.9830109477043152,
-0.4727500379085541,
1.1646183729171753,
0.1593649834394455,
-1.2673776149749756,
0.20757648348808289,
1.6311918497085571,
0.1726394146680832,
-0.36215829849243164,
0.571853518486023,
0.5439990758895874,
-0.5582659244537354,
-0.12445338815450668,
-1.075796365737915,
0.362106591463089,
-0.25231146812438965,
-0.4030037522315979,
0.27964985370635986,
0.3605227470397949,
1.0581108331680298,
0.00014994945377111435,
0.1698893904685974,
1.1386003494262695,
-1.3530547618865967,
1.4551382064819336,
-0.5692485570907593,
0.17952066659927368,
-2.2496895790100098,
1.2927265167236328,
-0.7371652722358704,
1.916401982307434,
-2.532980442047119,
0.38925573229789734,
-0.6017679572105408,
-0.48193320631980896,
0.28823840618133545,
-0.4396410882472992,
0.17055508494377136,
-0.2396509200334549,
-1.0901416540145874,
-0.17715953290462494,
-0.8547487258911133,
0.6510858535766602,
1.0103344917297363,
1.3345927000045776,
-1.1384774446487427,
-0.36808881163597107,
-1.6037086248397827,
-0.2456829696893692,
-0.7044408321380615,
0.45628270506858826,
-1.8837428092956543,
-0.2730310559272766,
-1.9832496643066406,
-2.4159905910491943,
-1.522778034210205,
-0.8142328262329102,
0.9762133955955505,
0.19183751940727234,
-0.7159474492073059,
1.0808584690093994,
-0.2334202229976654,
-2.023622989654541,
1.069275140762329,
-2.0747148990631104
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF Probably they are named inconsistently so that the correct pattern for which files should correspond to which split cannot be inferred. You can make it clearer to the loader by removing split names from filenames and putting files in separate folder for each split (you can take a look at the [documentation for imagefolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder)):
> ```
> Fuaimeanna2/
> ├─ test
> │ ├─ label_0
> │ │ ├── filename_0.jpg
> │ │ └── filename_1.jpg
> │ │ └── ...
> │ ├─ label_1
> │ │ └── ...
> │ ├─ label_2
> │ │ └── ...
> │ └─ label_3
> │ └── ...
> ├─ train
> │ ├─ label_0
> │ │ └── ...
> │ ├─ label_1
> │ │ └── ...
> │ ├─ label_2
> │ │ └── ...
> │ └─ label_3
> │ └── ...
> └── validation
> ├─ label_0
> │ └── ...
> ├─ label_1
> │ └── ...
> ├─ label_2
> │ └── ...
> └─ label_3
> └── ...
> ```
I have read this documentation more than once. It just wasn't a problem before. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 192 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> @WiNE-iNEFF Probably they are named inconsistently so that the correct pattern for which files should correspond to which split cannot be inferred. You can make it clearer to the loader by removing split names from filenames and putting files in separate folder for each split (you can take a look at the [documentation for imagefolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder)):
> ```
> Fuaimeanna2/
> ├─ test
> │ ├─ label_0
> │ │ ├── filename_0.jpg
> │ │ └── filename_1.jpg
> │ │ └── ...
> │ ├─ label_1
> │ │ └── ...
> │ ├─ label_2
> │ │ └── ...
> │ └─ label_3
> │ └── ...
> ├─ train
> │ ├─ label_0
> │ │ └── ...
> │ ├─ label_1
> │ │ └── ...
> │ ├─ label_2
> │ │ └── ...
> │ └─ label_3
> │ └── ...
> └── validation
> ├─ label_0
> │ └── ...
> ├─ label_1
> │ └── ...
> ├─ label_2
> │ └── ...
> └─ label_3
> └── ...
> ```
I have read this documentation more than once. It just wasn't a problem before. | [
-1.1607822179794312,
-0.8694145083427429,
-0.576958954334259,
1.5267342329025269,
-0.15517771244049072,
-1.2155128717422485,
0.28111693263053894,
-1.0133872032165527,
1.6215802431106567,
-0.8190064430236816,
0.25541284680366516,
-1.602110505104065,
0.05738339200615883,
-0.32514604926109314,
-0.7164437770843506,
-1.1138778924942017,
-0.5527369379997253,
-0.8422006368637085,
0.98993980884552,
2.4684946537017822,
1.208877444267273,
-1.2552363872528076,
2.6051502227783203,
0.5895877480506897,
-0.3662162721157074,
-1.1402134895324707,
0.5778014659881592,
0.030827466398477554,
-1.3810123205184937,
-0.4344478249549866,
-0.9347902536392212,
0.04559076949954033,
-0.6852874159812927,
-0.5374547243118286,
0.23465979099273682,
0.27294331789016724,
-0.3814055919647217,
-0.23100972175598145,
-0.636562705039978,
-0.7132002115249634,
0.41098782420158386,
-0.5095595121383667,
0.9571940302848816,
-0.31905698776245117,
1.7733758687973022,
-0.6278181076049805,
0.5197432041168213,
0.77280592918396,
1.2730319499969482,
0.15103685855865479,
-0.00034601055085659027,
0.2356260120868683,
0.45236945152282715,
0.12414146959781647,
0.2650619149208069,
1.1574448347091675,
0.5885747671127319,
0.3837004601955414,
0.6368513703346252,
-2.227313995361328,
1.3382861614227295,
-0.9374078512191772,
0.17752514779567719,
1.370895504951477,
-0.7784623503684998,
0.4247097074985504,
-1.7383809089660645,
0.05785655602812767,
0.7223715782165527,
-2.356325149536133,
-0.005007519386708736,
-1.4545085430145264,
-0.3482709228992462,
0.9453823566436768,
0.29219675064086914,
-1.2297146320343018,
0.11573587357997894,
-0.4872840940952301,
0.9695302248001099,
0.5009907484054565,
1.115219235420227,
-1.7124193906784058,
-0.04775116965174675,
-0.3183952271938324,
0.11077672988176346,
-1.1190098524093628,
-1.506800889968872,
0.6055384874343872,
0.7761402130126953,
0.5266667604446411,
-0.10936387628316879,
1.0164055824279785,
-0.9690805673599243,
0.7192077040672302,
-0.7349212765693665,
-1.6512395143508911,
-1.3818284273147583,
-2.3204426765441895,
-2.2615256309509277,
0.5420835018157959,
-0.5462278723716736,
-0.4690805673599243,
1.9878720045089722,
-1.0452516078948975,
-1.6496343612670898,
1.0443998575210571,
0.17724910378456116,
0.145696759223938,
2.3989970684051514,
0.24200354516506195,
-0.701379120349884,
0.2776404023170471,
-0.7434666752815247,
0.891740620136261,
-0.43878480792045593,
1.3386679887771606,
0.4207030236721039,
-0.9959545731544495,
1.513013482093811,
-0.3347826600074768,
0.5746596455574036,
-0.722725510597229,
-0.4700345993041992,
-0.9088111519813538,
0.2288663536310196,
1.8381013870239258,
-0.35681912302970886,
1.7295607328414917,
-0.10999719053506851,
-1.5114821195602417,
-1.6834559440612793,
0.7580668330192566,
0.518488883972168,
-0.8520992994308472,
0.09491796791553497,
-0.521666944026947,
-0.009468422271311283,
0.18923917412757874,
1.1493805646896362,
1.4016611576080322,
0.8118205070495605,
-0.45896977186203003,
-1.0241059064865112,
0.18298330903053284,
-0.08054637163877487,
-0.7190536856651306,
-2.0496766567230225,
-0.3468979299068451,
0.08947588503360748,
0.6748455166816711,
-1.167688250541687,
1.4487574100494385,
0.8902137279510498,
2.0773799419403076,
1.0745488405227661,
-0.5471619963645935,
1.631075382232666,
0.02487756684422493,
1.7847912311553955,
-0.6159397959709167,
0.6401058435440063,
-0.35583969950675964,
-1.2295740842819214,
0.7883360981941223,
-0.22565260529518127,
-1.9863768815994263,
-0.6404140591621399,
-0.882979691028595,
-0.15048840641975403,
-0.7522337436676025,
0.8407093286514282,
-0.1873926818370819,
-1.4296040534973145,
0.47111791372299194,
-0.7341886162757874,
-0.08172816783189774,
-1.2222228050231934,
0.3353103995323181,
0.7291674017906189,
-0.48644861578941345,
-0.03830665349960327,
-0.2927514314651489,
-1.3376213312149048,
-0.42495089769363403,
0.2533930540084839,
1.70261549949646,
-0.6196199059486389,
0.952630341053009,
0.9771313071250916,
-0.6010883450508118,
0.19967813789844513,
0.11837978661060333,
-0.2909039556980133,
0.7811145782470703,
-1.1620486974716187,
-0.27922216057777405,
1.1934313774108887,
-0.32127267122268677,
-0.5752089619636536,
1.4541592597961426,
0.6127752065658569,
-0.9834136962890625,
-0.2510775029659271,
-0.19051732122898102,
-0.7527835369110107,
0.16277740895748138,
-1.7360262870788574,
-0.11746877431869507,
0.3515847623348236,
-1.513010859489441,
-0.4873169958591461,
-0.16624248027801514,
1.4410946369171143,
-0.0819946750998497,
1.398112416267395,
-0.324497789144516,
-0.20906992256641388,
-0.47301143407821655,
-0.4793904721736908,
0.27737855911254883,
-0.3126784563064575,
-0.567956268787384,
0.3397581875324249,
-0.9107312560081482,
0.28936126828193665,
1.4114054441452026,
0.2893238067626953,
0.019721493124961853,
0.4999707043170929,
1.0086631774902344,
0.3791469931602478,
-0.11674010753631592,
-0.9258026480674744,
-1.6994587182998657,
2.1828548908233643,
-1.4540624618530273,
1.932497501373291,
0.7319530844688416,
-0.02300003170967102,
-1.7154994010925293,
-1.9639759063720703,
1.2044328451156616,
1.0626081228256226,
2.3914856910705566,
0.6069056391716003,
0.33440306782722473,
-0.7117462754249573,
-0.8111761808395386,
0.41365277767181396,
-1.0413250923156738,
-0.6421361565589905,
0.17989975214004517,
2.325190305709839,
1.620909571647644,
-0.42289867997169495,
-0.0741424635052681,
-0.9529089331626892,
1.3875640630722046,
-0.014246193692088127,
0.19486722350120544,
1.9842758178710938,
-0.1347537487745285,
-1.2621874809265137,
1.1346843242645264,
-2.1625044345855713,
0.27485236525535583,
1.9581795930862427,
0.2766869068145752,
0.07452449947595596,
-1.5293066501617432,
-0.6653987765312195,
-0.3857986629009247,
-0.4759552478790283,
-1.2687395811080933,
0.5999751687049866,
-0.3477344810962677,
-0.8606330752372742,
-1.621728539466858,
0.12709832191467285,
-1.059712290763855,
-1.6805758476257324,
0.19639375805854797,
1.909371256828308,
2.063714027404785,
-0.6471187472343445,
1.438796877861023,
-0.4157014787197113,
-0.14066791534423828,
1.0455299615859985,
1.1362049579620361,
3.1114389896392822,
2.045881748199463,
-1.1575998067855835,
0.6960556507110596,
-0.07561659812927246,
-0.46733877062797546,
1.0717931985855103,
-1.2344224452972412,
1.2366043329238892,
-0.2276390939950943,
-1.2588610649108887,
-1.206099033355713,
1.1060034036636353,
0.3446180820465088,
-0.10214417427778244,
-0.5190765857696533,
1.4572054147720337,
-0.041143469512462616,
1.487096905708313,
0.45337122678756714,
-0.2576431334018707,
0.6335721611976624,
-0.5617746710777283,
-0.5018803477287292,
1.5607142448425293,
0.35796278715133667,
-1.5042554140090942,
-2.3407087326049805,
-0.33382534980773926,
-0.7682471871376038,
0.14601169526576996,
-0.5094379186630249,
-1.0801187753677368,
1.7882435321807861,
0.3220301568508148,
-1.2435439825057983,
-0.3501621186733246,
-0.43775349855422974,
-0.4855571687221527,
2.685295343399048,
-1.417515516281128,
0.0047851549461483955,
-0.9272326231002808,
-0.6197940707206726,
1.3894492387771606,
-1.2898991107940674,
-0.2227323353290558,
-0.9994850158691406,
-0.5585213303565979,
-1.296585202217102,
-0.5549407601356506,
0.04507363587617874,
-0.9373038411140442,
0.5700322389602661,
0.27644267678260803,
-1.0579394102096558,
-0.3267916738986969,
-0.8203758001327515,
0.9683612585067749,
-0.03307643532752991,
0.23200547695159912,
1.98386549949646,
0.28948694467544556,
-0.23979035019874573,
0.6677948236465454,
1.1669899225234985,
0.6619187593460083,
-0.6265409588813782,
-0.10934370011091232,
-0.7469114661216736,
0.23879656195640564,
-1.2416995763778687,
0.20748616755008698,
-2.8537514209747314,
0.7099765539169312,
-0.044307030737400055,
0.13054104149341583,
-0.06182907894253731,
-1.284878134727478,
1.0915746688842773,
2.7501423358917236,
-1.1974197626113892,
0.4073202311992645,
0.29183635115623474,
0.9723576903343201,
-1.4783596992492676,
0.3229031264781952,
-0.36024150252342224,
2.202791929244995,
0.23406976461410522,
1.295315146446228,
-0.4479822516441345,
-2.3695740699768066,
0.5783440470695496,
-1.07899010181427,
-1.0385550260543823,
0.8861508369445801,
-0.7189134955406189,
-0.09998251497745514,
-1.3686614036560059,
-0.23779156804084778,
-0.8214237093925476,
-1.3331307172775269,
0.5797885656356812,
0.1609240174293518,
0.5432130098342896,
-0.5152744650840759,
0.34462833404541016,
-2.271162271499634,
-1.3242392539978027,
-0.21007806062698364,
-1.171486735343933,
0.5124121904373169,
-0.28386223316192627,
0.8059584498405457,
-0.12575764954090118,
0.2058410346508026,
0.4845292270183563,
1.4560195207595825,
3.433056116104126,
0.08308525383472443,
0.19741564989089966,
-0.09822681546211243,
-1.062274694442749,
1.330673336982727,
0.8546003103256226,
-0.06511380523443222,
-0.5527591705322266,
-0.9336792826652527,
1.1982756853103638,
2.067462921142578,
1.0357840061187744,
0.11719799041748047,
-0.9972960948944092,
-0.7904201149940491,
0.03966668248176575,
0.15512080490589142,
0.575019896030426,
0.8193886876106262,
0.21571995317935944,
0.1128268763422966,
1.4621661901474,
1.3484117984771729,
-0.33140042424201965,
0.44811883568763733,
-0.8545032143592834,
-0.3973512351512909,
0.5786071419715881,
0.3632148802280426,
0.032203055918216705,
0.43408524990081787,
-0.8552562594413757,
0.0038061710074543953,
-0.42979130148887634,
-0.8381309509277344,
-0.7220130562782288,
-0.24774596095085144,
-0.22987298667430878,
1.6674940586090088,
0.1700415313243866,
-0.43565088510513306,
0.03086232766509056,
-0.7161582112312317,
-0.2496568113565445,
-1.1050466299057007,
0.3073141276836395,
-0.10195598006248474,
0.03842148557305336,
-0.08782367408275604,
1.6223273277282715,
-0.7479428052902222,
-2.0700736045837402,
0.232710063457489,
0.3004516661167145,
-0.6303789615631104,
0.24934561550617218,
1.6826685667037964,
0.6565900444984436,
1.4762970209121704,
1.2095770835876465,
1.0193816423416138,
-0.7217826247215271,
-1.2345049381256104,
0.4644518792629242,
0.82893967628479,
-1.438100814819336,
0.849088728427887,
-0.044681254774332047,
-0.40106290578842163,
0.6290743350982666,
1.2309508323669434,
0.5080282688140869,
-2.1505484580993652,
0.9891118407249451,
-0.8759410381317139,
0.7647631168365479,
0.72394198179245,
0.7912701368331909,
0.15342266857624054,
0.7158265113830566,
-1.2186307907104492,
-0.9628607630729675,
-0.8138957619667053,
-0.5892866253852844,
1.8657082319259644,
-0.20802851021289825,
0.5296420454978943,
-0.19943265616893768,
-1.3488569259643555,
0.017670072615146637,
0.5797904133796692,
0.36446982622146606,
-0.39568012952804565,
0.9542536735534668,
-0.7157770991325378,
-1.1949665546417236,
-1.4148695468902588,
-0.49130406975746155,
-1.0296494960784912,
-1.0716687440872192,
1.2060201168060303,
0.721499502658844,
0.5357701778411865,
1.881567120552063,
0.44707372784614563,
0.15070940554141998,
-2.8606481552124023,
0.890194833278656,
0.20620298385620117,
-0.01720118708908558,
0.9802419543266296,
0.28233999013900757,
1.1409094333648682,
-0.23835714161396027,
0.5980969071388245,
-2.263477325439453,
2.3172476291656494,
-0.24429266154766083,
0.9025644659996033,
0.27954569458961487,
-0.05554793030023575,
0.858453094959259,
0.5961915850639343,
0.8085591793060303,
-1.2184280157089233,
1.0237720012664795,
-0.6993803977966309,
1.2532968521118164,
0.9069393873214722,
-0.778896152973175,
-0.056568171828985214,
1.351202368736267,
0.41867774724960327,
-0.554567277431488,
-0.8647103309631348,
-0.9233978986740112,
0.6709450483322144,
1.8134952783584595,
-0.16587786376476288,
-0.01983306184411049,
0.6080642938613892,
0.6317107081413269,
-1.2679303884506226,
0.061543021351099014,
-0.8064785599708557,
-0.7686912417411804,
1.5443085432052612,
2.041872501373291,
-0.06890495866537094,
-0.16399486362934113,
-0.7339280843734741,
-1.1835585832595825,
0.6985460519790649,
0.06796737760305405,
0.14525090157985687,
0.4330340623855591,
-0.7171355485916138,
1.1010438203811646,
0.6125918626785278,
0.9737425446510315,
0.2511286735534668,
0.4700995683670044,
0.39443832635879517,
-0.2526254653930664,
-1.0453238487243652,
-0.49577802419662476,
-1.0292274951934814,
-2.578925132751465,
0.5912644863128662,
-0.3875453770160675,
-1.4004367589950562,
-0.11370313167572021,
-0.9398800134658813,
0.903773844242096,
-0.5688066482543945,
-0.9403359293937683,
-1.410261869430542,
0.15930189192295074,
-0.1468590497970581,
0.9718378782272339,
-1.588497519493103,
-0.04968605190515518,
1.290657639503479,
1.0499407052993774,
-0.6036779284477234,
1.257399320602417,
0.36997175216674805,
0.9051939845085144,
0.9405492544174194,
-0.31519225239753723,
0.4244011640548706,
0.22966042160987854,
-1.133920431137085,
0.46890389919281006,
1.0928001403808594,
0.30159759521484375,
1.3261284828186035,
-0.6287548542022705,
-0.06300101429224014,
0.2934112250804901,
-0.4395379424095154,
-0.3697721064090729,
-0.3828725814819336,
0.6957881450653076,
0.0679180771112442,
-1.0976507663726807,
0.14193157851696014,
-0.4390809237957001,
0.030658312141895294,
0.2631233334541321,
-1.472310185432434,
-0.16037143766880035,
-0.3347570300102234,
-0.3865010738372803,
-1.2827353477478027,
-0.2050633579492569,
1.5236839056015015,
-0.7317891716957092,
-0.05587664991617203,
0.3192904591560364,
0.45860475301742554,
0.7203190326690674,
0.7684398293495178,
-0.6958878636360168,
-0.4458109140396118,
-0.4324811100959778,
-0.3922300636768341,
0.47327154874801636,
1.167160153388977,
-0.1913374662399292,
-1.0005316734313965,
0.7316950559616089,
-0.3695501685142517,
0.05963394418358803,
2.038015604019165,
0.19793719053268433,
-0.7656069397926331,
0.34707584977149963,
-0.6994564533233643,
1.7740833759307861,
1.7477504014968872,
1.3186829090118408,
-0.20855045318603516,
-1.08993399143219,
0.601445734500885,
-0.3477281928062439,
-0.4792235195636749,
0.705269455909729,
0.4397655427455902,
-0.32445183396339417,
-1.3557637929916382,
0.5887414813041687,
1.165274739265442,
-1.013572335243225,
-0.6195492148399353,
0.07553985714912415,
-0.7360783815383911,
1.1283639669418335,
0.754148006439209,
0.5230743885040283,
0.16957126557826996,
1.756342887878418,
0.7140038013458252,
-0.5929794311523438,
0.5392738580703735,
0.3687671422958374,
-0.3386940658092499,
-1.9283503293991089,
-1.2157214879989624,
0.3477206826210022,
-0.5137132406234741,
-1.5618128776550293,
1.4481395483016968,
-1.2309081554412842,
-1.038066029548645,
0.42145854234695435,
0.16769155859947205,
1.4253838062286377,
0.14433203637599945,
1.7824578285217285,
2.0766403675079346,
1.0064388513565063,
0.3508395850658417,
1.3228228092193604,
-0.03710564970970154,
-0.5298762917518616,
1.7210077047348022,
-0.40732479095458984,
0.3913322389125824,
1.3526191711425781,
-0.4497597813606262,
-0.9138083457946777,
-0.8935303092002869,
-1.0660945177078247,
-0.6034525036811829,
1.1568373441696167,
0.1265055239200592,
-1.2933512926101685,
0.2883916199207306,
1.732269525527954,
0.13907267153263092,
-0.38364914059638977,
0.5899624228477478,
0.6093388199806213,
-0.5954800248146057,
-0.1198510229587555,
-1.165859580039978,
0.43500468134880066,
-0.2425297498703003,
-0.4148099422454834,
0.281865656375885,
0.26721516251564026,
1.1413010358810425,
0.07574407756328583,
0.14202547073364258,
1.186007022857666,
-1.2701940536499023,
1.4371744394302368,
-0.5291726589202881,
0.15133263170719147,
-2.231884002685547,
1.3458508253097534,
-0.7256416082382202,
1.9518283605575562,
-2.538802146911621,
0.4073118269443512,
-0.5754220485687256,
-0.39766499400138855,
0.2601436972618103,
-0.38347378373146057,
0.25545117259025574,
-0.34491342306137085,
-1.0387812852859497,
-0.18241798877716064,
-0.8033646941184998,
0.6352725625038147,
0.9846275448799133,
1.4039314985275269,
-1.1150875091552734,
-0.2897088825702667,
-1.6653764247894287,
-0.2440805286169052,
-0.7230876684188843,
0.3555179238319397,
-1.8487377166748047,
-0.30450528860092163,
-1.976305603981018,
-2.4717960357666016,
-1.481742262840271,
-0.7277278304100037,
0.931330680847168,
0.11046147346496582,
-0.7080051302909851,
1.1649291515350342,
-0.2170228362083435,
-1.967262864112854,
1.113479495048523,
-2.0491151809692383
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | Hi,
You need to use:
```
from datasets import load_dataset
dataset = load_dataset("imagefolder", split="train", data_dir="path_to_your_folder")
```
instead of
```
from datasets import load_dataset
dataset = load_dataset("my_folder_name", split="train")
```
To create an image dataset from your local folders. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 37 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
Hi,
You need to use:
```
from datasets import load_dataset
dataset = load_dataset("imagefolder", split="train", data_dir="path_to_your_folder")
```
instead of
```
from datasets import load_dataset
dataset = load_dataset("my_folder_name", split="train")
```
To create an image dataset from your local folders. | [
-1.1582105159759521,
-0.9640612006187439,
-0.7400580048561096,
1.521652102470398,
-0.2003735452890396,
-1.1630498170852661,
0.22896651923656464,
-1.1730396747589111,
1.6571797132492065,
-0.9757708311080933,
0.3510728180408478,
-1.654999852180481,
-0.023809334263205528,
-0.5014384388923645,
-0.6869027614593506,
-1.0152274370193481,
-0.4502817988395691,
-0.6875490546226501,
1.058081030845642,
2.3924107551574707,
1.2347004413604736,
-1.2365971803665161,
2.6919264793395996,
0.6664698123931885,
-0.1429981142282486,
-1.0541982650756836,
0.6249123811721802,
0.030698049813508987,
-1.1111798286437988,
-0.45433342456817627,
-0.922841489315033,
-0.12248044461011887,
-0.5141783356666565,
-0.5599294304847717,
-0.08812931180000305,
0.49319988489151,
-0.47512733936309814,
-0.3709833323955536,
-0.531774640083313,
-0.849670946598053,
0.4381747841835022,
-0.3890279531478882,
0.9674652218818665,
-0.49653908610343933,
1.9082400798797607,
-0.5026702880859375,
0.4549570083618164,
0.7171005010604858,
1.2185713052749634,
0.17277777194976807,
0.011076017282903194,
0.21152430772781372,
0.45397770404815674,
-0.050321560353040695,
0.40033191442489624,
1.202045202255249,
0.4202187657356262,
0.6759167313575745,
0.7502036690711975,
-2.2759361267089844,
1.2184953689575195,
-1.0503348112106323,
0.2515634000301361,
1.3779969215393066,
-0.8413081765174866,
0.29193636775016785,
-1.7662320137023926,
-0.15480968356132507,
0.4868180751800537,
-2.204167366027832,
0.30735236406326294,
-1.2884929180145264,
-0.5562363862991333,
1.0080243349075317,
0.4127334952354431,
-1.1734100580215454,
0.09931179136037827,
-0.3554028868675232,
0.9893686771392822,
0.5604539513587952,
1.0660463571548462,
-1.6573083400726318,
0.002900148741900921,
-0.3178349733352661,
0.031961552798748016,
-1.3787297010421753,
-1.4554532766342163,
0.5896552205085754,
0.556895911693573,
0.7170009016990662,
-0.1674668937921524,
1.1652926206588745,
-1.0136994123458862,
0.7013500928878784,
-1.1009644269943237,
-1.5420897006988525,
-1.372293472290039,
-2.3548240661621094,
-2.38795804977417,
0.7224061489105225,
-0.5193446278572083,
-0.6146870255470276,
2.0833916664123535,
-1.0602871179580688,
-1.6840864419937134,
1.1979691982269287,
0.15850163996219635,
0.07278226315975189,
2.4142866134643555,
0.26228412985801697,
-0.6541086435317993,
0.3794410824775696,
-0.7579783201217651,
0.8811286091804504,
-0.2233624905347824,
1.421823501586914,
0.5211291313171387,
-1.068557620048523,
1.6931650638580322,
-0.3390991985797882,
0.7153424024581909,
-0.5527953505516052,
-0.556566059589386,
-0.8416362404823303,
0.33070018887519836,
1.8065088987350464,
-0.3013981282711029,
1.5395963191986084,
-0.2739962041378021,
-1.5353070497512817,
-1.7168385982513428,
1.001952886581421,
0.4063313901424408,
-0.6680639982223511,
0.08519911020994186,
-0.36523568630218506,
0.06000108644366264,
0.00018969643861055374,
1.2676819562911987,
1.1944818496704102,
0.8049126267433167,
-0.4192115366458893,
-0.8019469380378723,
0.20595361292362213,
-0.05648624524474144,
-0.7427783608436584,
-1.7219271659851074,
-0.46154990792274475,
0.16328918933868408,
0.5534021258354187,
-1.0969780683517456,
1.7615405321121216,
1.0243470668792725,
1.9193981885910034,
0.9151551723480225,
-0.2555212080478668,
1.3667032718658447,
0.06504747271537781,
1.8282676935195923,
-0.4374408721923828,
0.546263575553894,
-0.2920707166194916,
-1.1745730638504028,
0.9013728499412537,
-0.29891806840896606,
-1.9498658180236816,
-0.9754117727279663,
-0.8904626369476318,
-0.13944515585899353,
-0.7891039848327637,
0.9429395794868469,
-0.2842026352882385,
-1.497693657875061,
0.21275828778743744,
-0.5935121178627014,
0.06556157767772675,
-1.2250475883483887,
0.4145057201385498,
0.6404680013656616,
-0.7285938858985901,
-0.09026549756526947,
-0.17310866713523865,
-1.2498892545700073,
-0.43105944991111755,
0.22226978838443756,
2.0477426052093506,
-0.7469810843467712,
0.8645354509353638,
1.009063482284546,
-0.8301193118095398,
0.026957161724567413,
0.17720936238765717,
-0.32661160826683044,
0.6591817140579224,
-0.9597474932670593,
-0.4410370886325836,
1.2599326372146606,
-0.2967088520526886,
-0.7390016913414001,
1.5853092670440674,
0.685410737991333,
-0.9942449927330017,
-0.11560814827680588,
-0.29404494166374207,
-0.7482719421386719,
-0.016522862017154694,
-1.4056442975997925,
-0.035162553191185,
0.3872745633125305,
-1.383981704711914,
-0.452892929315567,
-0.15366250276565552,
1.3039798736572266,
-0.28357452154159546,
1.3124949932098389,
-0.388252317905426,
-0.37097734212875366,
-0.3348613679409027,
-0.4579842984676361,
0.16790685057640076,
-0.10364807397127151,
-0.7034177780151367,
0.12188352644443512,
-0.8573975563049316,
0.3561130464076996,
1.4492948055267334,
0.40704333782196045,
0.023117337375879288,
0.4552644193172455,
1.08787202835083,
0.43519681692123413,
-0.0493229515850544,
-0.954622209072113,
-1.4743355512619019,
1.9001978635787964,
-1.4415453672409058,
1.939780592918396,
0.5796987414360046,
-0.17026805877685547,
-1.823535442352295,
-1.8498643636703491,
1.3504283428192139,
1.3355611562728882,
2.3089282512664795,
0.49297577142715454,
0.3448456823825836,
-0.8146569132804871,
-0.8589972257614136,
0.3355829119682312,
-1.062710165977478,
-0.5048422813415527,
0.20673128962516785,
2.234104633331299,
1.7773765325546265,
-0.5567963123321533,
-0.14797981083393097,
-1.0285356044769287,
1.3694281578063965,
-0.20671330392360687,
0.26899078488349915,
1.9783865213394165,
-0.46498432755470276,
-1.1176691055297852,
1.3156980276107788,
-2.276104688644409,
0.08401401340961456,
2.006004571914673,
0.2959436774253845,
0.057294804602861404,
-1.3263601064682007,
-0.6302524209022522,
-0.34670767188072205,
-0.495076447725296,
-1.3340790271759033,
0.4963452219963074,
-0.23168392479419708,
-0.7110350131988525,
-1.3452354669570923,
0.2434709072113037,
-1.1187373399734497,
-1.6167465448379517,
0.36337652802467346,
1.899413824081421,
2.1265485286712646,
-0.7920517325401306,
1.4932414293289185,
-0.25767967104911804,
0.19213329255580902,
1.1757490634918213,
1.2658017873764038,
3.0691018104553223,
1.8438259363174438,
-1.261012077331543,
0.6328309178352356,
-0.0880870521068573,
-0.5948454141616821,
1.3038108348846436,
-1.1093950271606445,
1.3194806575775146,
-0.1914670318365097,
-1.0813326835632324,
-1.3376648426055908,
0.8661657571792603,
0.42034396529197693,
0.17394991219043732,
-0.5510737299919128,
1.2253631353378296,
0.12764045596122742,
1.3301478624343872,
0.5768160820007324,
-0.3724237084388733,
0.7252986431121826,
-0.47049087285995483,
-0.5641628503799438,
1.550945520401001,
0.27764177322387695,
-1.5281010866165161,
-2.2542502880096436,
-0.2891708016395569,
-0.8422580361366272,
0.09512153267860413,
-0.4749937951564789,
-1.009988784790039,
1.6933906078338623,
0.37242239713668823,
-1.2980260848999023,
-0.2786671221256256,
-0.29954543709754944,
-0.5899382829666138,
2.869877815246582,
-1.2219253778457642,
-0.16773565113544464,
-0.9470629096031189,
-0.7708749175071716,
1.7818812131881714,
-1.2016594409942627,
-0.1098896786570549,
-1.093300461769104,
-0.49667829275131226,
-1.5001685619354248,
-0.540827751159668,
0.14495663344860077,
-0.9829867482185364,
0.95659339427948,
0.16144362092018127,
-1.132166862487793,
-0.38823631405830383,
-0.8518814444541931,
0.9842063188552856,
-0.2772871255874634,
0.23454850912094116,
1.806136965751648,
0.46157312393188477,
-0.42005905508995056,
0.7238848209381104,
1.2065521478652954,
0.6419014930725098,
-0.6787221431732178,
0.20710347592830658,
-0.8287872672080994,
0.2772979736328125,
-1.2903797626495361,
0.1816755086183548,
-2.9842350482940674,
0.6365707516670227,
-0.11807002127170563,
-0.22076177597045898,
-0.03604591637849808,
-1.3109352588653564,
1.055259346961975,
2.5633106231689453,
-1.371192216873169,
0.4371005594730377,
0.32823899388313293,
1.1215070486068726,
-1.5908852815628052,
0.3361968994140625,
-0.4759250581264496,
1.9939138889312744,
0.20788456499576569,
1.2688809633255005,
-0.5479363203048706,
-2.161533832550049,
0.6527358889579773,
-1.2799793481826782,
-1.2609890699386597,
0.81746506690979,
-0.9405482411384583,
0.22675345838069916,
-1.3880466222763062,
-0.18833690881729126,
-0.9062191247940063,
-1.2280617952346802,
0.7569624185562134,
0.2472285032272339,
0.37188389897346497,
-0.4483776092529297,
0.40214598178863525,
-2.2254996299743652,
-1.4466935396194458,
-0.31899306178092957,
-0.9883769750595093,
0.5217313766479492,
-0.3964774012565613,
0.6922827959060669,
-0.244866281747818,
0.10687890648841858,
0.4719402492046356,
1.4872016906738281,
3.449254035949707,
0.27120891213417053,
0.2564657926559448,
-0.1093083843588829,
-0.9662368297576904,
1.6318142414093018,
0.9260093569755554,
0.11371482908725739,
-0.3912452161312103,
-1.0638099908828735,
1.1227575540542603,
1.940928339958191,
1.0180025100708008,
-0.10035757720470428,
-0.792303740978241,
-0.5811710357666016,
-0.173091322183609,
0.12739019095897675,
0.4794405996799469,
0.8739265203475952,
0.10450044274330139,
0.13299348950386047,
1.4428521394729614,
1.222292423248291,
-0.3944671154022217,
0.21979683637619019,
-0.8576624393463135,
-0.5312791466712952,
0.5651710629463196,
0.27024415135383606,
0.011191080324351788,
0.4277166724205017,
-0.9224794507026672,
-0.3207666575908661,
-0.3723009526729584,
-0.845519483089447,
-0.645707905292511,
-0.49179205298423767,
-0.44480109214782715,
1.529595136642456,
0.028433945029973984,
-0.5779029130935669,
-0.008196082897484303,
-0.8623377680778503,
-0.1321936696767807,
-1.2085151672363281,
0.18040348589420319,
-0.13029494881629944,
-0.23047052323818207,
-0.20666925609111786,
1.7451425790786743,
-1.0498712062835693,
-2.033707618713379,
0.2582048773765564,
0.3635307848453522,
-0.24258747696876526,
0.1824141889810562,
1.5705152750015259,
0.5032311081886292,
1.421288013458252,
1.2321443557739258,
1.0001614093780518,
-0.6432396769523621,
-1.233052372932434,
0.7219183444976807,
0.8637597560882568,
-1.2865790128707886,
0.8626274466514587,
0.03870685026049614,
-0.5010860562324524,
0.6329236626625061,
1.1110092401504517,
0.5620278716087341,
-1.845809817314148,
0.7121556997299194,
-0.9434653520584106,
0.766431450843811,
0.7568525075912476,
0.7100545763969421,
0.1740194857120514,
0.9058737754821777,
-0.9994462132453918,
-1.1889817714691162,
-0.6804776787757874,
-0.6905719637870789,
1.8999197483062744,
-0.34184831380844116,
0.6777147054672241,
-0.29089120030403137,
-1.192138433456421,
0.04055991768836975,
0.7449138164520264,
0.33061400055885315,
-0.4849843978881836,
0.8026820421218872,
-0.5762507319450378,
-0.9887251853942871,
-1.405307650566101,
-0.32421332597732544,
-1.2821062803268433,
-1.0265264511108398,
1.0879594087600708,
0.6749773025512695,
0.26493677496910095,
1.8685767650604248,
0.7438661456108093,
0.40959325432777405,
-2.5337026119232178,
0.8669755458831787,
0.16635049879550934,
0.03961362689733505,
0.7917866706848145,
0.32596418261528015,
1.0783886909484863,
-0.11437706649303436,
0.6154112219810486,
-2.3557703495025635,
2.2911508083343506,
-0.29008007049560547,
0.5868222713470459,
-0.01230688951909542,
-0.31373316049575806,
1.1439958810806274,
0.6279249787330627,
0.47041723132133484,
-1.1364730596542358,
0.665105402469635,
-0.4636482894420624,
1.1438134908676147,
0.9571784138679504,
-0.8340545296669006,
0.09099741280078888,
1.4759808778762817,
0.6046120524406433,
-0.4248804748058319,
-0.9361636638641357,
-0.9811346530914307,
1.0079010725021362,
1.5088900327682495,
-0.1294906884431839,
-0.0922374576330185,
0.8492920994758606,
0.6870110630989075,
-1.246498465538025,
0.06351485848426819,
-0.652141809463501,
-0.6503590941429138,
1.679686188697815,
2.089228391647339,
-0.11304880678653717,
-0.19162294268608093,
-0.7294889688491821,
-1.1136077642440796,
0.8951399326324463,
0.020824667066335678,
0.0862141028046608,
0.5952107310295105,
-0.687577486038208,
0.9788496494293213,
0.8767518401145935,
0.8145041465759277,
0.22395415604114532,
0.384623646736145,
0.513047993183136,
-0.27588561177253723,
-1.145980954170227,
-0.19419123232364655,
-1.031713843345642,
-2.6205224990844727,
0.46952229738235474,
-0.3876449465751648,
-1.3212472200393677,
-0.05842294543981552,
-1.1251386404037476,
1.0027190446853638,
-0.5709682106971741,
-1.0054636001586914,
-1.6755335330963135,
0.14384031295776367,
0.009515157900750637,
1.0006519556045532,
-1.6076723337173462,
-0.17124538123607635,
1.3027592897415161,
0.8611129522323608,
-0.7669491767883301,
1.0639262199401855,
0.2040358930826187,
1.1293359994888306,
0.7092691659927368,
-0.5045807957649231,
0.6316226124763489,
-0.044207505881786346,
-1.4241536855697632,
0.40793222188949585,
1.1786894798278809,
0.16124263405799866,
1.457871675491333,
-0.4467620849609375,
0.14698131382465363,
0.38052549958229065,
-0.606992244720459,
-0.6321899890899658,
-0.45093202590942383,
0.6691758632659912,
0.0780872106552124,
-0.8204749226570129,
0.07202953845262527,
-0.062306083738803864,
-0.3098941445350647,
0.24465200304985046,
-1.4482131004333496,
-0.22873690724372864,
-0.44820812344551086,
-0.5518662929534912,
-1.2652971744537354,
-0.02856144681572914,
1.463477373123169,
-0.7432105541229248,
-0.12074564397335052,
0.4007251262664795,
0.33720698952674866,
0.5653349757194519,
0.4944077134132385,
-0.720669686794281,
-0.15893816947937012,
-0.41189640760421753,
-0.2468423694372177,
0.3334503769874573,
1.345455527305603,
-0.16855846345424652,
-0.9126967191696167,
0.7389604449272156,
-0.2144622653722763,
0.06026309356093407,
1.9564684629440308,
0.04888824000954628,
-0.7630913853645325,
0.2580176889896393,
-0.7494290471076965,
1.7674956321716309,
1.716844916343689,
1.4126774072647095,
-0.02176576480269432,
-0.7749428153038025,
0.5325129628181458,
-0.34059348702430725,
-0.400760680437088,
0.9012084603309631,
0.3428351879119873,
-0.1839853823184967,
-1.4631998538970947,
0.8387643694877625,
1.2522457838058472,
-0.8233122229576111,
-0.7729954719543457,
0.17036031186580658,
-0.812571108341217,
1.0668879747390747,
0.554157018661499,
0.475849449634552,
0.37250077724456787,
1.6409380435943604,
0.7753176093101501,
-0.39285096526145935,
0.4916367530822754,
0.6516303420066833,
-0.13639916479587555,
-1.991212248802185,
-1.203186273574829,
0.41131994128227234,
-0.6352543234825134,
-1.538037657737732,
1.4457093477249146,
-1.112895131111145,
-1.100677728652954,
0.6143166422843933,
0.11964869499206543,
1.4201725721359253,
0.39907899498939514,
1.5742288827896118,
1.97365140914917,
0.7720783948898315,
0.4022568464279175,
1.2968133687973022,
-0.12861359119415283,
-0.46228569746017456,
1.828392505645752,
-0.4463772475719452,
0.40965762734413147,
1.1250321865081787,
-0.15019741654396057,
-1.1567394733428955,
-0.8408477902412415,
-1.1639891862869263,
-0.6734413504600525,
1.14736008644104,
0.11958931386470795,
-1.203722357749939,
0.13590240478515625,
1.5958049297332764,
0.09052715450525284,
-0.32950279116630554,
0.6404273509979248,
0.28375834226608276,
-0.7965745329856873,
0.03553420677781105,
-0.9890657067298889,
0.5521045327186584,
-0.24234145879745483,
-0.32045137882232666,
0.2549740672111511,
0.521851658821106,
1.4442718029022217,
-0.19713535904884338,
0.22591985762119293,
1.146226406097412,
-1.3729697465896606,
1.3960363864898682,
-0.6586290597915649,
0.1900714784860611,
-2.3301351070404053,
1.3353254795074463,
-0.7034357786178589,
1.9095572233200073,
-2.7224156856536865,
0.4656628966331482,
-0.5764859914779663,
-0.5459770560264587,
0.29256942868232727,
-0.4630240797996521,
0.12420660257339478,
-0.13482551276683807,
-1.0474555492401123,
0.06062227860093117,
-0.6739712357521057,
0.6526208519935608,
1.124433994293213,
1.417678713798523,
-1.1551589965820312,
-0.5244575142860413,
-1.7120864391326904,
-0.13264665007591248,
-0.7557108402252197,
0.40652385354042053,
-2.0738165378570557,
-0.2830231785774231,
-1.856329321861267,
-2.3809149265289307,
-1.193583369255066,
-0.8104525804519653,
1.1211628913879395,
0.08790934830904007,
-0.905085027217865,
1.276913046836853,
-0.3384079933166504,
-1.8854652643203735,
1.1776622533798218,
-2.081272840499878
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > Hi,
>
> You need to use:
>
> ```
> from datasets import load_dataset
>
> dataset = load_dataset("imagefolder", split="train", data_dir="path_to_your_folder")
> ```
>
> instead of
>
> ```
> from datasets import load_dataset
>
> dataset = load_dataset("my_folder_name", split="train")
> ```
>
> To create an image dataset from your local folders.
Thank you, but even using the method that you wrote above absolutely nothing changes, especially without using data_dir on my other data everything works fine | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 81 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> Hi,
>
> You need to use:
>
> ```
> from datasets import load_dataset
>
> dataset = load_dataset("imagefolder", split="train", data_dir="path_to_your_folder")
> ```
>
> instead of
>
> ```
> from datasets import load_dataset
>
> dataset = load_dataset("my_folder_name", split="train")
> ```
>
> To create an image dataset from your local folders.
Thank you, but even using the method that you wrote above absolutely nothing changes, especially without using data_dir on my other data everything works fine | [
-1.1617588996887207,
-0.9992468953132629,
-0.7096028923988342,
1.4687199592590332,
-0.1640932261943817,
-1.2055776119232178,
0.1589180827140808,
-1.2538357973098755,
1.676468849182129,
-0.8882619738578796,
0.33209216594696045,
-1.673874020576477,
-0.08058734983205795,
-0.505450963973999,
-0.7282091379165649,
-1.0703531503677368,
-0.4135052263736725,
-0.7883995175361633,
0.9974399209022522,
2.448223114013672,
1.2911237478256226,
-1.2367563247680664,
2.654473066329956,
0.6725351214408875,
-0.21082210540771484,
-1.0182560682296753,
0.6771509051322937,
-0.04620150849223137,
-1.1338651180267334,
-0.5045537948608398,
-0.8958023190498352,
-0.16603800654411316,
-0.6371937990188599,
-0.561202883720398,
-0.1130383238196373,
0.38851475715637207,
-0.45763859152793884,
-0.2699015736579895,
-0.533540666103363,
-0.8783707618713379,
0.3763664960861206,
-0.4124651551246643,
0.9862985610961914,
-0.46399515867233276,
1.7735625505447388,
-0.5490298271179199,
0.4955456852912903,
0.7127453088760376,
1.1962323188781738,
0.27955034375190735,
-0.05230062082409859,
0.18035367131233215,
0.43446409702301025,
-0.07533320784568787,
0.35242775082588196,
1.0866559743881226,
0.4798133969306946,
0.6438862681388855,
0.7806249856948853,
-2.261720895767212,
1.2249153852462769,
-0.994692862033844,
0.2358008623123169,
1.3273899555206299,
-0.7616581320762634,
0.32418161630630493,
-1.8188650608062744,
-0.11529285460710526,
0.5808015465736389,
-2.2634146213531494,
0.24216905236244202,
-1.3837462663650513,
-0.5823578834533691,
0.8878674507141113,
0.39465007185935974,
-1.1956440210342407,
0.02561906725168228,
-0.3135976791381836,
1.0106117725372314,
0.6330157518386841,
1.0677913427352905,
-1.8115724325180054,
0.013134239241480827,
-0.3309733271598816,
0.15668407082557678,
-1.294053077697754,
-1.5169519186019897,
0.6712781190872192,
0.5271687507629395,
0.6520408987998962,
-0.08611389994621277,
1.0862817764282227,
-0.937267541885376,
0.6383806467056274,
-1.0140047073364258,
-1.555708646774292,
-1.3524832725524902,
-2.3001325130462646,
-2.3875293731689453,
0.652504563331604,
-0.6905062794685364,
-0.5647222399711609,
2.0847220420837402,
-1.105568528175354,
-1.775080680847168,
1.14808988571167,
0.20340213179588318,
0.03286893293261528,
2.4396777153015137,
0.24800756573677063,
-0.6407163739204407,
0.42640405893325806,
-0.7673985362052917,
0.8336324095726013,
-0.19576388597488403,
1.4342679977416992,
0.48816153407096863,
-0.9699646830558777,
1.741455316543579,
-0.4573504328727722,
0.6826490759849548,
-0.5537882447242737,
-0.5926491022109985,
-0.7740259766578674,
0.31096380949020386,
1.8278371095657349,
-0.25556692481040955,
1.6309090852737427,
-0.2606114447116852,
-1.5497779846191406,
-1.7102102041244507,
0.9707246422767639,
0.4140457212924957,
-0.8125432133674622,
0.16910681128501892,
-0.3921879529953003,
0.05690009891986847,
0.04399995505809784,
1.1933751106262207,
1.2795437574386597,
0.8083798289299011,
-0.42643865942955017,
-0.8310377597808838,
0.13481247425079346,
-0.040903329849243164,
-0.7327393889427185,
-1.7663519382476807,
-0.4180065393447876,
0.08728533238172531,
0.6468943357467651,
-1.0867347717285156,
1.7209025621414185,
0.9555549621582031,
1.9625643491744995,
0.954359769821167,
-0.3309222459793091,
1.330414891242981,
0.11157878488302231,
1.7947413921356201,
-0.5266852974891663,
0.6118490695953369,
-0.36562782526016235,
-1.108621597290039,
0.9078182578086853,
-0.30844083428382874,
-1.863581657409668,
-0.8420146107673645,
-0.8743698000907898,
-0.22506874799728394,
-0.853325605392456,
0.9274988174438477,
-0.21403974294662476,
-1.3752278089523315,
0.39144107699394226,
-0.6747217774391174,
0.04065384715795517,
-1.2904342412948608,
0.4815235435962677,
0.6654757857322693,
-0.6578345894813538,
-0.07189781963825226,
-0.23540085554122925,
-1.2753931283950806,
-0.5194123387336731,
0.1072189211845398,
2.019540309906006,
-0.6618356108665466,
0.8647156357765198,
0.9427759051322937,
-0.765945553779602,
-0.042163681238889694,
0.24755734205245972,
-0.20666509866714478,
0.6773266196250916,
-1.0168211460113525,
-0.37586331367492676,
1.273741364479065,
-0.3102644979953766,
-0.6242566108703613,
1.5257092714309692,
0.6004059910774231,
-1.014639973640442,
-0.08356029540300369,
-0.27890917658805847,
-0.7174648642539978,
0.0349930077791214,
-1.5268927812576294,
-0.0678122490644455,
0.3963082432746887,
-1.450568675994873,
-0.5186395645141602,
-0.10906854271888733,
1.308520793914795,
-0.21805593371391296,
1.2859431505203247,
-0.38903433084487915,
-0.24191707372665405,
-0.36178651452064514,
-0.4347114562988281,
0.11862855404615402,
-0.18743646144866943,
-0.6305396556854248,
0.10260165482759476,
-0.8980425596237183,
0.2555621266365051,
1.4447823762893677,
0.3445914089679718,
-0.02152610570192337,
0.3665546178817749,
1.099075198173523,
0.3849940598011017,
-0.125380739569664,
-0.9267059564590454,
-1.4377400875091553,
1.9706507921218872,
-1.4726524353027344,
1.9383872747421265,
0.583098828792572,
-0.1677055060863495,
-1.8011893033981323,
-1.8778690099716187,
1.3029637336730957,
1.2514201402664185,
2.2732577323913574,
0.5672779083251953,
0.3306705951690674,
-0.7975202202796936,
-0.7999199032783508,
0.2922186255455017,
-1.007083535194397,
-0.6143239736557007,
0.17891883850097656,
2.2632625102996826,
1.6948941946029663,
-0.6375228762626648,
-0.10300207138061523,
-0.936069130897522,
1.344359040260315,
-0.14600002765655518,
0.24733659625053406,
1.928830623626709,
-0.4524514079093933,
-1.235755205154419,
1.3007521629333496,
-2.248197555541992,
0.05768353492021561,
2.005497694015503,
0.2666538655757904,
0.1866137981414795,
-1.276585340499878,
-0.7342177629470825,
-0.3620429039001465,
-0.5298981666564941,
-1.2950372695922852,
0.489807665348053,
-0.2363744080066681,
-0.727908194065094,
-1.431684136390686,
0.2352997362613678,
-1.0405100584030151,
-1.6414474248886108,
0.27362895011901855,
1.9165738821029663,
2.1697330474853516,
-0.8275144100189209,
1.5208089351654053,
-0.3510535657405853,
0.10142166167497635,
1.1375378370285034,
1.237250566482544,
3.090327262878418,
1.8850504159927368,
-1.2572569847106934,
0.6224002838134766,
-0.06444086879491806,
-0.5943127274513245,
1.3686283826828003,
-1.0930625200271606,
1.225477933883667,
-0.276525616645813,
-1.1475716829299927,
-1.2971690893173218,
0.8707961440086365,
0.35343554615974426,
0.07959156483411789,
-0.6078555583953857,
1.2592092752456665,
0.020017601549625397,
1.4059547185897827,
0.5518074631690979,
-0.3797643184661865,
0.7142964005470276,
-0.484500527381897,
-0.5325062870979309,
1.5698455572128296,
0.30924150347709656,
-1.50576651096344,
-2.3263323307037354,
-0.2561938762664795,
-0.8694008588790894,
0.12336995452642441,
-0.4830408990383148,
-1.096469521522522,
1.687146782875061,
0.4072043299674988,
-1.2210451364517212,
-0.35110971331596375,
-0.35141268372535706,
-0.5647978186607361,
2.8006157875061035,
-1.2478787899017334,
-0.17898058891296387,
-0.9517455101013184,
-0.7544722557067871,
1.703616738319397,
-1.2640867233276367,
-0.11111421883106232,
-1.077478289604187,
-0.47987180948257446,
-1.482698917388916,
-0.48310935497283936,
0.11530468612909317,
-0.9869593381881714,
0.8707793951034546,
0.27451786398887634,
-1.1696172952651978,
-0.27970120310783386,
-0.8314318060874939,
0.9492224454879761,
-0.24251407384872437,
0.3305181860923767,
1.8749104738235474,
0.40474602580070496,
-0.3793105483055115,
0.6769139170646667,
1.2046960592269897,
0.620306134223938,
-0.7070812582969666,
0.09349821507930756,
-0.8162606954574585,
0.3615066111087799,
-1.2866052389144897,
0.14664429426193237,
-2.9387238025665283,
0.7408261895179749,
-0.06128853186964989,
-0.1522633135318756,
0.04647994413971901,
-1.3725829124450684,
1.030107855796814,
2.6339120864868164,
-1.3617582321166992,
0.4919252395629883,
0.3267749547958374,
1.1567939519882202,
-1.6001774072647095,
0.33296889066696167,
-0.4520314633846283,
2.1954147815704346,
0.24642834067344666,
1.2976566553115845,
-0.44477590918540955,
-2.3253438472747803,
0.6431524157524109,
-1.200211763381958,
-1.2932937145233154,
0.7902705073356628,
-0.9345963597297668,
0.04998428747057915,
-1.4777582883834839,
-0.09965502470731735,
-0.933494508266449,
-1.1805295944213867,
0.8252783417701721,
0.1437520980834961,
0.4131239652633667,
-0.474712610244751,
0.3791332542896271,
-2.259632110595703,
-1.4271817207336426,
-0.2330944538116455,
-0.9730825424194336,
0.4973223805427551,
-0.3872806429862976,
0.7534775733947754,
-0.23427850008010864,
0.08688948303461075,
0.5235791206359863,
1.486087679862976,
3.4861862659454346,
0.21337541937828064,
0.24288713932037354,
-0.17045706510543823,
-0.9246332049369812,
1.5509356260299683,
0.8726130127906799,
0.019859330728650093,
-0.37900030612945557,
-1.0464248657226562,
1.1540976762771606,
1.9860191345214844,
0.910515308380127,
-0.01829405687749386,
-0.8386926651000977,
-0.4876417815685272,
-0.11497900635004044,
0.20800995826721191,
0.44107937812805176,
0.8890543580055237,
0.1345277726650238,
0.15326198935508728,
1.3871766328811646,
1.2244465351104736,
-0.2902178168296814,
0.3040313422679901,
-0.828876793384552,
-0.5114455819129944,
0.6505883932113647,
0.28665104508399963,
0.0331403985619545,
0.4065604507923126,
-0.8222830891609192,
-0.3208969831466675,
-0.324513703584671,
-0.7654385566711426,
-0.6289436221122742,
-0.42145487666130066,
-0.3288988471031189,
1.5054850578308105,
0.006301170215010643,
-0.5625770688056946,
0.05733264982700348,
-0.8465580344200134,
-0.1503063440322876,
-1.284102439880371,
0.1600959300994873,
-0.16268518567085266,
-0.18477576971054077,
-0.12544557452201843,
1.6341661214828491,
-0.9798634052276611,
-2.0144689083099365,
0.3189278542995453,
0.4493383467197418,
-0.39125850796699524,
0.22917857766151428,
1.6314868927001953,
0.49753767251968384,
1.4585202932357788,
1.2674473524093628,
1.0330184698104858,
-0.6699015498161316,
-1.1634138822555542,
0.6795114278793335,
0.8480138778686523,
-1.287659764289856,
0.9386241436004639,
0.07504793256521225,
-0.5624481439590454,
0.49866771697998047,
1.1026644706726074,
0.5659375190734863,
-1.8280986547470093,
0.8068540692329407,
-0.8472303748130798,
0.8371031284332275,
0.6669467687606812,
0.836321234703064,
0.1974269449710846,
0.9266467690467834,
-1.1151601076126099,
-1.1063185930252075,
-0.6929548382759094,
-0.6579546332359314,
1.8713133335113525,
-0.27989959716796875,
0.5860559940338135,
-0.3517124652862549,
-1.1746455430984497,
0.047487787902355194,
0.7265362739562988,
0.33600571751594543,
-0.4672037363052368,
0.7812434434890747,
-0.54634690284729,
-1.0222904682159424,
-1.373725175857544,
-0.31142425537109375,
-1.138724446296692,
-0.9883970022201538,
1.0987982749938965,
0.718505322933197,
0.3056704103946686,
1.9161401987075806,
0.6102390885353088,
0.31836041808128357,
-2.5544867515563965,
0.9361995458602905,
0.16377133131027222,
-0.0396181121468544,
0.8855814337730408,
0.4309915602207184,
1.0978938341140747,
-0.1076318621635437,
0.6196722388267517,
-2.3270440101623535,
2.268219232559204,
-0.305790513753891,
0.6441014409065247,
0.06938479840755463,
-0.215873122215271,
1.0101332664489746,
0.6325918436050415,
0.4794524312019348,
-1.1452336311340332,
0.7294246554374695,
-0.48320281505584717,
1.1072880029678345,
0.9495970606803894,
-0.9208329319953918,
0.14559650421142578,
1.4412883520126343,
0.5642566084861755,
-0.5055500864982605,
-0.9816182255744934,
-0.8195701241493225,
0.9868106245994568,
1.532045841217041,
-0.11571641266345978,
-0.09292878210544586,
0.7581977844238281,
0.6561947464942932,
-1.258260726928711,
0.07279495149850845,
-0.6359249353408813,
-0.7080668807029724,
1.6747958660125732,
1.9959192276000977,
-0.08249369263648987,
-0.16498559713363647,
-0.7068237662315369,
-1.2071913480758667,
0.9998775124549866,
0.04451756551861763,
0.10739123076200485,
0.5521247982978821,
-0.6710557341575623,
0.9902210831642151,
0.8388605713844299,
0.8830589056015015,
0.2685629427433014,
0.46725597977638245,
0.6239455342292786,
-0.27386897802352905,
-0.9957229495048523,
-0.16610178351402283,
-1.132965326309204,
-2.5988211631774902,
0.5706013441085815,
-0.44386327266693115,
-1.2679346799850464,
-0.10492568463087082,
-0.9949489235877991,
1.0126889944076538,
-0.6047365069389343,
-0.9068328142166138,
-1.5872111320495605,
0.12859952449798584,
-0.007841639220714569,
1.033219337463379,
-1.5973981618881226,
-0.13062018156051636,
1.2870705127716064,
0.917471706867218,
-0.7803370356559753,
1.0858665704727173,
0.3150000274181366,
1.1059376001358032,
0.7969636917114258,
-0.5782590508460999,
0.6535688042640686,
-0.051755573600530624,
-1.3764735460281372,
0.4089902937412262,
1.223515272140503,
0.2983665466308594,
1.4137442111968994,
-0.46527397632598877,
0.017369989305734634,
0.3480754792690277,
-0.5177308320999146,
-0.6010545492172241,
-0.4473152160644531,
0.6442989110946655,
0.164119690656662,
-0.9251772165298462,
-0.036861468106508255,
-0.1044159010052681,
-0.22358131408691406,
0.24788197875022888,
-1.462949275970459,
-0.17202317714691162,
-0.5500501394271851,
-0.44541746377944946,
-1.2787137031555176,
-0.20024168491363525,
1.5078082084655762,
-0.6998098492622375,
-0.053614065051078796,
0.4069181978702545,
0.3423813283443451,
0.5315234065055847,
0.5075104832649231,
-0.6772088408470154,
-0.2565203011035919,
-0.5406532883644104,
-0.30365288257598877,
0.2728590965270996,
1.2559455633163452,
-0.1580067276954651,
-0.9776903390884399,
0.6749125123023987,
-0.2030659019947052,
0.07872287929058075,
1.9042329788208008,
0.06312596052885056,
-0.7633126378059387,
0.15827560424804688,
-0.6353261470794678,
1.7869641780853271,
1.7411723136901855,
1.3842833042144775,
-0.06297990679740906,
-0.9003512859344482,
0.5746206641197205,
-0.31927335262298584,
-0.44728341698646545,
0.8318266272544861,
0.39984145760536194,
-0.16934847831726074,
-1.5213596820831299,
0.8033142685890198,
1.188710331916809,
-0.9024672508239746,
-0.744813084602356,
0.10246872901916504,
-0.6900449395179749,
1.0068777799606323,
0.607933521270752,
0.47358542680740356,
0.3940970003604889,
1.7140614986419678,
0.6977976560592651,
-0.509970486164093,
0.5003463625907898,
0.519478440284729,
-0.1807752549648285,
-1.965559720993042,
-1.2808188199996948,
0.3822358250617981,
-0.5792304873466492,
-1.5157732963562012,
1.4681538343429565,
-1.158155083656311,
-1.0202521085739136,
0.5523702502250671,
0.17664316296577454,
1.4200011491775513,
0.35234856605529785,
1.6813527345657349,
2.0303702354431152,
0.7258620858192444,
0.39262720942497253,
1.2934259176254272,
-0.14381587505340576,
-0.3937089443206787,
1.8083796501159668,
-0.39301711320877075,
0.4621344208717346,
1.219727873802185,
-0.23972228169441223,
-1.1326119899749756,
-0.9229968786239624,
-1.2508330345153809,
-0.7199024558067322,
1.138624668121338,
0.10560579597949982,
-1.207944393157959,
0.21562525629997253,
1.742587924003601,
0.01670411229133606,
-0.40275490283966064,
0.6192402243614197,
0.3593876361846924,
-0.7610021829605103,
0.017611423507332802,
-1.0927495956420898,
0.5882765650749207,
-0.19822493195533752,
-0.33975571393966675,
0.2853344976902008,
0.45506078004837036,
1.4408923387527466,
-0.08723217993974686,
0.1894659698009491,
1.1781078577041626,
-1.2871090173721313,
1.4037797451019287,
-0.6632532477378845,
0.16908812522888184,
-2.293727397918701,
1.334434986114502,
-0.6564148664474487,
1.9058763980865479,
-2.717461347579956,
0.4353082478046417,
-0.5310419201850891,
-0.46684107184410095,
0.25236597657203674,
-0.395291805267334,
0.19147524237632751,
-0.21432620286941528,
-1.0117653608322144,
0.04335002973675728,
-0.6252133846282959,
0.6226204037666321,
1.0847243070602417,
1.4687747955322266,
-1.1450344324111938,
-0.37385112047195435,
-1.7228662967681885,
-0.08147009462118149,
-0.7577093839645386,
0.32516220211982727,
-1.9926668405532837,
-0.2547116279602051,
-1.8815134763717651,
-2.45060658454895,
-1.2236889600753784,
-0.7426422834396362,
1.0859408378601074,
0.026833683252334595,
-0.9548166990280151,
1.3072621822357178,
-0.3636557161808014,
-1.858704686164856,
1.2338030338287354,
-2.0567336082458496
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF have you tried the suggestion I posted above? with removing split names from filenames and structuring files in folders?
> even using the method that you wrote above absolutely nothing changes
fyi - nothing changed because these two approaches are basically the same. it's just that when you pass your data directory as a dataset name (`load_dataset("my_folder_name"`), not as `data_dir` (`load_dataset("imagefolder", data_dir="my_folder_name"`), `datasets` infers what module to use (`imagefolder` in your case) automatically, by file extensions. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 77 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
@WiNE-iNEFF have you tried the suggestion I posted above? with removing split names from filenames and structuring files in folders?
> even using the method that you wrote above absolutely nothing changes
fyi - nothing changed because these two approaches are basically the same. it's just that when you pass your data directory as a dataset name (`load_dataset("my_folder_name"`), not as `data_dir` (`load_dataset("imagefolder", data_dir="my_folder_name"`), `datasets` infers what module to use (`imagefolder` in your case) automatically, by file extensions. | [
-1.1900068521499634,
-1.0374505519866943,
-0.7667200565338135,
1.445744276046753,
-0.16307328641414642,
-1.1914185285568237,
0.11968360841274261,
-1.1633044481277466,
1.702366590499878,
-0.9811842441558838,
0.34041881561279297,
-1.6606446504592896,
-0.016144132241606712,
-0.5038676261901855,
-0.7868605256080627,
-0.9593867659568787,
-0.47323280572891235,
-0.8489826917648315,
1.0393917560577393,
2.444161891937256,
1.251288652420044,
-1.3047558069229126,
2.7150754928588867,
0.6388551592826843,
-0.18001659214496613,
-1.0542969703674316,
0.5880024433135986,
-0.03822769224643707,
-1.1372612714767456,
-0.4885365962982178,
-0.9702085256576538,
-0.1054372489452362,
-0.5462378859519958,
-0.5559774041175842,
-0.04523255676031113,
0.36649090051651,
-0.3886184096336365,
-0.33491283655166626,
-0.5448415875434875,
-0.8246755599975586,
0.5191446542739868,
-0.39264732599258423,
1.0266607999801636,
-0.44781023263931274,
1.8618651628494263,
-0.5310700535774231,
0.4691597819328308,
0.676172137260437,
1.3196289539337158,
0.2205594927072525,
-0.06740221381187439,
0.24202798306941986,
0.4339600205421448,
-0.017327602952718735,
0.4164058566093445,
1.1984087228775024,
0.5125393867492676,
0.5668846964836121,
0.8009945154190063,
-2.2456462383270264,
1.2143778800964355,
-1.0188058614730835,
0.21810956299304962,
1.2621763944625854,
-0.8928937911987305,
0.3117901682853699,
-1.7780946493148804,
-0.1326383501291275,
0.5577706694602966,
-2.201526641845703,
0.24758349359035492,
-1.2937328815460205,
-0.49128657579421997,
0.9509503245353699,
0.31334012746810913,
-1.1987149715423584,
0.09619193524122238,
-0.35445839166641235,
1.0418306589126587,
0.5209099650382996,
1.081830382347107,
-1.725960373878479,
-0.0031424034386873245,
-0.286615788936615,
0.04566488415002823,
-1.329136848449707,
-1.4808900356292725,
0.5940766334533691,
0.5594509840011597,
0.6135924458503723,
-0.13293486833572388,
1.1496479511260986,
-1.0361745357513428,
0.7620602250099182,
-0.9971897602081299,
-1.501967430114746,
-1.3748201131820679,
-2.2748970985412598,
-2.336582899093628,
0.7127572298049927,
-0.5766742825508118,
-0.5709048509597778,
2.1141905784606934,
-1.0908434391021729,
-1.7221133708953857,
1.1932456493377686,
0.13225863873958588,
0.10516972839832306,
2.3728880882263184,
0.23928268253803253,
-0.7265447974205017,
0.40070319175720215,
-0.7467330694198608,
0.8602437376976013,
-0.3181948661804199,
1.4412108659744263,
0.452053427696228,
-0.981183648109436,
1.7386739253997803,
-0.4170284867286682,
0.6699421405792236,
-0.5364834070205688,
-0.577544629573822,
-0.8625679016113281,
0.3936349153518677,
1.871526837348938,
-0.3429749011993408,
1.5952144861221313,
-0.32611018419265747,
-1.578997254371643,
-1.6606658697128296,
0.9478486776351929,
0.4537699818611145,
-0.8009731769561768,
0.1333514153957367,
-0.36242663860321045,
0.04460827633738518,
0.01605108566582203,
1.155836582183838,
1.2555845975875854,
0.7715652585029602,
-0.3596198558807373,
-0.8818361759185791,
0.18473634123802185,
-0.11093343049287796,
-0.677057683467865,
-1.7558860778808594,
-0.434931218624115,
0.15682438015937805,
0.5984399318695068,
-1.1192466020584106,
1.8104480504989624,
0.9830297827720642,
1.990727424621582,
0.9080802798271179,
-0.22592602670192719,
1.3918228149414062,
0.06161618232727051,
1.844264268875122,
-0.3770010471343994,
0.5931979417800903,
-0.39072972536087036,
-1.2003729343414307,
0.8992974758148193,
-0.35315436124801636,
-1.9737403392791748,
-0.8724485635757446,
-0.8134677410125732,
-0.16404621303081512,
-0.8256585597991943,
0.9087439179420471,
-0.28999096155166626,
-1.3917524814605713,
0.35458219051361084,
-0.6059708595275879,
0.07812050729990005,
-1.2201035022735596,
0.4291684031486511,
0.6760563850402832,
-0.7440470457077026,
-0.08021799474954605,
-0.18984751403331757,
-1.2837584018707275,
-0.48238831758499146,
0.14838287234306335,
2.0067942142486572,
-0.8086264729499817,
0.8711220026016235,
1.016314148902893,
-0.7794947028160095,
-0.0015410450287163258,
0.21876846253871918,
-0.2862206697463989,
0.7459660172462463,
-0.9948986768722534,
-0.3270031213760376,
1.2786946296691895,
-0.2954595685005188,
-0.5932896137237549,
1.4776458740234375,
0.6520528793334961,
-1.0140252113342285,
-0.13902141153812408,
-0.2554774880409241,
-0.79970782995224,
-0.007024182938039303,
-1.4971263408660889,
-0.07448549568653107,
0.34019941091537476,
-1.3917020559310913,
-0.4577542543411255,
-0.1503148376941681,
1.3521130084991455,
-0.18730571866035461,
1.3739590644836426,
-0.4465895891189575,
-0.3067229986190796,
-0.33661526441574097,
-0.4929787516593933,
0.2060079425573349,
-0.16905845701694489,
-0.6858944892883301,
0.16840867698192596,
-0.7901282906532288,
0.32559603452682495,
1.4195702075958252,
0.38632190227508545,
0.022519569844007492,
0.4344785213470459,
1.1270402669906616,
0.4086272120475769,
-0.01833898015320301,
-0.9006761312484741,
-1.5028504133224487,
1.9890600442886353,
-1.4843087196350098,
2.007021427154541,
0.6538732647895813,
-0.12683427333831787,
-1.8143190145492554,
-1.8769333362579346,
1.3602020740509033,
1.2651692628860474,
2.292091131210327,
0.5103909969329834,
0.3604459762573242,
-0.8045874238014221,
-0.7967525124549866,
0.4070790410041809,
-1.0613518953323364,
-0.601281464099884,
0.07376350462436676,
2.2504308223724365,
1.7116955518722534,
-0.5696185231208801,
-0.16224749386310577,
-0.9454357624053955,
1.3328713178634644,
-0.1559784710407257,
0.2922070026397705,
1.888415813446045,
-0.41931188106536865,
-1.1910494565963745,
1.2414944171905518,
-2.3241281509399414,
0.07926370948553085,
2.0334911346435547,
0.3344354033470154,
0.17445018887519836,
-1.329278588294983,
-0.6466274261474609,
-0.30495262145996094,
-0.45201390981674194,
-1.252876877784729,
0.5792999863624573,
-0.32719653844833374,
-0.7395321130752563,
-1.4123597145080566,
0.20216387510299683,
-1.1268599033355713,
-1.6306073665618896,
0.3491511940956116,
1.9177807569503784,
2.156863212585449,
-0.8159731030464172,
1.5255025625228882,
-0.2520291805267334,
0.2591536045074463,
1.2054306268692017,
1.2326725721359253,
3.0867247581481934,
1.8671379089355469,
-1.2273736000061035,
0.5610423684120178,
-0.12483260035514832,
-0.5763211846351624,
1.2395381927490234,
-1.1144508123397827,
1.3279749155044556,
-0.21131619811058044,
-1.0575494766235352,
-1.2676608562469482,
0.9114975333213806,
0.4166296124458313,
0.068293496966362,
-0.4964810013771057,
1.2212013006210327,
0.09739814698696136,
1.3574105501174927,
0.5161184072494507,
-0.3597562909126282,
0.6793098449707031,
-0.44835370779037476,
-0.5915250778198242,
1.5925195217132568,
0.2756350636482239,
-1.488340139389038,
-2.303553819656372,
-0.26073259115219116,
-0.8639805912971497,
0.1272335797548294,
-0.4568089246749878,
-0.9858864545822144,
1.6414799690246582,
0.38093996047973633,
-1.3194514513015747,
-0.31332701444625854,
-0.34934061765670776,
-0.6158092617988586,
2.766779661178589,
-1.311475157737732,
-0.21090668439865112,
-0.9265066385269165,
-0.6820248961448669,
1.6912121772766113,
-1.2409731149673462,
-0.19549277424812317,
-1.0308167934417725,
-0.5339506268501282,
-1.4200221300125122,
-0.5888144969940186,
0.011328019201755524,
-0.9516750574111938,
0.8000397682189941,
0.25029289722442627,
-1.1525341272354126,
-0.34743982553482056,
-0.8071220517158508,
0.9298941493034363,
-0.19433215260505676,
0.27083438634872437,
1.8451850414276123,
0.40074408054351807,
-0.39700978994369507,
0.7430839538574219,
1.196643352508545,
0.6167197227478027,
-0.6413722634315491,
0.1396028697490692,
-0.7971137762069702,
0.35100263357162476,
-1.3270477056503296,
0.22767992317676544,
-2.9430525302886963,
0.7256772518157959,
-0.10073471814393997,
-0.19166859984397888,
-0.005302547477185726,
-1.3492368459701538,
0.9943498373031616,
2.5778162479400635,
-1.2838348150253296,
0.40635567903518677,
0.2908077836036682,
1.1922885179519653,
-1.623870849609375,
0.2942028045654297,
-0.4371829628944397,
2.117009401321411,
0.22090382874011993,
1.2787113189697266,
-0.5015726685523987,
-2.262949228286743,
0.6559613943099976,
-1.2716405391693115,
-1.233456015586853,
0.7686658501625061,
-0.9323614835739136,
0.08908741176128387,
-1.3930931091308594,
-0.1505100578069687,
-0.9155958294868469,
-1.2054740190505981,
0.7083609104156494,
0.18027722835540771,
0.39681607484817505,
-0.4976716637611389,
0.36508679389953613,
-2.1866283416748047,
-1.3791273832321167,
-0.286663293838501,
-0.9825800657272339,
0.45548170804977417,
-0.3588688373565674,
0.7149171233177185,
-0.23833177983760834,
0.13462598621845245,
0.4820523262023926,
1.4745250940322876,
3.475478172302246,
0.24681706726551056,
0.31536126136779785,
-0.12940920889377594,
-0.8994202613830566,
1.545423984527588,
0.9085143804550171,
-0.08297500759363174,
-0.4506949186325073,
-1.0566329956054688,
1.1932414770126343,
1.9213768243789673,
0.9247766137123108,
-0.01136920414865017,
-0.7183399796485901,
-0.6175681948661804,
-0.14839144051074982,
0.09525487571954727,
0.4959743022918701,
0.8857354521751404,
0.12618973851203918,
0.07735513150691986,
1.401799201965332,
1.2021085023880005,
-0.42545920610427856,
0.23903757333755493,
-0.8198274970054626,
-0.5053609013557434,
0.528545618057251,
0.29001694917678833,
0.055244818329811096,
0.367842435836792,
-0.8907195329666138,
-0.35018759965896606,
-0.38898712396621704,
-0.8557824492454529,
-0.678881049156189,
-0.46408480405807495,
-0.3713933229446411,
1.5732216835021973,
0.11483961343765259,
-0.5497458577156067,
-0.026492876932024956,
-0.7450461387634277,
-0.13578733801841736,
-1.197407603263855,
0.1996944695711136,
-0.06918652355670929,
-0.17607195675373077,
-0.1279398500919342,
1.7342394590377808,
-0.9335678219795227,
-2.103637933731079,
0.3637927770614624,
0.325054407119751,
-0.3247256278991699,
0.18172752857208252,
1.5568008422851562,
0.5066602826118469,
1.450883150100708,
1.3266409635543823,
0.9823678135871887,
-0.6653181910514832,
-1.1843725442886353,
0.7867964506149292,
0.8289523124694824,
-1.4285989999771118,
0.8513972759246826,
0.050397295504808426,
-0.4686742424964905,
0.6173355579376221,
1.1392570734024048,
0.537736177444458,
-1.9096418619155884,
0.822605311870575,
-0.9178807139396667,
0.7204806804656982,
0.6796863675117493,
0.7107582092285156,
0.20259670913219452,
0.9221360683441162,
-1.0386220216751099,
-1.1892980337142944,
-0.7570607662200928,
-0.7677590847015381,
1.9543349742889404,
-0.33035945892333984,
0.5792326927185059,
-0.2693469524383545,
-1.1904551982879639,
-0.038068532943725586,
0.6845909953117371,
0.2516140341758728,
-0.39129823446273804,
0.8509886264801025,
-0.6536767482757568,
-1.0518690347671509,
-1.44590425491333,
-0.3186853528022766,
-1.1932841539382935,
-1.015473484992981,
1.0470796823501587,
0.7578758597373962,
0.2934669256210327,
1.8953851461410522,
0.6666122078895569,
0.3216633200645447,
-2.541433334350586,
0.9334900975227356,
0.20975668728351593,
-0.059137649834156036,
0.8809164762496948,
0.26256459951400757,
1.0343042612075806,
-0.14020653069019318,
0.574532151222229,
-2.37619686126709,
2.2677419185638428,
-0.2840193510055542,
0.6658955216407776,
0.0014450522139668465,
-0.28914010524749756,
1.1128034591674805,
0.6067619323730469,
0.5236716270446777,
-1.1443463563919067,
0.6840208172798157,
-0.5562170743942261,
1.0963120460510254,
0.9442096948623657,
-0.9021825790405273,
0.15747573971748352,
1.4514164924621582,
0.5048472881317139,
-0.5260415077209473,
-0.8929165601730347,
-0.9342409372329712,
0.9865473508834839,
1.632245659828186,
-0.0773584395647049,
-0.0291704460978508,
0.8218315243721008,
0.7281485795974731,
-1.2816243171691895,
0.07420281320810318,
-0.7008017301559448,
-0.731139063835144,
1.7117383480072021,
2.103148937225342,
-0.028716938570141792,
-0.17887736856937408,
-0.6975889205932617,
-1.2345490455627441,
0.9348717331886292,
0.015075229108333588,
0.12059319019317627,
0.5642661452293396,
-0.7305386662483215,
1.0469614267349243,
0.9125980734825134,
0.8827136158943176,
0.23211102187633514,
0.30386531352996826,
0.5334116220474243,
-0.2285526990890503,
-1.0301647186279297,
-0.1832427680492401,
-1.0836268663406372,
-2.537783622741699,
0.5014870166778564,
-0.3097795844078064,
-1.3560816049575806,
-0.009012983180582523,
-0.9951578974723816,
0.9437696933746338,
-0.5194316506385803,
-1.0393691062927246,
-1.6267296075820923,
0.16388379037380219,
-0.012609248049557209,
0.9351468682289124,
-1.6067818403244019,
-0.14896850287914276,
1.3557111024856567,
0.9217679500579834,
-0.7223710417747498,
1.087752103805542,
0.21977484226226807,
1.036851406097412,
0.7941257953643799,
-0.5067845582962036,
0.610754132270813,
-0.04533464089035988,
-1.3516472578048706,
0.4585622549057007,
1.1831390857696533,
0.1871204376220703,
1.4970035552978516,
-0.5181600451469421,
0.07567642629146576,
0.3643515110015869,
-0.6365877389907837,
-0.6458189487457275,
-0.5058108568191528,
0.70408695936203,
0.15628834068775177,
-0.8284857273101807,
0.008848540484905243,
-0.06566914916038513,
-0.3057892322540283,
0.25320208072662354,
-1.4868594408035278,
-0.20372581481933594,
-0.4045792818069458,
-0.5030680894851685,
-1.2558850049972534,
-0.07910771667957306,
1.4673494100570679,
-0.7585856914520264,
-0.061692025512456894,
0.41617298126220703,
0.3904104232788086,
0.5415788292884827,
0.6024884581565857,
-0.6676850914955139,
-0.2318592518568039,
-0.4540868401527405,
-0.2775343060493469,
0.29844146966934204,
1.2874373197555542,
-0.08371564745903015,
-0.9038657546043396,
0.705292284488678,
-0.25865793228149414,
0.029220260679721832,
1.8774135112762451,
0.07568258792161942,
-0.7082068920135498,
0.2808539867401123,
-0.7521721124649048,
1.83251953125,
1.716687560081482,
1.3186827898025513,
-0.01335945911705494,
-0.8747720718383789,
0.5839762687683105,
-0.3172297477722168,
-0.37643831968307495,
0.9350170493125916,
0.42167508602142334,
-0.21829412877559662,
-1.500884771347046,
0.7837119698524475,
1.2396023273468018,
-0.8771357536315918,
-0.683762788772583,
0.0748305544257164,
-0.7323397994041443,
1.0618990659713745,
0.6317566633224487,
0.5085025429725647,
0.3261150121688843,
1.703439474105835,
0.8016175031661987,
-0.46442633867263794,
0.4520612359046936,
0.5943849682807922,
-0.11613510549068451,
-2.0029025077819824,
-1.1881284713745117,
0.43026286363601685,
-0.5428839921951294,
-1.4957873821258545,
1.4387352466583252,
-1.1177685260772705,
-1.034533977508545,
0.5652034878730774,
0.04851899296045303,
1.379194974899292,
0.3443155288696289,
1.6072299480438232,
2.016051769256592,
0.7707397937774658,
0.41390663385391235,
1.2547624111175537,
-0.12049374729394913,
-0.4150511622428894,
1.799920916557312,
-0.38602739572525024,
0.4065234065055847,
1.1412239074707031,
-0.2859938144683838,
-1.122848629951477,
-0.8460230827331543,
-1.1569157838821411,
-0.6651209592819214,
1.0621840953826904,
0.14321140944957733,
-1.187209963798523,
0.14820143580436707,
1.6474111080169678,
0.08960144221782684,
-0.35122138261795044,
0.5595692992210388,
0.3297640085220337,
-0.7412455081939697,
0.02836308255791664,
-1.0136971473693848,
0.5245171189308167,
-0.19091777503490448,
-0.42085903882980347,
0.3796895742416382,
0.46501612663269043,
1.3574148416519165,
-0.12987414002418518,
0.18254102766513824,
1.1580862998962402,
-1.4094653129577637,
1.404206395149231,
-0.6652148962020874,
0.19922097027301788,
-2.316904067993164,
1.3897258043289185,
-0.7223256826400757,
1.9828096628189087,
-2.7117583751678467,
0.41084933280944824,
-0.5974794626235962,
-0.5485804080963135,
0.31514763832092285,
-0.38314247131347656,
0.11373747140169144,
-0.16643066704273224,
-1.0107721090316772,
-0.0026759435422718525,
-0.6484361886978149,
0.6927443742752075,
1.1131646633148193,
1.3864833116531372,
-1.0979350805282593,
-0.4332638382911682,
-1.673315405845642,
-0.09171105921268463,
-0.6567604541778564,
0.35224658250808716,
-2.0789778232574463,
-0.216284841299057,
-1.9636056423187256,
-2.3336877822875977,
-1.2856497764587402,
-0.8163400888442993,
1.081969141960144,
0.06891701370477676,
-0.8996382355690002,
1.2130764722824097,
-0.34715867042541504,
-1.8883517980575562,
1.144806146621704,
-2.1094367504119873
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | Oh I didn't know that! OK but in any case, not sure why the image builder isn't working for @WiNE-iNEFF. But it's hard for us to help if we can't reproduce. I'd just check the structure of the folders, see if the splits are correctly set up, etc. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 48 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
Oh I didn't know that! OK but in any case, not sure why the image builder isn't working for @WiNE-iNEFF. But it's hard for us to help if we can't reproduce. I'd just check the structure of the folders, see if the splits are correctly set up, etc. | [
-1.249753475189209,
-1.019782304763794,
-0.8386698961257935,
1.4867123365402222,
-0.1751609891653061,
-1.1959946155548096,
0.07009580731391907,
-1.1152194738388062,
1.6629432439804077,
-1.02276611328125,
0.2492765188217163,
-1.6196708679199219,
0.05818118155002594,
-0.46583911776542664,
-0.7220693826675415,
-0.9663787484169006,
-0.4262487292289734,
-0.765466034412384,
1.1185848712921143,
2.45400333404541,
1.093697428703308,
-1.3912140130996704,
2.7520785331726074,
0.6093738079071045,
-0.19022683799266815,
-1.136293888092041,
0.7037389278411865,
-0.006720543839037418,
-1.1240113973617554,
-0.5556277632713318,
-0.9950380921363831,
0.027376769110560417,
-0.537093460559845,
-0.44518569111824036,
-0.08517962694168091,
0.4114394187927246,
-0.24706463515758514,
-0.3262646794319153,
-0.5112835764884949,
-0.7779249548912048,
0.4498021900653839,
-0.3568419814109802,
0.9536758661270142,
-0.458652526140213,
1.9213731288909912,
-0.39887842535972595,
0.31197747588157654,
0.652076005935669,
1.3651045560836792,
0.1464409977197647,
-0.08802580088376999,
0.09193105250597,
0.5005984306335449,
-0.08824454993009567,
0.36131975054740906,
1.1131325960159302,
0.45811912417411804,
0.592572033405304,
0.720521867275238,
-2.1983375549316406,
1.3255974054336548,
-1.0679453611373901,
0.25978851318359375,
1.3945114612579346,
-0.9622801542282104,
0.36485913395881653,
-1.7226346731185913,
-0.06813303381204605,
0.5186799168586731,
-2.291442394256592,
0.24725720286369324,
-1.1634076833724976,
-0.418251633644104,
0.9137836694717407,
0.34312084317207336,
-1.278602123260498,
0.10653916001319885,
-0.3848057985305786,
1.0417636632919312,
0.4885201156139374,
1.1177390813827515,
-1.6150425672531128,
0.02867087535560131,
-0.22994494438171387,
0.028759947046637535,
-1.3805688619613647,
-1.4287811517715454,
0.5232874155044556,
0.6501425504684448,
0.5984417796134949,
-0.06206163763999939,
0.9904455542564392,
-1.0766814947128296,
0.7086820602416992,
-0.8635268807411194,
-1.4567152261734009,
-1.3699839115142822,
-2.3951287269592285,
-2.3591861724853516,
0.7714183330535889,
-0.4825999438762665,
-0.5877130627632141,
2.1421029567718506,
-1.0939031839370728,
-1.7806657552719116,
1.3016445636749268,
0.11706625670194626,
0.13220307230949402,
2.4449377059936523,
0.19021806120872498,
-0.6955102682113647,
0.4980759024620056,
-0.7741273045539856,
0.8989853858947754,
-0.4645836651325226,
1.4754389524459839,
0.4423038363456726,
-0.922918975353241,
1.741581678390503,
-0.40175506472587585,
0.6317805647850037,
-0.4835774898529053,
-0.5709647536277771,
-0.9739424586296082,
0.4202761948108673,
1.8575265407562256,
-0.3020148277282715,
1.5536973476409912,
-0.32020100951194763,
-1.5492533445358276,
-1.6503363847732544,
0.9307403564453125,
0.496876060962677,
-0.830777645111084,
0.1035892441868782,
-0.3478413224220276,
0.0579884871840477,
0.05420155078172684,
1.1127375364303589,
1.273688554763794,
0.783795952796936,
-0.34653717279434204,
-1.0126533508300781,
0.22550484538078308,
-0.20336024463176727,
-0.6000238656997681,
-1.819701075553894,
-0.43300268054008484,
0.026324136182665825,
0.7003397941589355,
-1.1666028499603271,
1.669521450996399,
1.0637764930725098,
1.9640100002288818,
0.9016160368919373,
-0.29536548256874084,
1.445376992225647,
0.04555268585681915,
1.8551506996154785,
-0.3974190950393677,
0.6542192101478577,
-0.3108527362346649,
-1.234218716621399,
0.8240589499473572,
-0.3672526180744171,
-1.886111855506897,
-0.9172375202178955,
-0.9244029521942139,
-0.13467586040496826,
-0.7856506109237671,
0.9476158022880554,
-0.3504959046840668,
-1.3691264390945435,
0.31526482105255127,
-0.5125539302825928,
0.19900475442409515,
-1.2550894021987915,
0.4689514935016632,
0.7503500580787659,
-0.669258713722229,
-0.05387251079082489,
-0.18906067311763763,
-1.31320059299469,
-0.4442131519317627,
0.18987581133842468,
2.0230791568756104,
-0.8506521582603455,
0.8524271249771118,
0.9831408262252808,
-0.7201108336448669,
-0.003174669574946165,
0.33183637261390686,
-0.2627153694629669,
0.7286674380302429,
-0.9558404684066772,
-0.48537057638168335,
1.2500184774398804,
-0.35276585817337036,
-0.5482221841812134,
1.394673228263855,
0.69834303855896,
-1.0183981657028198,
-0.13165812194347382,
-0.22979940474033356,
-0.7419650554656982,
-0.030758164823055267,
-1.490755558013916,
-0.11454466730356216,
0.286355584859848,
-1.4756754636764526,
-0.47982338070869446,
-0.20135492086410522,
1.3544983863830566,
-0.1918957382440567,
1.4519498348236084,
-0.4208853542804718,
-0.24045619368553162,
-0.3941909670829773,
-0.5367107391357422,
0.3067532181739807,
-0.14749866724014282,
-0.637454092502594,
0.18737980723381042,
-0.8464964032173157,
0.37685278058052063,
1.447731375694275,
0.4063625633716583,
0.03077365644276142,
0.5442872047424316,
1.0840709209442139,
0.45365726947784424,
-0.03148720785975456,
-0.8784105777740479,
-1.4539350271224976,
2.0109386444091797,
-1.5657322406768799,
2.0175836086273193,
0.6810932755470276,
-0.19655144214630127,
-1.7263734340667725,
-1.8605986833572388,
1.3969924449920654,
1.319717288017273,
2.2602429389953613,
0.5094478726387024,
0.3148016333580017,
-0.8393612504005432,
-0.7741929292678833,
0.3056996166706085,
-1.0875968933105469,
-0.6699526906013489,
0.011427182704210281,
2.198565721511841,
1.7186833620071411,
-0.5772259831428528,
-0.07699521631002426,
-1.027491807937622,
1.3140894174575806,
-0.08283449709415436,
0.267698734998703,
1.9096633195877075,
-0.3988165855407715,
-1.2538962364196777,
1.1877193450927734,
-2.385310649871826,
0.11435871571302414,
1.9844636917114258,
0.3373692035675049,
0.04891003668308258,
-1.4953382015228271,
-0.6006152629852295,
-0.2183891087770462,
-0.4366825520992279,
-1.3210420608520508,
0.6214725375175476,
-0.29371002316474915,
-0.8879603743553162,
-1.4478307962417603,
0.235488161444664,
-1.1886706352233887,
-1.5978249311447144,
0.39632129669189453,
1.9369447231292725,
2.1974735260009766,
-0.8230313658714294,
1.5645252466201782,
-0.11858126521110535,
0.24017246067523956,
1.090664029121399,
1.1595966815948486,
3.014714002609253,
1.9226171970367432,
-1.1920000314712524,
0.4931095242500305,
-0.1432282030582428,
-0.5140877366065979,
1.143555998802185,
-1.0265482664108276,
1.3627724647521973,
-0.19120562076568604,
-1.0938936471939087,
-1.2778838872909546,
0.8996032476425171,
0.41809776425361633,
0.06945151090621948,
-0.3813829720020294,
1.2328314781188965,
0.08249509334564209,
1.2981765270233154,
0.49019932746887207,
-0.2992114722728729,
0.630903422832489,
-0.5121883153915405,
-0.6094849109649658,
1.5299978256225586,
0.23428578674793243,
-1.5824633836746216,
-2.2350761890411377,
-0.2836250364780426,
-0.7499389052391052,
0.031546883285045624,
-0.5142651796340942,
-0.9711378812789917,
1.6010022163391113,
0.40867379307746887,
-1.2234100103378296,
-0.3343462347984314,
-0.32355886697769165,
-0.7126078605651855,
2.6536245346069336,
-1.3164781332015991,
-0.28421375155448914,
-0.8599010109901428,
-0.6992093920707703,
1.6313762664794922,
-1.2997766733169556,
-0.11807601153850555,
-0.9455209970474243,
-0.5569429993629456,
-1.4077062606811523,
-0.5119106769561768,
-0.047462791204452515,
-0.951713502407074,
0.7716596126556396,
0.2991909086704254,
-1.0533210039138794,
-0.3813933730125427,
-0.8353740572929382,
0.8678115606307983,
-0.05526532232761383,
0.26809096336364746,
1.7897735834121704,
0.29713571071624756,
-0.43336600065231323,
0.85201096534729,
1.256818413734436,
0.619320273399353,
-0.6655540466308594,
0.13819359242916107,
-0.7351316213607788,
0.3314182460308075,
-1.265425443649292,
0.31762731075286865,
-3.0216383934020996,
0.6887990832328796,
-0.05366058647632599,
-0.17096903920173645,
-0.10748810321092606,
-1.3053544759750366,
1.1204842329025269,
2.468947172164917,
-1.2121198177337646,
0.5643200278282166,
0.22902049124240875,
1.3178902864456177,
-1.5974591970443726,
0.31245777010917664,
-0.49803367257118225,
2.212413787841797,
0.24147135019302368,
1.229132056236267,
-0.4941883981227875,
-2.261904001235962,
0.6756787896156311,
-1.3328466415405273,
-1.139111042022705,
0.6697386503219604,
-0.9053489565849304,
0.016056882217526436,
-1.3705120086669922,
-0.17561492323875427,
-0.9393585920333862,
-1.251047134399414,
0.6469063758850098,
0.2118077576160431,
0.4396664798259735,
-0.5358448028564453,
0.3737446069717407,
-2.2851974964141846,
-1.3797463178634644,
-0.19759535789489746,
-1.0896821022033691,
0.42998701333999634,
-0.43140968680381775,
0.6724608540534973,
-0.24884970486164093,
0.13940328359603882,
0.34797143936157227,
1.439782977104187,
3.500112295150757,
0.15990924835205078,
0.46237266063690186,
-0.13703717291355133,
-0.9905654191970825,
1.5744611024856567,
0.9678358435630798,
-0.02677139826118946,
-0.5439122915267944,
-1.0250531435012817,
1.2742345333099365,
1.9261142015457153,
0.9032281041145325,
-0.07756274938583374,
-0.7084450125694275,
-0.574675440788269,
-0.17201124131679535,
0.2031429260969162,
0.5986324548721313,
0.9373296499252319,
0.02288263849914074,
0.08204638957977295,
1.463181495666504,
1.2431859970092773,
-0.5162795186042786,
0.28138747811317444,
-0.8632782697677612,
-0.4762922525405884,
0.41872167587280273,
0.3679545819759369,
-0.07889585942029953,
0.3980778753757477,
-0.8888923525810242,
-0.2763350009918213,
-0.285686194896698,
-0.8299391269683838,
-0.6306194067001343,
-0.31978869438171387,
-0.3717615008354187,
1.5929579734802246,
0.2141270935535431,
-0.5620645880699158,
-0.02053511142730713,
-0.7576567530632019,
-0.10571931302547455,
-1.1612335443496704,
0.16579140722751617,
-0.09885697811841965,
-0.16363610327243805,
-0.14121092855930328,
1.8349937200546265,
-0.9151395559310913,
-2.169971466064453,
0.25116196274757385,
0.30689507722854614,
-0.20737628638744354,
0.14585858583450317,
1.5237035751342773,
0.451469361782074,
1.5021183490753174,
1.3748087882995605,
1.016136884689331,
-0.7259008884429932,
-1.3263736963272095,
0.745238721370697,
0.8730811476707458,
-1.4086350202560425,
0.8332604765892029,
-0.013235626742243767,
-0.499660462141037,
0.6607061624526978,
1.2373313903808594,
0.5072163939476013,
-1.9297081232070923,
0.8870074152946472,
-1.014796495437622,
0.795899510383606,
0.7081287503242493,
0.6730636358261108,
0.2310817390680313,
0.864176869392395,
-1.0569350719451904,
-1.1849056482315063,
-0.7710042595863342,
-0.7508394122123718,
1.9339882135391235,
-0.35432201623916626,
0.6210164427757263,
-0.15584559738636017,
-1.178978681564331,
-0.14844036102294922,
0.6027944087982178,
0.17376163601875305,
-0.22111769020557404,
0.8175421357154846,
-0.7833748459815979,
-1.2552120685577393,
-1.5172054767608643,
-0.34107574820518494,
-1.146287441253662,
-0.9772275686264038,
1.114424705505371,
0.76714688539505,
0.21563521027565002,
1.9576995372772217,
0.5880669951438904,
0.2801780104637146,
-2.5514681339263916,
0.9400757551193237,
0.35974982380867004,
0.017108270898461342,
0.8028567433357239,
0.2846323847770691,
1.1025513410568237,
-0.05139249563217163,
0.49902212619781494,
-2.266605854034424,
2.270604372024536,
-0.386266827583313,
0.8389192223548889,
0.017101898789405823,
-0.1892005354166031,
1.121206521987915,
0.6532261371612549,
0.6751053929328918,
-1.1409614086151123,
0.7808240056037903,
-0.5801615715026855,
1.2064086198806763,
1.02476167678833,
-0.7705978751182556,
0.12381892651319504,
1.2823604345321655,
0.5492879152297974,
-0.4961382746696472,
-0.9382021427154541,
-0.964713454246521,
0.875274658203125,
1.7033601999282837,
-0.16784976422786713,
0.034073494374752045,
0.6953989267349243,
0.6010030508041382,
-1.222094178199768,
-0.020013976842164993,
-0.7706687450408936,
-0.6354647278785706,
1.6532504558563232,
2.056769609451294,
-0.11250364780426025,
-0.2059364914894104,
-0.6721664667129517,
-1.3448175191879272,
0.7731243371963501,
-0.008411334827542305,
0.1573556810617447,
0.5553048849105835,
-0.77031409740448,
0.9946162104606628,
0.9629095792770386,
0.8390837907791138,
0.1713411957025528,
0.22317902743816376,
0.5532702803611755,
-0.24145369231700897,
-0.9411669969558716,
-0.15210765600204468,
-1.0681856870651245,
-2.6251957416534424,
0.36123213171958923,
-0.3893975615501404,
-1.3335014581680298,
0.01917782425880432,
-1.039391040802002,
0.9669334292411804,
-0.5053805708885193,
-0.9503016471862793,
-1.543591022491455,
0.16722869873046875,
-0.06586766242980957,
0.8390905857086182,
-1.6004725694656372,
-0.130745068192482,
1.4044325351715088,
0.9217827320098877,
-0.7108262777328491,
1.2218918800354004,
0.29315897822380066,
1.130484938621521,
0.6926157474517822,
-0.51760333776474,
0.541289210319519,
0.010023068636655807,
-1.3259626626968384,
0.4779161214828491,
1.1567344665527344,
0.10599043220281601,
1.3883404731750488,
-0.5628044605255127,
0.024089505895972252,
0.39207783341407776,
-0.5713794231414795,
-0.5970456600189209,
-0.423770010471344,
0.7890487313270569,
-0.03807380795478821,
-0.8024292588233948,
0.13877926766872406,
-0.2064601629972458,
-0.3019024729728699,
0.32099449634552,
-1.5098220109939575,
-0.34786370396614075,
-0.4778001010417938,
-0.44765549898147583,
-1.3957675695419312,
0.054702028632164,
1.4768223762512207,
-0.7257765531539917,
-0.13857699930667877,
0.4655613303184509,
0.4922104477882385,
0.5066407918930054,
0.6130673289299011,
-0.6383016109466553,
-0.32467442750930786,
-0.3673158288002014,
-0.23387812077999115,
0.39024218916893005,
1.3153361082077026,
-0.25444698333740234,
-0.8906252980232239,
0.6592919230461121,
-0.21365675330162048,
-0.05842144787311554,
1.8470975160598755,
0.017578482627868652,
-0.7566401958465576,
0.2475537657737732,
-0.7518317103385925,
1.9176454544067383,
1.5590399503707886,
1.38112211227417,
-0.06484617292881012,
-0.7407718896865845,
0.6650477647781372,
-0.22225826978683472,
-0.3202911615371704,
0.8647710084915161,
0.5535818934440613,
-0.19558075070381165,
-1.5815107822418213,
0.6373413801193237,
1.1708564758300781,
-0.8597549200057983,
-0.615854024887085,
0.027726517990231514,
-0.6890048980712891,
1.1015543937683105,
0.6777966022491455,
0.5901291370391846,
0.2768552303314209,
1.7161263227462769,
0.805659294128418,
-0.5026123523712158,
0.4418153762817383,
0.5471470355987549,
-0.14412768185138702,
-2.06095814704895,
-1.0463238954544067,
0.3367549479007721,
-0.49434909224510193,
-1.558153510093689,
1.407047986984253,
-1.0477548837661743,
-0.9692703485488892,
0.5048849582672119,
0.03727642446756363,
1.3014262914657593,
0.3325372338294983,
1.6012176275253296,
1.9465481042861938,
0.8421038389205933,
0.3940237760543823,
1.3027472496032715,
-0.2170223444700241,
-0.3851732909679413,
1.7994412183761597,
-0.35510075092315674,
0.3364487886428833,
1.2109392881393433,
-0.3031468689441681,
-1.0068461894989014,
-0.7966778874397278,
-1.038542628288269,
-0.5448615550994873,
1.029060959815979,
0.22143258154392242,
-1.2385437488555908,
0.11694522947072983,
1.5288528203964233,
0.14395202696323395,
-0.37070828676223755,
0.5305697917938232,
0.4908613860607147,
-0.7185695171356201,
-0.01873665302991867,
-0.9823521971702576,
0.5041869878768921,
-0.3142734169960022,
-0.4646604359149933,
0.41272228956222534,
0.34492188692092896,
1.3319871425628662,
-0.16269053518772125,
0.25725916028022766,
1.1758034229278564,
-1.4413952827453613,
1.341623306274414,
-0.7165383696556091,
0.2360808253288269,
-2.3163180351257324,
1.3217164278030396,
-0.6679625511169434,
2.032066583633423,
-2.7218685150146484,
0.474315345287323,
-0.7589922547340393,
-0.4302402436733246,
0.3969947397708893,
-0.45222577452659607,
0.05922657996416092,
-0.22763392329216003,
-1.0287752151489258,
0.009110899642109871,
-0.6511075496673584,
0.5439632534980774,
1.107126235961914,
1.2712312936782837,
-0.9367209672927856,
-0.33306291699409485,
-1.6685229539871216,
-0.12591765820980072,
-0.6177127361297607,
0.30098915100097656,
-2.1461968421936035,
-0.3041914999485016,
-1.9660494327545166,
-2.229933261871338,
-1.270837664604187,
-0.8517351150512695,
1.1009184122085571,
0.17174018919467926,
-0.8422361612319946,
1.299389362335205,
-0.24906067550182343,
-1.811072826385498,
1.1570230722427368,
-2.0719621181488037
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF have you tried the suggestion I posted above? with removing split names from filenames and structuring files in folders?
>
>
> > even using the method that you wrote above absolutely nothing changes
>
> fyi - nothing changed because these two approaches are basically the same. it's just that when you pass your data directory as a dataset name (`load_dataset("my_folder_name"`), not as `data_dir` (`load_dataset("imagefolder", data_dir="my_folder_name"`), `datasets` infers what module to use (`imagefolder` in your case) automatically, by file extensions.
I'll try to try your method over the next few days, then I'll write it turned out | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 100 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> @WiNE-iNEFF have you tried the suggestion I posted above? with removing split names from filenames and structuring files in folders?
>
>
> > even using the method that you wrote above absolutely nothing changes
>
> fyi - nothing changed because these two approaches are basically the same. it's just that when you pass your data directory as a dataset name (`load_dataset("my_folder_name"`), not as `data_dir` (`load_dataset("imagefolder", data_dir="my_folder_name"`), `datasets` infers what module to use (`imagefolder` in your case) automatically, by file extensions.
I'll try to try your method over the next few days, then I'll write it turned out | [
-1.1752804517745972,
-1.0280251502990723,
-0.7607489228248596,
1.4272140264511108,
-0.16815824806690216,
-1.1874408721923828,
0.13043317198753357,
-1.1640989780426025,
1.6622055768966675,
-0.9599194526672363,
0.2791514992713928,
-1.6761213541030884,
-0.057786278426647186,
-0.5033612251281738,
-0.8055688142776489,
-0.9530287981033325,
-0.4822896718978882,
-0.8690573573112488,
1.0267127752304077,
2.4555602073669434,
1.2138452529907227,
-1.3251914978027344,
2.7140963077545166,
0.6057619452476501,
-0.17081831395626068,
-1.0972777605056763,
0.6146786212921143,
-0.04631299525499344,
-1.1304327249526978,
-0.4869389832019806,
-0.9547463655471802,
-0.09585186839103699,
-0.6191480755805969,
-0.523495078086853,
-0.02278236672282219,
0.3304140567779541,
-0.35817140340805054,
-0.3410584628582001,
-0.5289767980575562,
-0.8257908225059509,
0.5040423274040222,
-0.3897746205329895,
1.0142384767532349,
-0.42616507411003113,
1.8365254402160645,
-0.535086989402771,
0.4692955017089844,
0.7118080258369446,
1.2995245456695557,
0.2752974033355713,
-0.03761066496372223,
0.23498550057411194,
0.42314890027046204,
0.008543433621525764,
0.4141978919506073,
1.1816520690917969,
0.5216086506843567,
0.5975810885429382,
0.7891656756401062,
-2.226757049560547,
1.2052809000015259,
-0.9930999875068665,
0.24559880793094635,
1.2816554307937622,
-0.8229662179946899,
0.3464389145374298,
-1.8188366889953613,
-0.09642991423606873,
0.5872035622596741,
-2.2161600589752197,
0.24698366224765778,
-1.323852300643921,
-0.4621792137622833,
0.9402784705162048,
0.2981416583061218,
-1.2354451417922974,
0.11569066345691681,
-0.36278995871543884,
1.0275051593780518,
0.5072383284568787,
1.068777084350586,
-1.747151255607605,
0.019758256152272224,
-0.2723553478717804,
0.09375173598527908,
-1.2944128513336182,
-1.4693059921264648,
0.5768754482269287,
0.5610901713371277,
0.5951350927352905,
-0.08442183583974838,
1.1190149784088135,
-1.02348792552948,
0.7321310043334961,
-0.9548429846763611,
-1.5089654922485352,
-1.367423415184021,
-2.2526938915252686,
-2.342926502227783,
0.7142935991287231,
-0.574268639087677,
-0.57928067445755,
2.1394200325012207,
-1.085827350616455,
-1.7371625900268555,
1.1720073223114014,
0.16720819473266602,
0.12462233752012253,
2.3876640796661377,
0.2414219230413437,
-0.7309615015983582,
0.4352652132511139,
-0.7493380904197693,
0.8956920504570007,
-0.35217273235321045,
1.435925006866455,
0.4648902714252472,
-0.9341079592704773,
1.743802785873413,
-0.41441789269447327,
0.6200111508369446,
-0.5922066569328308,
-0.5706525444984436,
-0.843830406665802,
0.40396663546562195,
1.8767201900482178,
-0.2662401795387268,
1.6128711700439453,
-0.32834336161613464,
-1.6252833604812622,
-1.6507941484451294,
0.9788655042648315,
0.44456034898757935,
-0.8314335346221924,
0.14370276033878326,
-0.35842302441596985,
0.10178244858980179,
0.012302452698349953,
1.1579205989837646,
1.273740291595459,
0.7547870874404907,
-0.33923104405403137,
-0.923378586769104,
0.18958206474781036,
-0.10571972280740738,
-0.7113975882530212,
-1.7801017761230469,
-0.41640713810920715,
0.1422906219959259,
0.5918049812316895,
-1.1122955083847046,
1.7726316452026367,
0.9510936141014099,
2.004611015319824,
0.9370934367179871,
-0.2873111367225647,
1.428956151008606,
0.07111769169569016,
1.8053261041641235,
-0.3935551941394806,
0.5867815613746643,
-0.38810938596725464,
-1.1908354759216309,
0.8764798641204834,
-0.37406250834465027,
-1.9546936750411987,
-0.8151785135269165,
-0.8061380982398987,
-0.16732919216156006,
-0.803918182849884,
0.9220156669616699,
-0.2853412926197052,
-1.3701024055480957,
0.3533117175102234,
-0.6613646745681763,
0.09700465202331543,
-1.2192628383636475,
0.451174795627594,
0.6938464641571045,
-0.7306246161460876,
-0.026073092594742775,
-0.1877824366092682,
-1.2834303379058838,
-0.4818195402622223,
0.1357058733701706,
2.0099520683288574,
-0.7874879837036133,
0.8666723966598511,
1.0006861686706543,
-0.7676267027854919,
-0.052474379539489746,
0.25734299421310425,
-0.308294415473938,
0.7628539204597473,
-1.0272862911224365,
-0.3383810222148895,
1.2382781505584717,
-0.3259845972061157,
-0.5988591909408569,
1.4183260202407837,
0.6585702300071716,
-0.9988340139389038,
-0.1568460911512375,
-0.2406642884016037,
-0.7940152287483215,
0.055301032960414886,
-1.5040010213851929,
-0.07562975585460663,
0.37893596291542053,
-1.4485633373260498,
-0.4730183780193329,
-0.129720076918602,
1.3618676662445068,
-0.20338374376296997,
1.389100193977356,
-0.46088090538978577,
-0.2472309023141861,
-0.34790167212486267,
-0.5009612441062927,
0.2205168455839157,
-0.19962650537490845,
-0.6684989333152771,
0.14141768217086792,
-0.7677304148674011,
0.33607444167137146,
1.4172961711883545,
0.3509064316749573,
-0.01922566257417202,
0.41916313767433167,
1.1143447160720825,
0.3899230659008026,
0.005026599392294884,
-0.9041995406150818,
-1.483906865119934,
2.0458359718322754,
-1.4902116060256958,
2.0202698707580566,
0.6430757641792297,
-0.14404188096523285,
-1.7797718048095703,
-1.8390402793884277,
1.3770254850387573,
1.2503303289413452,
2.2912745475769043,
0.5184234976768494,
0.42211097478866577,
-0.8179095387458801,
-0.7732255458831787,
0.3657229244709015,
-1.0168533325195312,
-0.6652845740318298,
0.09086031466722488,
2.2562010288238525,
1.7062748670578003,
-0.5745667815208435,
-0.16868236660957336,
-0.9274597764015198,
1.3628127574920654,
-0.21450060606002808,
0.2764278054237366,
1.894524335861206,
-0.3817346394062042,
-1.1997917890548706,
1.2416232824325562,
-2.3510282039642334,
0.07870160043239594,
2.036975145339966,
0.29029515385627747,
0.1793607473373413,
-1.3363826274871826,
-0.6414953470230103,
-0.33982616662979126,
-0.43376675248146057,
-1.2491754293441772,
0.5571960210800171,
-0.2940845489501953,
-0.7563494443893433,
-1.4151238203048706,
0.19408605992794037,
-1.103495717048645,
-1.6495764255523682,
0.298414409160614,
1.9453246593475342,
2.167062997817993,
-0.8412442207336426,
1.5278469324111938,
-0.28420886397361755,
0.23737964034080505,
1.1951532363891602,
1.2081496715545654,
3.1148955821990967,
1.878377079963684,
-1.1996515989303589,
0.5002456307411194,
-0.13922037184238434,
-0.6125248074531555,
1.2399481534957886,
-1.1155632734298706,
1.2899069786071777,
-0.20756392180919647,
-1.0913410186767578,
-1.2207001447677612,
0.9123098850250244,
0.4210479259490967,
0.06899628043174744,
-0.5260044932365417,
1.2126587629318237,
0.07242539525032043,
1.3574037551879883,
0.516322910785675,
-0.36133384704589844,
0.6561616659164429,
-0.4222079813480377,
-0.5428973436355591,
1.5930542945861816,
0.23676282167434692,
-1.5038787126541138,
-2.3127331733703613,
-0.2585977017879486,
-0.8648982644081116,
0.11887992173433304,
-0.4977881610393524,
-1.0083435773849487,
1.6150611639022827,
0.3568955659866333,
-1.254554033279419,
-0.3569379448890686,
-0.36091485619544983,
-0.633518636226654,
2.752746820449829,
-1.3483542203903198,
-0.20889833569526672,
-0.9176952838897705,
-0.6754559874534607,
1.6857191324234009,
-1.2581422328948975,
-0.1480334848165512,
-1.0268950462341309,
-0.5280919075012207,
-1.4353747367858887,
-0.5869653820991516,
0.00031570810824632645,
-0.9411078095436096,
0.7679928541183472,
0.305829256772995,
-1.169292688369751,
-0.31271275877952576,
-0.8456687927246094,
0.8756080269813538,
-0.16414567828178406,
0.2703699469566345,
1.8415817022323608,
0.36406785249710083,
-0.38832417130470276,
0.7460179924964905,
1.2175304889678955,
0.618355393409729,
-0.6383357048034668,
0.13623923063278198,
-0.745313823223114,
0.3301496207714081,
-1.3466482162475586,
0.24021923542022705,
-2.9308643341064453,
0.7488146424293518,
-0.07061190158128738,
-0.17991779744625092,
-0.007338209543377161,
-1.3297383785247803,
1.0136386156082153,
2.57454252243042,
-1.2837119102478027,
0.4297545552253723,
0.3190823793411255,
1.2359697818756104,
-1.6413891315460205,
0.2878503203392029,
-0.416797012090683,
2.1533944606781006,
0.21985366940498352,
1.279890775680542,
-0.44988006353378296,
-2.347872495651245,
0.6183014512062073,
-1.2755354642868042,
-1.2501492500305176,
0.7424741387367249,
-0.9322731494903564,
0.03160291910171509,
-1.392141580581665,
-0.14361684024333954,
-0.9385947585105896,
-1.1898045539855957,
0.7527469992637634,
0.1621980518102646,
0.4200286865234375,
-0.5235835313796997,
0.3573733866214752,
-2.2015366554260254,
-1.3715263605117798,
-0.2747902572154999,
-0.9822467565536499,
0.4775903820991516,
-0.3348224461078644,
0.739076554775238,
-0.2760903537273407,
0.13486909866333008,
0.4915856420993805,
1.4774999618530273,
3.4431450366973877,
0.2210947871208191,
0.3280138075351715,
-0.16648855805397034,
-0.8890590071678162,
1.576560378074646,
0.8702237010002136,
-0.06837611645460129,
-0.44999924302101135,
-1.0345500707626343,
1.2107491493225098,
1.940724492073059,
0.9060190916061401,
0.02130390889942646,
-0.738071858882904,
-0.5490847229957581,
-0.15217632055282593,
0.11873974651098251,
0.4789738953113556,
0.9024977087974548,
0.12690702080726624,
0.07920582592487335,
1.3441050052642822,
1.1887933015823364,
-0.3864361643791199,
0.2776168882846832,
-0.8127208352088928,
-0.4923621118068695,
0.5577730536460876,
0.25750553607940674,
-0.005478989332914352,
0.35389286279678345,
-0.8610056638717651,
-0.2935665249824524,
-0.3852020800113678,
-0.8310310244560242,
-0.6953331828117371,
-0.4353811740875244,
-0.309917688369751,
1.5852502584457397,
0.09679123014211655,
-0.5451084971427917,
0.001316305249929428,
-0.7517424821853638,
-0.12563630938529968,
-1.1693867444992065,
0.17758627235889435,
-0.06444086134433746,
-0.1594592183828354,
-0.0620272234082222,
1.7354153394699097,
-0.8907777070999146,
-2.0657155513763428,
0.30234527587890625,
0.37408024072647095,
-0.3145190477371216,
0.1561625897884369,
1.6225085258483887,
0.4506170451641083,
1.4899380207061768,
1.3555818796157837,
1.0238934755325317,
-0.6453847885131836,
-1.168716311454773,
0.795825183391571,
0.8387138247489929,
-1.4300154447555542,
0.866360604763031,
0.0283320564776659,
-0.4998740553855896,
0.5987891554832458,
1.1568682193756104,
0.5184222459793091,
-1.9060002565383911,
0.831453263759613,
-0.9475894570350647,
0.7328680753707886,
0.6779717206954956,
0.7302705645561218,
0.2605341076850891,
0.9610158801078796,
-1.0335482358932495,
-1.1961137056350708,
-0.7620682120323181,
-0.7287318110466003,
1.9256497621536255,
-0.3271214962005615,
0.5666114091873169,
-0.2782824635505676,
-1.1895294189453125,
-0.048652686178684235,
0.6827811002731323,
0.2799026072025299,
-0.4135347902774811,
0.8444461822509766,
-0.669558584690094,
-1.1100040674209595,
-1.440273642539978,
-0.31301403045654297,
-1.1410423517227173,
-1.0284454822540283,
1.0331307649612427,
0.776940107345581,
0.2616967260837555,
1.8805919885635376,
0.6402945518493652,
0.28536558151245117,
-2.5546915531158447,
0.9201359748840332,
0.1948087066411972,
-0.10605788230895996,
0.8998989462852478,
0.2874470353126526,
1.0903863906860352,
-0.07354652136564255,
0.5759174823760986,
-2.399256706237793,
2.2469592094421387,
-0.26544567942619324,
0.7121307253837585,
0.003814220428466797,
-0.2706482708454132,
1.0980262756347656,
0.5905122756958008,
0.5362573862075806,
-1.1059015989303589,
0.7324625849723816,
-0.5326655507087708,
1.1293561458587646,
0.9613776206970215,
-0.8935838341712952,
0.14488272368907928,
1.4390791654586792,
0.5356023907661438,
-0.5491998195648193,
-0.9243471026420593,
-0.926891028881073,
0.9397808313369751,
1.65147864818573,
-0.06358219683170319,
-0.04682692885398865,
0.8026990294456482,
0.7267902493476868,
-1.2526881694793701,
0.07589453458786011,
-0.689749538898468,
-0.7975919842720032,
1.6961219310760498,
2.095285415649414,
-0.034695982933044434,
-0.17028558254241943,
-0.675851047039032,
-1.2471107244491577,
0.8981755375862122,
0.01349385641515255,
0.11033613979816437,
0.5703189373016357,
-0.7294898629188538,
1.0459665060043335,
0.8880285024642944,
0.8859902620315552,
0.22827579081058502,
0.29006707668304443,
0.533677875995636,
-0.2787874937057495,
-1.0126228332519531,
-0.17380249500274658,
-1.1027194261550903,
-2.524494171142578,
0.5166053175926208,
-0.3111199736595154,
-1.3754446506500244,
-0.012618333101272583,
-0.9424571990966797,
0.9289698004722595,
-0.5551046133041382,
-1.047368049621582,
-1.5919913053512573,
0.11955169588327408,
-0.009895127266645432,
0.9362773299217224,
-1.5970231294631958,
-0.13976313173770905,
1.3210614919662476,
0.8999671339988708,
-0.703340470790863,
1.065189003944397,
0.24990646541118622,
1.0784245729446411,
0.8396177291870117,
-0.5128529667854309,
0.6322745084762573,
-0.038119520992040634,
-1.365342617034912,
0.4587637484073639,
1.1738009452819824,
0.17851953208446503,
1.4456983804702759,
-0.5302192568778992,
0.03976435959339142,
0.37308815121650696,
-0.5749973058700562,
-0.5868993401527405,
-0.5251033306121826,
0.65635085105896,
0.12302004545927048,
-0.8555281162261963,
0.0015662303194403648,
-0.1053047925233841,
-0.2483728677034378,
0.2623317539691925,
-1.554864525794983,
-0.1949014514684677,
-0.4275471866130829,
-0.5017496347427368,
-1.2053881883621216,
-0.07768239825963974,
1.5033602714538574,
-0.7717264294624329,
-0.09075526148080826,
0.423066645860672,
0.3832341730594635,
0.5503605604171753,
0.5634192824363708,
-0.6809112429618835,
-0.25643831491470337,
-0.39573508501052856,
-0.31370770931243896,
0.2855420410633087,
1.27115797996521,
-0.10831388086080551,
-0.9150837063789368,
0.6690500974655151,
-0.2954699695110321,
0.004360850900411606,
1.878121256828308,
0.07096321135759354,
-0.7271510362625122,
0.2902257740497589,
-0.7003266215324402,
1.8462495803833008,
1.723881483078003,
1.311539888381958,
-0.08310301601886749,
-0.9034832715988159,
0.5759533643722534,
-0.3319997489452362,
-0.4074699878692627,
0.8813188076019287,
0.4459179937839508,
-0.18424616754055023,
-1.5086802244186401,
0.8076531887054443,
1.2088011503219604,
-0.8704403638839722,
-0.7210789322853088,
0.09866029769182205,
-0.7607680559158325,
1.0046907663345337,
0.6723509430885315,
0.5028398036956787,
0.2923145294189453,
1.7341091632843018,
0.8235088586807251,
-0.5118529200553894,
0.48933669924736023,
0.6033279895782471,
-0.1591927409172058,
-2.0128605365753174,
-1.2161462306976318,
0.3700217008590698,
-0.47157418727874756,
-1.5242750644683838,
1.4556018114089966,
-1.1313687562942505,
-1.0215425491333008,
0.5374674797058105,
0.07413855195045471,
1.3582508563995361,
0.35801422595977783,
1.6204872131347656,
2.0467233657836914,
0.8042914271354675,
0.433459997177124,
1.2658822536468506,
-0.13295598328113556,
-0.4113152027130127,
1.800377607345581,
-0.40242117643356323,
0.4325631856918335,
1.1853646039962769,
-0.3594335615634918,
-1.134742259979248,
-0.8688960671424866,
-1.1856542825698853,
-0.6545393466949463,
1.0847336053848267,
0.1466449648141861,
-1.1664901971817017,
0.21175342798233032,
1.675200343132019,
0.058044373989105225,
-0.3919806480407715,
0.5915237665176392,
0.3702004551887512,
-0.7153292298316956,
0.0028942739591002464,
-1.0291742086410522,
0.5450894236564636,
-0.20497527718544006,
-0.4020189642906189,
0.39838993549346924,
0.4397179186344147,
1.387276530265808,
-0.12386652082204819,
0.16265448927879333,
1.1838791370391846,
-1.389343023300171,
1.3754957914352417,
-0.6718043684959412,
0.2072177678346634,
-2.289747476577759,
1.3556339740753174,
-0.681563138961792,
2.0103893280029297,
-2.6685993671417236,
0.37100842595100403,
-0.6390349268913269,
-0.5253767967224121,
0.3335442543029785,
-0.40497398376464844,
0.13518548011779785,
-0.19467908143997192,
-1.0525094270706177,
-0.027753693982958794,
-0.6385394930839539,
0.684137761592865,
1.0776039361953735,
1.3965036869049072,
-1.087238073348999,
-0.39295855164527893,
-1.6712530851364136,
-0.11667139083147049,
-0.6448838114738464,
0.2822844982147217,
-2.054227352142334,
-0.27047431468963623,
-1.9829567670822144,
-2.307271957397461,
-1.2946419715881348,
-0.7937599420547485,
1.072934865951538,
0.06020188331604004,
-0.8868493437767029,
1.2589595317840576,
-0.37941303849220276,
-1.8712668418884277,
1.119701623916626,
-2.0990231037139893
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF have you tried the suggestion I posted above? with removing split names from filenames and structuring files in folders?
>
>
> > even using the method that you wrote above absolutely nothing changes
>
> fyi - nothing changed because these two approaches are basically the same. it's just that when you pass your data directory as a dataset name (`load_dataset("my_folder_name"`), not as `data_dir` (`load_dataset("imagefolder", data_dir="my_folder_name"`), `datasets` infers what module to use (`imagefolder` in your case) automatically, by file extensions.
I tried creating a `train` folder and put my image folders in it. As a result, all 18,000 images were loaded. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 104 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
> @WiNE-iNEFF have you tried the suggestion I posted above? with removing split names from filenames and structuring files in folders?
>
>
> > even using the method that you wrote above absolutely nothing changes
>
> fyi - nothing changed because these two approaches are basically the same. it's just that when you pass your data directory as a dataset name (`load_dataset("my_folder_name"`), not as `data_dir` (`load_dataset("imagefolder", data_dir="my_folder_name"`), `datasets` infers what module to use (`imagefolder` in your case) automatically, by file extensions.
I tried creating a `train` folder and put my image folders in it. As a result, all 18,000 images were loaded. | [
-1.1830576658248901,
-1.0046110153198242,
-0.7478684186935425,
1.4172991514205933,
-0.17330297827720642,
-1.211991310119629,
0.13116858899593353,
-1.1868011951446533,
1.708343505859375,
-0.9793184995651245,
0.2828378975391388,
-1.6686041355133057,
-0.04922851547598839,
-0.5128047466278076,
-0.8321859836578369,
-0.9657054543495178,
-0.4736732244491577,
-0.8665735125541687,
1.0201382637023926,
2.4482216835021973,
1.2458350658416748,
-1.321030616760254,
2.6953587532043457,
0.624929666519165,
-0.16862978041172028,
-1.063266396522522,
0.6323695182800293,
-0.053713224828243256,
-1.1565935611724854,
-0.487221896648407,
-0.9750190377235413,
-0.10116871446371078,
-0.5925620794296265,
-0.548707902431488,
-0.03474726527929306,
0.31992942094802856,
-0.3533267676830292,
-0.34532028436660767,
-0.5169025659561157,
-0.8491798639297485,
0.4749073088169098,
-0.37041032314300537,
1.0073955059051514,
-0.4578015208244324,
1.8449821472167969,
-0.5590921640396118,
0.4683230221271515,
0.7019587755203247,
1.2881168127059937,
0.22202542424201965,
-0.028568362817168236,
0.24040989577770233,
0.4184609651565552,
-0.00808373000472784,
0.41683846712112427,
1.1885358095169067,
0.5024394989013672,
0.591243326663971,
0.809095025062561,
-2.21834135055542,
1.219741940498352,
-1.0068645477294922,
0.23730376362800598,
1.2566667795181274,
-0.8286247253417969,
0.32528021931648254,
-1.8140562772750854,
-0.09798137098550797,
0.5782844424247742,
-2.2003326416015625,
0.2461700439453125,
-1.3140796422958374,
-0.4910541772842407,
0.9288498759269714,
0.26658350229263306,
-1.2094464302062988,
0.12972600758075714,
-0.3691406846046448,
1.0269094705581665,
0.5290247201919556,
1.0816307067871094,
-1.7747139930725098,
-0.0079649668186903,
-0.26181817054748535,
0.10044655948877335,
-1.3125839233398438,
-1.4591984748840332,
0.5804973244667053,
0.5950953960418701,
0.6021535992622375,
-0.11083055287599564,
1.1276205778121948,
-0.9864568114280701,
0.7302427887916565,
-0.971781849861145,
-1.5096819400787354,
-1.3969155550003052,
-2.2229223251342773,
-2.344175338745117,
0.709053099155426,
-0.6051709651947021,
-0.5655379295349121,
2.126254081726074,
-1.0551632642745972,
-1.732069492340088,
1.169000267982483,
0.16470545530319214,
0.10218269377946854,
2.403886318206787,
0.2634178102016449,
-0.7141702175140381,
0.4359110891819,
-0.7418527603149414,
0.8586868047714233,
-0.3536044955253601,
1.4170838594436646,
0.45327016711235046,
-0.9402238726615906,
1.7362502813339233,
-0.4627475440502167,
0.6532841920852661,
-0.6054981350898743,
-0.5446515679359436,
-0.8626957535743713,
0.4141782522201538,
1.8582160472869873,
-0.27481988072395325,
1.591353416442871,
-0.315260648727417,
-1.6153498888015747,
-1.6665430068969727,
0.9706821441650391,
0.4460095465183258,
-0.7988736629486084,
0.1306166797876358,
-0.3679061233997345,
0.07318499684333801,
0.029353786259889603,
1.1267471313476562,
1.242702603340149,
0.802731990814209,
-0.3249181807041168,
-0.8955154418945312,
0.22513049840927124,
-0.12029434740543365,
-0.7135704755783081,
-1.7915445566177368,
-0.4332254230976105,
0.13055795431137085,
0.582595944404602,
-1.110225796699524,
1.8016767501831055,
0.9467557668685913,
2.007861614227295,
0.9257310032844543,
-0.28349021077156067,
1.4265192747116089,
0.07897907495498657,
1.8528612852096558,
-0.3724696934223175,
0.61253821849823,
-0.4180870056152344,
-1.1862571239471436,
0.894235372543335,
-0.3769022822380066,
-1.9460028409957886,
-0.8274657726287842,
-0.8092992901802063,
-0.1678326278924942,
-0.7935911417007446,
0.9117929935455322,
-0.2334749698638916,
-1.377156376838684,
0.32932859659194946,
-0.6352795362472534,
0.09399775415658951,
-1.21616530418396,
0.4461556375026703,
0.6795570254325867,
-0.728391170501709,
-0.013220209628343582,
-0.19144314527511597,
-1.308393955230713,
-0.48356008529663086,
0.12130796909332275,
2.005998134613037,
-0.801522970199585,
0.8721854090690613,
1.0134809017181396,
-0.794937789440155,
-0.056590355932712555,
0.2658812701702118,
-0.2928966283798218,
0.7335635423660278,
-1.0265902280807495,
-0.31948480010032654,
1.2672483921051025,
-0.29609519243240356,
-0.6077181696891785,
1.4159139394760132,
0.6442557573318481,
-1.0084764957427979,
-0.1370069533586502,
-0.27376314997673035,
-0.7602232098579407,
0.034783735871315,
-1.4932599067687988,
-0.03171037510037422,
0.3625929653644562,
-1.4130866527557373,
-0.46782389283180237,
-0.14453166723251343,
1.3535873889923096,
-0.22891880571842194,
1.4009945392608643,
-0.43386003375053406,
-0.27228960394859314,
-0.3568026125431061,
-0.4887692630290985,
0.19732193648815155,
-0.18230420351028442,
-0.6618722081184387,
0.1552824229001999,
-0.7832877039909363,
0.30311545729637146,
1.4351533651351929,
0.38026103377342224,
0.015622559934854507,
0.4068341553211212,
1.1036524772644043,
0.3888181746006012,
-0.009132775478065014,
-0.903046190738678,
-1.4735581874847412,
2.064378261566162,
-1.47801673412323,
2.002833366394043,
0.6061999797821045,
-0.12162228673696518,
-1.8103827238082886,
-1.8612534999847412,
1.3707135915756226,
1.2753535509109497,
2.321413040161133,
0.5401119589805603,
0.4045715034008026,
-0.8124260902404785,
-0.8037539124488831,
0.3955056965351105,
-1.0367616415023804,
-0.655029833316803,
0.11909425258636475,
2.2716598510742188,
1.7129243612289429,
-0.5655999183654785,
-0.13739114999771118,
-0.9209351539611816,
1.3961437940597534,
-0.20292901992797852,
0.2800159454345703,
1.8844256401062012,
-0.40376710891723633,
-1.1973826885223389,
1.253544807434082,
-2.3393545150756836,
0.07933556288480759,
2.0086421966552734,
0.29494228959083557,
0.17896819114685059,
-1.3634302616119385,
-0.6191433668136597,
-0.33990898728370667,
-0.45357924699783325,
-1.252244472503662,
0.5615401864051819,
-0.2857069671154022,
-0.7619079947471619,
-1.4203616380691528,
0.19203069806098938,
-1.088016390800476,
-1.645057201385498,
0.27181848883628845,
1.9268546104431152,
2.1339778900146484,
-0.849816083908081,
1.5368911027908325,
-0.2803664803504944,
0.21188950538635254,
1.1846174001693726,
1.2184678316116333,
3.118173122406006,
1.8780834674835205,
-1.2048312425613403,
0.5156205892562866,
-0.15746253728866577,
-0.600365936756134,
1.2178548574447632,
-1.119057059288025,
1.301562786102295,
-0.22003035247325897,
-1.0948625802993774,
-1.2381764650344849,
0.8934783339500427,
0.40980958938598633,
0.09717807918787003,
-0.5262011289596558,
1.2353198528289795,
0.07245504856109619,
1.3768583536148071,
0.510378897190094,
-0.353511780500412,
0.667256772518158,
-0.42982587218284607,
-0.5589277744293213,
1.592919111251831,
0.2758271396160126,
-1.4910019636154175,
-2.2903356552124023,
-0.25174933671951294,
-0.8920658826828003,
0.08725631982088089,
-0.47691208124160767,
-1.0054301023483276,
1.631687879562378,
0.3533933162689209,
-1.275581955909729,
-0.33716365694999695,
-0.32108116149902344,
-0.6257174015045166,
2.7750978469848633,
-1.3400403261184692,
-0.20147240161895752,
-0.9179325103759766,
-0.6671667695045471,
1.6822210550308228,
-1.2447361946105957,
-0.1531093418598175,
-1.0283313989639282,
-0.5035380125045776,
-1.4337950944900513,
-0.6085022687911987,
0.005485471338033676,
-0.9283880591392517,
0.7733333110809326,
0.29166966676712036,
-1.1837563514709473,
-0.3386300206184387,
-0.8371995687484741,
0.8765393495559692,
-0.15310005843639374,
0.2629658877849579,
1.8612544536590576,
0.383232057094574,
-0.3671848475933075,
0.7454923987388611,
1.2267929315567017,
0.6106346845626831,
-0.6378301978111267,
0.15458142757415771,
-0.7841088175773621,
0.3696427345275879,
-1.334086537361145,
0.22521357238292694,
-2.9179115295410156,
0.7569379210472107,
-0.07251103967428207,
-0.18978345394134521,
-0.027259977534413338,
-1.352232813835144,
1.0159356594085693,
2.632077217102051,
-1.2788305282592773,
0.43588367104530334,
0.31967300176620483,
1.2337616682052612,
-1.612194538116455,
0.27187421917915344,
-0.41485917568206787,
2.1445822715759277,
0.2237652838230133,
1.2815579175949097,
-0.4693332016468048,
-2.320188045501709,
0.5939298272132874,
-1.284229040145874,
-1.2226001024246216,
0.7550262808799744,
-0.9011580944061279,
0.03000470995903015,
-1.385465145111084,
-0.11026487499475479,
-0.9261753559112549,
-1.1900442838668823,
0.7309001684188843,
0.16106660664081573,
0.4556970000267029,
-0.5113380551338196,
0.3819599747657776,
-2.200653076171875,
-1.3731601238250732,
-0.2853375971317291,
-0.98436039686203,
0.48138001561164856,
-0.2921270728111267,
0.7371011972427368,
-0.24054940044879913,
0.11953110992908478,
0.5297041535377502,
1.4707096815109253,
3.4486637115478516,
0.22572116553783417,
0.3158508241176605,
-0.1389162540435791,
-0.8963504433631897,
1.5507636070251465,
0.869605541229248,
-0.09328927099704742,
-0.40970608592033386,
-1.0237902402877808,
1.2132649421691895,
1.9596374034881592,
0.9316136837005615,
-0.007310678716748953,
-0.761762261390686,
-0.5914450883865356,
-0.1309516727924347,
0.08094027638435364,
0.47210556268692017,
0.9071829915046692,
0.15299758315086365,
0.10264338552951813,
1.3869991302490234,
1.2040704488754272,
-0.41098055243492126,
0.2920856475830078,
-0.8326687812805176,
-0.4895680546760559,
0.5476197600364685,
0.2839793562889099,
0.0367949940264225,
0.3688373565673828,
-0.861794114112854,
-0.3096066117286682,
-0.38659945130348206,
-0.8181406855583191,
-0.6915762424468994,
-0.45175594091415405,
-0.30903130769729614,
1.5815377235412598,
0.0898028165102005,
-0.5376963019371033,
0.02105541154742241,
-0.7664685249328613,
-0.12506414949893951,
-1.1626564264297485,
0.2034011036157608,
-0.05322509631514549,
-0.15637625753879547,
-0.0787966400384903,
1.7363117933273315,
-0.9160783886909485,
-2.0335450172424316,
0.3128173351287842,
0.35489538311958313,
-0.32354700565338135,
0.17405487596988678,
1.6208051443099976,
0.4913182258605957,
1.490143895149231,
1.3562312126159668,
1.0076459646224976,
-0.6741407513618469,
-1.1938823461532593,
0.8057671189308167,
0.8232224583625793,
-1.4069372415542603,
0.8693844079971313,
0.02923624962568283,
-0.48437419533729553,
0.5947526693344116,
1.1220412254333496,
0.4731130599975586,
-1.9220863580703735,
0.7983567714691162,
-0.9361505508422852,
0.713880181312561,
0.6694201827049255,
0.7524771094322205,
0.2553505301475525,
0.9454933404922485,
-1.0436079502105713,
-1.1823111772537231,
-0.7533512711524963,
-0.7352278828620911,
1.9057899713516235,
-0.3292687237262726,
0.5722202062606812,
-0.30284544825553894,
-1.2482186555862427,
-0.05849260091781616,
0.6951677203178406,
0.28859880566596985,
-0.4218393862247467,
0.8258710503578186,
-0.6746726632118225,
-1.1040961742401123,
-1.4258712530136108,
-0.343234658241272,
-1.183945655822754,
-1.016196370124817,
1.045365810394287,
0.7882978916168213,
0.304587185382843,
1.8938558101654053,
0.6528945565223694,
0.28591015934944153,
-2.5572338104248047,
0.926077663898468,
0.1918092966079712,
-0.09642963856458664,
0.8643553853034973,
0.30931487679481506,
1.0399101972579956,
-0.10760786384344101,
0.6010932326316833,
-2.3937673568725586,
2.250821590423584,
-0.2711528539657593,
0.7070964574813843,
0.038243215531110764,
-0.2837667763233185,
1.0745255947113037,
0.6141411066055298,
0.525517463684082,
-1.1489957571029663,
0.6807723045349121,
-0.5301215052604675,
1.1259517669677734,
0.9214353561401367,
-0.8970171809196472,
0.16743579506874084,
1.4251198768615723,
0.5096189975738525,
-0.5253651142120361,
-0.9287245273590088,
-0.9284480810165405,
0.9900838732719421,
1.6063194274902344,
-0.09359495341777802,
-0.05529949441552162,
0.8182709813117981,
0.7108134031295776,
-1.2738792896270752,
0.05452515929937363,
-0.6959808468818665,
-0.7568108439445496,
1.6822482347488403,
2.0941224098205566,
-0.0342276394367218,
-0.14290791749954224,
-0.6880912184715271,
-1.2422820329666138,
0.9306153655052185,
0.03209403529763222,
0.1086849570274353,
0.5378058552742004,
-0.7038072943687439,
1.0445196628570557,
0.9133354425430298,
0.8817333579063416,
0.24562987685203552,
0.3178572356700897,
0.5129705667495728,
-0.3037422299385071,
-1.0109807252883911,
-0.17836077511310577,
-1.1025991439819336,
-2.528862953186035,
0.5029007792472839,
-0.30335840582847595,
-1.3738902807235718,
-0.005203649401664734,
-0.9410684704780579,
0.9174465537071228,
-0.5454698801040649,
-1.0068461894989014,
-1.570969581604004,
0.150965616106987,
-0.02919652685523033,
0.9252763986587524,
-1.6189393997192383,
-0.14195790886878967,
1.3218562602996826,
0.9054011106491089,
-0.7370167374610901,
1.0783030986785889,
0.24714192748069763,
1.0770293474197388,
0.8635128140449524,
-0.5000661015510559,
0.6471610069274902,
-0.010289139114320278,
-1.3648446798324585,
0.42008113861083984,
1.15984308719635,
0.18099345266819,
1.4230059385299683,
-0.5387066602706909,
0.07076963782310486,
0.35377204418182373,
-0.5771828293800354,
-0.6002649068832397,
-0.5196475982666016,
0.6384698152542114,
0.13792504370212555,
-0.8746816515922546,
-0.0016711591742932796,
-0.0864766463637352,
-0.2400209903717041,
0.2880834639072418,
-1.5282800197601318,
-0.19329263269901276,
-0.36321911215782166,
-0.46323367953300476,
-1.1959456205368042,
-0.08921022713184357,
1.5062010288238525,
-0.7490183115005493,
-0.07580775022506714,
0.40825706720352173,
0.37499794363975525,
0.5640766024589539,
0.5737703442573547,
-0.6876007318496704,
-0.26479318737983704,
-0.4151293635368347,
-0.3185368478298187,
0.3008624315261841,
1.2816776037216187,
-0.11410935968160629,
-0.8886924982070923,
0.6970484852790833,
-0.3126206398010254,
0.0014090193435549736,
1.8962866067886353,
0.09299745410680771,
-0.7293949723243713,
0.2681730389595032,
-0.7148532271385193,
1.8336765766143799,
1.7681784629821777,
1.2994365692138672,
-0.053284138441085815,
-0.8836150765419006,
0.556941568851471,
-0.3547305464744568,
-0.3916601836681366,
0.8865106701850891,
0.41998690366744995,
-0.2125309556722641,
-1.5060651302337646,
0.7601761221885681,
1.2359336614608765,
-0.8559686541557312,
-0.7067328095436096,
0.07678081095218658,
-0.7703422904014587,
1.0047645568847656,
0.6995663642883301,
0.512862503528595,
0.3015037178993225,
1.7175434827804565,
0.8458569645881653,
-0.4976542890071869,
0.5027574896812439,
0.6037229299545288,
-0.13883854448795319,
-2.021641254425049,
-1.2222859859466553,
0.3894042372703552,
-0.501724362373352,
-1.5180789232254028,
1.4272810220718384,
-1.144611120223999,
-1.0171806812286377,
0.5377854108810425,
0.07979709655046463,
1.365687370300293,
0.32915830612182617,
1.586902379989624,
2.0379018783569336,
0.8073497414588928,
0.386769562959671,
1.2584565877914429,
-0.13908877968788147,
-0.4238327741622925,
1.8035597801208496,
-0.4214206337928772,
0.41636285185813904,
1.1593645811080933,
-0.3497294485569,
-1.122395634651184,
-0.8985117673873901,
-1.2128779888153076,
-0.6549844145774841,
1.0978243350982666,
0.12962670624256134,
-1.1992192268371582,
0.18821187317371368,
1.6940200328826904,
0.03973305597901344,
-0.40473952889442444,
0.5892767906188965,
0.3754707872867584,
-0.7416293025016785,
0.023518916219472885,
-1.0193742513656616,
0.5302631258964539,
-0.17016738653182983,
-0.40080222487449646,
0.42056170105934143,
0.43932008743286133,
1.3716849088668823,
-0.11838868260383606,
0.1584126055240631,
1.1624836921691895,
-1.3828210830688477,
1.3737471103668213,
-0.6850876808166504,
0.1924152672290802,
-2.292487144470215,
1.355688214302063,
-0.6752485036849976,
1.970637321472168,
-2.6932387351989746,
0.3817455768585205,
-0.6082757115364075,
-0.5515000820159912,
0.3286614716053009,
-0.4192294478416443,
0.15058526396751404,
-0.18432815372943878,
-1.0095634460449219,
-0.018378423526883125,
-0.6495046019554138,
0.673939049243927,
1.0459049940109253,
1.400119662284851,
-1.0778220891952515,
-0.43093961477279663,
-1.6914830207824707,
-0.09925869852304459,
-0.6679494976997375,
0.3077390193939209,
-2.036370277404785,
-0.22729307413101196,
-1.9412977695465088,
-2.309281826019287,
-1.3403956890106201,
-0.8142173886299133,
1.0666249990463257,
0.06696249544620514,
-0.8785518407821655,
1.2475454807281494,
-0.3634428083896637,
-1.9002891778945923,
1.1251935958862305,
-2.0995841026306152
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF great! So to explain what happened according to my assumptions:
When you use a standard packaged loader (like `imagefolder`, `csv`, `jsonl`, and so on) and load your data like `load_dataset("my_folder_name")` or `load_dataset("imagefolder", data_dir="my_folder_name"`, the library searches for patterns to divide files into splits. This is described a bit in [this doc](https://huggingface.co/docs/datasets/v2.10.0/en/repository_structure#splits-and-file-names). And the order to search for patterns is the following:
1. first it checks for [pattern like `data/<split_name>-xxxxx-of-xxxxx`](https://huggingface.co/docs/datasets/v2.10.0/en/repository_structure#custom-split-names) (which allows to pass custom split names)
2. then for directories named as splits (if you have directories named `train`, `test` etc.)
3. then for [splits in filenames](https://huggingface.co/docs/datasets/v2.10.0/en/repository_structure#splits-and-file-names) (like if you have files named `train-image.jpg`, `test_0.jpg`, ...)
4. then if no pattern was found, it treats all files as belonging to a single `train` split
The code is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/data_files.py#L215).
So I assume that in your case, since you didn't have directories for splits (pattern 2), some files that included split keywords (pattern 3) were included and others were ignored as not matching the pattern. And when you added `train` directory, the pattern for directories (pattern 2) was triggered first and everything worked as expected. Everything worked in your previous cases probably because you didn't have split names keywords in filenames, so all the files ended up being a part of a single train split (pattern 4).
Another way to mitigate this apart from structuring your data according to the patterns is to explicitly state with files belong to which splits by passing them with `data_files` parameter:
```python
load_dataset("my_folder_name", data_files={"train": "**"}) # to tell that all files should be included
```
Now I see that this order should be explained in documentation and also referenced in sections for packaged modules like `imagefolder`, thank you for pointing this out.
| I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 287 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
@WiNE-iNEFF great! So to explain what happened according to my assumptions:
When you use a standard packaged loader (like `imagefolder`, `csv`, `jsonl`, and so on) and load your data like `load_dataset("my_folder_name")` or `load_dataset("imagefolder", data_dir="my_folder_name"`, the library searches for patterns to divide files into splits. This is described a bit in [this doc](https://huggingface.co/docs/datasets/v2.10.0/en/repository_structure#splits-and-file-names). And the order to search for patterns is the following:
1. first it checks for [pattern like `data/<split_name>-xxxxx-of-xxxxx`](https://huggingface.co/docs/datasets/v2.10.0/en/repository_structure#custom-split-names) (which allows to pass custom split names)
2. then for directories named as splits (if you have directories named `train`, `test` etc.)
3. then for [splits in filenames](https://huggingface.co/docs/datasets/v2.10.0/en/repository_structure#splits-and-file-names) (like if you have files named `train-image.jpg`, `test_0.jpg`, ...)
4. then if no pattern was found, it treats all files as belonging to a single `train` split
The code is [here](https://github.com/huggingface/datasets/blob/main/src/datasets/data_files.py#L215).
So I assume that in your case, since you didn't have directories for splits (pattern 2), some files that included split keywords (pattern 3) were included and others were ignored as not matching the pattern. And when you added `train` directory, the pattern for directories (pattern 2) was triggered first and everything worked as expected. Everything worked in your previous cases probably because you didn't have split names keywords in filenames, so all the files ended up being a part of a single train split (pattern 4).
Another way to mitigate this apart from structuring your data according to the patterns is to explicitly state with files belong to which splits by passing them with `data_files` parameter:
```python
load_dataset("my_folder_name", data_files={"train": "**"}) # to tell that all files should be included
```
Now I see that this order should be explained in documentation and also referenced in sections for packaged modules like `imagefolder`, thank you for pointing this out.
| [
-1.1636817455291748,
-0.9386833906173706,
-0.6888659000396729,
1.517526626586914,
-0.04435771331191063,
-1.2802530527114868,
0.11112862825393677,
-0.9745071530342102,
1.729108452796936,
-0.8276323080062866,
0.31986185908317566,
-1.67139732837677,
-0.007805363275110722,
-0.532904863357544,
-0.7716434597969055,
-0.8805225491523743,
-0.47418010234832764,
-0.8285109996795654,
1.0402631759643555,
2.477358102798462,
1.2648371458053589,
-1.3353437185287476,
2.7304019927978516,
0.6744536757469177,
-0.21644197404384613,
-1.0607067346572876,
0.5596039295196533,
-0.032369136810302734,
-1.2597286701202393,
-0.4203563630580902,
-0.91295325756073,
-0.036681901663541794,
-0.5735008120536804,
-0.5583504438400269,
0.05392272397875786,
0.4747259318828583,
-0.25711706280708313,
-0.3853076100349426,
-0.5923187136650085,
-0.7299532890319824,
0.4875565767288208,
-0.37952926754951477,
0.9429643154144287,
-0.35197699069976807,
1.8100627660751343,
-0.5806477665901184,
0.45667362213134766,
0.6573575139045715,
1.3173938989639282,
0.18455743789672852,
0.009237217716872692,
0.2060791701078415,
0.42591753602027893,
0.04004157334566116,
0.49984312057495117,
1.3069326877593994,
0.6397939920425415,
0.5732424855232239,
0.7547646164894104,
-2.239980459213257,
1.304670810699463,
-0.9601042866706848,
0.23475317656993866,
1.290050983428955,
-0.9120386242866516,
0.3189411461353302,
-1.841771125793457,
-0.05827641859650612,
0.5299311280250549,
-2.256600856781006,
0.18529421091079712,
-1.3081802129745483,
-0.4718760848045349,
1.014795184135437,
0.3232288956642151,
-1.2198818922042847,
0.19338931143283844,
-0.42114296555519104,
0.9945246577262878,
0.48489731550216675,
1.1370328664779663,
-1.6845606565475464,
-0.017268594354391098,
-0.25856831669807434,
0.12163736671209335,
-1.2436541318893433,
-1.6015863418579102,
0.5464867353439331,
0.6713322401046753,
0.6789843440055847,
-0.15130756795406342,
1.018007516860962,
-1.0310626029968262,
0.7550951838493347,
-0.9687029123306274,
-1.700931191444397,
-1.3850418329238892,
-2.251901149749756,
-2.3453924655914307,
0.7346516847610474,
-0.5174070000648499,
-0.5189136862754822,
2.036485195159912,
-1.0034494400024414,
-1.7799413204193115,
1.0725486278533936,
0.27100038528442383,
0.05608591064810753,
2.349331855773926,
0.24860379099845886,
-0.7590731978416443,
0.4165310561656952,
-0.729555606842041,
0.8445538282394409,
-0.33271026611328125,
1.336400032043457,
0.455092191696167,
-1.0103124380111694,
1.6424638032913208,
-0.41145560145378113,
0.5863468647003174,
-0.6635633707046509,
-0.47952255606651306,
-0.7062381505966187,
0.3357819616794586,
1.9305813312530518,
-0.36825838685035706,
1.5417768955230713,
-0.29250815510749817,
-1.5685325860977173,
-1.5857657194137573,
0.8219237327575684,
0.46877521276474,
-0.7946553230285645,
0.0626441240310669,
-0.38880595564842224,
0.05512116476893425,
0.06298238039016724,
1.1247702836990356,
1.206443428993225,
0.7641879916191101,
-0.3988681733608246,
-0.8657426834106445,
0.19038955867290497,
-0.0727929100394249,
-0.6686853170394897,
-1.8024791479110718,
-0.3609065115451813,
0.22722411155700684,
0.57879239320755,
-1.1725237369537354,
1.8225734233856201,
0.9211980700492859,
2.010437488555908,
0.9486157894134521,
-0.35178136825561523,
1.4963054656982422,
0.04936165735125542,
1.926803469657898,
-0.46042168140411377,
0.609257698059082,
-0.40003466606140137,
-1.208048701286316,
0.8451995849609375,
-0.3900189697742462,
-1.994560718536377,
-0.7231653332710266,
-0.8442234992980957,
-0.12211299687623978,
-0.7744253873825073,
0.9091604948043823,
-0.22688119113445282,
-1.4161378145217896,
0.1535496711730957,
-0.6393793821334839,
0.05674745514988899,
-1.2807042598724365,
0.22072409093379974,
0.7534127831459045,
-0.7202125787734985,
0.03314486891031265,
-0.26162397861480713,
-1.3240543603897095,
-0.5167779922485352,
0.29010406136512756,
1.8683767318725586,
-0.6921885013580322,
0.9241237044334412,
1.06899094581604,
-0.7733646631240845,
0.028971247375011444,
0.34879499673843384,
-0.32824841141700745,
0.8024882078170776,
-1.031986117362976,
-0.3680153787136078,
1.2023179531097412,
-0.18711549043655396,
-0.6623245477676392,
1.449834942817688,
0.6942631602287292,
-1.0528576374053955,
-0.21868808567523956,
-0.12208054959774017,
-0.7843042016029358,
0.0306246355175972,
-1.5194318294525146,
-0.10487237572669983,
0.36056140065193176,
-1.485802173614502,
-0.45588237047195435,
-0.23229211568832397,
1.3361458778381348,
-0.1581507921218872,
1.4017468690872192,
-0.2801629304885864,
-0.2172946184873581,
-0.3509954810142517,
-0.5020998120307922,
0.1235235407948494,
-0.21387244760990143,
-0.6076681017875671,
0.2347877323627472,
-0.8733068704605103,
0.33345794677734375,
1.5186339616775513,
0.3184179663658142,
0.09068847447633743,
0.456790953874588,
1.1240687370300293,
0.3827638626098633,
-0.06760793924331665,
-0.9337116479873657,
-1.5593076944351196,
2.055429697036743,
-1.4245301485061646,
1.957907795906067,
0.7906683683395386,
-0.10460204631090164,
-1.7905362844467163,
-1.846312165260315,
1.3797149658203125,
1.1689529418945312,
2.4601728916168213,
0.5401472449302673,
0.37547987699508667,
-0.7955474853515625,
-0.7361273169517517,
0.36952391266822815,
-0.9525195360183716,
-0.7177850604057312,
0.12615060806274414,
2.3267929553985596,
1.7866772413253784,
-0.4998337924480438,
-0.21010346710681915,
-0.9791531562805176,
1.398814082145691,
-0.19411492347717285,
0.2380983531475067,
1.9454050064086914,
-0.32589203119277954,
-1.0187476873397827,
1.2876307964324951,
-2.329634189605713,
0.21721011400222778,
1.9946110248565674,
0.26775991916656494,
0.10130134224891663,
-1.432268738746643,
-0.6313449144363403,
-0.2764011323451996,
-0.483757883310318,
-1.2472065687179565,
0.5411751866340637,
-0.2547340393066406,
-0.8686737418174744,
-1.4420957565307617,
0.143529012799263,
-1.1376516819000244,
-1.7651522159576416,
0.2963697016239166,
1.8844776153564453,
2.052722930908203,
-0.8046437501907349,
1.4933531284332275,
-0.2606287896633148,
0.16386522352695465,
1.2345173358917236,
1.2404664754867554,
3.141512393951416,
1.8586450815200806,
-1.2091436386108398,
0.6841723918914795,
-0.21009457111358643,
-0.5152381658554077,
1.1604280471801758,
-1.1331579685211182,
1.2127190828323364,
-0.26160624623298645,
-1.2182457447052002,
-1.2524546384811401,
0.9988526701927185,
0.46072056889533997,
0.07464372366666794,
-0.5268601775169373,
1.1862107515335083,
0.13398760557174683,
1.289375901222229,
0.5600138306617737,
-0.37578460574150085,
0.6567248106002808,
-0.37142086029052734,
-0.5716137290000916,
1.5560561418533325,
0.2527177929878235,
-1.4633222818374634,
-2.2618465423583984,
-0.23383523523807526,
-0.9264656901359558,
0.01676313206553459,
-0.6066994071006775,
-0.9986935257911682,
1.6285845041275024,
0.41335025429725647,
-1.292255163192749,
-0.24738161265850067,
-0.32494664192199707,
-0.5987918972969055,
2.6846251487731934,
-1.318942904472351,
-0.1659514158964157,
-1.0209705829620361,
-0.5775555968284607,
1.632846713066101,
-1.1833161115646362,
-0.18074730038642883,
-0.9478021860122681,
-0.5723235011100769,
-1.3518850803375244,
-0.5492473840713501,
0.029635723680257797,
-0.8726121783256531,
0.7692024111747742,
0.13012373447418213,
-1.1589840650558472,
-0.2993641495704651,
-0.858791708946228,
0.9407618641853333,
-0.17444832623004913,
0.18582364916801453,
1.8989050388336182,
0.37736859917640686,
-0.4017602503299713,
0.7140781283378601,
1.165191650390625,
0.6082419753074646,
-0.6191754937171936,
0.1882185935974121,
-0.6964858770370483,
0.2946532964706421,
-1.3903888463974,
0.2542518675327301,
-2.878786563873291,
0.6846864819526672,
-0.06620960682630539,
-0.10941727459430695,
-0.023992231115698814,
-1.330719232559204,
1.0381145477294922,
2.603285074234009,
-1.1967886686325073,
0.4661024212837219,
0.35774287581443787,
1.182140827178955,
-1.5065702199935913,
0.24456244707107544,
-0.44247540831565857,
2.083198308944702,
0.12823167443275452,
1.250750184059143,
-0.4922112822532654,
-2.1996328830718994,
0.5881984829902649,
-1.2909820079803467,
-1.038608193397522,
0.7898356914520264,
-0.8938018679618835,
0.11385966092348099,
-1.3530272245407104,
-0.15009944140911102,
-0.9072813987731934,
-1.2034369707107544,
0.7396253943443298,
0.09665714204311371,
0.41614818572998047,
-0.592827320098877,
0.3795766830444336,
-2.149728536605835,
-1.4068230390548706,
-0.23416680097579956,
-0.9913464784622192,
0.4637104272842407,
-0.3240744471549988,
0.646905779838562,
-0.15482290089130402,
0.056217391043901443,
0.3712683916091919,
1.422336220741272,
3.3910696506500244,
0.1888926774263382,
0.24464398622512817,
-0.17471151053905487,
-1.0155797004699707,
1.5288612842559814,
0.9018285274505615,
-0.1331365704536438,
-0.49088937044143677,
-1.0108850002288818,
1.3294448852539062,
1.962272047996521,
1.1047813892364502,
0.006982195191085339,
-0.8444228172302246,
-0.8388922810554504,
-0.0006896313279867172,
0.14161624014377594,
0.4882281422615051,
0.8742598295211792,
0.10922446101903915,
0.12140100449323654,
1.3914012908935547,
1.2139333486557007,
-0.4001019299030304,
0.396698921918869,
-0.8781179189682007,
-0.44508489966392517,
0.4262610375881195,
0.3082418441772461,
0.08798448741436005,
0.36894941329956055,
-1.0857720375061035,
-0.28836849331855774,
-0.36988481879234314,
-0.8054848909378052,
-0.7440489530563354,
-0.42889490723609924,
-0.348172664642334,
1.6154295206069946,
0.04237325116991997,
-0.5252524614334106,
0.04790424183011055,
-0.7480306029319763,
-0.15638287365436554,
-1.0521334409713745,
0.25579702854156494,
-0.11968083679676056,
-0.04421170800924301,
-0.15600647032260895,
1.7138218879699707,
-0.9512121677398682,
-2.1258351802825928,
0.31995996832847595,
0.22149036824703217,
-0.4025142192840576,
0.17358633875846863,
1.7037432193756104,
0.5427718162536621,
1.3965716361999512,
1.3667629957199097,
1.0112531185150146,
-0.6507103443145752,
-1.2243311405181885,
0.7045723795890808,
0.9393046498298645,
-1.3821285963058472,
0.8659077882766724,
-0.07792635262012482,
-0.49642014503479004,
0.6955105662345886,
1.2486144304275513,
0.39373573660850525,
-2.002126693725586,
0.792576789855957,
-0.8790432214736938,
0.748759925365448,
0.6717068552970886,
0.7271881103515625,
0.16427354514598846,
0.8139424324035645,
-1.2171703577041626,
-1.1797529458999634,
-0.7241942286491394,
-0.6554662585258484,
1.9148956537246704,
-0.1983499825000763,
0.5659165382385254,
-0.22347532212734222,
-1.316393256187439,
-0.0824253037571907,
0.7478890419006348,
0.31033119559288025,
-0.5316759943962097,
0.8435899615287781,
-0.616371214389801,
-1.0483222007751465,
-1.3621474504470825,
-0.4564414918422699,
-1.0646171569824219,
-0.9283924102783203,
1.0041381120681763,
0.7506588697433472,
0.44084060192108154,
1.941762924194336,
0.6576619148254395,
0.33132585883140564,
-2.6422905921936035,
0.9152199625968933,
0.24936646223068237,
-0.03769403696060181,
0.8635262846946716,
0.2844755947589874,
1.0115398168563843,
-0.1557261198759079,
0.5811489820480347,
-2.3214614391326904,
2.27351450920105,
-0.2186378389596939,
0.688104510307312,
0.06556515395641327,
-0.24656224250793457,
1.069229006767273,
0.6032654047012329,
0.6173592209815979,
-1.1823619604110718,
0.6887204051017761,
-0.5568175315856934,
1.1794302463531494,
0.7959992289543152,
-0.9266567230224609,
0.07558083534240723,
1.4043593406677246,
0.4940637946128845,
-0.47159114480018616,
-0.950799286365509,
-0.9796979427337646,
0.9326549768447876,
1.679051399230957,
-0.0702948197722435,
-0.015318325720727444,
0.9297163486480713,
0.6533750295639038,
-1.2281339168548584,
0.06306423246860504,
-0.6802297830581665,
-0.6278074979782104,
1.6877869367599487,
2.1014609336853027,
-0.13996265828609467,
-0.18880291283130646,
-0.7351919412612915,
-1.2311530113220215,
0.7844628095626831,
0.020454633980989456,
0.07433153688907623,
0.6950458884239197,
-0.7061281800270081,
1.1360379457473755,
0.8156262636184692,
0.924079179763794,
0.11668463796377182,
0.2927897572517395,
0.4237758219242096,
-0.3869297206401825,
-1.1711245775222778,
-0.302362322807312,
-1.0708974599838257,
-2.496328830718994,
0.4760620594024658,
-0.1802043914794922,
-1.4209345579147339,
0.05150875821709633,
-1.0170212984085083,
0.8411776423454285,
-0.5881506204605103,
-1.058862566947937,
-1.4511287212371826,
0.28017520904541016,
-0.1265018880367279,
0.9463411569595337,
-1.6446092128753662,
-0.08919951319694519,
1.2353812456130981,
0.8969187140464783,
-0.6530395746231079,
1.0120251178741455,
0.24676132202148438,
1.0141228437423706,
0.8597785234451294,
-0.3777255415916443,
0.5509231686592102,
0.09771420806646347,
-1.3772255182266235,
0.3638888895511627,
1.1845605373382568,
0.19492128491401672,
1.3592621088027954,
-0.5469517111778259,
0.08526264131069183,
0.43154945969581604,
-0.5946418046951294,
-0.519600510597229,
-0.5415144562721252,
0.6712580323219299,
0.009745835326611996,
-0.9784377217292786,
0.011616314761340618,
-0.07584203779697418,
-0.17547985911369324,
0.2879478335380554,
-1.5084006786346436,
-0.19039763510227203,
-0.3619786202907562,
-0.5184334516525269,
-1.2999286651611328,
-0.010950325056910515,
1.4428415298461914,
-0.8133060336112976,
-0.1671168953180313,
0.491835355758667,
0.3197627365589142,
0.4926478862762451,
0.5572643876075745,
-0.6748232245445251,
-0.2781013250350952,
-0.3111785650253296,
-0.3503440022468567,
0.3229430913925171,
1.3020594120025635,
-0.09634853154420853,
-0.9357962608337402,
0.7206920385360718,
-0.40906181931495667,
0.06976661086082458,
1.9567230939865112,
0.06958599388599396,
-0.7597270011901855,
0.33189600706100464,
-0.6983928680419922,
1.820995569229126,
1.757050633430481,
1.3218908309936523,
-0.051056306809186935,
-0.8757176995277405,
0.6093707084655762,
-0.29882970452308655,
-0.3787226378917694,
0.9635460376739502,
0.34152543544769287,
-0.2549791932106018,
-1.4670391082763672,
0.6227050423622131,
1.3323974609375,
-0.8832446336746216,
-0.7425647974014282,
0.13339541852474213,
-0.8280354738235474,
1.1451181173324585,
0.730055034160614,
0.3988482356071472,
0.21177414059638977,
1.6246016025543213,
0.8058791160583496,
-0.3930462598800659,
0.5215771794319153,
0.5069445967674255,
-0.163582444190979,
-2.0590083599090576,
-1.0702811479568481,
0.30295702815055847,
-0.4678736925125122,
-1.546728491783142,
1.3595675230026245,
-1.1626304388046265,
-1.001684308052063,
0.47985678911209106,
0.06371254473924637,
1.4426220655441284,
0.33740708231925964,
1.6535638570785522,
2.092641830444336,
0.8727012872695923,
0.32836151123046875,
1.2734781503677368,
-0.1561213731765747,
-0.43302518129348755,
1.770492672920227,
-0.4892504811286926,
0.4958198666572571,
1.0587525367736816,
-0.33982226252555847,
-1.1293891668319702,
-0.8387031555175781,
-1.2411388158798218,
-0.6789578199386597,
1.166001319885254,
0.10742098093032837,
-1.1160732507705688,
0.23705033957958221,
1.6202161312103271,
0.0981404259800911,
-0.2684226334095001,
0.6820000410079956,
0.39849498867988586,
-0.712017297744751,
-0.06925500929355621,
-0.9047423005104065,
0.518251359462738,
-0.16774985194206238,
-0.37114468216896057,
0.33290812373161316,
0.43306663632392883,
1.2494328022003174,
-0.017959903925657272,
0.14324986934661865,
1.1619306802749634,
-1.3678678274154663,
1.4909038543701172,
-0.6793903708457947,
0.24309629201889038,
-2.412710189819336,
1.4222586154937744,
-0.779981255531311,
1.9038732051849365,
-2.6387600898742676,
0.4273434579372406,
-0.5495570302009583,
-0.5832759737968445,
0.29365789890289307,
-0.3983810842037201,
0.07731900364160538,
-0.16212373971939087,
-1.0705043077468872,
-0.10768847912549973,
-0.7185439467430115,
0.6294437050819397,
1.1148483753204346,
1.4570965766906738,
-1.105432391166687,
-0.33627501130104065,
-1.7832849025726318,
-0.09999828040599823,
-0.7169319987297058,
0.33063551783561707,
-1.9732810258865356,
-0.20523209869861603,
-1.9075888395309448,
-2.3556840419769287,
-1.3953344821929932,
-0.8615319728851318,
1.0226606130599976,
0.1333203762769699,
-0.8475497961044312,
1.1610448360443115,
-0.37062299251556396,
-1.9116488695144653,
1.0761377811431885,
-2.161425828933716
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @NielsRogge @polinaeterna I have a similar problem when reading my dataset. I want to use DETR for object detection, but my data is in YOLO format. With a dataset of 10k images, yolo format involves having 10k labels. As far as I read regarding [COCO format](https://auto.gluon.ai/stable/tutorials/multimodal/object_detection/data_preparation/convert_data_to_coco_format.html), there must be one JSON per split. However, as I post in the [Hugging Face forum](https://discuss.huggingface.co/t/prepare-dataset-from-yolo-format-to-coco-for-detr/34894), when it is read, the number of rows is 1, which does not make sense.
The instruction to read the train-val-test splits are:
```python
from datasets import load_dataset
data_files = {
"train": './train_labels.json',
"validation": './val_labels.json',
"test": './test_labels.json'
}
dataset = load_dataset("json", data_files=data_files)
```
An example of the short version of the json file I read, to reproduce my error, is the following:
``` json
{
"info": {},
"licenses": [],
"images": [
{
"id": 1,
"file_name": "aceca_100.mp4frame21.png",
"width": 1280,
"height": 720,
"pixel_values": null,
"pixel_mask": null
},
{
"id": 2,
"file_name": "aceca_100.mp4frame24.png",
"width": 1280,
"height": 720,
"pixel_values": null,
"pixel_mask": null
},
{
"id": 3,
"file_name": "aceca_100.mp4frame25.png",
"width": 1280,
"height": 720,
"pixel_values": null,
"pixel_mask": null}],
"annotations": [
{
"id": 1,
"image_id": 1,
"category_id": 0,
"bbox": [0.0, 278.21896388398557, 86.94096523844935, 156.0293445072134],
"area": 13565.341816979679,
"iscrowd": 0
},
{
"id": 2,
"image_id": 2,
"category_id": 0,
"bbox": [149.28851295721816, 297.6359759754418, 34.76802347007475, 98.03908698442889],
"area": 3408.625277259324,
"iscrowd": 0
},
{
"id": 3,
"image_id": 3,
"category_id": 0,
"bbox": [153.3817197549372, 300.168969412891, 31.787555842913775, 89.69583163436312],
"area": 2851.2112569539095,
"iscrowd": 0
}
],
"categories": [
{
"id": 0, "name": "person"
}
]
}
```
If full files required, my email is [email protected] | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 247 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
@NielsRogge @polinaeterna I have a similar problem when reading my dataset. I want to use DETR for object detection, but my data is in YOLO format. With a dataset of 10k images, yolo format involves having 10k labels. As far as I read regarding [COCO format](https://auto.gluon.ai/stable/tutorials/multimodal/object_detection/data_preparation/convert_data_to_coco_format.html), there must be one JSON per split. However, as I post in the [Hugging Face forum](https://discuss.huggingface.co/t/prepare-dataset-from-yolo-format-to-coco-for-detr/34894), when it is read, the number of rows is 1, which does not make sense.
The instruction to read the train-val-test splits are:
```python
from datasets import load_dataset
data_files = {
"train": './train_labels.json',
"validation": './val_labels.json',
"test": './test_labels.json'
}
dataset = load_dataset("json", data_files=data_files)
```
An example of the short version of the json file I read, to reproduce my error, is the following:
``` json
{
"info": {},
"licenses": [],
"images": [
{
"id": 1,
"file_name": "aceca_100.mp4frame21.png",
"width": 1280,
"height": 720,
"pixel_values": null,
"pixel_mask": null
},
{
"id": 2,
"file_name": "aceca_100.mp4frame24.png",
"width": 1280,
"height": 720,
"pixel_values": null,
"pixel_mask": null
},
{
"id": 3,
"file_name": "aceca_100.mp4frame25.png",
"width": 1280,
"height": 720,
"pixel_values": null,
"pixel_mask": null}],
"annotations": [
{
"id": 1,
"image_id": 1,
"category_id": 0,
"bbox": [0.0, 278.21896388398557, 86.94096523844935, 156.0293445072134],
"area": 13565.341816979679,
"iscrowd": 0
},
{
"id": 2,
"image_id": 2,
"category_id": 0,
"bbox": [149.28851295721816, 297.6359759754418, 34.76802347007475, 98.03908698442889],
"area": 3408.625277259324,
"iscrowd": 0
},
{
"id": 3,
"image_id": 3,
"category_id": 0,
"bbox": [153.3817197549372, 300.168969412891, 31.787555842913775, 89.69583163436312],
"area": 2851.2112569539095,
"iscrowd": 0
}
],
"categories": [
{
"id": 0, "name": "person"
}
]
}
```
If full files required, my email is [email protected] | [
-1.1819826364517212,
-0.9595372080802917,
-0.7629253268241882,
1.5201905965805054,
-0.17483779788017273,
-1.175592064857483,
0.1410881131887436,
-1.1056796312332153,
1.6123040914535522,
-0.7624475955963135,
0.3311038911342621,
-1.6663615703582764,
-0.06205330416560173,
-0.5768489241600037,
-0.7183113098144531,
-0.9384354948997498,
-0.41343772411346436,
-0.7600525617599487,
1.0483590364456177,
2.439059019088745,
1.2509387731552124,
-1.371708631515503,
2.6701431274414062,
0.6637936234474182,
-0.1963009238243103,
-1.0097029209136963,
0.6002660393714905,
-0.01888364553451538,
-1.1122944355010986,
-0.4517771601676941,
-0.9410883784294128,
-0.11995764821767807,
-0.5331745743751526,
-0.45093482732772827,
-0.05971433222293854,
0.49885180592536926,
-0.3441045582294464,
-0.3783859312534332,
-0.6053040623664856,
-0.8044554591178894,
0.49406394362449646,
-0.36235401034355164,
0.9738268852233887,
-0.40935274958610535,
1.8276724815368652,
-0.5479573607444763,
0.488739013671875,
0.7588916420936584,
1.2756836414337158,
0.23661942780017853,
0.07154200971126556,
0.21537522971630096,
0.43211883306503296,
-0.051896821707487106,
0.5158364772796631,
1.198562502861023,
0.559991180896759,
0.4842666983604431,
0.7911441922187805,
-2.1974382400512695,
1.2142690420150757,
-1.0456929206848145,
0.25930848717689514,
1.3761875629425049,
-0.8114205002784729,
0.39456644654273987,
-1.8467744588851929,
-0.015569493174552917,
0.5994248390197754,
-2.1862246990203857,
0.2801159620285034,
-1.3200486898422241,
-0.5358526110649109,
0.9919592142105103,
0.3700650930404663,
-1.179805040359497,
0.14291365444660187,
-0.4123932421207428,
0.9946461915969849,
0.4397852420806885,
1.096882700920105,
-1.6604721546173096,
-0.048382826149463654,
-0.22866103053092957,
0.1594560146331787,
-1.302246332168579,
-1.4942010641098022,
0.553864061832428,
0.5202531814575195,
0.5876265168190002,
-0.11470496654510498,
1.022886037826538,
-1.104288935661316,
0.7870992422103882,
-1.1120976209640503,
-1.6222790479660034,
-1.4682581424713135,
-2.275061845779419,
-2.320401668548584,
0.7835986018180847,
-0.5643777847290039,
-0.5017160773277283,
2.064697265625,
-0.9825674891471863,
-1.6223615407943726,
1.1348956823349,
0.28776031732559204,
0.11700179427862167,
2.460965633392334,
0.2100559026002884,
-0.7378266453742981,
0.5473488569259644,
-0.7889931201934814,
0.7826405167579651,
-0.2956407964229584,
1.3258321285247803,
0.435443639755249,
-0.9415751099586487,
1.602746605873108,
-0.3314107358455658,
0.6586072444915771,
-0.6006510257720947,
-0.5362576246261597,
-0.7131685018539429,
0.3109888434410095,
1.836511254310608,
-0.30233708024024963,
1.464313268661499,
-0.2794483006000519,
-1.55789053440094,
-1.663420557975769,
0.9186079502105713,
0.4555956721305847,
-0.8324534296989441,
0.07594720274209976,
-0.4190737009048462,
0.12725161015987396,
-0.12822477519512177,
1.1272430419921875,
1.2716494798660278,
0.8369625210762024,
-0.37981006503105164,
-0.8388534188270569,
0.14961184561252594,
-0.09663785994052887,
-0.7591527104377747,
-1.722646951675415,
-0.35153818130493164,
0.21140170097351074,
0.5896733403205872,
-1.2375670671463013,
1.7579071521759033,
0.967197597026825,
1.973675012588501,
0.9725767374038696,
-0.4354175627231598,
1.5031274557113647,
0.050705064088106155,
1.8031631708145142,
-0.5662141442298889,
0.5162175893783569,
-0.33518680930137634,
-1.180537223815918,
0.8869898915290833,
-0.2777102291584015,
-2.0126476287841797,
-0.8650165796279907,
-0.7946938276290894,
-0.21414631605148315,
-0.7298049330711365,
0.9093093276023865,
-0.2725363075733185,
-1.4257004261016846,
0.2266428917646408,
-0.652638852596283,
0.02622760832309723,
-1.2248748540878296,
0.3204060196876526,
0.6480503678321838,
-0.6567429304122925,
0.05532613396644592,
-0.15055912733078003,
-1.2689961194992065,
-0.47408461570739746,
0.28511399030685425,
1.9496591091156006,
-0.7351934313774109,
0.8557599186897278,
1.03518545627594,
-0.772802472114563,
0.062049202620983124,
0.26357749104499817,
-0.3475203812122345,
0.7358303070068359,
-0.9808674454689026,
-0.5887715816497803,
1.186708927154541,
-0.2575996220111847,
-0.7017503976821899,
1.4340883493423462,
0.7271013259887695,
-1.033875584602356,
-0.30183181166648865,
-0.1833065003156662,
-0.7898434996604919,
0.0741366520524025,
-1.48154616355896,
-0.1408444046974182,
0.3870968818664551,
-1.5495625734329224,
-0.4159795045852661,
-0.21019375324249268,
1.3037225008010864,
-0.2455490082502365,
1.3960275650024414,
-0.3388698995113373,
-0.18579918146133423,
-0.33016255497932434,
-0.4950225055217743,
0.1270757019519806,
-0.22963586449623108,
-0.615541934967041,
0.16579577326774597,
-0.9039166569709778,
0.33225199580192566,
1.3784685134887695,
0.3906407356262207,
-0.0015731118619441986,
0.4131597876548767,
1.1246312856674194,
0.5147969722747803,
-0.025802377611398697,
-0.988628089427948,
-1.3953934907913208,
2.0388808250427246,
-1.4858644008636475,
1.985723614692688,
0.7239706516265869,
-0.10811827331781387,
-1.7963250875473022,
-1.9168457984924316,
1.2930651903152466,
1.215380311012268,
2.3583240509033203,
0.5018287301063538,
0.383565753698349,
-0.7915329933166504,
-0.7314228415489197,
0.3308626711368561,
-1.0480207204818726,
-0.6094962358474731,
0.20796386897563934,
2.3985469341278076,
1.7324199676513672,
-0.4923352003097534,
-0.225694939494133,
-0.9517860412597656,
1.405676245689392,
-0.13255682587623596,
0.27308323979377747,
2.0898869037628174,
-0.2908763587474823,
-1.0228685140609741,
1.2959460020065308,
-2.369814872741699,
0.1550019532442093,
1.9964486360549927,
0.32608217000961304,
0.1317787915468216,
-1.3677699565887451,
-0.6553389430046082,
-0.34528982639312744,
-0.5506420135498047,
-1.2401612997055054,
0.546750009059906,
-0.2046726495027542,
-0.9035608768463135,
-1.4286224842071533,
0.13179755210876465,
-1.1854796409606934,
-1.6694642305374146,
0.3295712172985077,
1.8779633045196533,
2.1543917655944824,
-0.8817682862281799,
1.5304784774780273,
-0.26514628529548645,
0.07085584849119186,
1.1579899787902832,
1.3056658506393433,
3.08711314201355,
1.832795262336731,
-1.2455261945724487,
0.5641586184501648,
-0.2100566029548645,
-0.48516252636909485,
1.1214224100112915,
-1.2203288078308105,
1.2211430072784424,
-0.17777793109416962,
-1.1264071464538574,
-1.1527098417282104,
0.9899373054504395,
0.3770112693309784,
0.08203207701444626,
-0.5010558366775513,
1.1388405561447144,
0.17247597873210907,
1.3843469619750977,
0.5985631346702576,
-0.2837642431259155,
0.6119146943092346,
-0.37914562225341797,
-0.5308147668838501,
1.561362624168396,
0.13843202590942383,
-1.5496793985366821,
-2.272808074951172,
-0.2831977605819702,
-0.8864659070968628,
0.07883553951978683,
-0.48540228605270386,
-1.0509510040283203,
1.6857802867889404,
0.3005179464817047,
-1.2965894937515259,
-0.3215744197368622,
-0.375104695558548,
-0.569419264793396,
2.807128429412842,
-1.2856814861297607,
-0.19284802675247192,
-0.9356783628463745,
-0.6406405568122864,
1.7133357524871826,
-1.1670432090759277,
-0.12605956196784973,
-1.043908953666687,
-0.5093814134597778,
-1.3924270868301392,
-0.5256893038749695,
0.06605610251426697,
-0.9657195806503296,
0.8938419818878174,
0.19432659447193146,
-1.1189467906951904,
-0.35159802436828613,
-0.8747013211250305,
0.9356145262718201,
-0.18356488645076752,
0.22547505795955658,
1.9055495262145996,
0.3813248574733734,
-0.31274282932281494,
0.7617092132568359,
1.1997880935668945,
0.6430283784866333,
-0.6134487390518188,
0.10194725543260574,
-0.7035544514656067,
0.33859309554100037,
-1.2772572040557861,
0.23825421929359436,
-2.8307220935821533,
0.694321870803833,
-0.06355002522468567,
-0.1442047655582428,
-0.01147457119077444,
-1.316564917564392,
1.157261848449707,
2.658567428588867,
-1.2402241230010986,
0.4008577764034271,
0.392635703086853,
1.1835598945617676,
-1.6059560775756836,
0.2853468656539917,
-0.4661179184913635,
2.097996234893799,
0.16500400006771088,
1.1957039833068848,
-0.47918879985809326,
-2.290870189666748,
0.6523979306221008,
-1.3239881992340088,
-1.1589196920394897,
0.786262571811676,
-0.9435248374938965,
0.20275302231311798,
-1.5141899585723877,
-0.18673175573349,
-0.9380055069923401,
-1.2073884010314941,
0.6423209309577942,
0.18495453894138336,
0.40844008326530457,
-0.5727280974388123,
0.36536258459091187,
-2.2378506660461426,
-1.4821537733078003,
-0.2985307574272156,
-0.9388189315795898,
0.5150850415229797,
-0.4261505603790283,
0.7737349271774292,
-0.13005109131336212,
0.0042963773012161255,
0.40358462929725647,
1.4639596939086914,
3.3882906436920166,
0.22789011895656586,
0.24227163195610046,
-0.20767484605312347,
-1.0227059125900269,
1.5559295415878296,
0.9099203944206238,
0.0013439077883958817,
-0.49634936451911926,
-1.0157861709594727,
1.207280158996582,
2.086472988128662,
1.0758312940597534,
-0.055134840309619904,
-0.8475929498672485,
-0.6980124115943909,
-0.045663610100746155,
0.24718868732452393,
0.5454902648925781,
0.9642757177352905,
-0.02365277335047722,
0.05420244485139847,
1.49929940700531,
1.2057859897613525,
-0.3490125834941864,
0.24143198132514954,
-0.8514780402183533,
-0.48506325483322144,
0.5241220593452454,
0.1965121179819107,
0.041418612003326416,
0.48909658193588257,
-1.0486083030700684,
-0.32132360339164734,
-0.361748605966568,
-0.8630956411361694,
-0.6532208323478699,
-0.4276740849018097,
-0.3878704011440277,
1.591243863105774,
0.14900389313697815,
-0.5026029944419861,
0.08357845991849899,
-0.7638153433799744,
-0.12198318541049957,
-1.1859861612319946,
0.19972193241119385,
-0.16093115508556366,
-0.14329934120178223,
-0.23499320447444916,
1.788535237312317,
-0.9404755234718323,
-2.033404588699341,
0.20936566591262817,
0.3429519236087799,
-0.265881210565567,
0.229448601603508,
1.6203612089157104,
0.49164626002311707,
1.4640259742736816,
1.2529988288879395,
0.9500795006752014,
-0.6544519662857056,
-1.2523449659347534,
0.6863449811935425,
0.983268141746521,
-1.3184839487075806,
0.8797290921211243,
-0.09157758951187134,
-0.4554527997970581,
0.6089291572570801,
1.2121111154556274,
0.43653497099876404,
-1.9877433776855469,
0.8109860420227051,
-0.9802194237709045,
0.8125736117362976,
0.6717973947525024,
0.675086259841919,
0.17618054151535034,
0.858491837978363,
-1.13100004196167,
-1.0866402387619019,
-0.7134765982627869,
-0.661335825920105,
1.9304397106170654,
-0.3189409375190735,
0.6638653874397278,
-0.17420344054698944,
-1.2426377534866333,
-0.02573903277516365,
0.7027320861816406,
0.3364720940589905,
-0.45141738653182983,
0.8428206443786621,
-0.6309992074966431,
-1.0530747175216675,
-1.331581950187683,
-0.3450251817703247,
-1.0523098707199097,
-1.000418782234192,
1.1136409044265747,
0.7045652270317078,
0.3201861083507538,
1.8995429277420044,
0.7347466349601746,
0.30896303057670593,
-2.599501132965088,
0.9473481178283691,
0.28720971941947937,
-0.11697008460760117,
0.8773727416992188,
0.32151177525520325,
1.063468098640442,
-0.08253224194049835,
0.553821861743927,
-2.3960771560668945,
2.2935233116149902,
-0.1933870017528534,
0.7531296610832214,
0.07276000827550888,
-0.22635670006275177,
1.0659632682800293,
0.5776773691177368,
0.5349141359329224,
-1.0917831659317017,
0.6347042322158813,
-0.5018208026885986,
1.1606864929199219,
0.9004760980606079,
-0.7762764692306519,
0.10277598351240158,
1.3266878128051758,
0.5961027145385742,
-0.4555421471595764,
-1.0057454109191895,
-0.8559279441833496,
0.940607488155365,
1.6644642353057861,
-0.18129953742027283,
-0.04917994141578674,
0.8640123009681702,
0.5988274812698364,
-1.2750076055526733,
-0.0011471034958958626,
-0.7287532091140747,
-0.6709554195404053,
1.6644234657287598,
2.127283811569214,
-0.18379737436771393,
-0.1674860417842865,
-0.688029408454895,
-1.2560100555419922,
0.8006369471549988,
-0.09324353188276291,
0.21096596121788025,
0.6011237502098083,
-0.6452339887619019,
1.067299485206604,
0.7570348978042603,
0.9212667346000671,
0.19647382199764252,
0.32992076873779297,
0.3922441601753235,
-0.36858800053596497,
-1.0984206199645996,
-0.2591816484928131,
-1.0350779294967651,
-2.571472644805908,
0.45273464918136597,
-0.2777094841003418,
-1.3417073488235474,
-0.030516479164361954,
-0.9820654392242432,
0.9842374324798584,
-0.5686731934547424,
-0.9875870943069458,
-1.5081653594970703,
0.2714100480079651,
-0.04206334799528122,
0.9825646877288818,
-1.6024200916290283,
-0.21733076870441437,
1.2880874872207642,
0.8641623854637146,
-0.7060357928276062,
0.9215098023414612,
0.2286696434020996,
1.0798349380493164,
0.7119873762130737,
-0.38489869236946106,
0.5680396556854248,
0.006368097849190235,
-1.3824166059494019,
0.41004273295402527,
1.1876658201217651,
0.1929955929517746,
1.4361125230789185,
-0.472210556268692,
0.07229261100292206,
0.38723012804985046,
-0.6321296095848083,
-0.5833434462547302,
-0.4104510545730591,
0.669011116027832,
0.047169074416160583,
-0.9912851452827454,
0.010567733086645603,
-0.061771925538778305,
-0.2932196855545044,
0.20738495886325836,
-1.3919599056243896,
-0.21249771118164062,
-0.4353819489479065,
-0.5706456303596497,
-1.2573481798171997,
-0.02233465388417244,
1.3662164211273193,
-0.7696588039398193,
-0.17410294711589813,
0.3937527537345886,
0.3352576196193695,
0.5206591486930847,
0.5828250050544739,
-0.7165501117706299,
-0.3574258089065552,
-0.2939892113208771,
-0.3073658347129822,
0.3514465093612671,
1.3274600505828857,
-0.0996292233467102,
-0.9949001669883728,
0.7150011658668518,
-0.31870344281196594,
0.06119202822446823,
1.9652581214904785,
0.02426951751112938,
-0.7081217169761658,
0.311755895614624,
-0.6979451775550842,
1.7847343683242798,
1.6669210195541382,
1.3352383375167847,
-0.22326776385307312,
-0.7983576655387878,
0.6484338641166687,
-0.37824758887290955,
-0.3915307819843292,
0.8377063870429993,
0.3063803017139435,
-0.2590705454349518,
-1.5142589807510376,
0.7261041402816772,
1.288233757019043,
-0.8949403166770935,
-0.7663546204566956,
0.2460232377052307,
-0.8214673399925232,
1.1440895795822144,
0.5854971408843994,
0.39964616298675537,
0.3079434633255005,
1.5905070304870605,
0.8315771222114563,
-0.4496045708656311,
0.42830216884613037,
0.6046169996261597,
-0.1574023813009262,
-2.083831310272217,
-1.187363624572754,
0.3380186855792999,
-0.5799587965011597,
-1.560387372970581,
1.4402155876159668,
-1.1484246253967285,
-1.1081511974334717,
0.5815479755401611,
0.02708534151315689,
1.3282341957092285,
0.39551812410354614,
1.5794703960418701,
2.0317180156707764,
0.8634006381034851,
0.4502336382865906,
1.2515608072280884,
-0.11079283803701401,
-0.5139941573143005,
1.8423000574111938,
-0.4050597846508026,
0.47362393140792847,
1.1226540803909302,
-0.2504952549934387,
-1.081283688545227,
-0.8003101944923401,
-1.1585819721221924,
-0.6782298684120178,
1.2472349405288696,
0.11409123241901398,
-1.0821404457092285,
0.2787884771823883,
1.6331307888031006,
0.10396255552768707,
-0.3875703513622284,
0.5933537483215332,
0.4139988422393799,
-0.7861620783805847,
-0.030731506645679474,
-0.8922185897827148,
0.5131962299346924,
-0.21284405887126923,
-0.3571786880493164,
0.2982756495475769,
0.44127658009529114,
1.3908259868621826,
-0.13161435723304749,
0.21684591472148895,
1.041276454925537,
-1.4337575435638428,
1.55465829372406,
-0.67287677526474,
0.276603102684021,
-2.3277900218963623,
1.3042125701904297,
-0.7662386894226074,
1.976381778717041,
-2.6311330795288086,
0.4389133155345917,
-0.5445616841316223,
-0.5332808494567871,
0.21185366809368134,
-0.40213850140571594,
0.09140066802501678,
-0.10839593410491943,
-1.0460177659988403,
0.013847201131284237,
-0.6894987225532532,
0.6309992074966431,
1.1003220081329346,
1.4434763193130493,
-1.0705081224441528,
-0.41665369272232056,
-1.7090895175933838,
-0.17254601418972015,
-0.7936336994171143,
0.27263548970222473,
-2.015347957611084,
-0.22672198712825775,
-1.9220468997955322,
-2.2692205905914307,
-1.3478846549987793,
-0.9040602445602417,
1.1217024326324463,
0.13002382218837738,
-0.9399105906486511,
1.2629972696304321,
-0.37319570779800415,
-1.8827178478240967,
1.2100412845611572,
-2.0898613929748535
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | Hi @Alberto1404, to load an object detection dataset it's recommended to make use of the metadata feature as explained [here](https://huggingface.co/docs/datasets/image_dataset#object-detection). | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 20 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
Hi @Alberto1404, to load an object detection dataset it's recommended to make use of the metadata feature as explained [here](https://huggingface.co/docs/datasets/image_dataset#object-detection). | [
-1.2578872442245483,
-1.0585508346557617,
-0.8663612604141235,
1.5138978958129883,
-0.14580555260181427,
-1.2121222019195557,
0.10029760748147964,
-1.0571463108062744,
1.6269721984863281,
-0.9158382415771484,
0.27373751997947693,
-1.6833643913269043,
-0.0995301678776741,
-0.4404575526714325,
-0.682697057723999,
-1.0092557668685913,
-0.4468502104282379,
-0.8230148553848267,
1.1393076181411743,
2.4591002464294434,
1.1624573469161987,
-1.3131868839263916,
2.711894989013672,
0.6764089465141296,
-0.18519170582294464,
-1.0939600467681885,
0.6416614651679993,
0.04482410475611687,
-1.1068521738052368,
-0.49364379048347473,
-0.9735633134841919,
0.02363172546029091,
-0.5433984994888306,
-0.5525397062301636,
-0.08732449263334274,
0.35932135581970215,
-0.2919161319732666,
-0.3126133978366852,
-0.48269760608673096,
-0.7246546149253845,
0.4905183017253876,
-0.3626992702484131,
0.9124962091445923,
-0.45624369382858276,
1.8708161115646362,
-0.4581247568130493,
0.3523847460746765,
0.6540830135345459,
1.3487815856933594,
0.1267806738615036,
-0.013130441308021545,
0.20483049750328064,
0.4729752838611603,
-0.08717482537031174,
0.3258657455444336,
1.2565644979476929,
0.41973456740379333,
0.6212363839149475,
0.7541598081588745,
-2.2743895053863525,
1.2480391263961792,
-1.0269558429718018,
0.3346019983291626,
1.342015266418457,
-0.959919810295105,
0.32884031534194946,
-1.776832103729248,
-0.07125682383775711,
0.515484094619751,
-2.2373061180114746,
0.16362880170345306,
-1.1917189359664917,
-0.48519060015678406,
0.953731894493103,
0.3691229522228241,
-1.327694058418274,
0.10632031410932541,
-0.40964919328689575,
1.02734375,
0.5558426380157471,
1.1190685033798218,
-1.6592401266098022,
0.11424756795167923,
-0.27251285314559937,
0.006155936047434807,
-1.3689109086990356,
-1.431710124015808,
0.516418993473053,
0.6010038256645203,
0.7515189051628113,
-0.04924144595861435,
1.018835186958313,
-0.9869601726531982,
0.7629432678222656,
-0.9226569533348083,
-1.5091232061386108,
-1.3775854110717773,
-2.3516087532043457,
-2.373450756072998,
0.8038420081138611,
-0.6097657680511475,
-0.5963599681854248,
2.0495781898498535,
-1.0696310997009277,
-1.8119503259658813,
1.2456079721450806,
0.2750115990638733,
0.08216319233179092,
2.4280354976654053,
0.2893136739730835,
-0.7401986122131348,
0.45278096199035645,
-0.7622537612915039,
0.9514593482017517,
-0.3472525477409363,
1.3986523151397705,
0.5399055480957031,
-0.9254000186920166,
1.6742379665374756,
-0.38842564821243286,
0.6657708287239075,
-0.5633381605148315,
-0.5812296867370605,
-0.9643696546554565,
0.41991880536079407,
1.835479497909546,
-0.3305075466632843,
1.627553939819336,
-0.3209724426269531,
-1.5649175643920898,
-1.726239562034607,
0.9496609568595886,
0.49628838896751404,
-0.7975127100944519,
0.12252344936132431,
-0.37067168951034546,
0.030967537313699722,
0.10537276417016983,
1.1362972259521484,
1.2386646270751953,
0.7338530421257019,
-0.34717920422554016,
-0.948674201965332,
0.18256603181362152,
-0.14388132095336914,
-0.6085075736045837,
-1.8379119634628296,
-0.43296247720718384,
0.17525914311408997,
0.5923044085502625,
-1.216400146484375,
1.689632773399353,
1.0033280849456787,
2.0508875846862793,
0.9396763443946838,
-0.31498298048973083,
1.3877431154251099,
0.04241853952407837,
1.8652945756912231,
-0.4090901017189026,
0.6590057611465454,
-0.3005410432815552,
-1.227649450302124,
0.8870318531990051,
-0.3946439027786255,
-1.937903881072998,
-0.9591060280799866,
-0.9357874393463135,
-0.1459934264421463,
-0.7495666146278381,
0.9796833992004395,
-0.29705706238746643,
-1.4378366470336914,
0.24690382182598114,
-0.5345636010169983,
0.10193038731813431,
-1.3137127161026,
0.29296591877937317,
0.7417373061180115,
-0.6509876847267151,
-0.10106716305017471,
-0.16551367938518524,
-1.3568674325942993,
-0.39257484674453735,
0.2112089842557907,
2.0349740982055664,
-0.7899950742721558,
0.9157077074050903,
1.010492205619812,
-0.7616285681724548,
0.03966723755002022,
0.18630725145339966,
-0.2690444588661194,
0.7403494715690613,
-0.9264212250709534,
-0.408670037984848,
1.25808846950531,
-0.2698688507080078,
-0.7449883222579956,
1.5185438394546509,
0.7375829219818115,
-1.0098589658737183,
-0.1264359951019287,
-0.21234092116355896,
-0.6975167989730835,
-0.08804397284984589,
-1.514339804649353,
-0.13549603521823883,
0.28833186626434326,
-1.402200698852539,
-0.5140166282653809,
-0.18652136623859406,
1.4185665845870972,
-0.2224990874528885,
1.3795466423034668,
-0.36754193902015686,
-0.2989889979362488,
-0.4238869249820709,
-0.6111574172973633,
0.2743617594242096,
-0.1981319934129715,
-0.635165810585022,
0.21505819261074066,
-0.8910840153694153,
0.303494393825531,
1.4176653623580933,
0.4727427363395691,
0.13771891593933105,
0.5238972902297974,
1.040334939956665,
0.4677830934524536,
-0.07352752983570099,
-0.9100878834724426,
-1.4621729850769043,
2.012643337249756,
-1.44370698928833,
1.9558602571487427,
0.6551284790039062,
-0.2240496277809143,
-1.8380683660507202,
-1.8376045227050781,
1.3520396947860718,
1.3544000387191772,
2.3369877338409424,
0.5274772644042969,
0.3809888958930969,
-0.8102327585220337,
-0.8244191408157349,
0.2983455955982208,
-1.064270257949829,
-0.608981728553772,
0.08525792509317398,
2.2453253269195557,
1.7278953790664673,
-0.6049269437789917,
-0.12368098646402359,
-1.0049829483032227,
1.2937099933624268,
-0.10967086255550385,
0.2991510033607483,
1.9307496547698975,
-0.42825788259506226,
-1.1211903095245361,
1.2495217323303223,
-2.3217861652374268,
0.12119955569505692,
1.987553596496582,
0.4019686281681061,
0.10693453997373581,
-1.4435410499572754,
-0.695505678653717,
-0.2720707356929779,
-0.6067953705787659,
-1.2829347848892212,
0.6279183030128479,
-0.28328678011894226,
-0.9180187582969666,
-1.4015536308288574,
0.1462858021259308,
-1.0589638948440552,
-1.7066067457199097,
0.45105281472206116,
1.887349009513855,
2.1243395805358887,
-0.8091386556625366,
1.465990662574768,
-0.15518195927143097,
0.1627950668334961,
1.1242588758468628,
1.2022428512573242,
3.0015692710876465,
1.912171483039856,
-1.2234731912612915,
0.6062377095222473,
-0.13702496886253357,
-0.6045919060707092,
1.170689344406128,
-1.0427385568618774,
1.311722755432129,
-0.22607311606407166,
-1.158989667892456,
-1.2852576971054077,
0.9384457468986511,
0.3875296711921692,
0.13385385274887085,
-0.5471534729003906,
1.3108335733413696,
0.09154187887907028,
1.2785719633102417,
0.5129676461219788,
-0.33746543526649475,
0.6204604506492615,
-0.4466036558151245,
-0.6790660619735718,
1.5813491344451904,
0.21189792454242706,
-1.59711492061615,
-2.2410826683044434,
-0.2710958421230316,
-0.812691867351532,
0.016834065318107605,
-0.48890072107315063,
-1.0616298913955688,
1.6320455074310303,
0.45915669202804565,
-1.2052925825119019,
-0.3368489146232605,
-0.3584566116333008,
-0.6332507133483887,
2.752058267593384,
-1.2836121320724487,
-0.23639331758022308,
-0.8358014822006226,
-0.5886300206184387,
1.7176991701126099,
-1.219778060913086,
-0.017477650195360184,
-0.9834508299827576,
-0.6274303197860718,
-1.4253623485565186,
-0.49441882967948914,
-0.04110456258058548,
-0.9517030715942383,
0.7731554508209229,
0.1225421354174614,
-1.0777077674865723,
-0.2447155863046646,
-0.8292725086212158,
0.9247432947158813,
-0.13730746507644653,
0.2946456968784332,
1.9058674573898315,
0.43102559447288513,
-0.4337253272533417,
0.809352695941925,
1.2649427652359009,
0.6322584748268127,
-0.711506187915802,
0.11770466715097427,
-0.7027697563171387,
0.3496062457561493,
-1.2896382808685303,
0.17191322147846222,
-3.056943893432617,
0.7282009124755859,
-0.060780175030231476,
-0.2207501232624054,
-0.0007048659026622772,
-1.2766085863113403,
1.1386600732803345,
2.5045905113220215,
-1.3004871606826782,
0.4220997095108032,
0.3840274512767792,
1.2240409851074219,
-1.4738337993621826,
0.3228203356266022,
-0.5232148766517639,
2.1073434352874756,
0.2106555700302124,
1.2362812757492065,
-0.5659488439559937,
-2.110299587249756,
0.6699614524841309,
-1.3177727460861206,
-1.1087768077850342,
0.7630655169487,
-0.9461945295333862,
0.19288209080696106,
-1.437429666519165,
-0.045125626027584076,
-0.872283399105072,
-1.2815656661987305,
0.6647659540176392,
0.2520250082015991,
0.3999452590942383,
-0.4906744658946991,
0.39588508009910583,
-2.2617335319519043,
-1.4650404453277588,
-0.24947921931743622,
-1.0619611740112305,
0.45908093452453613,
-0.40418651700019836,
0.6736297607421875,
-0.2116427719593048,
0.15971757471561432,
0.4169694483280182,
1.3723324537277222,
3.4216952323913574,
0.20786964893341064,
0.3598288595676422,
-0.07626357674598694,
-0.9445305466651917,
1.6343131065368652,
1.0492879152297974,
-0.020754454657435417,
-0.5077379941940308,
-0.9140917062759399,
1.2565903663635254,
2.006974935531616,
1.023429274559021,
-0.06568050384521484,
-0.8151372075080872,
-0.6350594758987427,
-0.06421057134866714,
0.22486087679862976,
0.5193215608596802,
0.9308627247810364,
0.01988261565566063,
0.15232829749584198,
1.4556541442871094,
1.2047085762023926,
-0.4490632116794586,
0.3242630064487457,
-0.8914936780929565,
-0.5081183910369873,
0.44587385654449463,
0.37768352031707764,
0.05876338109374046,
0.49126747250556946,
-0.9921339750289917,
-0.2845709025859833,
-0.2702464461326599,
-0.8540849089622498,
-0.693273663520813,
-0.3142182230949402,
-0.42003753781318665,
1.5882439613342285,
0.06653707474470139,
-0.4913528561592102,
0.036940183490514755,
-0.8160936832427979,
-0.15103496611118317,
-1.172855019569397,
0.2582559287548065,
-0.0667504221200943,
-0.08020178228616714,
-0.13473667204380035,
1.7718074321746826,
-1.0550073385238647,
-2.207472085952759,
0.24986816942691803,
0.38646453619003296,
-0.29926636815071106,
0.14468464255332947,
1.59113347530365,
0.4977547824382782,
1.3971798419952393,
1.2910019159317017,
0.9890449643135071,
-0.6815792322158813,
-1.2235236167907715,
0.7637350559234619,
0.8671076893806458,
-1.344473123550415,
0.891375720500946,
-0.06895235925912857,
-0.5116869211196899,
0.6990128755569458,
1.168931007385254,
0.4587680995464325,
-1.9154855012893677,
0.838751494884491,
-0.9042469263076782,
0.8550155758857727,
0.6010493040084839,
0.7090474963188171,
0.20743806660175323,
0.8732531666755676,
-1.1193363666534424,
-1.1923454999923706,
-0.750529944896698,
-0.7137335538864136,
1.8899898529052734,
-0.2947031855583191,
0.6028788685798645,
-0.21038976311683655,
-1.1949241161346436,
-0.020339196547865868,
0.6892809271812439,
0.20935459434986115,
-0.2958606481552124,
0.9163459539413452,
-0.5902884006500244,
-1.1278210878372192,
-1.448830246925354,
-0.36691364645957947,
-1.0893323421478271,
-0.940271258354187,
1.085957646369934,
0.6468174457550049,
0.30669620633125305,
1.9605271816253662,
0.5682380795478821,
0.327098548412323,
-2.595804452896118,
0.9370962381362915,
0.24931110441684723,
0.0021018609404563904,
0.8650556206703186,
0.29344478249549866,
1.088220477104187,
-0.14540188014507294,
0.5059120059013367,
-2.2644450664520264,
2.1952946186065674,
-0.35926949977874756,
0.6946307420730591,
0.11112156510353088,
-0.150589257478714,
1.0920054912567139,
0.6167817115783691,
0.6604030728340149,
-1.1474545001983643,
0.7125890254974365,
-0.5289218425750732,
1.1887929439544678,
0.9869037866592407,
-0.7776249647140503,
0.13536329567432404,
1.381612777709961,
0.597457766532898,
-0.37385475635528564,
-0.945505678653717,
-0.9158964157104492,
0.9560176134109497,
1.6173349618911743,
-0.16037534177303314,
0.010377195663750172,
0.7462129592895508,
0.538160502910614,
-1.3285893201828003,
0.001234668307006359,
-0.7230821847915649,
-0.6039885878562927,
1.695237636566162,
2.1034600734710693,
-0.10220257192850113,
-0.16930004954338074,
-0.6296845078468323,
-1.2726404666900635,
0.81724613904953,
-0.05079466477036476,
0.2058148980140686,
0.6398031115531921,
-0.7082096934318542,
1.0313029289245605,
0.7808337211608887,
0.750741183757782,
0.0761040672659874,
0.2720692753791809,
0.4516926109790802,
-0.22452670335769653,
-1.1176936626434326,
-0.2654445469379425,
-1.0492967367172241,
-2.528588056564331,
0.3241041302680969,
-0.3671535849571228,
-1.3146889209747314,
-0.02541998401284218,
-1.091621994972229,
0.929528534412384,
-0.5254896879196167,
-0.9097557663917542,
-1.621649980545044,
0.1252826303243637,
-0.04760795086622238,
0.8310755491256714,
-1.5776455402374268,
-0.20903171598911285,
1.3904439210891724,
0.8964554071426392,
-0.7373069524765015,
1.2007545232772827,
0.30194997787475586,
1.0569669008255005,
0.7101439833641052,
-0.524212121963501,
0.5811488628387451,
0.03187960386276245,
-1.390479326248169,
0.4638642966747284,
1.2175301313400269,
0.17910313606262207,
1.3863487243652344,
-0.5464452505111694,
0.055871959775686264,
0.42723527550697327,
-0.6179053783416748,
-0.6219223141670227,
-0.4569528102874756,
0.7354007959365845,
0.07544894516468048,
-0.9019506573677063,
0.1015750914812088,
-0.12612514197826385,
-0.26442620158195496,
0.3297964334487915,
-1.4604408740997314,
-0.2691459655761719,
-0.46824371814727783,
-0.489288866519928,
-1.3751399517059326,
0.10152321308851242,
1.4498451948165894,
-0.7765486836433411,
-0.12591195106506348,
0.40015193819999695,
0.42577099800109863,
0.5826395750045776,
0.5711926221847534,
-0.627994179725647,
-0.289102703332901,
-0.4305914640426636,
-0.19126540422439575,
0.3638845980167389,
1.2474743127822876,
-0.23624826967716217,
-0.929152250289917,
0.7801582217216492,
-0.26358047127723694,
-0.023134753108024597,
1.9698514938354492,
0.03579322621226311,
-0.7551316618919373,
0.2668428122997284,
-0.732866108417511,
1.7522374391555786,
1.5497068166732788,
1.333353877067566,
-0.09333357214927673,
-0.7143437266349792,
0.5053837299346924,
-0.1036558672785759,
-0.3498178720474243,
0.9039528965950012,
0.4198029041290283,
-0.22681230306625366,
-1.546653151512146,
0.604703962802887,
1.197961449623108,
-0.8729812502861023,
-0.6577398180961609,
0.06027461960911751,
-0.7776268124580383,
1.059757947921753,
0.6741992235183716,
0.483135849237442,
0.27929818630218506,
1.6456871032714844,
0.7517771124839783,
-0.4960498809814453,
0.3483060300350189,
0.5462992787361145,
-0.0960175022482872,
-2.004596710205078,
-1.0221116542816162,
0.3612653911113739,
-0.4806491732597351,
-1.5231035947799683,
1.3510903120040894,
-1.1317349672317505,
-1.0300188064575195,
0.5453278422355652,
0.04862071946263313,
1.3613299131393433,
0.33142948150634766,
1.6927443742752075,
2.0161774158477783,
0.9282857179641724,
0.2959756553173065,
1.3089232444763184,
-0.1209540069103241,
-0.39359140396118164,
1.8276820182800293,
-0.3587194085121155,
0.36880025267601013,
1.0677809715270996,
-0.298338919878006,
-1.0429885387420654,
-0.7875082492828369,
-1.1149239540100098,
-0.5465549230575562,
1.0787599086761475,
0.2742321193218231,
-1.2484989166259766,
0.13253279030323029,
1.498971939086914,
0.17245975136756897,
-0.29722192883491516,
0.5662528872489929,
0.4410455524921417,
-0.7265294790267944,
0.022372525185346603,
-0.9608525037765503,
0.431465208530426,
-0.19792845845222473,
-0.4222329556941986,
0.31156668066978455,
0.40594354271888733,
1.3353668451309204,
-0.22681006789207458,
0.29024505615234375,
1.2153912782669067,
-1.3913178443908691,
1.4106990098953247,
-0.6166216135025024,
0.21743667125701904,
-2.315944194793701,
1.3607096672058105,
-0.6723253130912781,
1.8580925464630127,
-2.712847948074341,
0.4318060278892517,
-0.6632130742073059,
-0.5456783771514893,
0.3667600452899933,
-0.44628143310546875,
0.07294459640979767,
-0.1881132423877716,
-1.0339868068695068,
0.0014279065653681755,
-0.6766359210014343,
0.5748230814933777,
1.0774686336517334,
1.290773868560791,
-1.0587228536605835,
-0.42330875992774963,
-1.6877154111862183,
-0.15448962152004242,
-0.7044501900672913,
0.39250752329826355,
-2.165820598602295,
-0.31845664978027344,
-1.9503276348114014,
-2.2546334266662598,
-1.3569144010543823,
-0.862909734249115,
1.1474045515060425,
0.12884831428527832,
-0.8982666730880737,
1.2004468441009521,
-0.3441303074359894,
-1.8387409448623657,
1.098461627960205,
-2.1083598136901855
] |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | You can now refer to https://huggingface.co/docs/datasets/repository_structure to learn about the `datasets`' data files inference, so I'm closing this issue. | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked | 251 | 19 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting images and the like but absolutely nothing worked
You can now refer to https://huggingface.co/docs/datasets/repository_structure to learn about the `datasets`' data files inference, so I'm closing this issue. | [
-1.1867899894714355,
-1.051448106765747,
-0.8590378165245056,
1.4533109664916992,
-0.13635018467903137,
-1.2141262292861938,
0.11013130843639374,
-1.1109310388565063,
1.6831398010253906,
-0.9019136428833008,
0.3223324716091156,
-1.6654736995697021,
-0.10083364695310593,
-0.4163318872451782,
-0.717571496963501,
-1.0177648067474365,
-0.44416895508766174,
-0.8469208478927612,
1.0542290210723877,
2.424129009246826,
1.18250572681427,
-1.2770872116088867,
2.733133316040039,
0.6653640866279602,
-0.1375235617160797,
-1.1370242834091187,
0.687957763671875,
-0.011303712613880634,
-1.0808361768722534,
-0.5058249831199646,
-0.9500042796134949,
-0.004857266787439585,
-0.5199711322784424,
-0.5324405431747437,
-0.08249957859516144,
0.4533243179321289,
-0.26732656359672546,
-0.2986653745174408,
-0.5185886025428772,
-0.7259893417358398,
0.48357442021369934,
-0.3274531662464142,
0.9112279415130615,
-0.5414647459983826,
1.9128613471984863,
-0.43812134861946106,
0.32353222370147705,
0.720012366771698,
1.341680884361267,
0.15117746591567993,
-0.02779266983270645,
0.16121289134025574,
0.50509113073349,
-0.09919009357690811,
0.3130706548690796,
1.2956877946853638,
0.40746670961380005,
0.6618056297302246,
0.7434574365615845,
-2.235234022140503,
1.2464258670806885,
-0.9910893440246582,
0.3327115476131439,
1.3550729751586914,
-0.9689584970474243,
0.2729482054710388,
-1.7444812059402466,
-0.0414850227534771,
0.5341728925704956,
-2.227252244949341,
0.20849674940109253,
-1.1737462282180786,
-0.4807766079902649,
0.9333930611610413,
0.34025609493255615,
-1.3066551685333252,
0.09102116525173187,
-0.3560796082019806,
0.9693194031715393,
0.5795831084251404,
1.135259985923767,
-1.6422104835510254,
0.15849527716636658,
-0.27591484785079956,
-0.01618048921227455,
-1.37906014919281,
-1.484953761100769,
0.5289260149002075,
0.5860775709152222,
0.7279103994369507,
-0.11569962650537491,
0.9710820913314819,
-1.0254992246627808,
0.7171815633773804,
-0.8686884045600891,
-1.4790098667144775,
-1.3864496946334839,
-2.3765366077423096,
-2.3179409503936768,
0.8026043772697449,
-0.570508599281311,
-0.558659553527832,
2.058920383453369,
-1.0258209705352783,
-1.8109081983566284,
1.2224500179290771,
0.2567364275455475,
0.15453481674194336,
2.3875441551208496,
0.35750889778137207,
-0.690971851348877,
0.3767332434654236,
-0.7747147679328918,
0.9242821335792542,
-0.3807741701602936,
1.4607857465744019,
0.5461602210998535,
-0.89070063829422,
1.7492380142211914,
-0.38918787240982056,
0.6603803634643555,
-0.5693313479423523,
-0.6121574640274048,
-0.9779468178749084,
0.4310248792171478,
1.8109774589538574,
-0.35100871324539185,
1.6005882024765015,
-0.36422199010849,
-1.5587482452392578,
-1.6996041536331177,
0.9325002431869507,
0.4513309597969055,
-0.8296375870704651,
0.11684054881334305,
-0.3723120391368866,
-0.06365598738193512,
0.03146414831280708,
1.193048119544983,
1.2174246311187744,
0.7520627975463867,
-0.40491771697998047,
-0.8907289505004883,
0.18323048949241638,
-0.11944276839494705,
-0.6355746984481812,
-1.8212876319885254,
-0.4393446445465088,
0.17684832215309143,
0.581301748752594,
-1.1591694355010986,
1.6888153553009033,
1.0708770751953125,
2.0387356281280518,
0.9069681763648987,
-0.3409005403518677,
1.3881456851959229,
0.01618018187582493,
1.919573187828064,
-0.4708750545978546,
0.5627205967903137,
-0.25107014179229736,
-1.2715377807617188,
0.9186689853668213,
-0.36357322335243225,
-1.9257452487945557,
-0.952634871006012,
-0.9687252044677734,
-0.11738771945238113,
-0.7391564846038818,
0.987110435962677,
-0.26904600858688354,
-1.4117169380187988,
0.1923603117465973,
-0.5390414595603943,
0.13307857513427734,
-1.2421013116836548,
0.3707023859024048,
0.7025304436683655,
-0.6800850033760071,
-0.12378916144371033,
-0.20383551716804504,
-1.3633285760879517,
-0.45567429065704346,
0.23014095425605774,
1.9565883874893188,
-0.799175500869751,
0.9047348499298096,
0.995843231678009,
-0.8111371397972107,
0.08001292496919632,
0.22933489084243774,
-0.23811936378479004,
0.7496749758720398,
-0.9960357546806335,
-0.4222930371761322,
1.2305521965026855,
-0.3085252046585083,
-0.7025797367095947,
1.504637598991394,
0.6855900287628174,
-0.9916135668754578,
-0.13283178210258484,
-0.24606159329414368,
-0.7775389552116394,
-0.06915044784545898,
-1.4833444356918335,
-0.10233789682388306,
0.21914583444595337,
-1.4166176319122314,
-0.4820828139781952,
-0.18143713474273682,
1.4035011529922485,
-0.15502694249153137,
1.3257428407669067,
-0.3224993348121643,
-0.2522873878479004,
-0.37424325942993164,
-0.5555747747421265,
0.2847273051738739,
-0.21418613195419312,
-0.6798890233039856,
0.22412654757499695,
-0.9402252435684204,
0.339216023683548,
1.4443248510360718,
0.39146292209625244,
0.09571101516485214,
0.5768582224845886,
1.0577995777130127,
0.3880721628665924,
-0.06436629593372345,
-0.8756006956100464,
-1.4754005670547485,
2.0317885875701904,
-1.4867117404937744,
1.9393794536590576,
0.604290783405304,
-0.21986791491508484,
-1.8220958709716797,
-1.8836902379989624,
1.3649219274520874,
1.2968002557754517,
2.260840654373169,
0.4958328902721405,
0.3478923738002777,
-0.8303277492523193,
-0.8598142266273499,
0.30983513593673706,
-1.0800738334655762,
-0.5961547493934631,
0.08921430259943008,
2.1527791023254395,
1.7060737609863281,
-0.6726199984550476,
-0.10287727415561676,
-1.0692082643508911,
1.2388497591018677,
-0.16063860058784485,
0.3000698983669281,
1.9629665613174438,
-0.41160640120506287,
-1.1755982637405396,
1.242631435394287,
-2.375171184539795,
0.15180397033691406,
1.9963828325271606,
0.3760586082935333,
0.12128103524446487,
-1.4574532508850098,
-0.6464493274688721,
-0.2520792484283447,
-0.5445110201835632,
-1.289324164390564,
0.6625069975852966,
-0.2638333737850189,
-0.9281527400016785,
-1.4425376653671265,
0.13789063692092896,
-1.1175880432128906,
-1.6671749353408813,
0.4843905568122864,
1.9451199769973755,
2.1146578788757324,
-0.7686587572097778,
1.5388381481170654,
-0.11958321928977966,
0.11424960941076279,
1.1422866582870483,
1.2006760835647583,
3.011784553527832,
1.8795126676559448,
-1.2159894704818726,
0.6354548931121826,
-0.10690485686063766,
-0.6000236868858337,
1.2104451656341553,
-1.0012136697769165,
1.2712671756744385,
-0.26222509145736694,
-1.0799212455749512,
-1.2863538265228271,
0.9278815388679504,
0.3670443594455719,
0.13537612557411194,
-0.48713064193725586,
1.2880570888519287,
0.09975503385066986,
1.2759431600570679,
0.555863618850708,
-0.36784812808036804,
0.6216314435005188,
-0.4027567207813263,
-0.6088858842849731,
1.5363547801971436,
0.2470693588256836,
-1.5542365312576294,
-2.2613418102264404,
-0.2419549524784088,
-0.8227592706680298,
0.02785429358482361,
-0.48608115315437317,
-1.0064641237258911,
1.5683120489120483,
0.5076348781585693,
-1.2184277772903442,
-0.33893489837646484,
-0.32098233699798584,
-0.634599506855011,
2.766395092010498,
-1.2679213285446167,
-0.22886350750923157,
-0.8580766320228577,
-0.5755965709686279,
1.736883521080017,
-1.2576985359191895,
-0.08912990987300873,
-0.9503975510597229,
-0.5734351277351379,
-1.4802522659301758,
-0.5580499768257141,
0.014893021434545517,
-0.9619042277336121,
0.8138608336448669,
0.16696670651435852,
-1.0166008472442627,
-0.2654399573802948,
-0.7713226079940796,
0.9574557542800903,
-0.14462876319885254,
0.3086215555667877,
1.884966254234314,
0.38161158561706543,
-0.3815004825592041,
0.7979739308357239,
1.2057034969329834,
0.6013758778572083,
-0.6245723366737366,
0.16687214374542236,
-0.71348637342453,
0.31203004717826843,
-1.3394560813903809,
0.21750596165657043,
-3.0664045810699463,
0.6704674363136292,
-0.06946282088756561,
-0.15840691328048706,
-0.07575499266386032,
-1.377287745475769,
1.0820764303207397,
2.4386911392211914,
-1.3183934688568115,
0.4639553129673004,
0.3414745032787323,
1.224557638168335,
-1.4911084175109863,
0.3597869575023651,
-0.5425139665603638,
2.090796947479248,
0.23027601838111877,
1.223391056060791,
-0.524522066116333,
-2.089538812637329,
0.6165119409561157,
-1.283889651298523,
-1.0811100006103516,
0.7388603091239929,
-0.9357029795646667,
0.1695205271244049,
-1.4836933612823486,
-0.08473797142505646,
-0.9669076800346375,
-1.2459887266159058,
0.6796516180038452,
0.22838160395622253,
0.2943122684955597,
-0.49645933508872986,
0.43308088183403015,
-2.1982250213623047,
-1.4168998003005981,
-0.2626171410083771,
-1.0187273025512695,
0.5667450428009033,
-0.39972248673439026,
0.6601109504699707,
-0.18598368763923645,
0.14064884185791016,
0.3662830591201782,
1.3271297216415405,
3.451284646987915,
0.15130579471588135,
0.3071489930152893,
-0.0625009834766388,
-0.9549508094787598,
1.6785756349563599,
1.065614938735962,
-0.01786685921251774,
-0.5872164368629456,
-0.9913484454154968,
1.2975292205810547,
2.0027921199798584,
0.9845205545425415,
-0.038232311606407166,
-0.829133927822113,
-0.619251549243927,
-0.12103273719549179,
0.19251132011413574,
0.5490292310714722,
0.9260095953941345,
0.024775326251983643,
0.1469452679157257,
1.423448085784912,
1.2401877641677856,
-0.3837246000766754,
0.32828983664512634,
-0.9310151934623718,
-0.478302538394928,
0.4351295232772827,
0.373038649559021,
0.09626377373933792,
0.5097841024398804,
-0.9758908748626709,
-0.30942437052726746,
-0.20465651154518127,
-0.8341352939605713,
-0.6972286105155945,
-0.386880487203598,
-0.4300443232059479,
1.5842171907424927,
0.14784005284309387,
-0.6225865483283997,
-0.04745259881019592,
-0.7701232433319092,
-0.13248008489608765,
-1.1863343715667725,
0.24481669068336487,
-0.08309351652860641,
-0.07778982818126678,
-0.17033696174621582,
1.7259846925735474,
-1.0044324398040771,
-2.19110369682312,
0.25580865144729614,
0.44086796045303345,
-0.3532257676124573,
0.1376483142375946,
1.5534024238586426,
0.48894408345222473,
1.4226865768432617,
1.3311723470687866,
0.9561965465545654,
-0.668155312538147,
-1.2455673217773438,
0.719917893409729,
0.8624598383903503,
-1.42184317111969,
0.8741017580032349,
0.0035370932891964912,
-0.5181670784950256,
0.6989602446556091,
1.1921817064285278,
0.4451879858970642,
-1.9349610805511475,
0.8503466844558716,
-0.8979438543319702,
0.8523250818252563,
0.6432192325592041,
0.7280216813087463,
0.24157306551933289,
0.8837575912475586,
-1.155006766319275,
-1.2365788221359253,
-0.78650963306427,
-0.7626225352287292,
1.9508304595947266,
-0.29720643162727356,
0.667491614818573,
-0.19386547803878784,
-1.2305983304977417,
-0.06961087882518768,
0.6494090557098389,
0.18467062711715698,
-0.350694864988327,
0.8937370777130127,
-0.6540704965591431,
-1.160470962524414,
-1.4392787218093872,
-0.31501537561416626,
-1.1228224039077759,
-0.9428892731666565,
1.0682787895202637,
0.7017512321472168,
0.3085753321647644,
1.9418874979019165,
0.5549229979515076,
0.35570403933525085,
-2.626908779144287,
0.9148660898208618,
0.2861320376396179,
0.07226739823818207,
0.8194151520729065,
0.25523868203163147,
1.0942115783691406,
-0.14387571811676025,
0.548611581325531,
-2.2898926734924316,
2.241642475128174,
-0.36185675859451294,
0.7257948517799377,
0.11470524221658707,
-0.20464327931404114,
1.1259409189224243,
0.6482893228530884,
0.7030395865440369,
-1.244568109512329,
0.7444419264793396,
-0.5172819495201111,
1.1361340284347534,
0.982487678527832,
-0.8496086001396179,
0.1279466152191162,
1.3647843599319458,
0.5928187966346741,
-0.3740968406200409,
-0.9284955859184265,
-0.9579805135726929,
0.9214439988136292,
1.6055186986923218,
-0.1233389675617218,
0.09432689845561981,
0.7802194952964783,
0.5708605647087097,
-1.274416208267212,
0.022022472694516182,
-0.6885494589805603,
-0.5926558971405029,
1.6957694292068481,
2.0757734775543213,
-0.0905647873878479,
-0.13666686415672302,
-0.6341890096664429,
-1.2535752058029175,
0.7995381355285645,
-0.09088443964719772,
0.20760351419448853,
0.5963274836540222,
-0.760206401348114,
1.017500638961792,
0.7301523685455322,
0.8202508687973022,
0.049495846033096313,
0.34218457341194153,
0.5417003631591797,
-0.2309449017047882,
-1.03607976436615,
-0.27530738711357117,
-1.0469176769256592,
-2.5763039588928223,
0.42333391308784485,
-0.3843693733215332,
-1.3418428897857666,
-0.0034165778197348118,
-1.0555609464645386,
0.9392223358154297,
-0.5286499261856079,
-0.9603561162948608,
-1.5613783597946167,
0.1452317237854004,
-0.049862414598464966,
0.8502987027168274,
-1.5998262166976929,
-0.17226150631904602,
1.422606110572815,
0.8983628153800964,
-0.7332744002342224,
1.2170954942703247,
0.3152049481868744,
1.1217374801635742,
0.6480036377906799,
-0.5069124698638916,
0.6048639416694641,
0.011214058846235275,
-1.3535377979278564,
0.5119714140892029,
1.223635196685791,
0.07705377787351608,
1.3861472606658936,
-0.48518890142440796,
0.1309862732887268,
0.4869394898414612,
-0.6825187802314758,
-0.6163485646247864,
-0.40349119901657104,
0.7535693645477295,
0.10196442902088165,
-0.8851368427276611,
0.07455369085073471,
-0.14488011598587036,
-0.2262386977672577,
0.29510238766670227,
-1.4759845733642578,
-0.35918936133384705,
-0.5120900273323059,
-0.4589894413948059,
-1.3608057498931885,
0.06067602336406708,
1.456896185874939,
-0.7018011808395386,
-0.12477248907089233,
0.44678643345832825,
0.44575703144073486,
0.6072075366973877,
0.524113655090332,
-0.6724098920822144,
-0.23836106061935425,
-0.4299173355102539,
-0.2431088089942932,
0.32543420791625977,
1.2593218088150024,
-0.19057714939117432,
-0.8877051472663879,
0.7365178465843201,
-0.2692846357822418,
-0.018738538026809692,
1.9519767761230469,
0.00263407826423645,
-0.7185249924659729,
0.24675700068473816,
-0.7732800245285034,
1.795667290687561,
1.5262335538864136,
1.3510199785232544,
-0.06022636592388153,
-0.7390540838241577,
0.5055147409439087,
-0.18041473627090454,
-0.3550034165382385,
0.8518906831741333,
0.42666202783584595,
-0.16042372584342957,
-1.5262407064437866,
0.6469610333442688,
1.260826587677002,
-0.9291858077049255,
-0.6582291126251221,
0.039680782705545425,
-0.720935583114624,
1.0722582340240479,
0.6786275506019592,
0.4947696626186371,
0.3329613506793976,
1.6332464218139648,
0.7212979197502136,
-0.47343701124191284,
0.38978075981140137,
0.5061143636703491,
-0.10456099361181259,
-1.96010160446167,
-1.031004786491394,
0.43632885813713074,
-0.5088156461715698,
-1.5286861658096313,
1.360970139503479,
-1.0693726539611816,
-0.9753556251525879,
0.4748491942882538,
0.07246583700180054,
1.3712083101272583,
0.37114793062210083,
1.64084792137146,
1.969319462776184,
0.786447286605835,
0.27544909715652466,
1.3743083477020264,
-0.09138079732656479,
-0.46960002183914185,
1.8449161052703857,
-0.310094952583313,
0.37725916504859924,
1.1891279220581055,
-0.3153593838214874,
-1.0762759447097778,
-0.8056156039237976,
-1.1072129011154175,
-0.5124844908714294,
1.0930672883987427,
0.2704739570617676,
-1.2286895513534546,
0.1536514163017273,
1.550757884979248,
0.1576918661594391,
-0.32748639583587646,
0.5753929018974304,
0.4388168752193451,
-0.7253666520118713,
0.014580091461539268,
-0.9958613514900208,
0.42491239309310913,
-0.26118215918540955,
-0.4778405725955963,
0.29286643862724304,
0.35528454184532166,
1.3142995834350586,
-0.22124835848808289,
0.23273906111717224,
1.2000463008880615,
-1.4089585542678833,
1.413456916809082,
-0.6651865839958191,
0.19711729884147644,
-2.354789972305298,
1.36973237991333,
-0.6220190525054932,
1.9878910779953003,
-2.730726718902588,
0.4563019871711731,
-0.6947377324104309,
-0.4994760751724243,
0.31195068359375,
-0.41286081075668335,
0.020923946052789688,
-0.20196202397346497,
-1.0288125276565552,
0.042119089514017105,
-0.6797224283218384,
0.6025747060775757,
1.1157432794570923,
1.2919867038726807,
-1.034617304801941,
-0.36204907298088074,
-1.6802536249160767,
-0.1463322639465332,
-0.7197721004486084,
0.40027865767478943,
-2.128443717956543,
-0.2967577278614044,
-1.9435111284255981,
-2.275202989578247,
-1.3097816705703735,
-0.8578604459762573,
1.1736423969268799,
0.1315373182296753,
-0.9140964150428772,
1.2078278064727783,
-0.3196110725402832,
-1.8538727760314941,
1.0701645612716675,
-2.148421287536621
] |
https://github.com/huggingface/datasets/issues/5649 | The index column created with .to_sql() is dependent on the batch_size when writing | Thanks for reporting, @lsb.
We are investigating it.
On the other hand, please note that in the next `datasets` release, the index will not be created by default (see #5583). If you would like to have it, you will need to explicitly pass `index=True`. | ### Describe the bug
It seems like the "index" column is designed to be unique? The values are only unique per batch. The SQL index is not a unique index.
This can be a problem, for instance, when building a faiss index on a dataset and then trying to match up ids with a sql export.
### Steps to reproduce the bug
```
from datasets import Dataset
import sqlite3
db = sqlite3.connect(":memory:")
nice_numbers = Dataset.from_dict({"nice_number": range(101,106)})
nice_numbers.to_sql("nice1", db, batch_size=1)
nice_numbers.to_sql("nice2", db, batch_size=2)
print(db.execute("select * from nice1").fetchall()) # [(0, 101), (0, 102), (0, 103), (0, 104), (0, 105)]
print(db.execute("select * from nice2").fetchall()) # [(0, 101), (1, 102), (0, 103), (1, 104), (0, 105)]
```
### Expected behavior
I expected the "index" column to be unique
### Environment info
```
% datasets-cli env
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.10.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
zsh: segmentation fault datasets-cli env
``` | 252 | 44 | The index column created with .to_sql() is dependent on the batch_size when writing
### Describe the bug
It seems like the "index" column is designed to be unique? The values are only unique per batch. The SQL index is not a unique index.
This can be a problem, for instance, when building a faiss index on a dataset and then trying to match up ids with a sql export.
### Steps to reproduce the bug
```
from datasets import Dataset
import sqlite3
db = sqlite3.connect(":memory:")
nice_numbers = Dataset.from_dict({"nice_number": range(101,106)})
nice_numbers.to_sql("nice1", db, batch_size=1)
nice_numbers.to_sql("nice2", db, batch_size=2)
print(db.execute("select * from nice1").fetchall()) # [(0, 101), (0, 102), (0, 103), (0, 104), (0, 105)]
print(db.execute("select * from nice2").fetchall()) # [(0, 101), (1, 102), (0, 103), (1, 104), (0, 105)]
```
### Expected behavior
I expected the "index" column to be unique
### Environment info
```
% datasets-cli env
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.10.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
zsh: segmentation fault datasets-cli env
```
Thanks for reporting, @lsb.
We are investigating it.
On the other hand, please note that in the next `datasets` release, the index will not be created by default (see #5583). If you would like to have it, you will need to explicitly pass `index=True`. | [
-1.1808711290359497,
-0.8976662755012512,
-0.7335754632949829,
1.436436414718628,
-0.1361965835094452,
-1.1997706890106201,
0.20258775353431702,
-1.0767230987548828,
1.659774899482727,
-0.7932363748550415,
0.3628166913986206,
-1.6527295112609863,
0.08775049448013306,
-0.5531241297721863,
-0.7216796875,
-0.7917060852050781,
-0.55120450258255,
-0.7736012935638428,
1.0785117149353027,
2.5561423301696777,
1.2774114608764648,
-1.340282678604126,
2.7112879753112793,
0.7302142381668091,
-0.12573112547397614,
-0.9374632835388184,
0.49489161372184753,
-0.13744567334651947,
-1.3953397274017334,
-0.42605069279670715,
-0.9765087962150574,
-0.11187946796417236,
-0.5802866220474243,
-0.5759949088096619,
0.010362669825553894,
0.40076854825019836,
-0.37179067730903625,
-0.4335987865924835,
-0.5153427720069885,
-0.8320505619049072,
0.5300101041793823,
-0.4044981598854065,
0.9965909719467163,
-0.3000256419181824,
1.7726702690124512,
-0.5991223454475403,
0.5908221006393433,
0.6840764284133911,
1.367937445640564,
0.25299790501594543,
-0.06503655761480331,
0.5124804973602295,
0.36278295516967773,
-0.003076587338000536,
0.5544841289520264,
1.1283632516860962,
0.6797575950622559,
0.4547525644302368,
0.7587764859199524,
-2.207847833633423,
1.3208727836608887,
-1.0954244136810303,
0.298898309469223,
1.2719680070877075,
-0.9163467288017273,
0.29591041803359985,
-1.7152681350708008,
-0.09551720321178436,
0.5765799880027771,
-2.209106206893921,
0.2883114218711853,
-1.3087642192840576,
-0.48349446058273315,
1.0900710821151733,
0.47806817293167114,
-1.2483848333358765,
0.061965420842170715,
-0.4039604067802429,
0.9328146576881409,
0.3525925874710083,
1.066833734512329,
-1.7705047130584717,
-0.06465820968151093,
-0.36317184567451477,
0.11603139340877533,
-1.226684808731079,
-1.5455827713012695,
0.6279053092002869,
0.6626847386360168,
0.548923909664154,
-0.18366947770118713,
1.0291328430175781,
-1.0938527584075928,
0.731657087802887,
-1.0279513597488403,
-1.7493482828140259,
-1.455795168876648,
-2.3361387252807617,
-2.257490873336792,
0.7121664881706238,
-0.4637886881828308,
-0.5807008147239685,
2.1084399223327637,
-1.0867350101470947,
-1.6972564458847046,
1.1711081266403198,
0.27542588114738464,
-0.1076914444565773,
2.4071173667907715,
0.1703346073627472,
-0.6794893741607666,
0.5833601951599121,
-0.8050345182418823,
0.8502113223075867,
-0.36216309666633606,
1.3110069036483765,
0.3581755757331848,
-1.0552172660827637,
1.6004866361618042,
-0.4162103831768036,
0.5517745614051819,
-0.5693591833114624,
-0.3783964514732361,
-0.7714816927909851,
0.35293450951576233,
1.8845088481903076,
-0.2606201171875,
1.459666132926941,
-0.314088374376297,
-1.5504541397094727,
-1.6219278573989868,
0.8554736971855164,
0.4834352731704712,
-0.7618831992149353,
0.112749844789505,
-0.36817672848701477,
0.09108098596334457,
0.03077484481036663,
1.1893248558044434,
1.351011037826538,
0.6943390369415283,
-0.35004836320877075,
-0.9813235998153687,
0.17628628015518188,
-0.10075081139802933,
-0.8442070484161377,
-1.6963106393814087,
-0.4064810276031494,
0.06179441511631012,
0.5931999683380127,
-1.1273101568222046,
1.856481671333313,
0.9293210506439209,
1.909871220588684,
1.0250935554504395,
-0.3205774128437042,
1.5053139925003052,
0.107895128428936,
1.8714648485183716,
-0.49873995780944824,
0.6701023578643799,
-0.49927574396133423,
-1.16677725315094,
0.8382740616798401,
-0.3723224401473999,
-2.098810911178589,
-0.7183900475502014,
-0.7203474044799805,
-0.25301143527030945,
-0.8271880745887756,
1.0067015886306763,
-0.26238784193992615,
-1.39625084400177,
0.2682730257511139,
-0.7937880754470825,
0.03290171921253204,
-1.295584797859192,
0.3352026343345642,
0.6622597575187683,
-0.6709879040718079,
0.09577906131744385,
-0.2748378813266754,
-1.3199436664581299,
-0.3930637240409851,
0.2560977637767792,
1.8366621732711792,
-0.7286244630813599,
0.9478288888931274,
1.0567268133163452,
-0.719858705997467,
-0.08248522132635117,
0.37802428007125854,
-0.3592008352279663,
0.8730722069740295,
-0.9903365969657898,
-0.4335571825504303,
1.274438500404358,
-0.17627428472042084,
-0.5566314458847046,
1.3747986555099487,
0.6049160957336426,
-1.0139559507369995,
-0.21016058325767517,
-0.11038940399885178,
-0.8454878926277161,
0.18486781418323517,
-1.6202110052108765,
-0.027185890823602676,
0.5046756863594055,
-1.557557225227356,
-0.5151083469390869,
-0.11183875054121017,
1.2276220321655273,
-0.08539310842752457,
1.4124343395233154,
-0.3654864430427551,
-0.10206717997789383,
-0.4229455888271332,
-0.35317423939704895,
0.1190778911113739,
-0.10633722692728043,
-0.5478424429893494,
0.25498563051223755,
-0.7437406778335571,
0.4099927544593811,
1.4277582168579102,
0.32392093539237976,
0.1183917373418808,
0.5109981894493103,
1.0172481536865234,
0.37811532616615295,
-0.11409519612789154,
-0.8565477132797241,
-1.647855281829834,
2.1287178993225098,
-1.434617280960083,
1.9472635984420776,
0.7624252438545227,
-0.04543319344520569,
-1.7871335744857788,
-1.8892076015472412,
1.356547236442566,
1.1151049137115479,
2.321031093597412,
0.5346751809120178,
0.4381358325481415,
-0.8012993931770325,
-0.6615064144134521,
0.38192760944366455,
-1.0106934309005737,
-0.7782965302467346,
0.13170009851455688,
2.409022331237793,
1.7397297620773315,
-0.4018796682357788,
-0.1576959788799286,
-1.0972464084625244,
1.4055746793746948,
-0.2531101405620575,
0.1886989325284958,
1.8713040351867676,
-0.3144855499267578,
-1.0809969902038574,
1.368364930152893,
-2.2969167232513428,
0.14426963031291962,
1.9745230674743652,
0.26966920495033264,
0.10084281116724014,
-1.3037225008010864,
-0.6644588112831116,
-0.2800249755382538,
-0.37389442324638367,
-1.2677209377288818,
0.5214198231697083,
-0.1866108924150467,
-0.825859785079956,
-1.335146188735962,
0.1290571689605713,
-1.1504480838775635,
-1.6581687927246094,
0.22236399352550507,
1.7848914861679077,
2.0998106002807617,
-0.7373812198638916,
1.5613765716552734,
-0.25453105568885803,
0.1955411434173584,
1.1274133920669556,
1.2278735637664795,
3.0903868675231934,
1.9140236377716064,
-1.3358585834503174,
0.6551461219787598,
-0.1350189447402954,
-0.5188717246055603,
1.2541887760162354,
-1.2523000240325928,
1.380679726600647,
-0.09675756841897964,
-1.2188029289245605,
-1.1777735948562622,
0.9386346936225891,
0.44355350732803345,
0.06980903446674347,
-0.42416608333587646,
1.1403048038482666,
0.10577176511287689,
1.2347053289413452,
0.5895425081253052,
-0.2922607362270355,
0.6615490913391113,
-0.3946240246295929,
-0.48668625950813293,
1.510050654411316,
0.2918440103530884,
-1.433600664138794,
-2.254206418991089,
-0.16936156153678894,
-0.9123456478118896,
0.09020806103944778,
-0.724157452583313,
-0.869844913482666,
1.5903557538986206,
0.3138120472431183,
-1.1910419464111328,
-0.2592369616031647,
-0.335161030292511,
-0.5526604056358337,
2.7382595539093018,
-1.3968561887741089,
-0.2655005156993866,
-1.019201397895813,
-0.6777498126029968,
1.6009438037872314,
-1.189297080039978,
-0.1913602501153946,
-1.0466034412384033,
-0.5014057159423828,
-1.1876013278961182,
-0.5475203394889832,
0.00706866942346096,
-0.940444827079773,
0.8010714054107666,
0.16998951137065887,
-1.2734270095825195,
-0.3324185013771057,
-0.9143839478492737,
0.8216564655303955,
-0.13313831388950348,
0.14201653003692627,
1.7891476154327393,
0.3362410366535187,
-0.3478064239025116,
0.784527599811554,
1.1926281452178955,
0.6107996702194214,
-0.5465503931045532,
0.24625757336616516,
-0.68507981300354,
0.3711445927619934,
-1.198081135749817,
0.32541704177856445,
-2.804320812225342,
0.5795982480049133,
-0.12014170736074448,
-0.0753994807600975,
-0.037009626626968384,
-1.309381127357483,
1.0777174234390259,
2.5701003074645996,
-1.1879956722259521,
0.5516356825828552,
0.24352651834487915,
1.1830110549926758,
-1.6111481189727783,
0.1925239861011505,
-0.5165942907333374,
2.1083946228027344,
0.20490673184394836,
1.1524088382720947,
-0.5035962462425232,
-2.242328405380249,
0.6902520656585693,
-1.3364030122756958,
-1.1442705392837524,
0.6887833476066589,
-0.9219484925270081,
0.13079975545406342,
-1.2928398847579956,
-0.19642670452594757,
-0.7857721447944641,
-1.1312512159347534,
0.6315308213233948,
0.1353587806224823,
0.5039348602294922,
-0.5276978611946106,
0.314581960439682,
-2.217294931411743,
-1.3210062980651855,
-0.23807361721992493,
-0.9004486203193665,
0.47831177711486816,
-0.366925984621048,
0.7052374482154846,
-0.2334509789943695,
-0.08141439408063889,
0.4382280707359314,
1.37693190574646,
3.4218194484710693,
0.1286584585905075,
0.35420870780944824,
-0.18038193881511688,
-0.9416475892066956,
1.391186237335205,
0.8926494717597961,
-0.20384255051612854,
-0.6229143738746643,
-1.0878818035125732,
1.3281605243682861,
1.9476999044418335,
0.9820635318756104,
0.029139915481209755,
-0.8167048096656799,
-0.773588240146637,
-0.014259761199355125,
0.1376931220293045,
0.36732205748558044,
0.9539939761161804,
0.14736445248126984,
0.04307851940393448,
1.5428829193115234,
1.1485506296157837,
-0.34011709690093994,
0.38246646523475647,
-0.7292860150337219,
-0.46158942580223083,
0.5850692987442017,
0.24951156973838806,
0.05192767083644867,
0.38031888008117676,
-1.0003511905670166,
-0.3187589645385742,
-0.3901544213294983,
-0.8965381979942322,
-0.7677000164985657,
-0.40416285395622253,
-0.3764699399471283,
1.7366985082626343,
0.07529117166996002,
-0.46760067343711853,
-0.029553068801760674,
-0.7994645833969116,
-0.03150736540555954,
-1.030430793762207,
0.24574947357177734,
-0.13600297272205353,
-0.1328096091747284,
-0.15916118025779724,
1.7080447673797607,
-0.9385384321212769,
-2.1378486156463623,
0.21429552137851715,
0.18921393156051636,
-0.2341243326663971,
0.20001709461212158,
1.6070388555526733,
0.5958300828933716,
1.5090582370758057,
1.3895766735076904,
0.9685739278793335,
-0.6508705615997314,
-1.312907099723816,
0.7233563661575317,
0.9935218095779419,
-1.474006175994873,
0.752470076084137,
0.037113577127456665,
-0.5415429472923279,
0.5809672474861145,
1.1442140340805054,
0.46771201491355896,
-1.9468727111816406,
0.8105684518814087,
-0.99234539270401,
0.8262012600898743,
0.697390079498291,
0.7076043486595154,
0.14635120332241058,
0.7535308003425598,
-1.290188193321228,
-1.1359446048736572,
-0.6881703734397888,
-0.7381332516670227,
2.0081851482391357,
-0.28682997822761536,
0.571800172328949,
-0.2800760269165039,
-1.3325222730636597,
-0.06191530078649521,
0.6605610251426697,
0.32223954796791077,
-0.5590934753417969,
0.8018218874931335,
-0.6691800951957703,
-1.125891089439392,
-1.4637306928634644,
-0.42983168363571167,
-1.1373029947280884,
-0.8815796971321106,
1.0416553020477295,
0.7088132500648499,
0.3515574336051941,
1.8637964725494385,
0.6863768100738525,
0.29323047399520874,
-2.57214617729187,
0.8876696228981018,
0.2681642770767212,
-0.12246071547269821,
0.8441250920295715,
0.37597909569740295,
0.9780700206756592,
-0.14027486741542816,
0.5960097908973694,
-2.4170196056365967,
2.3504109382629395,
-0.20883680880069733,
0.6727830171585083,
0.07266020774841309,
-0.11036395281553268,
1.0690441131591797,
0.5911035537719727,
0.5151098370552063,
-1.084859013557434,
0.5827421545982361,
-0.5866105556488037,
1.3114370107650757,
0.8516669273376465,
-0.8676363825798035,
-0.024073027074337006,
1.326098918914795,
0.39571288228034973,
-0.4344085454940796,
-0.978492259979248,
-0.942244827747345,
0.9839919805526733,
1.7138727903366089,
-0.10620960593223572,
0.03542110323905945,
0.8328210115432739,
0.6787942051887512,
-1.331106424331665,
0.005511532537639141,
-0.7516767382621765,
-0.7711432576179504,
1.6425285339355469,
2.2090635299682617,
-0.14927026629447937,
-0.19576700031757355,
-0.72111976146698,
-1.3055495023727417,
0.8847957253456116,
0.032665520906448364,
0.0938863605260849,
0.680198073387146,
-0.5620017647743225,
1.0178030729293823,
0.9653083086013794,
0.9138023853302002,
0.29541951417922974,
0.20048575103282928,
0.31273284554481506,
-0.310452938079834,
-1.121198058128357,
-0.23971830308437347,
-1.0370092391967773,
-2.6199684143066406,
0.44437363743782043,
-0.22276832163333893,
-1.5179283618927002,
0.08330775797367096,
-0.9675905108451843,
0.8726140856742859,
-0.4647829234600067,
-1.0619964599609375,
-1.4958609342575073,
0.23228497803211212,
-0.019686242565512657,
1.008703351020813,
-1.6762313842773438,
-0.12199155986309052,
1.1672793626785278,
0.8742989301681519,
-0.712416410446167,
0.9155303835868835,
0.269402414560318,
0.9766131043434143,
0.9330467581748962,
-0.3722526729106903,
0.5808514356613159,
0.08880496770143509,
-1.3363837003707886,
0.3848603069782257,
1.258582353591919,
0.16955694556236267,
1.383605718612671,
-0.5119619369506836,
0.017781555652618408,
0.34834837913513184,
-0.5175407528877258,
-0.4311716854572296,
-0.49063098430633545,
0.6174041032791138,
-0.0028981477953493595,
-0.9207189083099365,
-0.056681595742702484,
0.0625554770231247,
-0.28026771545410156,
0.14174695312976837,
-1.4561890363693237,
-0.10600978881120682,
-0.36646348237991333,
-0.6137014031410217,
-1.2557904720306396,
-0.23957255482673645,
1.3878322839736938,
-0.7704703211784363,
-0.11316125094890594,
0.497008353471756,
0.28896525502204895,
0.5689043402671814,
0.6923772692680359,
-0.6273304224014282,
-0.3259615898132324,
-0.1542644500732422,
-0.3424029052257538,
0.31731319427490234,
1.4419552087783813,
-0.02697722241282463,
-0.949378252029419,
0.6746919751167297,
-0.29869168996810913,
0.1400204747915268,
1.8525782823562622,
0.07085341215133667,
-0.7975674867630005,
0.293316125869751,
-0.6208104491233826,
1.8950437307357788,
1.7284520864486694,
1.2366033792495728,
-0.12698473036289215,
-0.9813882112503052,
0.6778688430786133,
-0.33270102739334106,
-0.33007732033729553,
0.8396914005279541,
0.2853113114833832,
-0.2616288959980011,
-1.388556957244873,
0.7569331526756287,
1.2611405849456787,
-0.8100313544273376,
-0.8214285969734192,
0.07823729515075684,
-0.839379072189331,
1.1730847358703613,
0.7335115075111389,
0.39610135555267334,
0.25173118710517883,
1.6793384552001953,
0.8380341529846191,
-0.4475030303001404,
0.5588968396186829,
0.5550135374069214,
-0.1711370348930359,
-2.11690616607666,
-1.1861793994903564,
0.2890506982803345,
-0.5994797945022583,
-1.538700819015503,
1.3247474431991577,
-1.1944153308868408,
-0.9707075953483582,
0.5702165961265564,
0.0626857578754425,
1.4381048679351807,
0.4078563153743744,
1.5177192687988281,
2.0771031379699707,
0.9228520393371582,
0.4450813829898834,
1.278641939163208,
-0.1451771855354309,
-0.3263319134712219,
1.7634600400924683,
-0.336858332157135,
0.5095593333244324,
1.088313102722168,
-0.30371469259262085,
-1.061936378479004,
-0.7425567507743835,
-1.2629420757293701,
-0.7914246320724487,
1.150517225265503,
0.024848682805895805,
-1.0731801986694336,
0.27480968832969666,
1.5897940397262573,
0.056602977216243744,
-0.2729405164718628,
0.6480259895324707,
0.4306650757789612,
-0.7776597738265991,
-0.07550553977489471,
-0.8777331113815308,
0.5026511549949646,
-0.3058946132659912,
-0.41459372639656067,
0.39006906747817993,
0.43268129229545593,
1.3399518728256226,
-0.05702006071805954,
0.11103096604347229,
1.073927879333496,
-1.4909502267837524,
1.5018177032470703,
-0.7228267788887024,
0.26508432626724243,
-2.2826271057128906,
1.3724722862243652,
-0.7988884449005127,
1.8719158172607422,
-2.725414276123047,
0.44610536098480225,
-0.4985100030899048,
-0.6347111463546753,
0.3166816532611847,
-0.29828324913978577,
0.17607218027114868,
-0.14486797153949738,
-1.1631872653961182,
-0.07927636057138443,
-0.6248595118522644,
0.5751060843467712,
1.0788434743881226,
1.3629456758499146,
-1.0966852903366089,
-0.3252262771129608,
-1.73000967502594,
-0.07458806037902832,
-0.645106315612793,
0.27394405007362366,
-1.95033860206604,
-0.21558688580989838,
-1.8899537324905396,
-2.3488376140594482,
-1.25971257686615,
-0.8548556566238403,
1.2643969058990479,
0.12249131500720978,
-0.872752845287323,
1.2470964193344116,
-0.42768359184265137,
-1.9142491817474365,
1.0991239547729492,
-2.2505412101745605
] |
https://github.com/huggingface/datasets/issues/5649 | The index column created with .to_sql() is dependent on the batch_size when writing | I think this is low enough priority for me to close this as Won't Fix. If I need any primary keys I can generate them beforehand. Feel free to reopen. | ### Describe the bug
It seems like the "index" column is designed to be unique? The values are only unique per batch. The SQL index is not a unique index.
This can be a problem, for instance, when building a faiss index on a dataset and then trying to match up ids with a sql export.
### Steps to reproduce the bug
```
from datasets import Dataset
import sqlite3
db = sqlite3.connect(":memory:")
nice_numbers = Dataset.from_dict({"nice_number": range(101,106)})
nice_numbers.to_sql("nice1", db, batch_size=1)
nice_numbers.to_sql("nice2", db, batch_size=2)
print(db.execute("select * from nice1").fetchall()) # [(0, 101), (0, 102), (0, 103), (0, 104), (0, 105)]
print(db.execute("select * from nice2").fetchall()) # [(0, 101), (1, 102), (0, 103), (1, 104), (0, 105)]
```
### Expected behavior
I expected the "index" column to be unique
### Environment info
```
% datasets-cli env
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.10.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
zsh: segmentation fault datasets-cli env
``` | 252 | 30 | The index column created with .to_sql() is dependent on the batch_size when writing
### Describe the bug
It seems like the "index" column is designed to be unique? The values are only unique per batch. The SQL index is not a unique index.
This can be a problem, for instance, when building a faiss index on a dataset and then trying to match up ids with a sql export.
### Steps to reproduce the bug
```
from datasets import Dataset
import sqlite3
db = sqlite3.connect(":memory:")
nice_numbers = Dataset.from_dict({"nice_number": range(101,106)})
nice_numbers.to_sql("nice1", db, batch_size=1)
nice_numbers.to_sql("nice2", db, batch_size=2)
print(db.execute("select * from nice1").fetchall()) # [(0, 101), (0, 102), (0, 103), (0, 104), (0, 105)]
print(db.execute("select * from nice2").fetchall()) # [(0, 101), (1, 102), (0, 103), (1, 104), (0, 105)]
```
### Expected behavior
I expected the "index" column to be unique
### Environment info
```
% datasets-cli env
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.10.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.9.6
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
zsh: segmentation fault datasets-cli env
```
I think this is low enough priority for me to close this as Won't Fix. If I need any primary keys I can generate them beforehand. Feel free to reopen. | [
-1.186758041381836,
-0.8972295522689819,
-0.7346424460411072,
1.4334063529968262,
-0.10345949977636337,
-1.1754729747772217,
0.18971529603004456,
-1.0659135580062866,
1.6534698009490967,
-0.787743866443634,
0.397875040769577,
-1.6621402502059937,
0.10325346887111664,
-0.5468894243240356,
-0.7083077430725098,
-0.7793852686882019,
-0.521335244178772,
-0.770650327205658,
1.0759261846542358,
2.570161819458008,
1.2505483627319336,
-1.3556461334228516,
2.7051339149475098,
0.7246211767196655,
-0.1171509176492691,
-0.9568291306495667,
0.5028050541877747,
-0.09548363834619522,
-1.3878825902938843,
-0.43504223227500916,
-0.9645920991897583,
-0.09697739779949188,
-0.5878221392631531,
-0.5632418990135193,
-0.020315304398536682,
0.4103572964668274,
-0.3612038195133209,
-0.44168785214424133,
-0.504055917263031,
-0.8393473029136658,
0.5178887844085693,
-0.40016135573387146,
0.9623384475708008,
-0.2981134057044983,
1.7615060806274414,
-0.5980873703956604,
0.6017611622810364,
0.6950118541717529,
1.3503425121307373,
0.2512756288051605,
-0.09407346695661545,
0.4994859993457794,
0.3790093660354614,
-0.011756271123886108,
0.558612048625946,
1.1239690780639648,
0.6776590943336487,
0.4592062830924988,
0.7286500930786133,
-2.20346736907959,
1.3318911790847778,
-1.095768928527832,
0.3042251467704773,
1.2921626567840576,
-0.9117317199707031,
0.30944591760635376,
-1.724236011505127,
-0.12368465960025787,
0.5693712830543518,
-2.2135508060455322,
0.2758576571941376,
-1.3238945007324219,
-0.47790321707725525,
1.059261441230774,
0.4801287353038788,
-1.2682350873947144,
0.05350085720419884,
-0.4023900032043457,
0.9112855195999146,
0.32677847146987915,
1.079883098602295,
-1.7427769899368286,
-0.07875171303749084,
-0.3494371175765991,
0.11142350733280182,
-1.2161791324615479,
-1.5474622249603271,
0.6074153184890747,
0.6703935265541077,
0.5374904274940491,
-0.17012962698936462,
0.9949288368225098,
-1.1135073900222778,
0.746479332447052,
-1.0186599493026733,
-1.765411615371704,
-1.4597631692886353,
-2.3547329902648926,
-2.263340950012207,
0.7096310257911682,
-0.45234036445617676,
-0.5912347435951233,
2.1058828830718994,
-1.099342942237854,
-1.700116515159607,
1.1825817823410034,
0.26224908232688904,
-0.11934997141361237,
2.429478645324707,
0.17608115077018738,
-0.6992534399032593,
0.5935349464416504,
-0.8153374195098877,
0.843390941619873,
-0.3559591770172119,
1.3191605806350708,
0.3775317668914795,
-1.046476125717163,
1.6110795736312866,
-0.390646755695343,
0.5511568784713745,
-0.571682333946228,
-0.37245628237724304,
-0.7736498713493347,
0.37017685174942017,
1.8718016147613525,
-0.23975661396980286,
1.4719247817993164,
-0.3004699945449829,
-1.5439070463180542,
-1.5991027355194092,
0.83871990442276,
0.4801274538040161,
-0.8083661198616028,
0.11945171654224396,
-0.37377557158470154,
0.11808741092681885,
0.07479996979236603,
1.2109683752059937,
1.3690720796585083,
0.6837807893753052,
-0.38083261251449585,
-0.9675946235656738,
0.17316265404224396,
-0.09534163773059845,
-0.8177677392959595,
-1.7202482223510742,
-0.37337130308151245,
0.08598784357309341,
0.6165124177932739,
-1.1435390710830688,
1.8602696657180786,
0.9538522958755493,
1.8931710720062256,
1.0361088514328003,
-0.3018381595611572,
1.4862260818481445,
0.0854463130235672,
1.8908079862594604,
-0.49312809109687805,
0.6763927340507507,
-0.4629001319408417,
-1.1560418605804443,
0.8511608839035034,
-0.36867979168891907,
-2.096928596496582,
-0.7553681135177612,
-0.7422100305557251,
-0.2526039183139801,
-0.827458918094635,
0.9936625957489014,
-0.2550790011882782,
-1.3988595008850098,
0.2676761746406555,
-0.7883954644203186,
0.04474755749106407,
-1.2854160070419312,
0.3243470788002014,
0.6362138986587524,
-0.6548125147819519,
0.09643697738647461,
-0.2737201750278473,
-1.326088547706604,
-0.38488245010375977,
0.2740132212638855,
1.821205973625183,
-0.7472373247146606,
0.9640383720397949,
1.0432993173599243,
-0.6993783712387085,
-0.047552891075611115,
0.38586708903312683,
-0.35007748007774353,
0.8937647938728333,
-0.9829314351081848,
-0.42688417434692383,
1.2629773616790771,
-0.19535359740257263,
-0.5535451769828796,
1.3920389413833618,
0.6226902008056641,
-1.0063536167144775,
-0.22691430151462555,
-0.1298053115606308,
-0.8664710521697998,
0.1690209060907364,
-1.6409823894500732,
-0.06216902658343315,
0.4999661147594452,
-1.5529857873916626,
-0.4767487049102783,
-0.11245030164718628,
1.2399412393569946,
-0.09435012191534042,
1.4113966226577759,
-0.39086875319480896,
-0.10318812727928162,
-0.42203617095947266,
-0.35150519013404846,
0.12880025804042816,
-0.1037791520357132,
-0.5465627908706665,
0.25957223773002625,
-0.7457571029663086,
0.39949938654899597,
1.424992322921753,
0.34130194783210754,
0.13149496912956238,
0.5066859722137451,
1.0362908840179443,
0.35441866517066956,
-0.10688883066177368,
-0.8399474024772644,
-1.6533656120300293,
2.139188051223755,
-1.428983211517334,
1.9507173299789429,
0.7770006060600281,
-0.03988885506987572,
-1.7856941223144531,
-1.89469575881958,
1.3613576889038086,
1.117271065711975,
2.3376989364624023,
0.5305176973342896,
0.42605122923851013,
-0.8041750192642212,
-0.6533527970314026,
0.35365837812423706,
-1.0353920459747314,
-0.7800744771957397,
0.1172725111246109,
2.3929646015167236,
1.7542409896850586,
-0.4022742211818695,
-0.14711594581604004,
-1.107532024383545,
1.4116010665893555,
-0.24783873558044434,
0.16456826031208038,
1.9233574867248535,
-0.3241579532623291,
-1.0771313905715942,
1.37823486328125,
-2.3010621070861816,
0.15172643959522247,
1.9940258264541626,
0.2719559669494629,
0.08652719110250473,
-1.3134609460830688,
-0.6602290868759155,
-0.2804744839668274,
-0.3795853853225708,
-1.245201587677002,
0.5409830808639526,
-0.1832645684480667,
-0.8357954621315002,
-1.3577828407287598,
0.12024238705635071,
-1.1631536483764648,
-1.688462734222412,
0.24363109469413757,
1.7746927738189697,
2.101283073425293,
-0.7230907678604126,
1.5603257417678833,
-0.2419416308403015,
0.19935189187526703,
1.1495333909988403,
1.2154568433761597,
3.0725138187408447,
1.9092090129852295,
-1.3254376649856567,
0.6389232873916626,
-0.16024550795555115,
-0.527492880821228,
1.2293976545333862,
-1.2739832401275635,
1.370868444442749,
-0.10025486350059509,
-1.2159337997436523,
-1.1666425466537476,
0.9516887068748474,
0.4226616621017456,
0.07824276387691498,
-0.43365755677223206,
1.1446952819824219,
0.11586616933345795,
1.2371119260787964,
0.5651146769523621,
-0.27336981892585754,
0.6595039367675781,
-0.4023096561431885,
-0.4776719808578491,
1.5160945653915405,
0.2758523225784302,
-1.448036551475525,
-2.271742105484009,
-0.1767222136259079,
-0.9047988653182983,
0.08206389099359512,
-0.7219061255455017,
-0.8802196979522705,
1.5783919095993042,
0.32582247257232666,
-1.1869226694107056,
-0.25935617089271545,
-0.34509846568107605,
-0.5674365162849426,
2.7489359378814697,
-1.3907324075698853,
-0.26882418990135193,
-1.0270205736160278,
-0.6997524499893188,
1.6130045652389526,
-1.1920806169509888,
-0.19388890266418457,
-1.021766185760498,
-0.5066184997558594,
-1.193360447883606,
-0.5183969140052795,
0.0008936189115047455,
-0.9712288975715637,
0.7828468084335327,
0.1505717635154724,
-1.2524449825286865,
-0.3325323760509491,
-0.9065024256706238,
0.7909367084503174,
-0.1439955234527588,
0.15370875597000122,
1.763028621673584,
0.33725470304489136,
-0.35064175724983215,
0.8070809841156006,
1.1912281513214111,
0.6160658597946167,
-0.5356336236000061,
0.23086507618427277,
-0.6759196519851685,
0.36491549015045166,
-1.1758382320404053,
0.3389657735824585,
-2.80517315864563,
0.5774742364883423,
-0.13135004043579102,
-0.06310644745826721,
-0.0531102679669857,
-1.309165120124817,
1.097119927406311,
2.5512795448303223,
-1.1681435108184814,
0.5588659644126892,
0.2299460917711258,
1.180525302886963,
-1.6159791946411133,
0.23466244339942932,
-0.5138087272644043,
2.1064822673797607,
0.21581539511680603,
1.1480522155761719,
-0.489330917596817,
-2.2434277534484863,
0.6948291063308716,
-1.3427456617355347,
-1.1315256357192993,
0.6864274144172668,
-0.9211243391036987,
0.1358383744955063,
-1.2996604442596436,
-0.21038718521595,
-0.8044093251228333,
-1.1081178188323975,
0.6093426942825317,
0.1260104924440384,
0.48977968096733093,
-0.5149874687194824,
0.3038618266582489,
-2.2585854530334473,
-1.353021264076233,
-0.22469517588615417,
-0.9282656908035278,
0.4944715201854706,
-0.37681394815444946,
0.6918160915374756,
-0.23970858752727509,
-0.064276784658432,
0.4097214639186859,
1.3911021947860718,
3.4042611122131348,
0.15559810400009155,
0.39328011870384216,
-0.19033513963222504,
-0.9690157175064087,
1.4062469005584717,
0.8752909898757935,
-0.19792349636554718,
-0.6324975490570068,
-1.091434359550476,
1.3312729597091675,
1.944179892539978,
0.981846034526825,
0.013299853540956974,
-0.8124110102653503,
-0.7557401657104492,
-0.01486488152295351,
0.1507703959941864,
0.3922141194343567,
0.9590317010879517,
0.14102834463119507,
0.039253175258636475,
1.5295441150665283,
1.1469478607177734,
-0.35915201902389526,
0.39775392413139343,
-0.7399929165840149,
-0.43664512038230896,
0.5597280859947205,
0.25405439734458923,
0.06690996885299683,
0.3798161745071411,
-0.9938352108001709,
-0.313375324010849,
-0.3796238303184509,
-0.9105615019798279,
-0.7890954613685608,
-0.40479809045791626,
-0.37246420979499817,
1.726650595664978,
0.09826061874628067,
-0.48027458786964417,
-0.039793677628040314,
-0.8006796836853027,
-0.05105525627732277,
-1.0052021741867065,
0.22774448990821838,
-0.11317935585975647,
-0.11613324284553528,
-0.14643076062202454,
1.7290916442871094,
-0.9396121501922607,
-2.1328632831573486,
0.22394943237304688,
0.18646179139614105,
-0.2351725697517395,
0.19325163960456848,
1.6137146949768066,
0.5894120931625366,
1.5044147968292236,
1.382036566734314,
0.9374434947967529,
-0.6507262587547302,
-1.3235803842544556,
0.722900927066803,
0.985590934753418,
-1.4365644454956055,
0.7774379253387451,
0.017422258853912354,
-0.5292122960090637,
0.5696168541908264,
1.170728325843811,
0.48043960332870483,
-1.942634105682373,
0.7988281846046448,
-0.9887924194335938,
0.8153417706489563,
0.6944867968559265,
0.6940097808837891,
0.13705264031887054,
0.7184075713157654,
-1.2952927350997925,
-1.1206849813461304,
-0.7077313661575317,
-0.7250402569770813,
1.9995325803756714,
-0.279363214969635,
0.575815737247467,
-0.2448742389678955,
-1.3292310237884521,
-0.05680036172270775,
0.688758909702301,
0.3320125341415405,
-0.5441274642944336,
0.8010036945343018,
-0.6358023881912231,
-1.1462408304214478,
-1.466605305671692,
-0.39564260840415955,
-1.1153976917266846,
-0.867504358291626,
1.0081032514572144,
0.7105369567871094,
0.31609615683555603,
1.8665721416473389,
0.6857877373695374,
0.30085036158561707,
-2.603161334991455,
0.9091577529907227,
0.25443434715270996,
-0.11126001924276352,
0.8637394905090332,
0.36411798000335693,
0.979385495185852,
-0.15261998772621155,
0.5922191739082336,
-2.4080698490142822,
2.3585124015808105,
-0.21352827548980713,
0.7000812888145447,
0.05566193535923958,
-0.1002708300948143,
1.0790114402770996,
0.5891039967536926,
0.5313718318939209,
-1.0944706201553345,
0.6030168533325195,
-0.5936344265937805,
1.3049838542938232,
0.8657947182655334,
-0.84050053358078,
-0.022380350157618523,
1.3143891096115112,
0.3863273561000824,
-0.40911293029785156,
-0.9854520559310913,
-0.9478551149368286,
1.0043731927871704,
1.7259745597839355,
-0.11902213096618652,
0.03540119528770447,
0.8154471516609192,
0.6567221283912659,
-1.328105092048645,
-0.008653705939650536,
-0.7337204217910767,
-0.7454878687858582,
1.6422892808914185,
2.233050584793091,
-0.1422007828950882,
-0.2258126437664032,
-0.7400307655334473,
-1.3472191095352173,
0.8773468732833862,
0.016629479825496674,
0.09557893872261047,
0.6825237274169922,
-0.5743549466133118,
1.0412431955337524,
0.9517989158630371,
0.9298603534698486,
0.28820592164993286,
0.17595651745796204,
0.30382299423217773,
-0.2784578502178192,
-1.1299110651016235,
-0.2641000747680664,
-1.0662404298782349,
-2.6000614166259766,
0.4329676330089569,
-0.248640775680542,
-1.515298843383789,
0.07886094599962234,
-0.9813404679298401,
0.8486518859863281,
-0.46734902262687683,
-1.0599194765090942,
-1.4979037046432495,
0.21596430242061615,
-0.04028206691145897,
0.9774491190910339,
-1.66909921169281,
-0.1321815401315689,
1.1802431344985962,
0.8858031630516052,
-0.7120755910873413,
0.9324373006820679,
0.2615795135498047,
0.9738190174102783,
0.8862647414207458,
-0.388040155172348,
0.6009266376495361,
0.0812039002776146,
-1.3125144243240356,
0.4113704264163971,
1.249718427658081,
0.17998383939266205,
1.3812788724899292,
-0.5129175782203674,
0.018254514783620834,
0.3621160686016083,
-0.4940614104270935,
-0.4398117661476135,
-0.47800636291503906,
0.6367491483688354,
0.00003661308437585831,
-0.9157912731170654,
-0.04148412123322487,
0.05379154905676842,
-0.25581175088882446,
0.17928051948547363,
-1.4550334215164185,
-0.12547644972801208,
-0.37613680958747864,
-0.6161949038505554,
-1.2519198656082153,
-0.2391221821308136,
1.3876630067825317,
-0.7857801914215088,
-0.11926896125078201,
0.49367550015449524,
0.2858293354511261,
0.5971540808677673,
0.6702573299407959,
-0.5973992347717285,
-0.3256860375404358,
-0.1574629247188568,
-0.33492323756217957,
0.33107611536979675,
1.412591576576233,
-0.03769220411777496,
-0.959270715713501,
0.6832500696182251,
-0.3167813718318939,
0.15972909331321716,
1.8693625926971436,
0.03780251368880272,
-0.7890781760215759,
0.3187963366508484,
-0.6105297803878784,
1.876245379447937,
1.7219326496124268,
1.2163599729537964,
-0.10825096070766449,
-0.9843024611473083,
0.6725324392318726,
-0.3250862956047058,
-0.309145450592041,
0.8418112397193909,
0.2896762788295746,
-0.25129446387290955,
-1.3845551013946533,
0.759897768497467,
1.242796540260315,
-0.8204743266105652,
-0.8095996379852295,
0.06700082868337631,
-0.8619039058685303,
1.178209900856018,
0.71433424949646,
0.4223874509334564,
0.24588176608085632,
1.668026089668274,
0.8149670362472534,
-0.44610264897346497,
0.5179228186607361,
0.5521103739738464,
-0.18337033689022064,
-2.1268532276153564,
-1.1658917665481567,
0.27299657464027405,
-0.6085052490234375,
-1.5263229608535767,
1.3315266370773315,
-1.2076401710510254,
-0.9610047340393066,
0.5832948088645935,
0.06983686238527298,
1.439565896987915,
0.40776172280311584,
1.5425267219543457,
2.07647442817688,
0.9351430535316467,
0.44747623801231384,
1.2494696378707886,
-0.18092352151870728,
-0.3512129783630371,
1.7732000350952148,
-0.2991233170032501,
0.5079199075698853,
1.0922160148620605,
-0.31600821018218994,
-1.0525449514389038,
-0.7536942958831787,
-1.2447303533554077,
-0.7921929359436035,
1.1569799184799194,
0.058593351393938065,
-1.080649733543396,
0.2600477337837219,
1.5912131071090698,
0.06883546710014343,
-0.28049471974372864,
0.6096073389053345,
0.4257435202598572,
-0.7883622646331787,
-0.07022834569215775,
-0.8985478281974792,
0.5074549913406372,
-0.3271543085575104,
-0.4115447700023651,
0.37758517265319824,
0.42018038034439087,
1.3336691856384277,
-0.04540001228451729,
0.12872128188610077,
1.086733102798462,
-1.512042760848999,
1.5174129009246826,
-0.7029818296432495,
0.2705511450767517,
-2.2476677894592285,
1.3694417476654053,
-0.7911600470542908,
1.9007688760757446,
-2.721290111541748,
0.44236093759536743,
-0.5276326537132263,
-0.6177796721458435,
0.30824142694473267,
-0.30309802293777466,
0.1638207733631134,
-0.14046916365623474,
-1.164934515953064,
-0.09434212744235992,
-0.6235682368278503,
0.5473728775978088,
1.0787346363067627,
1.3634411096572876,
-1.0927668809890747,
-0.33139607310295105,
-1.7193938493728638,
-0.09760940819978714,
-0.6510364413261414,
0.2681965231895447,
-1.9318420886993408,
-0.1809256672859192,
-1.8938981294631958,
-2.33555269241333,
-1.2627609968185425,
-0.8631116151809692,
1.2485408782958984,
0.1271786242723465,
-0.8674580454826355,
1.2226160764694214,
-0.4379264712333679,
-1.8909096717834473,
1.1524412631988525,
-2.2341294288635254
] |
https://github.com/huggingface/datasets/issues/5648 | flatten_indices doesn't work with pandas format | Thanks for reporting! This can be fixed by setting the format to `arrow` in `flatten_indices` and restoring the original format after the flattening. I'm working on a PR that reduces the number of the `flatten_indices` calls in our codebase and makes `flatten_indices` a no-op when a dataset does not have an indices mapping, so I'll incorporate the fix in that PR. | ### Describe the bug
Hi,
I noticed that `flatten_indices` throws an error when the batch format is `pandas`. This is probably due to the fact that flatten_indices uses map internally which doesn't accept dataframes as the transformation function output
### Steps to reproduce the bug
tabular_data = pd.DataFrame(np.random.randn(10,10))
tabular_data = datasets.arrow_dataset.Dataset.from_pandas(tabular_data)
tabular_data.with_format("pandas").select([0,1,2,3]).flatten_indices()
### Expected behavior
No error thrown
### Environment info
- `datasets` version: 2.10.1
- Python version: 3.9.5
- PyArrow version: 11.0.0
- Pandas version: 1.4.1 | 253 | 61 | flatten_indices doesn't work with pandas format
### Describe the bug
Hi,
I noticed that `flatten_indices` throws an error when the batch format is `pandas`. This is probably due to the fact that flatten_indices uses map internally which doesn't accept dataframes as the transformation function output
### Steps to reproduce the bug
tabular_data = pd.DataFrame(np.random.randn(10,10))
tabular_data = datasets.arrow_dataset.Dataset.from_pandas(tabular_data)
tabular_data.with_format("pandas").select([0,1,2,3]).flatten_indices()
### Expected behavior
No error thrown
### Environment info
- `datasets` version: 2.10.1
- Python version: 3.9.5
- PyArrow version: 11.0.0
- Pandas version: 1.4.1
Thanks for reporting! This can be fixed by setting the format to `arrow` in `flatten_indices` and restoring the original format after the flattening. I'm working on a PR that reduces the number of the `flatten_indices` calls in our codebase and makes `flatten_indices` a no-op when a dataset does not have an indices mapping, so I'll incorporate the fix in that PR. | [
-1.2029781341552734,
-0.8917182683944702,
-0.64821457862854,
1.4915000200271606,
-0.1317991465330124,
-1.3191663026809692,
0.17012664675712585,
-1.0664777755737305,
1.6801811456680298,
-0.8560732007026672,
0.2718721628189087,
-1.6509367227554321,
0.08023453503847122,
-0.5655778050422668,
-0.6543856263160706,
-0.9642912745475769,
-0.2715751528739929,
-0.683037519454956,
1.062285304069519,
2.463900327682495,
1.1923203468322754,
-1.3628073930740356,
2.668515205383301,
0.7109869718551636,
-0.22024908661842346,
-1.0862287282943726,
0.531123697757721,
0.08045566827058792,
-1.3230119943618774,
-0.4306410551071167,
-0.9193379282951355,
-0.07232293486595154,
-0.5196951627731323,
-0.5060847997665405,
-0.03830445930361748,
0.4364768862724304,
-0.36860886216163635,
-0.38973650336265564,
-0.4239405691623688,
-0.8211025595664978,
0.40994903445243835,
-0.4140385091304779,
0.9001814126968384,
-0.39464473724365234,
1.8747004270553589,
-0.6375645399093628,
0.5263657569885254,
0.695498526096344,
1.3258740901947021,
0.19308854639530182,
-0.10599576681852341,
0.3627808690071106,
0.35620611906051636,
-0.007793864235281944,
0.5744914412498474,
0.9967818260192871,
0.615487277507782,
0.5136310458183289,
0.62935870885849,
-2.2124650478363037,
1.296854019165039,
-1.062139630317688,
0.2501082122325897,
1.354830026626587,
-1.1433753967285156,
0.36988040804862976,
-1.6973246335983276,
-0.12237726151943207,
0.5332433581352234,
-2.3108081817626953,
0.19590729475021362,
-1.3802329301834106,
-0.4692215621471405,
1.0411800146102905,
0.3531875014305115,
-1.260934591293335,
0.1462959498167038,
-0.43316352367401123,
0.992229700088501,
0.4127905070781708,
0.9809556007385254,
-1.660567045211792,
-0.1354721188545227,
-0.3179652988910675,
0.039262812584638596,
-1.3620179891586304,
-1.567347764968872,
0.6400786638259888,
0.6964352130889893,
0.5809731483459473,
-0.06766432523727417,
0.9889160990715027,
-1.077864170074463,
0.7251542210578918,
-1.0284993648529053,
-1.6929006576538086,
-1.4017413854599,
-2.340477466583252,
-2.237293004989624,
0.7176846265792847,
-0.42185303568840027,
-0.5087459683418274,
2.1199464797973633,
-1.1163477897644043,
-1.7693114280700684,
1.1378153562545776,
0.30860966444015503,
-0.16087880730628967,
2.4015700817108154,
0.17580543458461761,
-0.6198365092277527,
0.4287099540233612,
-0.7915919423103333,
0.7341256737709045,
-0.430564284324646,
1.3036624193191528,
0.46512895822525024,
-1.0996671915054321,
1.5315120220184326,
-0.2887764573097229,
0.5328007936477661,
-0.7798441052436829,
-0.5144145488739014,
-0.8029323220252991,
0.33663851022720337,
1.9512208700180054,
-0.36322706937789917,
1.507148027420044,
-0.2201618105173111,
-1.506889820098877,
-1.5749179124832153,
0.8558415770530701,
0.41653376817703247,
-0.7908703088760376,
0.18140356242656708,
-0.29252973198890686,
0.14194762706756592,
-0.024841658771038055,
1.22356116771698,
1.2377872467041016,
0.6976129412651062,
-0.3484608232975006,
-0.8277568817138672,
0.24801838397979736,
-0.17640165984630585,
-0.6515205502510071,
-1.7323054075241089,
-0.3929918706417084,
0.08500941842794418,
0.6450726389884949,
-1.1505242586135864,
1.8096760511398315,
0.8773284554481506,
1.844072937965393,
1.0752596855163574,
-0.36025410890579224,
1.4980707168579102,
0.09866554290056229,
1.8518025875091553,
-0.4619096517562866,
0.7955408096313477,
-0.343892902135849,
-1.168116569519043,
0.7659131288528442,
-0.3170374631881714,
-2.0511600971221924,
-0.6783363223075867,
-0.8221381306648254,
-0.13140329718589783,
-0.7293905019760132,
0.9873784184455872,
-0.26392868161201477,
-1.2911369800567627,
0.21381866931915283,
-0.7347069382667542,
0.15716785192489624,
-1.2304389476776123,
0.3227432668209076,
0.7991341948509216,
-0.554585874080658,
0.08939043432474136,
-0.25108009576797485,
-1.3172105550765991,
-0.44359245896339417,
0.3095215857028961,
1.8095519542694092,
-0.8443306088447571,
0.9863815903663635,
0.9763053059577942,
-0.6847597360610962,
0.060757700353860855,
0.3353070616722107,
-0.3599390387535095,
1.0056724548339844,
-0.9779829978942871,
-0.4846659004688263,
1.1841650009155273,
-0.3405003845691681,
-0.6016035079956055,
1.5043731927871704,
0.7305932641029358,
-0.93753981590271,
-0.16880089044570923,
-0.14695309102535248,
-0.8663228750228882,
0.0675177350640297,
-1.703208565711975,
-0.14348861575126648,
0.35447707772254944,
-1.5382664203643799,
-0.49058830738067627,
-0.22545066475868225,
1.338230013847351,
-0.06654708087444305,
1.4038052558898926,
-0.3553560674190521,
-0.3120034337043762,
-0.388254851102829,
-0.4611678123474121,
0.136310875415802,
-0.25118377804756165,
-0.54569411277771,
0.2544941306114197,
-0.7969512939453125,
0.296018123626709,
1.448056936264038,
0.28134068846702576,
0.09340374916791916,
0.6083645820617676,
1.1150732040405273,
0.31468507647514343,
-0.19466851651668549,
-0.8375228643417358,
-1.6337733268737793,
2.0007665157318115,
-1.3749502897262573,
2.0422213077545166,
0.7555420398712158,
-0.06675989925861359,
-1.7121564149856567,
-1.9533156156539917,
1.3459138870239258,
1.0521111488342285,
2.2830960750579834,
0.5603415966033936,
0.4637216031551361,
-0.8585401177406311,
-0.6868065595626831,
0.3578904867172241,
-1.014092206954956,
-0.7444146871566772,
0.10689249634742737,
2.318678379058838,
1.7975702285766602,
-0.4353581964969635,
-0.1839519739151001,
-1.040130376815796,
1.4485985040664673,
-0.16856563091278076,
0.24224087595939636,
2.0337893962860107,
-0.3040647506713867,
-1.030791997909546,
1.2535912990570068,
-2.4355928897857666,
0.11001602560281754,
1.9973292350769043,
0.2765900790691376,
0.018930144608020782,
-1.3897778987884521,
-0.6787834763526917,
-0.35891446471214294,
-0.4094603657722473,
-1.1865392923355103,
0.4705764353275299,
-0.17903605103492737,
-0.8170984983444214,
-1.3899424076080322,
0.17407378554344177,
-1.0673635005950928,
-1.6749844551086426,
0.23446564376354218,
1.8227086067199707,
2.063798427581787,
-0.7498740553855896,
1.5868074893951416,
-0.2254280000925064,
0.2538197934627533,
1.2415062189102173,
1.1664936542510986,
3.1276819705963135,
1.9865193367004395,
-1.2893904447555542,
0.6718008518218994,
-0.08738347142934799,
-0.41756343841552734,
1.1342849731445312,
-1.2042567729949951,
1.304203748703003,
-0.15269382297992706,
-1.3303591012954712,
-1.2709561586380005,
0.9297812581062317,
0.390691876411438,
0.002438602037727833,
-0.4924643635749817,
1.25315523147583,
0.11588980257511139,
1.3839105367660522,
0.5405544638633728,
-0.2814675271511078,
0.548767626285553,
-0.4425548017024994,
-0.5619394183158875,
1.5553923845291138,
0.20409686863422394,
-1.3883286714553833,
-2.3360679149627686,
-0.30442139506340027,
-0.7623403072357178,
0.05134539678692818,
-0.6850228905677795,
-1.0324922800064087,
1.638375997543335,
0.4708538353443146,
-1.1208515167236328,
-0.25274530053138733,
-0.33997875452041626,
-0.6217468976974487,
2.6955814361572266,
-1.388257622718811,
-0.21564531326293945,
-1.0045040845870972,
-0.591344952583313,
1.6067731380462646,
-1.2537623643875122,
-0.18591617047786713,
-0.9914234280586243,
-0.5502485036849976,
-1.2455854415893555,
-0.5012857913970947,
-0.0710444375872612,
-0.9527206420898438,
0.8266032934188843,
0.19643746316432953,
-1.1705505847930908,
-0.35439833998680115,
-0.9168524146080017,
0.8903968334197998,
-0.07118538022041321,
0.16692812740802765,
1.7834771871566772,
0.3359663784503937,
-0.4680042564868927,
0.8813196420669556,
1.0767381191253662,
0.6914621591567993,
-0.5976985692977905,
0.29433315992355347,
-0.6447582840919495,
0.30843639373779297,
-1.2396605014801025,
0.3350831866264343,
-2.8778533935546875,
0.5689190030097961,
-0.08702821284532547,
-0.053778935223817825,
-0.06217550113797188,
-1.3404823541641235,
1.0899626016616821,
2.500412940979004,
-1.139564871788025,
0.5446141362190247,
0.2629391551017761,
1.227902889251709,
-1.5706303119659424,
0.3801116943359375,
-0.3724440932273865,
2.1475980281829834,
0.1708344668149948,
1.1765735149383545,
-0.3529309928417206,
-2.30766224861145,
0.6458753347396851,
-1.3074774742126465,
-1.2003512382507324,
0.8231095671653748,
-0.9380246996879578,
0.08065067231655121,
-1.386435866355896,
-0.23312737047672272,
-0.7592278718948364,
-1.2430667877197266,
0.6976958513259888,
0.08452996611595154,
0.4524374008178711,
-0.5739775896072388,
0.2689862847328186,
-2.158810615539551,
-1.3106435537338257,
-0.25336864590644836,
-0.986264169216156,
0.3916609585285187,
-0.36805835366249084,
0.7535548210144043,
-0.15913015604019165,
0.051700346171855927,
0.2855793833732605,
1.4676917791366577,
3.2925543785095215,
0.11977919936180115,
0.3773985207080841,
-0.16293972730636597,
-0.8724713921546936,
1.3837448358535767,
0.9161003828048706,
-0.27054327726364136,
-0.543207049369812,
-1.0554137229919434,
1.273446798324585,
1.8600128889083862,
0.9977246522903442,
-0.0012730099260807037,
-0.8068416118621826,
-0.7093207836151123,
-0.11421917378902435,
0.21313758194446564,
0.6224746704101562,
0.8676115870475769,
0.12100133299827576,
0.0945759117603302,
1.4678705930709839,
1.2199913263320923,
-0.4690800607204437,
0.4201451241970062,
-0.9212334752082825,
-0.5276400446891785,
0.4968124032020569,
0.303658664226532,
-0.04848180338740349,
0.29979920387268066,
-0.9634320735931396,
-0.259074330329895,
-0.36174899339675903,
-0.8988842368125916,
-0.6974289417266846,
-0.47884270548820496,
-0.41777336597442627,
1.7277354001998901,
0.09905929863452911,
-0.5034483075141907,
-0.1062081903219223,
-0.7133175730705261,
-0.04030993953347206,
-0.9888975024223328,
0.3058595657348633,
-0.0944875180721283,
-0.12764820456504822,
-0.06935988366603851,
1.712254524230957,
-0.9266770482063293,
-2.0438077449798584,
0.2484349012374878,
0.15158429741859436,
-0.33660730719566345,
0.17068077623844147,
1.6618849039077759,
0.5281868577003479,
1.4841467142105103,
1.3523932695388794,
0.9577069282531738,
-0.7491336464881897,
-1.3448377847671509,
0.7225412726402283,
0.9014039635658264,
-1.454770565032959,
0.77034592628479,
0.07578480988740921,
-0.5418258309364319,
0.6266219019889832,
1.198134183883667,
0.4977835416793823,
-2.0292837619781494,
0.8778017163276672,
-0.9934327602386475,
0.8391538858413696,
0.78119957447052,
0.694769024848938,
0.22888532280921936,
0.7975289821624756,
-1.2832804918289185,
-1.138744592666626,
-0.7822619080543518,
-0.6857821941375732,
1.9359462261199951,
-0.33584919571876526,
0.5721887350082397,
-0.15283134579658508,
-1.3725379705429077,
-0.047950711101293564,
0.6500892043113708,
0.3727540075778961,
-0.4065437614917755,
0.8691062927246094,
-0.6807379722595215,
-1.0490310192108154,
-1.3613994121551514,
-0.37817633152008057,
-1.0973082780838013,
-0.9576494097709656,
1.1077996492385864,
0.8185648322105408,
0.1916862279176712,
1.8548238277435303,
0.6362179517745972,
0.20502738654613495,
-2.622384548187256,
0.9577121138572693,
0.2349940985441208,
-0.07700584083795547,
0.7587950825691223,
0.2609957456588745,
1.0635381937026978,
-0.12198632210493088,
0.4702915549278259,
-2.4331705570220947,
2.3245553970336914,
-0.28694719076156616,
0.7215027809143066,
0.012782334350049496,
-0.0703798308968544,
1.1455150842666626,
0.5701915621757507,
0.6373521685600281,
-1.0041944980621338,
0.7304642200469971,
-0.6523516178131104,
1.365241289138794,
0.952804684638977,
-0.8537958860397339,
-0.10289262980222702,
1.244922161102295,
0.5564347505569458,
-0.504084587097168,
-0.9916697144508362,
-1.0651495456695557,
0.8652704358100891,
1.7669074535369873,
-0.05428481847047806,
-0.03387167304754257,
0.8457279801368713,
0.7041300535202026,
-1.2842446565628052,
0.13918554782867432,
-0.6881241202354431,
-0.7327553033828735,
1.589255690574646,
2.089498519897461,
-0.05173762887716293,
-0.1820320188999176,
-0.726381242275238,
-1.1977473497390747,
0.749485433101654,
0.01869037374854088,
0.05556618794798851,
0.707408607006073,
-0.5390487313270569,
1.1046088933944702,
0.9513846039772034,
0.9253286719322205,
0.2407732605934143,
0.12534670531749725,
0.2822803556919098,
-0.2967897355556488,
-1.226579189300537,
-0.2736554741859436,
-1.0054810047149658,
-2.55523943901062,
0.48100563883781433,
-0.22913023829460144,
-1.4301815032958984,
0.021936483681201935,
-1.070557713508606,
0.9870524406433105,
-0.6127875447273254,
-1.158770203590393,
-1.5190078020095825,
0.1301526129245758,
-0.14064833521842957,
0.8322296142578125,
-1.5484269857406616,
-0.07492148876190186,
1.325884461402893,
0.9126962423324585,
-0.5661305785179138,
1.0193935632705688,
0.30656930804252625,
1.0198811292648315,
0.8163455724716187,
-0.3459045886993408,
0.5361623764038086,
0.09327535331249237,
-1.4244935512542725,
0.5293219685554504,
1.1454299688339233,
0.21729066967964172,
1.5667672157287598,
-0.5992863774299622,
0.012585238553583622,
0.3835541307926178,
-0.5192118287086487,
-0.4918088912963867,
-0.642056941986084,
0.8560483455657959,
0.0337505042552948,
-0.8347357511520386,
0.03944377228617668,
-0.05479026213288307,
-0.2973700165748596,
0.20472921431064606,
-1.510371446609497,
-0.12431488186120987,
-0.24652354419231415,
-0.7230768799781799,
-1.2354602813720703,
-0.04367314279079437,
1.3574227094650269,
-0.7830417156219482,
-0.1298976093530655,
0.5159279704093933,
0.2555297017097473,
0.5486564636230469,
0.6445613503456116,
-0.6479889750480652,
-0.2531982958316803,
-0.2853440046310425,
-0.3536636531352997,
0.4250093698501587,
1.3282438516616821,
-0.12466271966695786,
-0.9670242667198181,
0.6998037695884705,
-0.326201468706131,
0.01077271718531847,
1.9649659395217896,
0.1221524327993393,
-0.8052146434783936,
0.35032421350479126,
-0.7253513932228088,
2.006890058517456,
1.6951565742492676,
1.3329740762710571,
-0.12086346000432968,
-1.0225697755813599,
0.6114526391029358,
-0.28676822781562805,
-0.3664848804473877,
0.8889346718788147,
0.5239734053611755,
-0.22760744392871857,
-1.3345857858657837,
0.771361231803894,
1.1657849550247192,
-0.9190441966056824,
-0.7786768078804016,
0.17272107303142548,
-0.7335037589073181,
1.136855959892273,
0.7228267788887024,
0.41250675916671753,
0.2932102382183075,
1.6399612426757812,
0.8000412583351135,
-0.4750789701938629,
0.4743996262550354,
0.5883002877235413,
-0.16373011469841003,
-2.012533664703369,
-1.146873116493225,
0.4082457423210144,
-0.6132780313491821,
-1.6308296918869019,
1.4217671155929565,
-1.090549349784851,
-0.8566344976425171,
0.6154006123542786,
0.05636360123753548,
1.5029197931289673,
0.30062350630760193,
1.59138023853302,
2.011427640914917,
0.8846532106399536,
0.36721816658973694,
1.3089879751205444,
-0.20683564245700836,
-0.4935148060321808,
1.7473373413085938,
-0.39656689763069153,
0.47545719146728516,
1.1407550573349,
-0.3423006534576416,
-1.0441200733184814,
-0.8130639791488647,
-1.1469850540161133,
-0.6421363949775696,
1.1587339639663696,
0.12884430587291718,
-1.0472089052200317,
0.263666570186615,
1.5225898027420044,
0.05736921355128288,
-0.30870771408081055,
0.5518592000007629,
0.3442099094390869,
-0.7409709692001343,
-0.059695515781641006,
-0.8893101811408997,
0.51482093334198,
-0.3064659833908081,
-0.3793571889400482,
0.42681410908699036,
0.38578569889068604,
1.2997775077819824,
-0.02320007234811783,
0.17622876167297363,
1.2205909490585327,
-1.4310210943222046,
1.4223573207855225,
-0.6606672406196594,
0.26114365458488464,
-2.251993417739868,
1.4508377313613892,
-0.8272005319595337,
1.9324877262115479,
-2.670200824737549,
0.4787650406360626,
-0.6449909210205078,
-0.3921315371990204,
0.2766037881374359,
-0.428432822227478,
0.12471401691436768,
-0.17346489429473877,
-1.2179712057113647,
-0.07047782093286514,
-0.7190244793891907,
0.5968681573867798,
1.1153661012649536,
1.2608554363250732,
-1.0736401081085205,
-0.22123661637306213,
-1.6837351322174072,
-0.13058334589004517,
-0.711259126663208,
0.38472768664360046,
-1.9551184177398682,
-0.17426803708076477,
-1.9752182960510254,
-2.437605142593384,
-1.2114231586456299,
-0.8062632083892822,
1.0745068788528442,
0.06998045742511749,
-0.827526867389679,
1.1728698015213013,
-0.36239564418792725,
-1.7982127666473389,
1.1243544816970825,
-2.1616554260253906
] |
https://github.com/huggingface/datasets/issues/5647 | Make all print statements optional | We now log these messages instead of printing them (addressed in #6019), so I'm closing this issue. | ### Feature request
Make all print statements optional to speed up the development
### Motivation
Im loading multiple tiny datasets and all the print statements make the loading slower
### Your contribution
I can help contribute | 254 | 17 | Make all print statements optional
### Feature request
Make all print statements optional to speed up the development
### Motivation
Im loading multiple tiny datasets and all the print statements make the loading slower
### Your contribution
I can help contribute
We now log these messages instead of printing them (addressed in #6019), so I'm closing this issue. | [
-1.0385414361953735,
-0.9450052380561829,
-0.9861457943916321,
1.5392557382583618,
-0.14777745306491852,
-1.2754552364349365,
0.06461398303508759,
-0.9845627546310425,
1.6036921739578247,
-0.9216593503952026,
0.30726632475852966,
-1.8531793355941772,
0.14387789368629456,
-0.755454957485199,
-0.5917501449584961,
-0.8868843913078308,
-0.32082399725914,
-0.6746675372123718,
1.1481884717941284,
2.5820751190185547,
1.1510484218597412,
-1.1643773317337036,
2.8406262397766113,
0.5771982669830322,
-0.16172854602336884,
-0.9343103170394897,
0.7073025703430176,
0.0626852735877037,
-1.234592080116272,
-0.6089296340942383,
-1.144777536392212,
-0.03332884609699249,
-0.4013885259628296,
-0.39269256591796875,
-0.06430727243423462,
0.4408372640609741,
-0.0892687514424324,
-0.6494542360305786,
-0.5465313792228699,
-0.8983771204948425,
0.2875835597515106,
-0.41358739137649536,
0.9272275567054749,
-0.5023143291473389,
1.8451520204544067,
-0.5320870280265808,
0.24695496261119843,
0.675982654094696,
1.4132505655288696,
0.31885623931884766,
-0.054329730570316315,
0.27651745080947876,
0.3958800733089447,
-0.01357894018292427,
0.533302903175354,
0.9664673805236816,
0.5521692037582397,
0.6733652353286743,
0.5740907788276672,
-1.9982577562332153,
1.4116400480270386,
-1.009966254234314,
0.13616304099559784,
1.356839895248413,
-1.1925721168518066,
0.3934096097946167,
-1.6234787702560425,
-0.0310501791536808,
0.6331226229667664,
-2.1263771057128906,
0.32950082421302795,
-1.2550216913223267,
-0.6032415628433228,
0.9351421594619751,
0.4302993714809418,
-1.3196851015090942,
-0.08634259551763535,
-0.4520284831523895,
1.0693073272705078,
0.5986219048500061,
1.0919432640075684,
-1.5907094478607178,
-0.017611265182495117,
-0.2964469790458679,
-0.23750831186771393,
-1.4032217264175415,
-1.4393267631530762,
0.5536374449729919,
0.8627616167068481,
0.5201212167739868,
-0.04166416823863983,
0.9296682476997375,
-0.9599164128303528,
0.8654587864875793,
-0.6866985559463501,
-1.7862603664398193,
-1.4826946258544922,
-2.329897165298462,
-2.2421929836273193,
1.0195964574813843,
-0.42626869678497314,
-0.6544713377952576,
1.9175348281860352,
-1.2071001529693604,
-1.905501127243042,
1.3074238300323486,
0.03295663744211197,
-0.11944252997636795,
2.57024884223938,
0.3106905221939087,
-0.5735421776771545,
0.352006733417511,
-0.7780628800392151,
0.8953410387039185,
-0.9202690720558167,
1.3303310871124268,
0.2948340177536011,
-1.0282851457595825,
1.61648428440094,
-0.4720536172389984,
0.5491740703582764,
-0.655751645565033,
-0.5704702734947205,
-0.9203352928161621,
0.34111928939819336,
1.9701271057128906,
-0.33188390731811523,
1.6187348365783691,
-0.4998367726802826,
-1.5293902158737183,
-1.7078235149383545,
0.7761081457138062,
0.2677844166755676,
-0.7858551740646362,
0.3391971290111542,
-0.2761366367340088,
0.04689732939004898,
-0.02439754270017147,
1.04059636592865,
1.3925663232803345,
0.548376202583313,
-0.2923795282840729,
-0.753485381603241,
0.3487044870853424,
0.02714037336409092,
-0.749496579170227,
-1.6249825954437256,
-0.19463959336280823,
-0.023204833269119263,
0.7081947326660156,
-1.1129285097122192,
1.58013117313385,
0.8719316720962524,
2.121028184890747,
1.03248131275177,
-0.3241328001022339,
1.2621759176254272,
0.1676184982061386,
1.891880989074707,
-0.4636175334453583,
0.5183346271514893,
-0.4013392925262451,
-1.2123514413833618,
0.7626170516014099,
-0.4208466112613678,
-1.7385908365249634,
-0.7771507501602173,
-0.8693347573280334,
-0.21703191101551056,
-0.6775327324867249,
1.0294440984725952,
-0.41828423738479614,
-1.2451412677764893,
0.216322660446167,
-0.725435197353363,
0.025074036791920662,
-1.466444492340088,
0.2535642683506012,
0.6138748526573181,
-0.4905252754688263,
0.10904130339622498,
-0.21771137416362762,
-1.3722590208053589,
-0.4119322597980499,
0.40251845121383667,
1.960042119026184,
-0.8137052059173584,
0.9873247146606445,
0.9431585669517517,
-0.6257500648498535,
-0.18058161437511444,
0.39724820852279663,
-0.1787130981683731,
0.7657689452171326,
-1.1317267417907715,
-0.3924012780189514,
1.4099761247634888,
-0.33856022357940674,
-0.6034275889396667,
1.4248453378677368,
0.7875688672065735,
-1.0930598974227905,
-0.17940600216388702,
-0.1733115166425705,
-0.9756499528884888,
-0.033119600266218185,
-1.7944363355636597,
-0.2406049221754074,
0.42325761914253235,
-1.3608698844909668,
-0.5933558344841003,
-0.2141071856021881,
1.2726800441741943,
0.19729109108448029,
1.3616704940795898,
-0.4045292139053345,
-0.15655432641506195,
-0.3827740252017975,
-0.3507225215435028,
0.25621286034584045,
-0.2680053114891052,
-0.43647301197052,
0.19820912182331085,
-0.6617714166641235,
0.2632291913032532,
1.3517684936523438,
0.24322156608104706,
0.1361669898033142,
0.6815576553344727,
0.9439724683761597,
0.2545093595981598,
-0.10436258465051651,
-0.8612680435180664,
-1.46115243434906,
2.0492331981658936,
-1.37613844871521,
1.9268932342529297,
0.8582906126976013,
-0.04491241276264191,
-1.8212403059005737,
-1.960062861442566,
1.3160818815231323,
1.2646710872650146,
1.9964299201965332,
0.5783922076225281,
0.4755887985229492,
-0.8679044246673584,
-0.6826248168945312,
0.03120175562798977,
-1.0681568384170532,
-0.7992941737174988,
0.09577437490224838,
2.2630231380462646,
1.7240521907806396,
-0.45615410804748535,
-0.05192340165376663,
-1.23466956615448,
1.272892713546753,
-0.14469996094703674,
0.038404740393161774,
1.906110167503357,
-0.4750133156776428,
-0.8812028169631958,
0.9772840142250061,
-2.1224827766418457,
0.025432879105210304,
1.9781001806259155,
0.24531032145023346,
0.17149187624454498,
-1.33790123462677,
-0.6963518261909485,
-0.4136451780796051,
-0.17610828578472137,
-1.1737204790115356,
0.7164949774742126,
-0.31597110629081726,
-0.7094775438308716,
-1.4346990585327148,
0.1563284546136856,
-1.033992052078247,
-1.5725966691970825,
0.24443252384662628,
2.040524482727051,
2.0200960636138916,
-0.8823910355567932,
1.6328890323638916,
-0.14668795466423035,
0.02158411219716072,
1.4911826848983765,
0.9393792748451233,
3.2010254859924316,
2.0398623943328857,
-1.1948760747909546,
0.7653166055679321,
0.052698858082294464,
-0.37825995683670044,
1.0811036825180054,
-1.2576693296432495,
1.3789362907409668,
-0.12670835852622986,
-1.1091421842575073,
-1.3186964988708496,
0.7311528921127319,
0.38133159279823303,
0.02574261836707592,
-0.3709729015827179,
1.5842210054397583,
0.09562339633703232,
1.2759175300598145,
0.6026752591133118,
-0.48424720764160156,
0.6068655252456665,
-0.24575889110565186,
-0.3110700249671936,
1.6418856382369995,
0.281290739774704,
-1.6522794961929321,
-2.25724196434021,
-0.06591173261404037,
-0.6370994448661804,
0.11510670185089111,
-0.6829023361206055,
-1.0534828901290894,
1.6375236511230469,
0.5895335674285889,
-1.0220693349838257,
-0.4694533348083496,
-0.5151501297950745,
-0.7025065422058105,
2.610947847366333,
-1.6254510879516602,
-0.46311134099960327,
-0.9160456657409668,
-0.4675872027873993,
1.7470756769180298,
-1.2286579608917236,
-0.2535075843334198,
-0.9681628346443176,
-0.4978231191635132,
-1.1346402168273926,
-0.49270498752593994,
0.0626310184597969,
-0.9116579294204712,
0.7171379327774048,
0.08084286749362946,
-1.0645861625671387,
-0.041273415088653564,
-0.8841904997825623,
0.7976325750350952,
-0.2769702970981598,
0.5070492029190063,
1.971878170967102,
0.47001680731773376,
-0.5822799205780029,
0.6145710349082947,
1.2834664583206177,
0.4473707377910614,
-0.6487288475036621,
0.17979517579078674,
-0.6503886580467224,
0.6011742353439331,
-1.1229099035263062,
0.3142768442630768,
-2.794933557510376,
0.5172580480575562,
-0.22635449469089508,
-0.09652290493249893,
-0.06795236468315125,
-1.3135783672332764,
1.050180196762085,
2.2814133167266846,
-1.2747052907943726,
0.41439223289489746,
0.2587393522262573,
1.5617437362670898,
-1.613085389137268,
0.62105792760849,
-0.3345474898815155,
1.9622365236282349,
0.31794074177742004,
1.017141342163086,
-0.3906424045562744,
-2.0557172298431396,
0.6253117918968201,
-1.3015309572219849,
-1.1180499792099,
0.8851597309112549,
-0.9371334314346313,
-0.2556063234806061,
-1.4212777614593506,
-0.12501156330108643,
-0.6429965496063232,
-1.2048124074935913,
0.846951961517334,
0.2142457365989685,
0.3939986228942871,
-0.5021461844444275,
0.14637961983680725,
-2.271268129348755,
-1.4000024795532227,
-0.22021880745887756,
-0.9415569305419922,
0.23935987055301666,
-0.5152099132537842,
0.7163118720054626,
-0.25111931562423706,
0.06732646375894547,
0.29425472021102905,
1.36316978931427,
3.3445687294006348,
0.031537383794784546,
0.6003520488739014,
-0.20909610390663147,
-0.7970238327980042,
1.3999618291854858,
0.8609567284584045,
-0.20672078430652618,
-0.4907446503639221,
-0.928264856338501,
1.3729126453399658,
1.8753927946090698,
0.9434351325035095,
0.23534560203552246,
-0.7479749321937561,
-0.6103343963623047,
-0.18083828687667847,
0.2920401692390442,
0.3447585105895996,
0.860743522644043,
-0.09061592817306519,
0.08335793763399124,
1.4063408374786377,
1.2130460739135742,
-0.5819599628448486,
0.5539528727531433,
-0.8565936088562012,
-0.2706138491630554,
0.4001442790031433,
0.38923534750938416,
-0.14205169677734375,
0.07818704098463058,
-0.8478032350540161,
-0.36388829350471497,
-0.2651495635509491,
-0.8794091939926147,
-0.7417310476303101,
-0.15247423946857452,
-0.2603013515472412,
1.754371166229248,
0.17165079712867737,
-0.6852657198905945,
-0.057104624807834625,
-0.7994290590286255,
-0.0526086762547493,
-1.0346461534500122,
0.15022453665733337,
-0.07756276428699493,
-0.09305696934461594,
0.13410449028015137,
1.9241135120391846,
-1.2496638298034668,
-2.2630198001861572,
0.3118772506713867,
0.29964593052864075,
-0.22814205288887024,
0.04744227975606918,
1.6439448595046997,
0.4490732252597809,
1.382980465888977,
1.3675265312194824,
0.8629497289657593,
-0.9968731999397278,
-1.3792393207550049,
0.8034347295761108,
1.1076229810714722,
-1.5535316467285156,
0.7142430543899536,
0.042817555367946625,
-0.5669983625411987,
0.5284457206726074,
1.1843180656433105,
0.5346719622612,
-1.8035173416137695,
0.7823882699012756,
-1.0218136310577393,
0.7763849496841431,
0.7568848133087158,
0.8120622038841248,
0.4496743977069855,
0.7880244851112366,
-1.0799107551574707,
-1.2754889726638794,
-0.877389669418335,
-0.6804561018943787,
1.983620047569275,
-0.15401501953601837,
0.4877886474132538,
-0.12975309789180756,
-1.2454553842544556,
-0.03987237066030502,
0.6865269541740417,
0.19509616494178772,
-0.3985050320625305,
0.5920248627662659,
-0.7620388865470886,
-0.9960169792175293,
-1.5361021757125854,
-0.4789343476295471,
-1.0329519510269165,
-1.0402634143829346,
1.0518317222595215,
0.9171106219291687,
0.1961391270160675,
1.7549400329589844,
0.5668438076972961,
0.359000563621521,
-2.3313326835632324,
0.9738762974739075,
0.21352200210094452,
-0.1405850201845169,
0.9470088481903076,
0.4751564860343933,
1.030716061592102,
0.05134233087301254,
0.26850560307502747,
-2.423856735229492,
2.212806463241577,
-0.46059557795524597,
0.6240352988243103,
-0.011978182010352612,
0.0647173821926117,
1.2880231142044067,
0.6037562489509583,
0.4700867831707001,
-0.8589221835136414,
0.6430770754814148,
-0.3530535101890564,
1.3579744100570679,
1.0409754514694214,
-0.7816400527954102,
-0.04507237672805786,
1.5059679746627808,
0.5226898789405823,
-0.5285952687263489,
-0.9275961518287659,
-0.853229820728302,
0.7826330661773682,
1.6480481624603271,
0.01236695609986782,
0.23586544394493103,
0.7729299068450928,
0.41546642780303955,
-1.1857932806015015,
-0.029096782207489014,
-0.6562301516532898,
-0.7158363461494446,
1.5913935899734497,
2.1754448413848877,
-0.2628260850906372,
-0.15996544063091278,
-0.7984734177589417,
-1.2897056341171265,
0.7275426387786865,
-0.23813802003860474,
0.05679963529109955,
0.7778407335281372,
-0.7854308485984802,
1.1592668294906616,
0.8031168580055237,
0.6474474668502808,
0.23399090766906738,
0.1450299769639969,
0.5173806548118591,
-0.17052312195301056,
-0.9559669494628906,
-0.10657412558794022,
-1.4089924097061157,
-2.489973306655884,
0.4409227967262268,
-0.43106308579444885,
-1.4999357461929321,
0.008981361985206604,
-1.1179956197738647,
1.1318646669387817,
-0.44322267174720764,
-0.9741390347480774,
-1.5809509754180908,
-0.08072049170732498,
-0.17832355201244354,
0.9087600708007812,
-1.5994337797164917,
-0.22535797953605652,
1.2526462078094482,
0.724936842918396,
-0.7374013066291809,
1.0813679695129395,
0.2234310358762741,
1.2055455446243286,
0.7511301040649414,
-0.2645978033542633,
0.5301373600959778,
-0.13107815384864807,
-1.310496211051941,
0.620847225189209,
1.2052568197250366,
-0.01869850605726242,
1.6617075204849243,
-0.5467067360877991,
-0.20982104539871216,
0.43978142738342285,
-0.39226967096328735,
-0.5930870175361633,
-0.4101771414279938,
0.7225903868675232,
0.17411603033542633,
-0.6863763332366943,
0.17519140243530273,
-0.15206271409988403,
-0.2758912742137909,
0.18913494050502777,
-1.6195687055587769,
-0.2867323160171509,
-0.32545292377471924,
-0.6215962171554565,
-1.3320351839065552,
-0.10473794490098953,
1.4541124105453491,
-0.7898733019828796,
-0.2733524739742279,
0.5190476775169373,
0.494631826877594,
0.4871831238269806,
0.5743445158004761,
-0.5767460465431213,
-0.19485653936862946,
-0.2409818172454834,
-0.2231028825044632,
0.24685396254062653,
1.5827536582946777,
-0.22718539834022522,
-1.0994246006011963,
0.603947103023529,
-0.5075071454048157,
0.06968339532613754,
2.0455286502838135,
0.2598077356815338,
-1.195652961730957,
0.058345675468444824,
-0.7185050845146179,
2.1966609954833984,
1.3798468112945557,
1.4456804990768433,
0.033461928367614746,
-0.8679695129394531,
0.7382420897483826,
0.06293442845344543,
-0.2728128433227539,
0.8156089186668396,
0.4564755856990814,
-0.3819308876991272,
-1.5663177967071533,
0.5513692498207092,
1.0593876838684082,
-0.8163613677024841,
-0.848659336566925,
-0.11399823427200317,
-0.628653883934021,
0.9658923149108887,
0.9409947991371155,
0.5990359783172607,
0.3829200565814972,
1.5891534090042114,
0.8251931071281433,
-0.6999598741531372,
0.4022262394428253,
0.5029104948043823,
-0.028194813057780266,
-2.1746089458465576,
-0.8729981184005737,
0.379512757062912,
-0.44437703490257263,
-1.5796990394592285,
1.2850003242492676,
-1.096869945526123,
-0.9141817092895508,
0.6090869307518005,
0.18334250152111053,
1.5521974563598633,
0.24209998548030853,
1.4989163875579834,
1.882047176361084,
0.9111811518669128,
0.2951500117778778,
1.411016583442688,
-0.29946476221084595,
-0.38576552271842957,
1.7856905460357666,
-0.3319435119628906,
0.3298541009426117,
1.1064300537109375,
-0.47646763920783997,
-1.0442428588867188,
-0.5675895810127258,
-1.0304052829742432,
-0.7318901419639587,
1.216874599456787,
0.08875839412212372,
-1.0371074676513672,
0.15083222091197968,
1.383363127708435,
0.26325786113739014,
-0.4554288685321808,
0.49870920181274414,
0.5899755954742432,
-0.9443055391311646,
0.01604614593088627,
-0.9467980265617371,
0.48456233739852905,
-0.09658685326576233,
-0.6145995259284973,
0.5692715048789978,
0.3604508936405182,
1.4749730825424194,
-0.12519174814224243,
0.2617862820625305,
1.1796605587005615,
-1.4228543043136597,
1.4013680219650269,
-0.789497971534729,
-0.03154730796813965,
-2.2966177463531494,
1.504799485206604,
-0.5767689943313599,
1.7717663049697876,
-2.7815804481506348,
0.5254817605018616,
-0.789565920829773,
-0.27571943402290344,
0.3971143066883087,
-0.26851847767829895,
0.13683363795280457,
-0.18983668088912964,
-1.1381683349609375,
-0.07096411287784576,
-0.6058695316314697,
0.598375678062439,
1.269040822982788,
1.1589152812957764,
-1.012919545173645,
-0.18229667842388153,
-1.6844619512557983,
-0.13220615684986115,
-0.7363101840019226,
0.17204901576042175,
-2.0947928428649902,
-0.18955381214618683,
-1.8061856031417847,
-2.2843987941741943,
-1.2861261367797852,
-0.7545547485351562,
1.2684907913208008,
0.3067716658115387,
-1.0594658851623535,
1.2224324941635132,
-0.467562198638916,
-1.728860855102539,
1.0291857719421387,
-2.171755313873291
] |
https://github.com/huggingface/datasets/issues/5645 | Datasets map and select(range()) is giving dill error | It looks like an error that we observed once in https://github.com/huggingface/datasets/pull/5166
Can you try to update `datasets` ?
```
pip install -U datasets
```
if it doesn't work, can you make sure you don't have packages installed that may modify `dill`'s behavior, such as `apache-beam` ? | ### Describe the bug
I'm using Huggingface Datasets library to load the dataset in google colab
When I do,
> data = train_dataset.select(range(10))
or
> train_datasets = train_dataset.map(
> process_data_to_model_inputs,
> batched=True,
> batch_size=batch_size,
> remove_columns=["article", "abstract"],
> )
I get following error: `module 'dill._dill' has no attribute 'log'`
I've tried downgrading the dill version from latest to 0.2.8, but no luck.
Stack trace:
> ---------------------------------------------------------------------------
> ModuleNotFoundError Traceback (most recent call last)
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in _no_cache_fields(obj)
> 367 try:
> --> 368 import transformers as tr
> 369
>
> ModuleNotFoundError: No module named 'transformers'
>
> During handling of the above exception, another exception occurred:
>
> AttributeError Traceback (most recent call last)
> 17 frames
> <ipython-input-13-dd14813880a6> in <module>
> ----> 1 test = train_dataset.select(range(10))
>
> /usr/local/lib/python3.9/dist-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
> 155 }
> 156 # apply actual function
> --> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
> 158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
> 159 # re-apply format to the output
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
> 155 if kwargs.get(fingerprint_name) is None:
> 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name
> --> 157 kwargs[fingerprint_name] = update_fingerprint(
> 158 self._fingerprint, transform, kwargs_for_fingerprint
> 159 )
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args)
> 103 for key in sorted(transform_args):
> 104 hasher.update(key)
> --> 105 hasher.update(transform_args[key])
> 106 return hasher.hexdigest()
> 107
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in update(self, value)
> 55 def update(self, value):
> 56 self.m.update(f"=={type(value)}==".encode("utf8"))
> ---> 57 self.m.update(self.hash(value).encode("utf-8"))
> 58
> 59 def hexdigest(self):
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in hash(cls, value)
> 51 return cls.dispatch[type(value)](cls, value)
> 52 else:
> ---> 53 return cls.hash_default(value)
> 54
> 55 def update(self, value):
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in hash_default(cls, value)
> 44 @classmethod
> 45 def hash_default(cls, value):
> ---> 46 return cls.hash_bytes(dumps(value))
> 47
> 48 @classmethod
>
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in dumps(obj)
> 387 file = StringIO()
> 388 with _no_cache_fields(obj):
> --> 389 dump(obj, file)
> 390 return file.getvalue()
> 391
>
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in dump(obj, file)
> 359 def dump(obj, file):
> 360 """pickle an object to a file"""
> --> 361 Pickler(file, recurse=True).dump(obj)
> 362 return
> 363
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in dump(self, obj)
> 392 return
> 393
> --> 394 def load_session(filename='/tmp/session.pkl', main=None):
> 395 """update the __main__ module with the state from the session file"""
> 396 if main is None: main = _main_module
>
> /usr/lib/python3.9/pickle.py in dump(self, obj)
> 485 if self.proto >= 4:
> 486 self.framer.start_framing()
> --> 487 self.save(obj)
> 488 self.write(STOP)
> 489 self.framer.end_framing()
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in save(self, obj, save_persistent_id)
> 386 pickler._byref = False # disable pickling by name reference
> 387 pickler._recurse = False # disable pickling recursion for globals
> --> 388 pickler._session = True # is best indicator of when pickling a session
> 389 pickler.dump(main)
> 390 finally:
>
> /usr/lib/python3.9/pickle.py in save(self, obj, save_persistent_id)
> 558 f = self.dispatch.get(t)
> 559 if f is not None:
> --> 560 f(self, obj) # Call unbound method with explicit self
> 561 return
> 562
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in save_singleton(pickler, obj)
>
> /usr/lib/python3.9/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj)
> 689 write(NEWOBJ)
> 690 else:
> --> 691 save(func)
> 692 save(args)
> 693 write(REDUCE)
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in save(self, obj, save_persistent_id)
> 386 pickler._byref = False # disable pickling by name reference
> 387 pickler._recurse = False # disable pickling recursion for globals
> --> 388 pickler._session = True # is best indicator of when pickling a session
> 389 pickler.dump(main)
> 390 finally:
>
> /usr/lib/python3.9/pickle.py in save(self, obj, save_persistent_id)
> 558 f = self.dispatch.get(t)
> 559 if f is not None:
> --> 560 f(self, obj) # Call unbound method with explicit self
> 561 return
> 562
>
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in save_function(pickler, obj)
> 583 dill._dill.log.info("# F1")
> 584 else:
> --> 585 dill._dill.log.info("F2: %s" % obj)
> 586 name = getattr(obj, "__qualname__", getattr(obj, "__name__", None))
> 587 dill._dill.StockPickler.save_global(pickler, obj, name=name)
>
> AttributeError: module 'dill._dill' has no attribute 'log'
### Steps to reproduce the bug
After loading the dataset(eg: https://huggingface.co/datasets/scientific_papers) in google colab
do either
> data = train_dataset.select(range(10))
or
> train_datasets = train_dataset.map(
> process_data_to_model_inputs,
> batched=True,
> batch_size=batch_size,
> remove_columns=["article", "abstract"],
> )
### Expected behavior
The map and select function should work
### Environment info
dataset: https://huggingface.co/datasets/scientific_papers
dill = 0.3.6
python= 3.9.16
transformer = 4.2.0 | 255 | 46 | Datasets map and select(range()) is giving dill error
### Describe the bug
I'm using Huggingface Datasets library to load the dataset in google colab
When I do,
> data = train_dataset.select(range(10))
or
> train_datasets = train_dataset.map(
> process_data_to_model_inputs,
> batched=True,
> batch_size=batch_size,
> remove_columns=["article", "abstract"],
> )
I get following error: `module 'dill._dill' has no attribute 'log'`
I've tried downgrading the dill version from latest to 0.2.8, but no luck.
Stack trace:
> ---------------------------------------------------------------------------
> ModuleNotFoundError Traceback (most recent call last)
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in _no_cache_fields(obj)
> 367 try:
> --> 368 import transformers as tr
> 369
>
> ModuleNotFoundError: No module named 'transformers'
>
> During handling of the above exception, another exception occurred:
>
> AttributeError Traceback (most recent call last)
> 17 frames
> <ipython-input-13-dd14813880a6> in <module>
> ----> 1 test = train_dataset.select(range(10))
>
> /usr/local/lib/python3.9/dist-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
> 155 }
> 156 # apply actual function
> --> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
> 158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
> 159 # re-apply format to the output
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
> 155 if kwargs.get(fingerprint_name) is None:
> 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name
> --> 157 kwargs[fingerprint_name] = update_fingerprint(
> 158 self._fingerprint, transform, kwargs_for_fingerprint
> 159 )
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args)
> 103 for key in sorted(transform_args):
> 104 hasher.update(key)
> --> 105 hasher.update(transform_args[key])
> 106 return hasher.hexdigest()
> 107
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in update(self, value)
> 55 def update(self, value):
> 56 self.m.update(f"=={type(value)}==".encode("utf8"))
> ---> 57 self.m.update(self.hash(value).encode("utf-8"))
> 58
> 59 def hexdigest(self):
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in hash(cls, value)
> 51 return cls.dispatch[type(value)](cls, value)
> 52 else:
> ---> 53 return cls.hash_default(value)
> 54
> 55 def update(self, value):
>
> /usr/local/lib/python3.9/dist-packages/datasets/fingerprint.py in hash_default(cls, value)
> 44 @classmethod
> 45 def hash_default(cls, value):
> ---> 46 return cls.hash_bytes(dumps(value))
> 47
> 48 @classmethod
>
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in dumps(obj)
> 387 file = StringIO()
> 388 with _no_cache_fields(obj):
> --> 389 dump(obj, file)
> 390 return file.getvalue()
> 391
>
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in dump(obj, file)
> 359 def dump(obj, file):
> 360 """pickle an object to a file"""
> --> 361 Pickler(file, recurse=True).dump(obj)
> 362 return
> 363
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in dump(self, obj)
> 392 return
> 393
> --> 394 def load_session(filename='/tmp/session.pkl', main=None):
> 395 """update the __main__ module with the state from the session file"""
> 396 if main is None: main = _main_module
>
> /usr/lib/python3.9/pickle.py in dump(self, obj)
> 485 if self.proto >= 4:
> 486 self.framer.start_framing()
> --> 487 self.save(obj)
> 488 self.write(STOP)
> 489 self.framer.end_framing()
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in save(self, obj, save_persistent_id)
> 386 pickler._byref = False # disable pickling by name reference
> 387 pickler._recurse = False # disable pickling recursion for globals
> --> 388 pickler._session = True # is best indicator of when pickling a session
> 389 pickler.dump(main)
> 390 finally:
>
> /usr/lib/python3.9/pickle.py in save(self, obj, save_persistent_id)
> 558 f = self.dispatch.get(t)
> 559 if f is not None:
> --> 560 f(self, obj) # Call unbound method with explicit self
> 561 return
> 562
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in save_singleton(pickler, obj)
>
> /usr/lib/python3.9/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj)
> 689 write(NEWOBJ)
> 690 else:
> --> 691 save(func)
> 692 save(args)
> 693 write(REDUCE)
>
> /usr/local/lib/python3.9/dist-packages/dill/_dill.py in save(self, obj, save_persistent_id)
> 386 pickler._byref = False # disable pickling by name reference
> 387 pickler._recurse = False # disable pickling recursion for globals
> --> 388 pickler._session = True # is best indicator of when pickling a session
> 389 pickler.dump(main)
> 390 finally:
>
> /usr/lib/python3.9/pickle.py in save(self, obj, save_persistent_id)
> 558 f = self.dispatch.get(t)
> 559 if f is not None:
> --> 560 f(self, obj) # Call unbound method with explicit self
> 561 return
> 562
>
> /usr/local/lib/python3.9/dist-packages/datasets/utils/py_utils.py in save_function(pickler, obj)
> 583 dill._dill.log.info("# F1")
> 584 else:
> --> 585 dill._dill.log.info("F2: %s" % obj)
> 586 name = getattr(obj, "__qualname__", getattr(obj, "__name__", None))
> 587 dill._dill.StockPickler.save_global(pickler, obj, name=name)
>
> AttributeError: module 'dill._dill' has no attribute 'log'
### Steps to reproduce the bug
After loading the dataset(eg: https://huggingface.co/datasets/scientific_papers) in google colab
do either
> data = train_dataset.select(range(10))
or
> train_datasets = train_dataset.map(
> process_data_to_model_inputs,
> batched=True,
> batch_size=batch_size,
> remove_columns=["article", "abstract"],
> )
### Expected behavior
The map and select function should work
### Environment info
dataset: https://huggingface.co/datasets/scientific_papers
dill = 0.3.6
python= 3.9.16
transformer = 4.2.0
It looks like an error that we observed once in https://github.com/huggingface/datasets/pull/5166
Can you try to update `datasets` ?
```
pip install -U datasets
```
if it doesn't work, can you make sure you don't have packages installed that may modify `dill`'s behavior, such as `apache-beam` ? | [
-1.2083317041397095,
-0.8604457378387451,
-0.5360966920852661,
1.388693928718567,
-0.012574469670653343,
-1.3568854331970215,
0.054514821618795395,
-0.9596343040466309,
1.5538126230239868,
-0.8409479856491089,
0.3125772774219513,
-1.6776341199874878,
0.0163361057639122,
-0.584671139717102,
-0.6244500279426575,
-0.6903088092803955,
-0.3107611835002899,
-0.7599807381629944,
1.1104567050933838,
2.4734270572662354,
1.2488923072814941,
-1.3114382028579712,
2.848646879196167,
0.6752209663391113,
-0.2953881323337555,
-0.8377723097801208,
0.45977216958999634,
0.0035653747618198395,
-1.4697343111038208,
-0.2809653878211975,
-0.9704515337944031,
-0.028112348169088364,
-0.7258849740028381,
-0.494349867105484,
0.10238590836524963,
0.3982534408569336,
-0.20743173360824585,
-0.31819912791252136,
-0.41585686802864075,
-0.7217399477958679,
0.5608958005905151,
-0.29638025164604187,
0.8533409833908081,
-0.27589473128318787,
1.6745164394378662,
-0.6572370529174805,
0.5344094038009644,
0.5349467992782593,
1.1689516305923462,
0.2881162166595459,
-0.12483219802379608,
0.4468780755996704,
0.23934857547283173,
0.0715545043349266,
0.5671755075454712,
1.2163896560668945,
0.5995510220527649,
0.5070551037788391,
0.7304363250732422,
-2.2015581130981445,
1.3215434551239014,
-0.739290177822113,
0.22810257971286774,
1.2860476970672607,
-0.9793804287910461,
0.5202125310897827,
-1.865527629852295,
-0.13610413670539856,
0.481037974357605,
-2.339742660522461,
0.0974111333489418,
-1.3912173509597778,
-0.5664303302764893,
0.9228805303573608,
0.33345675468444824,
-1.231795072555542,
-0.04236394912004471,
-0.4820610582828522,
0.9523583054542542,
0.4200371503829956,
1.1107157468795776,
-1.7734547853469849,
0.04079746827483177,
-0.21299785375595093,
0.3633077144622803,
-1.0983587503433228,
-1.670644760131836,
0.697350263595581,
0.697231113910675,
0.6849882006645203,
-0.10597529262304306,
0.8515452146530151,
-1.0757139921188354,
0.7206298112869263,
-0.9513273239135742,
-1.7802125215530396,
-1.3218004703521729,
-2.4413957595825195,
-2.3586556911468506,
0.6936286687850952,
-0.5610606670379639,
-0.39865171909332275,
2.145960569381714,
-1.1436232328414917,
-1.802660584449768,
1.0887218713760376,
0.346865177154541,
-0.08967497199773788,
2.4365694522857666,
0.21525847911834717,
-0.8803284764289856,
0.7717248797416687,
-0.8809347748756409,
0.6817697882652283,
-0.3132047653198242,
1.2921619415283203,
0.4046439230442047,
-1.0326056480407715,
1.6340625286102295,
-0.5023428201675415,
0.5077784657478333,
-0.6724879145622253,
-0.3904680013656616,
-0.5765547752380371,
0.16728730499744415,
1.9827693700790405,
-0.1362537145614624,
1.5475764274597168,
-0.12490885704755783,
-1.4805617332458496,
-1.3924882411956787,
0.7246235609054565,
0.5127077698707581,
-0.9619954824447632,
0.2749742567539215,
-0.4493837356567383,
0.12095344811677933,
0.21160046756267548,
1.1290662288665771,
1.3337339162826538,
0.797760009765625,
-0.19472651183605194,
-0.9525984525680542,
0.03380771353840828,
-0.04863661155104637,
-0.6006817817687988,
-1.8007503747940063,
-0.269973486661911,
0.10027546435594559,
0.6669891476631165,
-1.1370130777359009,
1.8290669918060303,
0.9479575157165527,
2.0177652835845947,
1.0070202350616455,
-0.3654440939426422,
1.4761385917663574,
0.1145915687084198,
1.8833791017532349,
-0.3840487599372864,
0.7015807032585144,
-0.5497950911521912,
-1.1657942533493042,
0.7093392610549927,
-0.37639278173446655,
-1.9160813093185425,
-0.3509299159049988,
-0.8624553680419922,
-0.18672122061252594,
-0.9707148671150208,
1.0148999691009521,
-0.1801782101392746,
-1.3284553289413452,
0.31868958473205566,
-0.7219612002372742,
0.14271721243858337,
-1.419838309288025,
0.2984122335910797,
0.7190474271774292,
-0.6966841816902161,
0.040919218212366104,
-0.5303428769111633,
-1.419054627418518,
-0.6993989944458008,
0.379536896944046,
1.7409708499908447,
-0.6092738509178162,
1.03801429271698,
0.9759626984596252,
-0.5988171696662903,
-0.14150704443454742,
0.4604175388813019,
-0.32008057832717896,
0.8516647815704346,
-1.0429646968841553,
-0.36980703473091125,
1.1332355737686157,
-0.3475373089313507,
-0.42032337188720703,
1.257006049156189,
0.6513126492500305,
-0.9974158406257629,
-0.3414299488067627,
-0.1443253606557846,
-0.8183116912841797,
0.11003916710615158,
-1.6288334131240845,
-0.10543511062860489,
0.3130166530609131,
-1.5611127614974976,
-0.46435612440109253,
-0.053223296999931335,
1.3356270790100098,
0.029539112001657486,
1.2850991487503052,
-0.2652715742588043,
-0.060024287551641464,
-0.5354379415512085,
-0.5774378180503845,
0.20184168219566345,
-0.15469138324260712,
-0.5826379656791687,
0.2489374727010727,
-0.8098450899124146,
0.1205078735947609,
1.5346531867980957,
0.2247038632631302,
0.12219326943159103,
0.4760262370109558,
1.1158053874969482,
0.3232263922691345,
-0.25345051288604736,
-0.88082355260849,
-1.718615174293518,
2.0561399459838867,
-1.6382414102554321,
1.9294800758361816,
0.8079836964607239,
-0.07958115637302399,
-1.855402946472168,
-1.8670271635055542,
1.452783465385437,
1.0958541631698608,
2.513856887817383,
0.59592604637146,
0.4465530812740326,
-0.7599905729293823,
-0.6669151782989502,
0.37388378381729126,
-0.7629154324531555,
-0.9637318253517151,
0.1879117786884308,
2.3163700103759766,
1.6784493923187256,
-0.41030701994895935,
-0.11474375426769257,
-0.8630281090736389,
1.312525749206543,
-0.26134055852890015,
0.2643241286277771,
1.8614249229431152,
-0.45118582248687744,
-1.0802621841430664,
1.3583403825759888,
-2.3986740112304688,
0.2746831476688385,
2.0134193897247314,
0.3238850235939026,
0.12051843851804733,
-1.114597201347351,
-0.7908359169960022,
-0.1935661882162094,
-0.47670620679855347,
-1.266398549079895,
0.39624354243278503,
-0.2280379831790924,
-0.785650372505188,
-1.47429621219635,
0.011762450449168682,
-1.1407643556594849,
-1.7216808795928955,
0.263356477022171,
1.822445273399353,
2.281864643096924,
-0.8073471188545227,
1.31118905544281,
-0.35717150568962097,
0.2271895855665207,
1.108787178993225,
1.250626564025879,
3.189197540283203,
1.8821194171905518,
-1.2792816162109375,
0.7096391916275024,
-0.15354564785957336,
-0.5653345584869385,
1.222898006439209,
-1.0188814401626587,
1.1597750186920166,
-0.28021863102912903,
-1.416725993156433,
-1.212212324142456,
0.945512056350708,
0.42159634828567505,
-0.08987125754356384,
-0.48451972007751465,
1.1519420146942139,
0.09455086290836334,
1.3547940254211426,
0.6366873383522034,
-0.30474039912223816,
0.5329865217208862,
-0.3768538534641266,
-0.5238956212997437,
1.5983636379241943,
0.09380693733692169,
-1.597464919090271,
-2.4027249813079834,
-0.1607639342546463,
-1.0362628698349,
0.055327076464891434,
-0.8589284420013428,
-1.1325619220733643,
1.4835479259490967,
0.4219196140766144,
-0.8544245958328247,
-0.1377076655626297,
-0.3875856101512909,
-0.5706133842468262,
2.5592904090881348,
-1.3565722703933716,
-0.2218719720840454,
-0.9028668999671936,
-0.619201123714447,
1.456335186958313,
-1.2295690774917603,
-0.2458226978778839,
-1.024883508682251,
-0.4721282720565796,
-1.2538343667984009,
-0.36195263266563416,
-0.05290788412094116,
-0.8263611793518066,
0.7134016752243042,
0.04239919036626816,
-1.2253957986831665,
-0.24934940040111542,
-1.1016544103622437,
0.8064270615577698,
-0.2660380005836487,
0.09930086880922318,
1.7568320035934448,
0.22341133654117584,
-0.3700009286403656,
0.7949365973472595,
1.2970303297042847,
0.6154292821884155,
-0.5700076818466187,
0.10617423057556152,
-0.6679638028144836,
0.5342410802841187,
-1.1889402866363525,
0.3291948735713959,
-2.9847967624664307,
0.7132881283760071,
0.06823230534791946,
0.027124501764774323,
-0.10207309573888779,
-1.5555291175842285,
0.9575764536857605,
2.483238935470581,
-1.1312499046325684,
0.6682201623916626,
0.2869342863559723,
1.1804349422454834,
-1.6192139387130737,
0.011390269733965397,
-0.6303674578666687,
2.1739211082458496,
0.07947339862585068,
1.0793066024780273,
-0.4884358048439026,
-2.469409465789795,
0.6334609985351562,
-1.162129282951355,
-1.0228468179702759,
0.7030633091926575,
-0.9311443567276001,
0.14307831227779388,
-1.2565957307815552,
-0.055416010320186615,
-0.9242957830429077,
-1.0430220365524292,
0.5360431671142578,
-0.0011690333485603333,
0.6489966511726379,
-0.562873363494873,
0.20610350370407104,
-2.305352210998535,
-1.4085655212402344,
-0.08993024379014969,
-0.941941499710083,
0.5287684202194214,
-0.40181392431259155,
0.7801253795623779,
-0.0979437530040741,
0.02340538427233696,
0.29939067363739014,
1.4895362854003906,
3.159177541732788,
-0.01925482787191868,
0.3077680170536041,
-0.2322274148464203,
-1.0821751356124878,
1.498660922050476,
0.8538615107536316,
-0.3060016334056854,
-0.5765692591667175,
-0.9584784507751465,
1.376503348350525,
1.9098498821258545,
0.9100610017776489,
0.1269216388463974,
-0.9982284903526306,
-0.6816114187240601,
0.17257080972194672,
0.19193734228610992,
0.47709932923316956,
0.961995542049408,
0.1517292559146881,
0.1884249597787857,
1.354349136352539,
1.0370407104492188,
-0.2810274064540863,
0.5628461837768555,
-0.7903158664703369,
-0.41153332591056824,
0.6028363704681396,
0.3605975806713104,
-0.007080583833158016,
0.24792180955410004,
-0.9640088677406311,
-0.18738864362239838,
-0.19966325163841248,
-0.7603183388710022,
-0.7045953869819641,
-0.35269930958747864,
-0.36731696128845215,
1.7290849685668945,
-0.11717139184474945,
-0.5005661249160767,
0.01247368473559618,
-0.8050884008407593,
-0.12058304250240326,
-1.0903576612472534,
0.29189085960388184,
-0.1786344200372696,
0.056947771459817886,
-0.15239065885543823,
1.6277194023132324,
-0.8706598877906799,
-2.204029083251953,
0.1149333193898201,
0.3490704596042633,
-0.42766472697257996,
-0.10962095111608505,
1.9037585258483887,
0.49440649151802063,
1.4409922361373901,
1.5671390295028687,
1.1086148023605347,
-0.5954365134239197,
-1.2151726484298706,
0.7389575242996216,
0.8801646828651428,
-1.266982078552246,
0.9782556891441345,
-0.21898606419563293,
-0.6564794778823853,
0.4726102352142334,
1.2732300758361816,
0.49773427844047546,
-1.909860372543335,
0.9598338603973389,
-1.1264967918395996,
0.9631400108337402,
0.8147605657577515,
0.9309643507003784,
0.14258460700511932,
0.8863102197647095,
-1.3129218816757202,
-0.9918805956840515,
-0.6311926245689392,
-0.6348704695701599,
1.8030424118041992,
-0.2436826527118683,
0.2876128852367401,
-0.3945366442203522,
-1.2385317087173462,
0.13690485060214996,
0.6733308434486389,
0.34463274478912354,
-0.28012707829475403,
0.7353901863098145,
-0.7138950824737549,
-1.1597987413406372,
-1.3148235082626343,
-0.41406428813934326,
-0.9678611755371094,
-0.8609750866889954,
1.038370966911316,
0.693830668926239,
0.5460184216499329,
1.9653980731964111,
0.6247749924659729,
0.1620880365371704,
-2.5811455249786377,
0.8312063217163086,
0.284395307302475,
-0.1533004343509674,
0.8863514065742493,
0.3454691767692566,
1.2384377717971802,
-0.1474214345216751,
0.5437085628509521,
-2.2789433002471924,
2.1980745792388916,
-0.2311086505651474,
0.7957747578620911,
0.13336966931819916,
0.138755202293396,
0.9331452250480652,
0.5408764481544495,
0.5433033108711243,
-1.075775384902954,
0.9742914438247681,
-0.5830941796302795,
1.1166108846664429,
0.8744840025901794,
-0.9233421683311462,
0.1956019550561905,
1.1659985780715942,
0.3767831325531006,
-0.5836291909217834,
-1.0004637241363525,
-0.7586598992347717,
0.948905885219574,
1.775987982749939,
-0.008363325148820877,
0.05718916282057762,
0.6805232167243958,
0.7297043204307556,
-1.308986783027649,
-0.029627270996570587,
-0.5062611699104309,
-0.6606061458587646,
1.7644333839416504,
1.9638653993606567,
0.021026477217674255,
-0.001007080078125,
-0.6738883852958679,
-1.568657636642456,
0.916752815246582,
0.10567554831504822,
-0.0330561101436615,
0.7837762236595154,
-0.6315897107124329,
1.1385977268218994,
0.8024656772613525,
0.8627305030822754,
0.27824217081069946,
0.1055668517947197,
0.33000412583351135,
-0.25087329745292664,
-1.1070255041122437,
-0.3336133658885956,
-1.0558409690856934,
-2.5300214290618896,
0.4795333445072174,
-0.32601669430732727,
-1.465772271156311,
0.08227033168077469,
-0.8595792651176453,
0.7963029146194458,
-0.5390366911888123,
-1.0419176816940308,
-1.3457021713256836,
0.25612789392471313,
-0.19328142702579498,
0.8016219735145569,
-1.5551124811172485,
-0.17198801040649414,
1.0841336250305176,
0.9872239232063293,
-0.708158016204834,
0.9473880529403687,
0.3812076151371002,
0.9069862365722656,
0.9361259341239929,
-0.43222516775131226,
0.4822106957435608,
0.2710658311843872,
-1.3265310525894165,
0.3305904269218445,
1.3994148969650269,
0.24960516393184662,
1.260061264038086,
-0.4312058389186859,
-0.15832515060901642,
0.40481019020080566,
-0.2358068823814392,
-0.5286888480186462,
-0.6373034119606018,
0.6069206595420837,
-0.11918706446886063,
-0.9990841150283813,
-0.1961316168308258,
-0.00014550331979990005,
-0.1617920994758606,
0.378926157951355,
-1.5219411849975586,
-0.06848430633544922,
-0.5363696813583374,
-0.5624520778656006,
-1.3764045238494873,
-0.1497381627559662,
1.4359546899795532,
-0.8990801572799683,
-0.09278693795204163,
0.5495463013648987,
0.20406986773014069,
0.527187705039978,
0.6885480284690857,
-0.7528053522109985,
-0.22169838845729828,
-0.19969044625759125,
-0.44468778371810913,
0.25266337394714355,
1.2348369359970093,
-0.1045069769024849,
-1.005085825920105,
0.4559730589389801,
-0.19218222796916962,
0.1911093145608902,
1.876481056213379,
0.02488715574145317,
-0.9010748267173767,
0.27958038449287415,
-0.7082090973854065,
1.8840590715408325,
1.6332937479019165,
1.3000426292419434,
-0.12133651971817017,
-0.9397549629211426,
0.6429975628852844,
-0.26150205731391907,
-0.33863940834999084,
0.7735627889633179,
0.42976438999176025,
-0.2917669713497162,
-1.49009108543396,
0.788002610206604,
1.2350969314575195,
-0.8226099610328674,
-0.7283362150192261,
0.036755356937646866,
-0.7675796151161194,
1.2141777276992798,
0.6932818293571472,
0.39010190963745117,
0.3145103454589844,
1.759444236755371,
0.6974167823791504,
-0.6408832669258118,
0.4872489869594574,
0.4675421118736267,
-0.1591423600912094,
-1.9640535116195679,
-1.2039700746536255,
0.25293880701065063,
-0.4077571630477905,
-1.4272985458374023,
1.4480204582214355,
-1.2423577308654785,
-0.9689128994941711,
0.5594086647033691,
0.18101808428764343,
1.327038288116455,
0.3072141110897064,
1.7986671924591064,
2.0029990673065186,
0.9480514526367188,
0.45100295543670654,
1.1653425693511963,
-0.22865703701972961,
-0.19913960993289948,
1.640581488609314,
-0.3814764618873596,
0.6780886054039001,
1.1379226446151733,
-0.49475589394569397,
-1.1988940238952637,
-0.8456739187240601,
-1.1591774225234985,
-0.8261417746543884,
1.0503203868865967,
0.19576698541641235,
-1.1502432823181152,
0.3647642135620117,
1.7192977666854858,
0.023289073258638382,
-0.10556158423423767,
0.6906024813652039,
0.43149036169052124,
-0.6801846027374268,
-0.12317939847707748,
-1.166520595550537,
0.6031234860420227,
-0.41514503955841064,
-0.4152139723300934,
0.15624283254146576,
0.526220440864563,
1.2454196214675903,
0.2010989636182785,
0.11431459337472916,
1.3458551168441772,
-1.316197395324707,
1.150465488433838,
-0.9869691133499146,
0.3477490544319153,
-2.194486618041992,
1.4857192039489746,
-0.9517679810523987,
1.9776417016983032,
-2.709167003631592,
0.47865498065948486,
-0.490705668926239,
-0.5152549743652344,
0.11480910331010818,
-0.17198947072029114,
0.13187175989151,
-0.07227092236280441,
-1.0195555686950684,
-0.12310029566287994,
-0.8058280348777771,
0.4811142385005951,
1.2650315761566162,
1.3724850416183472,
-0.9550755620002747,
-0.22222088277339935,
-1.6271347999572754,
-0.20615790784358978,
-0.5182689428329468,
0.11990188807249069,
-1.7097291946411133,
-0.19126328825950623,
-2.023548126220703,
-2.5356216430664062,
-1.3014540672302246,
-0.9824845194816589,
1.3328253030776978,
0.08974267542362213,
-0.9691792130470276,
1.1982300281524658,
-0.4335932433605194,
-1.7364939451217651,
1.293229103088379,
-2.1703128814697266
] |
https://github.com/huggingface/datasets/issues/5638 | xPath to implement all operations for Path | I think https://github.com/fsspec/universal_pathlib is the project you are looking for.
`xPath` has the methods often used in dataset scripts, and `mkdir` is not one of them (`dl_manager`'s role is to "interact" with the file system, so using `mkdir` is discouraged). | ### Feature request
Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally.
### Motivation
I'm using xPath to interact with remote objects.
### Your contribution
I could try to make a PR. I'm a bit unfamiliar with chaining right now. | 256 | 40 | xPath to implement all operations for Path
### Feature request
Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally.
### Motivation
I'm using xPath to interact with remote objects.
### Your contribution
I could try to make a PR. I'm a bit unfamiliar with chaining right now.
I think https://github.com/fsspec/universal_pathlib is the project you are looking for.
`xPath` has the methods often used in dataset scripts, and `mkdir` is not one of them (`dl_manager`'s role is to "interact" with the file system, so using `mkdir` is discouraged). | [
-1.0243768692016602,
-0.792435884475708,
-0.9160916805267334,
1.470665454864502,
-0.1463327407836914,
-1.2837564945220947,
0.24655765295028687,
-1.162750482559204,
1.7502630949020386,
-0.8548779487609863,
0.436855673789978,
-1.5977184772491455,
0.08030333369970322,
-0.5997151732444763,
-0.781125009059906,
-0.8921163082122803,
-0.326386421918869,
-0.6873911023139954,
0.9783669114112854,
2.6141459941864014,
1.1729447841644287,
-1.3381434679031372,
2.6507153511047363,
0.7149796485900879,
-0.23467640578746796,
-1.0524121522903442,
0.4750361740589142,
-0.033029649406671524,
-1.1263067722320557,
-0.4964922070503235,
-0.9515817165374756,
-0.09610660374164581,
-0.5757631659507751,
-0.5549184679985046,
-0.049175143241882324,
0.429715633392334,
-0.32447776198387146,
-0.4279737174510956,
-0.5349549055099487,
-0.943335235118866,
0.33994919061660767,
-0.48373648524284363,
0.9173986315727234,
-0.32063940167427063,
1.8418103456497192,
-0.42177847027778625,
0.45698341727256775,
0.7510393261909485,
1.4614944458007812,
0.1464816778898239,
-0.032097190618515015,
0.2752608060836792,
0.3962002098560333,
0.014487968757748604,
0.39973267912864685,
1.11849844455719,
0.6678708791732788,
0.5819244384765625,
0.654035747051239,
-2.222172737121582,
1.3209627866744995,
-1.0662044286727905,
0.25699281692504883,
1.2173044681549072,
-0.9220613837242126,
0.28820550441741943,
-1.7063654661178589,
-0.10455387830734253,
0.5395610928535461,
-2.252182960510254,
0.2678682506084442,
-1.2182936668395996,
-0.43001386523246765,
1.0141109228134155,
0.38029178977012634,
-1.3189671039581299,
0.03719030320644379,
-0.3016926348209381,
0.8795098066329956,
0.49005699157714844,
1.1073812246322632,
-1.7260229587554932,
-0.03611600399017334,
-0.36296790838241577,
0.0439344123005867,
-1.3769285678863525,
-1.4617743492126465,
0.549578070640564,
0.6120120882987976,
0.608820915222168,
-0.11951630562543869,
0.9577250480651855,
-0.9539734721183777,
0.722725510597229,
-0.8411399126052856,
-1.78227961063385,
-1.3609795570373535,
-2.342902898788452,
-2.3220205307006836,
0.7870331406593323,
-0.3997763991355896,
-0.5601576566696167,
2.107414722442627,
-0.9804316163063049,
-1.7158249616622925,
1.089616060256958,
0.14210215210914612,
0.05409540235996246,
2.478226900100708,
0.17291970551013947,
-0.6534212231636047,
0.40698161721229553,
-0.6990990042686462,
0.8220773339271545,
-0.5894473195075989,
1.4218738079071045,
0.48443880677223206,
-1.1175576448440552,
1.6900767087936401,
-0.3611307442188263,
0.5619179010391235,
-0.7004983425140381,
-0.46751391887664795,
-0.8314653038978577,
0.42968976497650146,
1.7990427017211914,
-0.3191353678703308,
1.5444139242172241,
-0.4782591164112091,
-1.5450217723846436,
-1.6104577779769897,
0.9351823925971985,
0.3891611099243164,
-0.6776606440544128,
0.16960914433002472,
-0.3200441896915436,
0.1600770205259323,
-0.0033388356678187847,
1.1890983581542969,
1.3295010328292847,
0.6176345348358154,
-0.29654228687286377,
-0.941137969493866,
0.37790679931640625,
-0.013405118137598038,
-0.680961012840271,
-1.7209407091140747,
-0.36042892932891846,
0.13805937767028809,
0.6266533732414246,
-1.0927444696426392,
1.7649916410446167,
0.8690985441207886,
1.9894953966140747,
0.9973253011703491,
-0.2979779541492462,
1.4456456899642944,
0.046333663165569305,
1.8661086559295654,
-0.48418480157852173,
0.6541576385498047,
-0.37734851241111755,
-1.1568247079849243,
0.8562889099121094,
-0.27504271268844604,
-1.9353692531585693,
-0.8042252063751221,
-0.8981378674507141,
-0.16844776272773743,
-0.7918167114257812,
0.92669677734375,
-0.2944681942462921,
-1.3677270412445068,
0.2794320285320282,
-0.7862956523895264,
0.07826204597949982,
-1.2651159763336182,
0.41384559869766235,
0.7029781341552734,
-0.6595897674560547,
0.13232316076755524,
-0.3007597327232361,
-1.2633212804794312,
-0.5875006914138794,
0.30236268043518066,
1.9453271627426147,
-0.7390416860580444,
0.8605061769485474,
0.9586232900619507,
-0.7364895343780518,
-0.04543142765760422,
0.41213488578796387,
-0.3744727671146393,
0.7963988780975342,
-1.0858150720596313,
-0.39615538716316223,
1.2158129215240479,
-0.2568827271461487,
-0.7065209746360779,
1.3727718591690063,
0.8035411834716797,
-0.9716489911079407,
-0.08795753121376038,
-0.20891143381595612,
-0.8596650958061218,
0.12408927083015442,
-1.7104222774505615,
-0.16856467723846436,
0.40816378593444824,
-1.4883676767349243,
-0.5218831300735474,
-0.25338366627693176,
1.203573226928711,
-0.15264062583446503,
1.2512476444244385,
-0.2783081531524658,
-0.25305795669555664,
-0.3766460716724396,
-0.4015218913555145,
0.16578449308872223,
-0.23187927901744843,
-0.6925890445709229,
0.2972058057785034,
-0.7269303202629089,
0.4505489766597748,
1.3615050315856934,
0.28221479058265686,
-0.026021188125014305,
0.5272095799446106,
1.158044695854187,
0.3711507320404053,
-0.09794452041387558,
-0.9094790816307068,
-1.4754118919372559,
2.014188528060913,
-1.4146380424499512,
1.880613088607788,
0.7684200406074524,
-0.07271134108304977,
-1.7473429441452026,
-1.9085103273391724,
1.3973828554153442,
1.1673781871795654,
2.267354726791382,
0.6804410219192505,
0.42294585704803467,
-0.7399410009384155,
-0.6692864894866943,
0.3020784854888916,
-1.2308385372161865,
-0.7986904978752136,
0.09517069160938263,
2.3532981872558594,
1.7119402885437012,
-0.4347400963306427,
-0.17184342443943024,
-1.1268646717071533,
1.3320032358169556,
-0.1571953296661377,
0.1409057378768921,
2.080427646636963,
-0.28874602913856506,
-1.0917770862579346,
1.134634256362915,
-2.2800490856170654,
0.15176717936992645,
2.0379445552825928,
0.2392776906490326,
0.06244178116321564,
-1.4125601053237915,
-0.674085795879364,
-0.17509765923023224,
-0.2727792263031006,
-1.217279076576233,
0.5347985029220581,
-0.2159452587366104,
-0.7357696294784546,
-1.472796082496643,
0.2686513662338257,
-1.0824944972991943,
-1.5918986797332764,
0.27782395482063293,
1.8894078731536865,
2.019930601119995,
-0.7970442175865173,
1.6136796474456787,
-0.17578506469726562,
0.13870874047279358,
1.266686201095581,
1.1183066368103027,
3.0907557010650635,
1.9945452213287354,
-1.133347511291504,
0.6497917175292969,
-0.06858406215906143,
-0.5151709914207458,
1.2330774068832397,
-1.0884482860565186,
1.1730713844299316,
-0.14898979663848877,
-1.0684335231781006,
-1.3602867126464844,
0.8212536573410034,
0.4285549223423004,
-0.033912789076566696,
-0.4673655927181244,
1.2067302465438843,
0.0943928137421608,
1.2739875316619873,
0.5629110932350159,
-0.3058505654335022,
0.7302674055099487,
-0.3880080282688141,
-0.3283248245716095,
1.5521761178970337,
0.3030538260936737,
-1.3922770023345947,
-2.338083028793335,
-0.15646809339523315,
-0.787406861782074,
0.070451520383358,
-0.5003380179405212,
-1.0359901189804077,
1.6232877969741821,
0.3675693869590759,
-1.2045528888702393,
-0.3424825370311737,
-0.42548292875289917,
-0.6457354426383972,
2.7505931854248047,
-1.4543393850326538,
-0.30182620882987976,
-1.0384302139282227,
-0.5944031476974487,
1.8034474849700928,
-1.3148807287216187,
-0.12127566337585449,
-1.0793190002441406,
-0.4418540298938751,
-1.2579153776168823,
-0.6072105169296265,
0.0353253036737442,
-0.9139083027839661,
0.8210819363594055,
0.27281156182289124,
-1.1687628030776978,
-0.24807561933994293,
-0.8399138450622559,
0.7562022805213928,
-0.17566797137260437,
0.2878316044807434,
1.7982878684997559,
0.5207508206367493,
-0.3610211908817291,
0.6896072626113892,
1.0539827346801758,
0.4951874017715454,
-0.6070235967636108,
0.36180421710014343,
-0.7702237367630005,
0.2419920265674591,
-1.2257061004638672,
0.28494998812675476,
-2.784620523452759,
0.5669330954551697,
-0.11057233810424805,
-0.10179624706506729,
-0.01649639569222927,
-1.3392647504806519,
1.1234447956085205,
2.5853915214538574,
-1.3054484128952026,
0.5027198791503906,
0.20702241361141205,
1.3235586881637573,
-1.6170576810836792,
0.32608968019485474,
-0.38430923223495483,
2.1755435466766357,
0.1834985911846161,
1.1998372077941895,
-0.42827001214027405,
-2.262134552001953,
0.6325337290763855,
-1.1936519145965576,
-1.2256789207458496,
0.8021057844161987,
-0.8112462759017944,
-0.12040866911411285,
-1.3424686193466187,
-0.24644789099693298,
-0.7565048933029175,
-1.2651046514511108,
0.8315452933311462,
0.18108995258808136,
0.5683673620223999,
-0.6206872463226318,
0.2915104925632477,
-2.0874595642089844,
-1.356292724609375,
-0.25911593437194824,
-0.9056763052940369,
0.3516749143600464,
-0.3285578787326813,
0.6338607668876648,
-0.34485331177711487,
0.00043273717164993286,
0.32172539830207825,
1.4190778732299805,
3.5131213665008545,
0.20425312221050262,
0.44148361682891846,
-0.18368302285671234,
-0.9296413064002991,
1.4265824556350708,
0.8315290212631226,
-0.04442289471626282,
-0.5467796921730042,
-1.0774654150009155,
1.2140535116195679,
1.9896912574768066,
0.863251268863678,
0.1246795654296875,
-0.8068434000015259,
-0.5887448191642761,
-0.07417229562997818,
0.2255886048078537,
0.42208626866340637,
0.9977289438247681,
0.09835726767778397,
-0.06294523924589157,
1.3713972568511963,
1.3428109884262085,
-0.49842801690101624,
0.44092389941215515,
-0.8755350112915039,
-0.40184855461120605,
0.45479029417037964,
0.2579320967197418,
-0.011463997885584831,
0.1907275915145874,
-0.8920794129371643,
-0.2437562644481659,
-0.3623497188091278,
-1.027722954750061,
-0.853178858757019,
-0.43131473660469055,
-0.29236313700675964,
1.7445803880691528,
0.11523241549730301,
-0.5608571767807007,
-0.010466154664754868,
-0.746497631072998,
0.03161347657442093,
-0.9851534962654114,
0.0984097421169281,
-0.20595359802246094,
-0.22701114416122437,
-0.014871343038976192,
1.8249155282974243,
-1.0650882720947266,
-2.0729005336761475,
0.31072863936424255,
0.2624671459197998,
-0.3722417652606964,
0.2671014368534088,
1.5424141883850098,
0.522014319896698,
1.500687599182129,
1.392447829246521,
1.0488547086715698,
-0.777910590171814,
-1.3178776502609253,
0.6345105767250061,
0.9720168709754944,
-1.4344305992126465,
0.7177445888519287,
0.12870870530605316,
-0.39842188358306885,
0.6194762587547302,
1.2491648197174072,
0.5257906317710876,
-1.946091890335083,
0.7402742505073547,
-0.9295531511306763,
0.7675341367721558,
0.6843258142471313,
0.7132557034492493,
0.2978549301624298,
0.7129133343696594,
-1.1502526998519897,
-1.1742057800292969,
-0.7695310115814209,
-0.7015526294708252,
1.9961581230163574,
-0.2771413028240204,
0.7285667061805725,
-0.01571555808186531,
-1.3988803625106812,
-0.15399052202701569,
0.7330538630485535,
0.36678701639175415,
-0.47433745861053467,
0.6922299861907959,
-0.6411899328231812,
-1.0364716053009033,
-1.5651865005493164,
-0.4748982787132263,
-1.0565011501312256,
-1.0395920276641846,
0.9853164553642273,
0.798846960067749,
0.235819011926651,
1.9058785438537598,
0.6333394646644592,
0.3063710331916809,
-2.626880407333374,
0.925546407699585,
0.44653549790382385,
0.05865941941738129,
0.8775300979614258,
0.42338311672210693,
1.0294837951660156,
-0.07336854934692383,
0.5943752527236938,
-2.3436343669891357,
2.3999621868133545,
-0.22146259248256683,
0.668261706829071,
0.011946631595492363,
-0.17451860010623932,
1.090440034866333,
0.4118119478225708,
0.6709321141242981,
-1.1536483764648438,
0.6607941389083862,
-0.6989017724990845,
1.2732304334640503,
0.9839668869972229,
-0.8003417253494263,
0.02401822991669178,
1.3931456804275513,
0.496362566947937,
-0.5087611675262451,
-0.9014877080917358,
-0.9503349661827087,
0.8316832184791565,
1.7460947036743164,
-0.11851149052381516,
-0.03646143898367882,
0.8722612857818604,
0.6501023173332214,
-1.2865333557128906,
-0.033935993909835815,
-0.8011278510093689,
-0.8002612590789795,
1.6768349409103394,
2.048556327819824,
-0.23786437511444092,
-0.3661157190799713,
-0.886626124382019,
-1.1457229852676392,
0.8127158284187317,
-0.012125507928431034,
0.003606043756008148,
0.7049559354782104,
-0.6380613446235657,
1.1838047504425049,
0.9098503589630127,
0.9682443141937256,
0.18646854162216187,
0.34940117597579956,
0.45581772923469543,
-0.38907259702682495,
-1.0330959558486938,
-0.19040389358997345,
-1.1886440515518188,
-2.6389095783233643,
0.5179204344749451,
-0.34740138053894043,
-1.3582892417907715,
-0.08080296963453293,
-1.0333918333053589,
0.9770253300666809,
-0.5230069160461426,
-1.0625041723251343,
-1.5207133293151855,
0.06200290471315384,
-0.1495286226272583,
0.8582679629325867,
-1.6072157621383667,
-0.05493064224720001,
1.303059458732605,
0.9467791318893433,
-0.7737957835197449,
1.0209460258483887,
0.20830927789211273,
1.1636159420013428,
0.8304771780967712,
-0.3880294859409332,
0.4890534281730652,
-0.07616155594587326,
-1.3238850831985474,
0.579988420009613,
1.1559392213821411,
0.11406153440475464,
1.5143251419067383,
-0.599439799785614,
0.05663266032934189,
0.3910876214504242,
-0.39747583866119385,
-0.5237278938293457,
-0.47798123955726624,
0.8094371557235718,
0.114028699696064,
-0.891788125038147,
0.1502748429775238,
-0.06472476571798325,
-0.1901351511478424,
0.11310535669326782,
-1.5638866424560547,
-0.24524448812007904,
-0.2839038372039795,
-0.5600951910018921,
-1.1959989070892334,
-0.11286162585020065,
1.344348669052124,
-0.6576756834983826,
-0.2472967654466629,
0.47701728343963623,
0.41186830401420593,
0.4175161123275757,
0.4759167730808258,
-0.5914815068244934,
-0.4644773602485657,
-0.21152523159980774,
-0.32821646332740784,
0.4285694658756256,
1.3501484394073486,
-0.08869349211454391,
-1.0015172958374023,
0.7634356021881104,
-0.39642277359962463,
0.08559265732765198,
1.906120777130127,
0.11184119433164597,
-0.9751154780387878,
0.14224891364574432,
-0.7060444951057434,
1.9735679626464844,
1.6625200510025024,
1.2792205810546875,
0.024887623265385628,
-0.9955416321754456,
0.7322342991828918,
-0.23481255769729614,
-0.3633493483066559,
0.8684865832328796,
0.37175118923187256,
-0.09581979364156723,
-1.3180391788482666,
0.5625171661376953,
1.1958589553833008,
-0.7796562314033508,
-0.9732545614242554,
-0.03202173858880997,
-0.8348073363304138,
1.0194894075393677,
0.6727222800254822,
0.41098278760910034,
0.2161397486925125,
1.638363242149353,
0.7712782025337219,
-0.4517672061920166,
0.5727460384368896,
0.4430379569530487,
-0.1580936759710312,
-2.1388907432556152,
-1.1269218921661377,
0.31000834703445435,
-0.39924243092536926,
-1.5816514492034912,
1.3608144521713257,
-1.1891305446624756,
-0.8660849332809448,
0.5967239737510681,
0.18066376447677612,
1.4996298551559448,
0.35811179876327515,
1.5606615543365479,
1.9887537956237793,
0.8470527529716492,
0.35317474603652954,
1.3900773525238037,
-0.2614225149154663,
-0.5978977680206299,
1.8025624752044678,
-0.5227147340774536,
0.4448893666267395,
1.1031166315078735,
-0.30103760957717896,
-0.9907947182655334,
-0.8147213459014893,
-1.1511168479919434,
-0.7069048881530762,
1.142471194267273,
0.08107491582632065,
-1.0887033939361572,
0.3383159935474396,
1.5902365446090698,
0.09888757020235062,
-0.36376646161079407,
0.5472913384437561,
0.5027288198471069,
-0.8035702705383301,
0.0073842983692884445,
-0.874546229839325,
0.5791997313499451,
-0.15517738461494446,
-0.40094873309135437,
0.43475115299224854,
0.3437419533729553,
1.2601292133331299,
-0.14334779977798462,
0.15469254553318024,
1.1553014516830444,
-1.4769041538238525,
1.4957672357559204,
-0.5916387438774109,
0.19000117480754852,
-2.285656452178955,
1.4796079397201538,
-0.75479656457901,
1.8573261499404907,
-2.6857545375823975,
0.33945542573928833,
-0.5480985641479492,
-0.3069382309913635,
0.26735660433769226,
-0.3107692003250122,
0.1272943764925003,
-0.15847277641296387,
-1.1846405267715454,
-0.11157450824975967,
-0.7039401531219482,
0.5167195796966553,
1.2101616859436035,
1.1705049276351929,
-0.9322543144226074,
-0.22311469912528992,
-1.76136314868927,
-0.1354733109474182,
-0.6637895107269287,
0.32316485047340393,
-2.049142599105835,
-0.2907510995864868,
-1.931743860244751,
-2.356748580932617,
-1.2854461669921875,
-0.7044806480407715,
0.9993826150894165,
0.11724738776683807,
-0.8100646734237671,
1.1508945226669312,
-0.2788766622543335,
-1.8480713367462158,
1.1095082759857178,
-2.2105302810668945
] |
https://github.com/huggingface/datasets/issues/5638 | xPath to implement all operations for Path | Right is there a difference between UPath and xPath? Typically is xPath less well implemented compared to Upath, ie missing some implementations of some methods? Or are there methods in xPath that are not implemented with UPath? | ### Feature request
Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally.
### Motivation
I'm using xPath to interact with remote objects.
### Your contribution
I could try to make a PR. I'm a bit unfamiliar with chaining right now. | 256 | 37 | xPath to implement all operations for Path
### Feature request
Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally.
### Motivation
I'm using xPath to interact with remote objects.
### Your contribution
I could try to make a PR. I'm a bit unfamiliar with chaining right now.
Right is there a difference between UPath and xPath? Typically is xPath less well implemented compared to Upath, ie missing some implementations of some methods? Or are there methods in xPath that are not implemented with UPath? | [
-1.0106008052825928,
-0.7387740015983582,
-0.9313934445381165,
1.3835766315460205,
-0.19250820577144623,
-1.2251503467559814,
0.2857244312763214,
-1.2179111242294312,
1.7469072341918945,
-0.8455259799957275,
0.39711669087409973,
-1.5503346920013428,
0.12296529114246368,
-0.569279670715332,
-0.7083023190498352,
-0.9378350377082825,
-0.33983540534973145,
-0.745098888874054,
0.9853748083114624,
2.678969144821167,
1.0936672687530518,
-1.3671516180038452,
2.565856695175171,
0.8347783088684082,
-0.25853338837623596,
-1.0573467016220093,
0.49942097067832947,
-0.010890389792621136,
-1.1232296228408813,
-0.46520647406578064,
-0.9616662859916687,
-0.11968463659286499,
-0.528243362903595,
-0.5592782497406006,
-0.16566085815429688,
0.3659144937992096,
-0.27017757296562195,
-0.40931516885757446,
-0.5440829992294312,
-0.859167218208313,
0.3696114420890808,
-0.47191014885902405,
0.9523400068283081,
-0.32115307450294495,
1.8526804447174072,
-0.4636213779449463,
0.5134475231170654,
0.6951972246170044,
1.508270263671875,
0.19186975061893463,
-0.16580188274383545,
0.17819006741046906,
0.3101297616958618,
-0.051704809069633484,
0.35877525806427,
1.0701156854629517,
0.7315597534179688,
0.6719928979873657,
0.7056145668029785,
-2.066128969192505,
1.2771048545837402,
-1.1387584209442139,
0.31264322996139526,
1.2317652702331543,
-1.0412465333938599,
0.28552597761154175,
-1.7216750383377075,
-0.039484232664108276,
0.5823640823364258,
-2.2737016677856445,
0.28077268600463867,
-1.108669400215149,
-0.40760695934295654,
0.9869465231895447,
0.36721518635749817,
-1.3349891901016235,
0.04702223092317581,
-0.2638179361820221,
0.8827056884765625,
0.44365912675857544,
1.0475444793701172,
-1.704280972480774,
0.0271346103399992,
-0.4272288680076599,
0.027242081239819527,
-1.391850233078003,
-1.4694947004318237,
0.5652827024459839,
0.6640117764472961,
0.5514904856681824,
0.0028091557323932648,
0.9107649922370911,
-1.006577968597412,
0.7502533197402954,
-0.8291085958480835,
-1.7142497301101685,
-1.3170801401138306,
-2.3716485500335693,
-2.2560763359069824,
0.7568420171737671,
-0.31538140773773193,
-0.6285674571990967,
2.117133378982544,
-1.0195764303207397,
-1.657645583152771,
1.1344798803329468,
0.11389467120170593,
0.02388582192361355,
2.5402278900146484,
0.0626167505979538,
-0.6880528330802917,
0.4831906259059906,
-0.7146083116531372,
0.894253134727478,
-0.692743718624115,
1.4407391548156738,
0.3733765184879303,
-1.073453426361084,
1.7467855215072632,
-0.38389286398887634,
0.7050976753234863,
-0.6530881524085999,
-0.5511996746063232,
-0.9035441279411316,
0.38319453597068787,
1.888160228729248,
-0.2096463441848755,
1.5956817865371704,
-0.48050785064697266,
-1.5558836460113525,
-1.5967100858688354,
0.9864625334739685,
0.4092790484428406,
-0.686109185218811,
0.21583105623722076,
-0.34372907876968384,
0.14832018315792084,
0.045059435069561005,
1.0890941619873047,
1.435819387435913,
0.6296287775039673,
-0.17041917145252228,
-1.019025206565857,
0.3198249936103821,
-0.18078643083572388,
-0.6575318574905396,
-1.674081802368164,
-0.4034900367259979,
0.020826075226068497,
0.5615086555480957,
-1.078015685081482,
1.7585817575454712,
0.8840680718421936,
2.0050718784332275,
0.9848243594169617,
-0.34041422605514526,
1.480402946472168,
0.005054873414337635,
1.8359030485153198,
-0.49650105834007263,
0.8000534176826477,
-0.38228002190589905,
-1.1573909521102905,
0.7214361429214478,
-0.33477041125297546,
-2.0190529823303223,
-0.7585097551345825,
-0.7991794943809509,
-0.12113084644079208,
-0.7486212253570557,
1.0019750595092773,
-0.304688423871994,
-1.296940803527832,
0.30013307929039,
-0.825008749961853,
0.12216393649578094,
-1.3499186038970947,
0.5068978071212769,
0.7668788433074951,
-0.564716100692749,
0.09971783310174942,
-0.2837766706943512,
-1.2378103733062744,
-0.5520783066749573,
0.27789241075515747,
1.9542566537857056,
-0.8002322912216187,
0.8169891834259033,
0.9452427625656128,
-0.6774584650993347,
-0.028200335800647736,
0.47419825196266174,
-0.3001437187194824,
0.9396958351135254,
-1.0385987758636475,
-0.40033602714538574,
1.2240705490112305,
-0.28883451223373413,
-0.634318470954895,
1.3518542051315308,
0.7489732503890991,
-0.9225314259529114,
-0.11112509667873383,
-0.18691007792949677,
-0.7674086093902588,
0.07439695298671722,
-1.7754309177398682,
-0.10381002724170685,
0.3679420053958893,
-1.407609462738037,
-0.5666558742523193,
-0.24311447143554688,
1.2033278942108154,
-0.08494949340820312,
1.243617296218872,
-0.2828335762023926,
-0.2632010281085968,
-0.31917208433151245,
-0.46720248460769653,
0.1608748733997345,
-0.2713426351547241,
-0.649284839630127,
0.3769451975822449,
-0.6674029231071472,
0.3727484941482544,
1.329871416091919,
0.20653142035007477,
-0.008201006799936295,
0.54901123046875,
1.0905942916870117,
0.4547750651836395,
-0.18743595480918884,
-0.8135829567909241,
-1.3969309329986572,
1.967460036277771,
-1.3877662420272827,
1.8875900506973267,
0.906855583190918,
-0.10830286890268326,
-1.6165355443954468,
-1.9404610395431519,
1.468015193939209,
1.2534021139144897,
2.194744825363159,
0.6783601641654968,
0.3935485780239105,
-0.855078935623169,
-0.6561102867126465,
0.29362455010414124,
-1.3288724422454834,
-0.8621509671211243,
-0.015194402076303959,
2.3157026767730713,
1.6453933715820312,
-0.4005987048149109,
-0.20189997553825378,
-1.1001523733139038,
1.3041046857833862,
-0.17623679339885712,
0.15193594992160797,
2.0860435962677,
-0.3158789277076721,
-1.2046518325805664,
1.0763440132141113,
-2.2744140625,
0.07035653293132782,
2.0263919830322266,
0.2717638313770294,
0.10389193147420883,
-1.4192616939544678,
-0.6567125916481018,
-0.16380774974822998,
-0.3066326379776001,
-1.1661077737808228,
0.5570229291915894,
-0.16491426527500153,
-0.7576807141304016,
-1.3997701406478882,
0.27561530470848083,
-1.126877784729004,
-1.5517874956130981,
0.29210102558135986,
1.8235194683074951,
2.069491386413574,
-0.8913725018501282,
1.6263916492462158,
-0.1689525991678238,
0.06927052140235901,
1.1354124546051025,
1.1212245225906372,
3.085205316543579,
2.0723342895507812,
-1.1080374717712402,
0.601531445980072,
-0.0892912819981575,
-0.5442749261856079,
1.132462501525879,
-1.1024820804595947,
1.2094002962112427,
-0.0887942761182785,
-1.026224136352539,
-1.3735839128494263,
0.6728086471557617,
0.40163174271583557,
-0.03490313142538071,
-0.4487003982067108,
1.22573721408844,
0.09818728268146515,
1.239234209060669,
0.5083273649215698,
-0.2740592360496521,
0.6666830778121948,
-0.44985005259513855,
-0.3636900782585144,
1.5527149438858032,
0.36290544271469116,
-1.3207485675811768,
-2.3561322689056396,
-0.19448882341384888,
-0.7269198298454285,
0.04156190901994705,
-0.5744824409484863,
-1.057750940322876,
1.6813080310821533,
0.25546035170555115,
-1.113021731376648,
-0.3796054720878601,
-0.41727104783058167,
-0.6280030608177185,
2.7289371490478516,
-1.5789886713027954,
-0.3669854998588562,
-0.9930555820465088,
-0.6470118761062622,
1.7573109865188599,
-1.303376317024231,
-0.14703251421451569,
-1.1405583620071411,
-0.46995046734809875,
-1.1795430183410645,
-0.619773805141449,
-0.0795159637928009,
-0.9749213457107544,
0.7808569073677063,
0.38208818435668945,
-1.228622317314148,
-0.11810802668333054,
-0.8521472811698914,
0.7671461701393127,
-0.07064440101385117,
0.2723848521709442,
1.6789990663528442,
0.479313462972641,
-0.31550127267837524,
0.6897907853126526,
1.1552678346633911,
0.5323184728622437,
-0.6036062836647034,
0.372702956199646,
-0.775187611579895,
0.28635668754577637,
-1.217106819152832,
0.3518369793891907,
-2.765596389770508,
0.5791983604431152,
-0.07981494814157486,
-0.13627959787845612,
-0.0001393454149365425,
-1.3001970052719116,
1.1548432111740112,
2.616453170776367,
-1.1935884952545166,
0.5691903233528137,
0.18256092071533203,
1.3513972759246826,
-1.5957345962524414,
0.28551870584487915,
-0.42158612608909607,
2.259758710861206,
0.2514273524284363,
1.2057931423187256,
-0.4416327178478241,
-2.4185659885406494,
0.6370913982391357,
-1.2560609579086304,
-1.252382755279541,
0.7176986932754517,
-0.8572654724121094,
-0.22940723598003387,
-1.310653567314148,
-0.1901039481163025,
-0.8215689063072205,
-1.2452369928359985,
0.7957767844200134,
0.23378783464431763,
0.5944195985794067,
-0.6148644685745239,
0.2964215874671936,
-2.234340190887451,
-1.3403289318084717,
-0.30954569578170776,
-0.9425157904624939,
0.26817238330841064,
-0.3480813503265381,
0.5740061402320862,
-0.38176995515823364,
0.0661640390753746,
0.3656911849975586,
1.4214990139007568,
3.4577434062957764,
0.08182217925786972,
0.49461981654167175,
-0.17903250455856323,
-0.9978522658348083,
1.4437494277954102,
0.8942412734031677,
-0.049946948885917664,
-0.6415775418281555,
-0.96828293800354,
1.2072432041168213,
1.9965474605560303,
0.932866096496582,
-0.00931665487587452,
-0.8677845001220703,
-0.49380144476890564,
-0.08979114890098572,
0.3198041319847107,
0.40073734521865845,
1.055566668510437,
0.09242761135101318,
-0.04835771769285202,
1.3546361923217773,
1.3527899980545044,
-0.5443645715713501,
0.4510490596294403,
-0.9351624250411987,
-0.44512656331062317,
0.3656286597251892,
0.3175978660583496,
-0.01810609921813011,
0.1339636594057083,
-0.849302351474762,
-0.2114785611629486,
-0.33101600408554077,
-1.0289708375930786,
-0.9480230212211609,
-0.43681904673576355,
-0.2694181799888611,
1.7679498195648193,
0.15043750405311584,
-0.5685691833496094,
-0.06918682903051376,
-0.7125420570373535,
0.028373906388878822,
-1.089309811592102,
0.11441090703010559,
-0.19484220445156097,
-0.19158364832401276,
-0.005413272883743048,
1.9060696363449097,
-1.0827792882919312,
-2.104583978652954,
0.2725730240345001,
0.3222726285457611,
-0.33442819118499756,
0.247467041015625,
1.479172945022583,
0.5297326445579529,
1.538784384727478,
1.3999946117401123,
1.0664997100830078,
-0.881054699420929,
-1.3646588325500488,
0.7045314908027649,
0.957825243473053,
-1.361701250076294,
0.7047728300094604,
0.16129560768604279,
-0.3652680218219757,
0.5448975563049316,
1.1761245727539062,
0.6165699362754822,
-2.039450168609619,
0.8461019992828369,
-1.017837643623352,
0.7905827164649963,
0.6259372234344482,
0.7320659756660461,
0.364778071641922,
0.6431882977485657,
-1.2032411098480225,
-1.0920164585113525,
-0.8216814994812012,
-0.6977993249893188,
2.0265164375305176,
-0.42237168550491333,
0.6904836297035217,
-0.03611113131046295,
-1.2963603734970093,
-0.16019697487354279,
0.7553766369819641,
0.4316352307796478,
-0.38318368792533875,
0.7155619263648987,
-0.6149707436561584,
-1.1224101781845093,
-1.5637468099594116,
-0.4694584310054779,
-0.9905030727386475,
-1.0286803245544434,
1.015200138092041,
0.7665615677833557,
0.2582976222038269,
1.8334063291549683,
0.6371548771858215,
0.31853267550468445,
-2.5691206455230713,
0.9436551928520203,
0.4709205627441406,
-0.006435539573431015,
0.8601996898651123,
0.4250277876853943,
0.997545599937439,
-0.029182901605963707,
0.5233885049819946,
-2.372042179107666,
2.445054531097412,
-0.16419965028762817,
0.7419312000274658,
0.0606253519654274,
-0.15233474969863892,
1.1011872291564941,
0.45616185665130615,
0.63997483253479,
-1.0961604118347168,
0.6155021786689758,
-0.7432217597961426,
1.2964580059051514,
0.9374794363975525,
-0.7081229090690613,
0.04032811522483826,
1.3256505727767944,
0.4638485610485077,
-0.5065228939056396,
-0.9194899797439575,
-0.8082279562950134,
0.8094469904899597,
1.792870044708252,
-0.0847344622015953,
0.051907360553741455,
0.8453728556632996,
0.5771716833114624,
-1.229576587677002,
-0.0823562815785408,
-0.7881383299827576,
-0.8626795411109924,
1.629677414894104,
2.0077290534973145,
-0.181375190615654,
-0.4106000065803528,
-0.9197792410850525,
-1.2117258310317993,
0.8322086930274963,
-0.061083197593688965,
0.055976592004299164,
0.6795746684074402,
-0.6053094863891602,
1.242753267288208,
1.053021788597107,
1.0165748596191406,
0.20731253921985626,
0.26146557927131653,
0.530174970626831,
-0.37380924820899963,
-0.9685612916946411,
-0.1992141753435135,
-1.217895269393921,
-2.6618399620056152,
0.5419167876243591,
-0.3945135474205017,
-1.357009768486023,
-0.1014009341597557,
-0.9838171601295471,
0.9757228493690491,
-0.545486569404602,
-0.9604767560958862,
-1.6473524570465088,
0.06978175789117813,
-0.18714356422424316,
0.8219879865646362,
-1.5488849878311157,
-0.11676327884197235,
1.2255053520202637,
1.0012632608413696,
-0.7434840798377991,
1.0627566576004028,
0.1790008693933487,
1.1217875480651855,
0.8410630822181702,
-0.37674447894096375,
0.5173446536064148,
-0.0020319074392318726,
-1.2654186487197876,
0.5112283825874329,
1.1781411170959473,
0.1431204080581665,
1.481644868850708,
-0.6553645133972168,
-0.035879068076610565,
0.36375948786735535,
-0.26222309470176697,
-0.497376412153244,
-0.5810469388961792,
0.8435845375061035,
0.18765871226787567,
-0.8548890948295593,
0.10382980853319168,
-0.044247888028621674,
-0.23114940524101257,
0.0973355695605278,
-1.5999033451080322,
-0.3034718930721283,
-0.3620421290397644,
-0.5331363081932068,
-1.2407424449920654,
-0.04977644234895706,
1.425988793373108,
-0.6069415807723999,
-0.23332761228084564,
0.4595237374305725,
0.5861496925354004,
0.38539010286331177,
0.592341959476471,
-0.5704402327537537,
-0.42899009585380554,
-0.18620657920837402,
-0.3955082893371582,
0.4896909296512604,
1.4225364923477173,
-0.0918576717376709,
-1.0097450017929077,
0.7390149831771851,
-0.34017840027809143,
-0.03211870789527893,
1.8456181287765503,
0.166713684797287,
-0.9843557476997375,
0.1645529866218567,
-0.6842968463897705,
2.0083673000335693,
1.5648916959762573,
1.2769109010696411,
-0.031485915184020996,
-0.9824902415275574,
0.7760146856307983,
-0.19204121828079224,
-0.30426663160324097,
0.8739146590232849,
0.5249027609825134,
-0.1446106880903244,
-1.4150736331939697,
0.5906332731246948,
1.244047999382019,
-0.8259316682815552,
-0.9059136509895325,
-0.003462226130068302,
-0.809234082698822,
1.0152901411056519,
0.6805838942527771,
0.4505830407142639,
0.19634650647640228,
1.662179708480835,
0.7860273122787476,
-0.5273246169090271,
0.5164690613746643,
0.39846286177635193,
-0.23652337491512299,
-2.1269121170043945,
-1.1766380071640015,
0.3742820620536804,
-0.4366590082645416,
-1.4890055656433105,
1.3319616317749023,
-1.192825198173523,
-0.8151116371154785,
0.5541337728500366,
0.06313084810972214,
1.4874807596206665,
0.35571423172950745,
1.5822391510009766,
1.9595125913619995,
0.8737508058547974,
0.3492565155029297,
1.424182653427124,
-0.34417396783828735,
-0.5198334455490112,
1.7511606216430664,
-0.5156638026237488,
0.48309409618377686,
1.1186329126358032,
-0.257175087928772,
-1.003801941871643,
-0.7435330152511597,
-1.1927982568740845,
-0.6409938335418701,
1.146176815032959,
0.056733258068561554,
-1.12309992313385,
0.32230210304260254,
1.595909833908081,
0.07208004593849182,
-0.3672332167625427,
0.47526589035987854,
0.49180659651756287,
-0.8895446062088013,
0.0057274214923381805,
-0.917851448059082,
0.483259379863739,
-0.1660773754119873,
-0.46401888132095337,
0.3917310833930969,
0.36962559819221497,
1.2092628479003906,
-0.19246192276477814,
0.1833505630493164,
1.1503450870513916,
-1.5777732133865356,
1.5156152248382568,
-0.6512653231620789,
0.15981820225715637,
-2.283745527267456,
1.4521925449371338,
-0.5736569762229919,
1.9215896129608154,
-2.695377826690674,
0.32594507932662964,
-0.6179744005203247,
-0.2963927388191223,
0.2884575426578522,
-0.2655665874481201,
0.1424020528793335,
-0.09203191846609116,
-1.1534972190856934,
-0.061224564909935,
-0.6972683072090149,
0.5063269138336182,
1.1157089471817017,
1.0528806447982788,
-0.7979854345321655,
-0.15453477203845978,
-1.7108594179153442,
-0.1700744777917862,
-0.6112101674079895,
0.2118234634399414,
-2.054044246673584,
-0.3386894762516022,
-1.9484827518463135,
-2.223302125930786,
-1.3330388069152832,
-0.7799755334854126,
1.0268276929855347,
0.1351296603679657,
-0.772071123123169,
1.0705153942108154,
-0.23823438584804535,
-1.7914363145828247,
1.0915133953094482,
-2.253931760787964
] |