html_url
stringlengths
51
51
title
stringlengths
6
280
comments
stringlengths
63
141k
body
stringlengths
18
58.6k
comment_length
int64
16
10.8k
text
stringlengths
6
280
embeddings
listlengths
768
768
https://github.com/huggingface/datasets/issues/3127
datasets-cli: convertion of a tfds dataset to a huggingface one.
Hi, the MNIST dataset is already available on the Hub. You can use it as follows: ```python import datasets dataset_dict = datasets.load_dataset("mnist") ``` As for the conversion of TFDS datasets to HF datasets, we will be working on it in the coming months, so stay tuned.
### Discussed in https://github.com/huggingface/datasets/discussions/3079 <div type='discussions-op-text'> <sup>Originally posted by **vitalyshalumov** October 14, 2021</sup> I'm trying to convert a tfds dataset to a huggingface one. I've tried: 1. datasets-cli convert --tfds_path ~/tensorflow_datasets/mnist/3.0.1/ --datasets_directory ~/.cache/huggingface/datasets/mnist/3.0.1/ 2. datasets-cli convert --tfds_path ~/tensorflow_datasets/mnist/3.0.1/ --datasets_directory ~/.cache/huggingface/datasets/ and other permutations. The script appears to be running and finishing without an error but when looking in the huggingface/datasets/ folder nothing is created. </div>
46
datasets-cli: convertion of a tfds dataset to a huggingface one.
[ -0.3639712333679199, -0.5548223257064819, -0.11050345748662949, 0.14039330184459686, 0.2327231466770172, 0.053377483040094376, 0.1226828545331955, 0.1051502674818039, -0.038365595042705536, 0.16224081814289093, -0.5412346124649048, -0.16877339780330658, -0.09586737304925919, 0.5082456469535828, 0.1377793550491333, -0.27415886521339417, 0.19602714478969574, 0.28701117634773254, -0.49112915992736816, -0.17101098597049713, 0.00346597982570529, 0.20238478481769562, 0.15267758071422577, -0.041805196553468704, -0.19343404471874237, -0.09024594724178314, -0.20380662381649017, 0.204655259847641, -0.19889593124389648, 0.24163544178009033, 0.21961243450641632, 0.21572281420230865, 0.10040922462940216, 0.538731038570404, -0.00010836245928658172, -0.008880269713699818, -0.43488675355911255, -0.06940100342035294, -0.008469349704682827, 0.3174470365047455, -0.09473022073507309, 0.005344374105334282, -0.03450236842036247, -0.1389436572790146, -0.3736715316772461, -0.15170830488204956, -0.18613015115261078, -0.2976672053337097, 0.459650456905365, 0.0603451207280159, 0.251486212015152, 0.6144551634788513, -0.12630628049373627, 0.0065230196341872215, -0.21028712391853333, 0.09792498499155045, -0.05488382652401924, 0.11689102649688721, 0.10172533243894577, 0.08000542223453522, 0.056934256106615067, 0.11217334121465683, -0.0452415756881237, -0.13187749683856964, 0.454924613237381, -0.08434290438890457, -0.11664790660142899, -0.09206545352935791, 0.2077202945947647, 0.4298337399959564, 0.24625691771507263, -0.26392123103141785, -0.2483697086572647, 0.01356847956776619, -0.28107908368110657, 0.07615041732788086, -0.1846059411764145, -0.015203045681118965, -0.09328309446573257, 0.32955411076545715, -0.30959221720695496, -0.21169762313365936, -0.3423629701137543, -0.25329649448394775, -0.37279218435287476, 0.13001038134098053, -0.055645812302827835, -0.08464743196964264, 0.1471191942691803, -0.07362410426139832, -0.176173597574234, 0.1487574577331543, 0.1524418592453003, 0.11931171268224716, -0.21748365461826324, -0.36921754479408264, 0.004184534307569265, 0.16830722987651825, 0.3301921486854553, 0.17115917801856995, -0.1471097469329834, 0.012346230447292328, -0.05564237758517265, -0.0954103097319603, 0.0661616176366806, 0.02975359559059143, -0.06168285012245178, 0.007171083707362413, 0.19869761168956757, -0.016220811754465103, 0.007975471206009388, 0.16231772303581238, -0.023991316556930542, 0.01956692337989807, -0.05153684318065643, -0.1925615668296814, -0.0022294316440820694, -0.10894573479890823, 0.028495579957962036, -0.007380357012152672, 0.2430352419614792, 0.1764480471611023, -0.10426397621631622, 0.16586250066757202, 0.12089008092880249, 0.07530122995376587, 0.3619370460510254, 0.048917919397354126, -0.08149853348731995, -0.08030345290899277, -0.32586780190467834, -0.11241285502910614, 0.10934003442525864, -0.1374734789133072, -0.20377475023269653, -0.21811430156230927, 0.0651736930012703, 0.039020683616399765, 0.03994232788681984, 0.33368396759033203, -0.15326593816280365, 0.3445541560649872, 0.22699286043643951, 0.2508618235588074, -0.009694753214716911, -0.1146073266863823, 0.2782612442970276, -0.18250463902950287, 0.013016625307500362, -0.06325530260801315, 0.26975563168525696, -0.04553975909948349, -0.369205504655838, 0.16553232073783875, -0.04827241972088814, -0.22639049589633942, -0.10752195119857788, 0.38098904490470886, -0.008880437351763248, -0.0006472450331784785, 0.018892092630267143, -0.040837496519088745, -0.08316833525896072, 0.06083332374691963, 0.18165913224220276, 0.20360508561134338, -0.4884209632873535, -0.19693613052368164, 0.49404093623161316, -0.6904416680335999, -0.18057659268379211, 0.25449731945991516, 0.15321668982505798, -0.23375950753688812, -0.21186111867427826, 0.074654221534729, -0.06350760161876678, -0.21322765946388245, -0.07047562301158905, 0.4135313332080841, -0.10000652819871902, -0.014905054122209549, -0.016986876726150513, 0.1398434191942215, 0.13015863299369812, -0.0515780970454216, -0.19860032200813293, 0.0063660163432359695, -0.19526204466819763, 0.14295434951782227, -0.06729729473590851, -0.07602487504482269, 0.2199757844209671, -0.1648445427417755, 0.06985463201999664, 0.33117857575416565, -0.021342039108276367, 0.06881028413772583, 0.34887799620628357, -0.36686402559280396, 0.12229867279529572, 0.10872817784547806, 0.1972663402557373, 0.01235333364456892, 0.11203810572624207, -0.34397435188293457, -0.7087827920913696, -0.054366230964660645, 0.19168074429035187, 0.43093907833099365, -0.028316447511315346, -0.23296041786670685, -0.3265511691570282, 0.023440750315785408, 0.05269336700439453, 0.11169812083244324, 0.1906818151473999, 0.011556481011211872, 0.12580780684947968, -0.218633234500885, -0.39867106080055237, 0.01675422489643097, -0.2248569279909134, 0.2015892118215561, -0.0468013770878315, 0.268101304769516, 0.15475113689899445, 0.12878330051898956, 0.03055134229362011, 0.1757863461971283, -0.09211935847997665, -0.33582279086112976, 0.005912818480283022, 0.3307495713233948, -0.15343622863292694, 0.3291846513748169, 0.038544364273548126, 0.460887610912323, 0.15637421607971191, -0.08471893519163132, -0.09597598761320114, 0.051426392048597336, 0.04144497960805893, -0.024520516395568848, -0.24485622346401215, 0.2835718095302582, -0.009016713127493858, 0.2497522383928299, 0.2832465171813965, 0.10829140990972519, 0.17367519438266754, -0.06547430157661438, -0.19082872569561005, -0.1786232739686966, -0.03158994019031525, -0.20131780207157135, 0.33905965089797974, 0.1041892021894455, -0.49454814195632935, 0.37856173515319824, 0.07463425397872925, -0.3470834195613861, 0.042394574731588364, 0.03230029344558716, 0.008451487869024277, 0.04281952977180481, 0.2866237461566925, 0.42343851923942566, -0.060144223272800446, 0.19195656478405, 0.27601462602615356, 0.2012435495853424, -0.21179988980293274, 0.006435790564864874, 0.26987671852111816, -0.27582624554634094, 0.16575565934181213, 0.14849023520946503, -0.054569631814956665, 0.06354039907455444, -0.43150633573532104, 0.20392294228076935, -0.17315474152565002, 0.23470187187194824, -0.33302929997444153, -0.002147593768313527, -0.2626020312309265, -0.44297096133232117, 0.06044568493962288, 0.3443808853626251, -0.27579063177108765, -0.12924905121326447, -0.08748168498277664, 0.10504741966724396, -0.0815395787358284, 0.03795550763607025, -0.08973845839500427, 0.3350003957748413, 0.08734364062547684, 0.037511251866817474, -0.22375361621379852, -0.40580904483795166, -0.20568612217903137, 0.181839257478714, 0.17351345717906952, 0.1143755167722702, 0.4775236248970032, -0.33788296580314636, 0.20090502500534058, -0.517166018486023, -0.3994520604610443, 0.3022798001766205, -0.30251026153564453, 0.06356990337371826, 0.37895941734313965, 0.6386061906814575, -0.10293030738830566, 0.07609068602323532, -0.036338165402412415, -0.2918684780597687, -0.33438557386398315, -0.14668375253677368, -0.22209152579307556, -0.15560393035411835, -0.27845364809036255, 0.027544695883989334, -0.13572299480438232, -0.06667014956474304, 0.15815572440624237, -0.10462513566017151, 0.05074768513441086, 0.454765647649765, 0.08158058673143387, 0.09286388754844666, -0.0235167033970356, 0.005545277614146471, -0.11732524633407593, -0.28527167439460754, 0.016963621601462364, -0.1464376598596573, -0.3646937310695648, -0.07545880228281021, 0.20368805527687073, 0.16120080649852753, 0.12559929490089417, -0.24050280451774597, -0.16347508132457733, -0.28734713792800903, 0.3344680070877075, -0.138909250497818, 0.10009866952896118, 0.22996516525745392, 0.02532464638352394, -0.03144552558660507, -0.32194483280181885, 0.07221892476081848, 0.24621573090553284, -0.11835861206054688, -0.00976202916353941, -0.04467129707336426, 0.26042112708091736, 0.059972215443849564, 0.35215938091278076, -0.008370203897356987, -0.30869656801223755, 0.2498626708984375, -0.43651440739631653, 0.49554866552352905, -0.05451004579663277, -0.27027782797813416, 0.2694157361984253, 0.1951252818107605, -0.05971129983663559, 0.20708023011684418, 0.02075866609811783, 0.13055618107318878, -0.10429873317480087, 0.07959171384572983, 0.14246825873851776, -0.11467555165290833, -0.33611974120140076, 0.23324596881866455, 0.06364848464727402, 0.20343022048473358, -0.2915351688861847, -0.18810342252254486, 0.05761721730232239, 0.2804901599884033, 0.31784871220588684, 0.24894775450229645, 0.08716797828674316, -0.5073598623275757, 0.29092714190483093, -0.5212346315383911, -0.05252694711089134, 0.1455782651901245, -0.26106154918670654, -0.19982130825519562, -0.06314278393983841, -0.1220298707485199, -0.00662737712264061, 0.8074291348457336, 0.18250788748264313, 0.1930878460407257, 0.06676658242940903, 0.05552924796938896, -0.29604485630989075, 0.3073112666606903, -0.33515962958335876, 0.008048134855926037, 0.2239018976688385, 0.6733412146568298, -0.4527921676635742, -0.20523037016391754, 0.17430207133293152, 0.17909438908100128, -0.1339798867702484, -0.07286442071199417, -0.018790192902088165, -0.3383858799934387, -0.09550710767507553, -0.06248530372977257, 0.33388960361480713, 0.2524735629558563, 0.2822149693965912, 0.004113438539206982, 0.06817083805799484, -0.1723925769329071, 0.08980952203273773, 0.214110866189003, 0.1728629320859909, 0.30575814843177795, -0.06239709630608559, -0.07446583360433578, 0.31499576568603516, -0.12027807533740997, 0.2551571726799011, -0.23131121695041656, -0.22030238807201385, 0.09900043904781342, 0.18549129366874695, 0.42243191599845886, 0.17832119762897491, -0.0241239033639431, -0.29118219017982483, 0.15029920637607574, 0.20053769648075104, -0.17295405268669128, 0.17620940506458282, 0.06969162821769714, 0.2128138244152069, -0.09596022963523865, -0.2244206666946411, 0.3919931650161743, 0.01900707557797432, 0.10259262472391129, -0.04344088211655617, 0.8805367946624756, -0.29630500078201294, 0.041020072996616364, 0.25149717926979065, 0.8912192583084106, -0.21244743466377258, 0.26679596304893494, 0.787945568561554, -0.14536407589912415, 0.6190558075904846, -0.055949822068214417, -0.42902135848999023, -0.26308342814445496, -0.3787742555141449, -0.007924001663923264, 0.0732533410191536, 0.03940759599208832, 0.18014368414878845, 0.07322003692388535, 0.009129527024924755, 0.006633392535150051, 0.03631840646266937, 0.23608213663101196, 0.1382431983947754, 0.10209279507398605, -0.07935632765293121, -0.2891823351383209, 0.22606265544891357, 0.039444439113140106, -0.14302535355091095, -0.13837672770023346, -0.004187393002212048, -0.022247331216931343, 0.3048791289329529, -0.09699515998363495, -0.09024044126272202, -0.34532150626182556, -0.08951571583747864, 0.07479783147573471, -0.09245570003986359, -0.14014028012752533, 0.2041044533252716, 0.41908130049705505, -0.053160060197114944, -0.20272600650787354, 0.04059966281056404, -0.1020243689417839, 0.2048611342906952, -0.03495258465409279, 0.12777511775493622, 0.39920586347579956, -0.13126768171787262, 0.14492885768413544, -0.32546907663345337, -0.02074459195137024, -0.13728828728199005, 0.07131215929985046, -0.505355179309845, -0.22638046741485596, -0.3687920570373535, -0.1713302731513977, 0.010357464663684368, 0.1822504997253418, -0.009557693265378475, 0.11466632783412933, -0.07563281804323196, -0.009089440107345581, -0.16459012031555176, 0.22237250208854675, -0.24377499520778656, -0.00026590595371089876, 0.24568583071231842, 0.0851190984249115, -0.25212132930755615, 0.03491984307765961, 0.3867529630661011, -0.10680297762155533, -0.30775293707847595, 0.06038420647382736, 0.23519432544708252, -0.27938032150268555, 0.35766541957855225, -0.025685759261250496, -0.2586924433708191, -0.10227442532777786, 0.46903011202812195, 0.2285585254430771, 0.03399968519806862, 0.010495631024241447, -0.015319024212658405, -0.4984997808933258, -0.07371044903993607, -0.11860472708940506, 0.3672793507575989, 0.1933181881904602, 0.32321757078170776, -0.32387208938598633, -0.2377486675977707, -0.40881186723709106, -0.08791221678256989, 0.10103512555360794, -0.177091583609581, 0.51780104637146, -0.19275714457035065, -0.00518935639411211, -0.1058918833732605, 0.19779455661773682, 0.07023507356643677, -0.10962881147861481, -0.30570659041404724, -0.2791278660297394, 0.10585653781890869, 0.03669865429401398, -0.2405713051557541, 0.38338643312454224, 0.18325404822826385, -0.5213270783424377, -0.13351497054100037, 0.44079652428627014, 0.06993614882230759, 0.018622521311044693, 0.09769163280725479, 0.11452847719192505, -0.16400012373924255, -0.16784270107746124, -0.12861409783363342, 0.554990828037262, 0.024136586114764214, -0.25726407766342163, 0.07865855097770691, -0.13985218107700348, -0.2806394100189209, 0.18929387629032135, 0.442073792219162, 0.34613439440727234, -0.12654151022434235, 0.2638471722602844, 0.014774464070796967, -0.17674070596694946, 0.2087704837322235, 0.6739819645881653, -0.05726238712668419, -0.024810876697301865, 0.12200528383255005, 0.07692009210586548, 0.2103477269411087, -0.3367645740509033, 0.04821084439754486, 0.4187711775302887, -0.233560711145401, 0.1874212920665741, 0.12386778742074966, -0.08541307598352432, 0.09662371128797531, 0.2629712224006653, -0.16964037716388702, 0.22385549545288086, -0.14430728554725647, -0.042239557951688766, 0.4076554477214813, -0.019479840993881226, 0.06092241778969765, 0.21405848860740662, 0.26583337783813477, 0.1284504383802414, -0.07637748122215271, -0.15348750352859497, 0.025412488728761673, -0.2804846167564392, 0.18488770723342896, 0.3733937740325928, -0.25969675183296204, 0.0977478176355362, -0.12013112753629684, -0.16786013543605804, 0.2215646505355835, 0.011465874500572681, 0.4968182444572449, -0.2123057246208191, -0.35203033685684204, -0.17470891773700714, 0.5345350503921509, -0.4044800102710724, -0.22033466398715973, -0.028453024104237556, -0.23503193259239197, -0.013931673020124435, 0.07906479388475418, -0.3465774357318878, -0.28771039843559265, -0.12044389545917511, -0.1322406381368637, 0.29001837968826294, -0.009922717697918415, -0.23636548221111298, 0.008175346069037914, 0.14674364030361176, 0.16418370604515076, 0.27063021063804626, 0.34660041332244873, -0.278725266456604, 0.0006078276201151311, 0.4418000280857086, 0.11205949634313583, -0.06389172375202179, 0.29207268357276917, 0.25171229243278503, -0.14701326191425323, -0.21580274403095245, 0.06950677186250687, 0.03321139141917229, -0.07557129859924316, 0.017441237345337868, 0.3489695191383362, 0.10329398512840271, -0.12001608312129974, -0.12488675117492676, -0.025800129398703575, 0.18224336206912994, -0.22590169310569763, -0.058046627789735794, -0.21798035502433777, -0.12825503945350647, -0.14544090628623962, 0.01654098927974701, -0.2471509575843811, -0.21119113266468048, 0.14509475231170654, -0.24680760502815247, 0.18245761096477509, -0.13587646186351776, 0.1314271241426468, -0.0012773926137015224, 0.5390916466712952, 0.2117173969745636, -0.017037268728017807, 0.055622898042201996, -0.15597184002399445, -0.5972923040390015, 0.12228590995073318, 0.5210613012313843, -0.11051031202077866, -0.046601396054029465, 0.04225499927997589, 0.23874421417713165, 0.003630103077739477, 0.09371520578861237, 0.04316188395023346, 0.14681106805801392, -0.30946725606918335, 0.07095081359148026, -0.2240338921546936, -0.3035629689693451, 0.18387427926063538, -0.02796490490436554, 0.0032046977430582047, 0.25435805320739746, 0.22823715209960938, 0.08927438408136368, -0.06937102228403091, 0.3860848844051361, -0.17482857406139374, -0.3670329451560974, -0.1519732028245926, 0.20575043559074402, 0.37100815773010254, -0.28702500462532043, -0.007160231005400419, 0.07567287981510162, -0.00014376580656971782, -0.46553468704223633, 0.2536732852458954, -0.031954191625118256, 0.2096351832151413, -0.10054956376552582, -0.1683691442012787, 0.024524807929992676, -0.13152508437633514, 0.33499640226364136, -0.00392004894092679, -0.3352990746498108, 0.3684501647949219, -0.12569023668766022, -0.2776372730731964, 0.31326889991760254, 0.4257003366947174, -0.06079765781760216, 0.10891161113977432, -0.07187121361494064, -0.2309102863073349, 0.3947645127773285, -0.13502158224582672, -0.21667462587356567, 0.2604718804359436, -0.15640152990818024, 0.1500980108976364, -0.41270434856414795, -0.44965964555740356, 0.05510927736759186, 0.10058519244194031, -0.18843400478363037, 0.0012796103255823255, 0.4909285604953766, -0.09474115073680878, 0.03673531487584114, -0.09822101145982742, 0.3224860727787018, 0.36296403408050537, -0.2903895080089569, 0.0670519694685936, -0.1637123078107834 ]
https://github.com/huggingface/datasets/issues/3126
"arabic_billion_words" dataset does not create the full dataset
Thanks for reporting, @vitalyshalumov. Apparently the script to parse the data has a bug, and does not generate the entire dataset. I'm fixing it.
## Describe the bug When running: raw_dataset = load_dataset('arabic_billion_words','Alittihad') the correct dataset file is pulled from the url. But, the generated dataset includes just a small portion of the data included in the file. This is true for all other portions of the "arabic_billion_words" dataset ('Almasryalyoum',.....) ## Steps to reproduce the bug ```python # Sample code to reproduce the bug raw_dataset = load_dataset('arabic_billion_words','Alittihad') #The screen message Downloading and preparing dataset arabic_billion_words/Alittihad (download: 332.13 MiB, generated: 20.62 MiB, post-processed: Unknown size, total: 352.74 MiB) ## Expected results over 100K sentences ## Actual results only 11K sentences ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.14.0 - Platform: Linux-5.8.0-63-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 4.0.1
24
"arabic_billion_words" dataset does not create the full dataset
[ -0.20525527000427246, 0.3063390552997589, -0.19825401902198792, 0.36477306485176086, -0.2166450023651123, 0.19931893050670624, 0.22037352621555328, 0.3366604447364807, -0.12080014497041702, 0.044808633625507355, 0.19312559068202972, -0.3459148108959198, 0.2320835143327713, 0.34642139077186584, -0.05998950079083443, 0.34095725417137146, 0.20592008531093597, 0.08636127412319183, -0.0034738522954285145, -0.250377893447876, -0.07699406892061234, 0.18192657828330994, -0.10372452437877655, -0.17007942497730255, -0.5079939365386963, 0.032629456371068954, 0.13277025520801544, -0.2602483034133911, -0.30431634187698364, -0.0379948727786541, -0.1255660504102707, -0.17918707430362701, -0.15485699474811554, 0.21508009731769562, -0.00011052418267354369, -0.16869458556175232, 0.22314785420894623, -0.10945659130811691, -0.4500367045402527, 0.01756921410560608, -0.1973213106393814, -0.1977742314338684, -0.12080250680446625, -0.03391943871974945, -0.05020258203148842, -0.22414082288742065, 0.04189589247107506, -0.12032310664653778, 0.07573544234037399, 0.2810153663158417, 0.24238598346710205, -0.07974334061145782, 0.125270813703537, -0.1081213653087616, -0.0093288104981184, 0.10560707747936249, -0.26214799284935, 0.009684492833912373, -0.05509867146611214, 0.17705897986888885, -0.3462054133415222, 0.4197658598423004, 0.26203909516334534, 0.001959890825673938, -0.0824546068906784, -0.03763171657919884, -0.02801377698779106, -0.3054354190826416, 0.6297928094863892, -0.012429362162947655, 0.3046698272228241, -0.135766863822937, -0.30568447709083557, -0.21112535893917084, -0.13156606256961823, -0.18857838213443756, 0.05148232728242874, 0.40048444271087646, -0.16554956138134003, 0.031219864264130592, 0.015658266842365265, -0.1798333376646042, -0.15345361828804016, 0.06652719527482986, -0.5799531936645508, 0.28832781314849854, -0.23036062717437744, 0.002344070700928569, -0.08587014675140381, -0.15886394679546356, 0.1536729633808136, -0.35131675004959106, 0.03808854892849922, -0.13328075408935547, -0.06687533855438232, 0.22347189486026764, 0.0388370007276535, 0.21538463234901428, 0.4370402693748474, -0.2509460151195526, -0.022227760404348373, 0.19414420425891876, -0.02566460333764553, -0.08293704688549042, 0.15581300854682922, 0.01621084474027157, 0.0023259965237230062, -0.19322390854358673, 0.10352876037359238, -0.10496049374341965, -0.27023470401763916, 0.059596072882413864, 0.08155754208564758, 0.14936646819114685, -0.35311585664749146, -0.3420683741569519, 0.010497805662453175, -0.15424862504005432, -0.22215120494365692, 0.45621058344841003, -0.21420609951019287, -0.3086090683937073, -0.25777408480644226, 0.053190816193819046, -0.11516737937927246, -0.007754105143249035, 0.03726610913872719, 0.12360958755016327, -0.28738757967948914, -0.34123289585113525, -0.26881396770477295, -0.11244663596153259, -0.1701274812221527, 0.051278796046972275, 0.3439023196697235, -0.08878730237483978, 0.47831815481185913, -0.14422422647476196, 0.24689197540283203, 0.13334275782108307, 0.04958399012684822, -0.1895749270915985, 0.31318941712379456, 0.19133009016513824, 0.38080641627311707, 0.3089599609375, -0.17550326883792877, 0.05365766957402229, -0.011522817425429821, 0.4148204028606415, -0.016754956915974617, 0.03512631356716156, -0.2605970799922943, 0.20082685351371765, -0.04864075779914856, 0.08342305570840836, 0.2495797574520111, 0.5529049634933472, 0.45430809259414673, -0.08740261942148209, -0.133270725607872, -0.02486773207783699, -0.13447540998458862, 0.0104793980717659, 0.12744146585464478, 0.1944216936826706, -0.5449081659317017, -0.10088431090116501, 0.045459114015102386, 0.2752189040184021, 0.23948802053928375, 0.22530199587345123, -0.0643075630068779, 0.17240272462368011, -0.1169239804148674, 0.23853760957717896, 0.012085006572306156, 0.30633410811424255, -0.30730879306793213, 0.2027607411146164, 0.25019583106040955, -0.13864277303218842, 0.34329211711883545, -0.08756297081708908, 0.2709335386753082, 0.1139753982424736, 0.518482506275177, 0.28838005661964417, -0.06768511235713959, -0.20363856852054596, -0.15150614082813263, -0.17644540965557098, 0.0007432287675328553, -0.00041851820424199104, 0.16643604636192322, 0.11096245795488358, 0.09284281730651855, 0.1333552598953247, 0.31891995668411255, 0.2064138501882553, 0.25638455152511597, 0.13112403452396393, -0.284230500459671, -0.2013556808233261, 0.2001040279865265, 0.02445647493004799, 0.06501876562833786, -0.1723690629005432, 0.058895293623209, 0.3197583258152008, -0.1162746399641037, 0.07141917943954468, -0.4591136872768402, -0.14019949734210968, -0.00012203842197777703, -0.14930959045886993, 0.21765559911727905, 0.2430683672428131, -0.04536091163754463, 0.24418939650058746, -0.08686038851737976, -0.1909331977367401, -0.16406166553497314, -0.09969425946474075, -0.570305347442627, 0.010595285333693027, -0.1384313404560089, -0.09748776257038116, 0.12943029403686523, 0.1430983692407608, -0.03318892419338226, 0.05978696048259735, -0.05362639203667641, -0.202997624874115, -0.2970931828022003, -0.13339391350746155, 0.07282472401857376, 0.5247650146484375, 0.22074191272258759, -0.027256755158305168, 0.3124711811542511, 0.21028321981430054, 0.26076459884643555, -0.04243513196706772, 0.03409625217318535, 0.19370687007904053, 0.347460001707077, 0.11729972064495087, 0.1868577003479004, -0.16418243944644928, 0.6262772083282471, 0.0059259324334561825, 0.08054123818874359, -0.4745660424232483, 0.13324959576129913, -0.06919225305318832, 0.24575936794281006, 0.2965683043003082, 0.011087480932474136, 0.21698196232318878, 0.7142072319984436, -0.1637583076953888, 0.05735650286078453, 0.17274045944213867, -0.30656197667121887, -0.39788371324539185, -0.06171886622905731, 0.11359479278326035, 0.22288942337036133, 0.31490224599838257, 0.4356389045715332, 0.023208841681480408, 0.026493564248085022, -0.29465600848197937, 0.15361224114894867, 0.033893097192049026, 0.027686255052685738, 0.305514931678772, 0.12488682568073273, -0.1864260882139206, -0.5453474521636963, 0.17945468425750732, 0.14003774523735046, 0.05890854820609093, -0.0880512222647667, 0.08886967599391937, 0.1160283088684082, -0.20290248095989227, 0.06789571046829224, -0.30786558985710144, -0.2110845148563385, -0.2806333899497986, 0.04493104666471481, 0.0895598754286766, 0.03741886839270592, 0.1759769171476364, -0.24752555787563324, 0.04735592380166054, 0.1466035693883896, 0.14496740698814392, 0.05026208609342575, -0.031570084393024445, -0.34789013862609863, 0.20027637481689453, 0.0018668640404939651, -0.09165776520967484, 0.06536053866147995, -0.2392798364162445, -0.1087268516421318, -0.36444684863090515, -0.19610562920570374, 0.4006870687007904, -0.01406174898147583, 0.14157269895076752, -0.07488544285297394, 0.20226648449897766, -0.09577935189008713, -0.107121542096138, 0.03612456098198891, -0.0570068396627903, -0.22336483001708984, -0.12756332755088806, -0.3430795669555664, -0.08224206417798996, -0.024205319583415985, -0.3865702748298645, -0.044607508927583694, -0.15321551263332367, -0.13986259698867798, 0.24287287890911102, 0.2414499968290329, -0.027948005124926567, 0.011536126025021076, -0.1964832991361618, 0.013298246078193188, 0.09070649743080139, -0.5771008133888245, -0.2648049592971802, 0.25383397936820984, -0.17295904457569122, -0.3591112792491913, 0.07774379849433899, -0.2555443048477173, 0.24420198798179626, 0.11122015863656998, -0.3634728789329529, 0.24646613001823425, -0.35186079144477844, 0.026451053097844124, -0.033571165055036545, 0.36480945348739624, 0.21853508055210114, -0.1973508596420288, -0.16404502093791962, -0.23965655267238617, -0.27448761463165283, 0.17610718309879303, -0.017694316804409027, 0.3702256977558136, 0.003071424551308155, 0.14305157959461212, 0.07620958238840103, 0.3774281144142151, 0.07793579995632172, -0.0501348040997982, 0.3533669412136078, 0.005935017950832844, 0.37134355306625366, -0.40380826592445374, -0.08530599623918533, 0.07147331535816193, 0.0029250290244817734, -0.010520031675696373, 0.6038849353790283, 0.1489352434873581, -0.1825474351644516, 0.07355403155088425, -0.06797288358211517, -0.617351233959198, -0.2059258073568344, -0.04521435499191284, -0.20599259436130524, 0.17638429999351501, 0.29182782769203186, -0.011933431029319763, -0.04101836308836937, -0.14186786115169525, -0.13499678671360016, -0.38608479499816895, 0.05512423813343048, -0.10991077125072479, -0.17966897785663605, -0.031190501525998116, -0.6619414687156677, 0.14131174981594086, -0.06786935031414032, 0.4663116931915283, -0.14415229856967926, -0.05759509280323982, 0.1868518441915512, 0.11059252172708511, 0.5653717517852783, 0.07586637139320374, -0.03341711685061455, -0.05000219866633415, 0.06546399742364883, -0.2373293787240982, 0.15579675137996674, -0.11546361446380615, 0.22844035923480988, 0.050636958330869675, -0.11655855923891068, -0.41562122106552124, 0.15887172520160675, 0.11241566389799118, 0.5059365630149841, -0.02683575637638569, 0.16835908591747284, -0.2785593271255493, -0.4805263578891754, -0.23527754843235016, -0.1585828810930252, 0.22161351144313812, 0.11143840849399567, 0.38405418395996094, 0.030775872990489006, 0.11828989535570145, -0.22004064917564392, 0.17885330319404602, 0.04388461261987686, 0.17520011961460114, 0.141203373670578, 0.2861458659172058, -0.2234913557767868, 0.08649741858243942, 0.18899156153202057, 0.5265169739723206, -0.011515856720507145, -0.13157333433628082, 0.3436855971813202, -0.27182838320732117, 0.21795696020126343, 0.3074047565460205, -0.042884040623903275, 0.03459570184350014, 0.12126455456018448, -0.08857084810733795, 0.0784221664071083, 0.08094017207622528, -0.07067723572254181, 0.03620367869734764, -0.354557067155838, -0.3268676996231079, 0.16851213574409485, -0.04841050133109093, -0.011159345507621765, 0.2999800145626068, -0.002158361254259944, -0.35327601432800293, 0.46983417868614197, -0.2510683238506317, 0.747601330280304, 0.3271571099758148, 0.5007338523864746, -0.15160033106803894, 0.2947440445423126, 0.02068895474076271, -0.028748400509357452, 0.22570131719112396, -0.22601361572742462, -0.2532016336917877, -0.052427224814891815, 0.10236137360334396, -0.032854679971933365, 0.07984510809183121, 0.22406776249408722, 0.11825790256261826, 0.07038086652755737, 0.11082133650779724, 0.19282516837120056, 0.18400442600250244, -0.3514045178890228, -0.28082504868507385, -0.07753418385982513, 0.1312551349401474, 0.18765193223953247, 0.0003873057139571756, 0.002183998003602028, 0.08595627546310425, -0.11641968786716461, -0.15602296590805054, -0.14425669610500336, -0.05594675987958908, -0.29407835006713867, 0.01659967564046383, -0.2504556477069855, 0.05368983745574951, -0.1596105396747589, -0.20690573751926422, 0.37119579315185547, 0.17357616126537323, -0.07777836173772812, 0.35278943181037903, -0.10791350901126862, 0.0937638133764267, 0.012349582277238369, -0.14321854710578918, 0.11006882786750793, -0.05708151310682297, -0.11114475876092911, -0.07465681433677673, 0.028598390519618988, 0.06747039407491684, -0.5162514448165894, 0.16261152923107147, 0.05466204881668091, -0.09243015944957733, -0.22626842558383942, 0.013836617581546307, -0.12543286383152008, -0.21601571142673492, 0.18600700795650482, 0.06142789497971535, -0.20146100223064423, 0.1485460102558136, 0.055592525750398636, -0.28159257769584656, -0.504974365234375, 0.2661876380443573, 0.4860316812992096, 0.03191174939274788, 0.28178495168685913, 0.0031464609783142805, -0.13238024711608887, -0.07613781839609146, 0.04696023091673851, 0.1864287108182907, -0.2270992547273636, 0.015747372061014175, 0.1062747910618782, -0.37872010469436646, -0.26226165890693665, 0.2490987777709961, 0.10759609937667847, 0.1600266396999359, -0.020650001242756844, -0.2703319787979126, -0.018220217898488045, 0.2620507478713989, 0.03622711822390556, -0.08830147981643677, 0.3093957006931305, 0.09428344666957855, 0.15292459726333618, 0.09171098470687866, -0.3394050598144531, 0.09069009870290756, 0.020666297525167465, 0.4804111123085022, -0.42404845356941223, 0.022265994921326637, 0.16796539723873138, 0.06682393699884415, 0.14313803613185883, 0.17079319059848785, -0.08295346796512604, -0.29188811779022217, 0.06757718324661255, 0.11900472640991211, 0.22695046663284302, 0.06882897019386292, 0.10287181288003922, -0.0612545944750309, -0.32923412322998047, -0.14298240840435028, 0.22138239443302155, 0.20032180845737457, -0.011387484148144722, -0.005183848086744547, 0.08738961070775986, 0.015153327956795692, 0.05210566520690918, -0.12506718933582306, -0.12282861769199371, 0.29564765095710754, 0.1925121545791626, 0.11171332001686096, 0.08365129679441452, 0.030377602204680443, -0.15894825756549835, 0.10721323639154434, -0.29902365803718567, 0.192766010761261, 0.070785291492939, -0.03851316124200821, -0.10404039174318314, 0.23149026930332184, 0.4464277923107147, 0.17404434084892273, -0.0795663520693779, -0.2201690375804901, 0.31556078791618347, 0.25367072224617004, -0.4561591148376465, -0.23572224378585815, 0.10863509029150009, -0.6767041683197021, 0.2953755259513855, 0.22401101887226105, 0.5169703960418701, -0.2902044355869293, -0.23838835954666138, -0.05436868965625763, 0.010074591264128685, -0.23003849387168884, 0.0929451510310173, 0.5139504075050354, -0.17744912207126617, 0.2795488238334656, 0.1934807449579239, 0.012468571774661541, -0.05923406779766083, 1.0060051679611206, 0.20802424848079681, 0.7441649436950684, 0.4063798189163208, -0.17608828842639923, -0.24443954229354858, -0.13534779846668243, 0.5503752827644348, 0.2510231137275696, -0.06926602870225906, 0.20666921138763428, 0.1867813766002655, -0.3430961072444916, 0.09850658476352692, -0.03410918638110161, -0.309628427028656, -0.26149269938468933, 0.022995347157120705, -0.05840272083878517, 0.008769056759774685, -0.2918294072151184, 0.11173156648874283, -0.0062890625558793545, 0.07489166408777237, -0.05028630793094635, 0.13662303984165192, -0.17030717432498932, -0.3109019994735718, -0.04519663751125336, 0.1349179893732071, -0.10677416622638702, -0.22743138670921326, -0.06839121133089066, 0.32841697335243225, -0.024395281448960304, -0.02747345343232155, 0.02212154120206833, 0.29964593052864075, 0.2850598394870758, 0.03430027514696121, 0.18838998675346375, -0.08449340611696243, -0.06844083219766617, -0.18380047380924225, -0.388518750667572, 0.33859238028526306, 0.4001184403896332, 0.07534772902727127, 0.20310497283935547, 0.11730679869651794, -0.23041100800037384, -0.1027105525135994, 0.594165027141571, -0.2854640781879425, -0.17426466941833496, -0.20383955538272858, -0.24124684929847717, -0.24550610780715942, -0.16577954590320587, -0.022852079942822456, -0.6388343572616577, -0.26656293869018555, 0.32195428013801575, -0.5105656385421753, 0.2798570394515991, -0.2730637788772583, 0.11773605644702911, -0.23311379551887512, 0.4261065721511841, 0.1583886295557022, 0.007816758006811142, -0.10742076486349106, -0.07860708981752396, -0.4054638147354126, 0.2531290352344513, -0.28203442692756653, 0.3988304138183594, -0.2600894570350647, 0.26032325625419617, 0.22627682983875275, 0.04627241939306259, 0.09232235699892044, 0.29476436972618103, -0.11589472740888596, -0.10990121215581894, -0.3578888773918152, -0.3229808807373047, 0.029519513249397278, 0.2821800410747528, -0.24330705404281616, -0.3632620871067047, 0.1399586945772171, -0.2338823825120926, 0.15871472656726837, 0.0042997095733881, -0.28542980551719666, 0.08946555107831955, 0.24496468901634216, 0.2141810953617096, 0.4291110038757324, 0.2007444053888321, -0.34517958760261536, -0.03450849652290344, -0.03311074897646904, 0.11182910203933716, -0.19336862862110138, 0.5511646270751953, 0.18548378348350525, 0.073210209608078, -0.09048763662576675, -0.1268891543149948, 0.11587858200073242, 0.4119914770126343, 0.08323127776384354, -0.03516875207424164, -0.11165746301412582, 0.3595488965511322, -0.14710821211338043, 0.012530717998743057, -0.0694730132818222, 0.29457470774650574, -0.13338372111320496, -0.028943831101059914, 0.12057361006736755, -0.23666630685329437, 0.18115352094173431, -0.2630181312561035, -0.4930932819843292, -0.32226499915122986, 0.15426506102085114, 0.35130295157432556, -0.03746188431978226, -0.12865205109119415, 0.17536653578281403, 0.2631238102912903, 0.008549908176064491, -0.09460857510566711, 0.24897654354572296, -0.22570526599884033, -0.05684604495763779, -0.04784216731786728, 0.32026389241218567, 0.28574198484420776, -0.6782664656639099, -0.013440479524433613, -0.1401071399450302 ]
https://github.com/huggingface/datasets/issues/3123
Segmentation fault when loading datasets from file
Hi ! I created an issue on Arrow's JIRA after making a minimum reproducible example https://issues.apache.org/jira/browse/ARROW-14439 ```python import io import pyarrow.json as paj batch = b'{"a": [], "b": 1}\n{"b": 1}' block_size = 12 paj.read_json( io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size) ) ``` I don't see a way to workaround this properly now without hurting the performance of the JSON loader significantly though
## Describe the bug Custom dataset loading sometimes segfaults and kills the process if chunks contain a variety of features/ ## Steps to reproduce the bug Download an example file: ``` wget https://gist.githubusercontent.com/TevenLeScao/11e2184394b3fa47d693de2550942c6b/raw/4232704d08fbfcaf93e5b51def9e5051507651ad/tiny_kelm.jsonl ``` Then in Python: ``` import datasets tiny_kelm = datasets.load_dataset("json", data_files="tiny_kelm.jsonl", chunksize=100000) ``` ## Expected results a `tiny_kelm` functional dataset ## Actual results ☠️ `Segmentation fault (core dumped)` ☠️ ## Environment info - `datasets` version: 1.14.0 - Platform: Linux-5.11.0-38-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 5.0.0
58
Segmentation fault when loading datasets from file
[ -0.5560070276260376, 0.01487702690064907, -0.18501289188861847, 0.46718496084213257, 0.34982776641845703, 0.10155385732650757, 0.3750864267349243, 0.4207443296909332, 0.024526409804821014, 0.14756779372692108, -0.0723491981625557, -0.002263841452077031, 0.006010944489389658, -0.1406913697719574, -0.18660226464271545, -0.11936715245246887, 0.12424428015947342, 0.18371915817260742, -0.2388942986726761, -0.1415649801492691, -0.21150097250938416, 0.2605627179145813, -0.18676413595676422, 0.006868842989206314, -0.3923412263393402, 0.002821505768224597, 0.06160721555352211, 0.579744279384613, -0.08457578718662262, -0.21397005021572113, 0.005424020811915398, -0.042775366455316544, 0.19623441994190216, 0.37410426139831543, -0.00009718575893202797, -0.016089821234345436, -0.02537408284842968, -0.045448753982782364, -0.1220165267586708, 0.311330646276474, -0.1971534639596939, -0.02694055438041687, -0.10134070366621017, -0.28313466906547546, -0.11151774227619171, -0.14190852642059326, -0.06251086294651031, -0.13481850922107697, 0.38969507813453674, 0.2545805275440216, 0.33939942717552185, -0.17927707731723785, -0.08515700697898865, -0.159791499376297, 0.275008887052536, 0.15052829682826996, 0.09028750658035278, 0.4584706425666809, 0.05231150984764099, -0.1350780725479126, -0.10777854919433594, 0.2647674083709717, -0.13474959135055542, 0.00981541071087122, 0.06986739486455917, -0.02592797391116619, 0.0054986486211419106, -0.07022115588188171, 0.17892992496490479, 0.08352256566286087, 0.2907857596874237, -0.0970567986369133, -0.14123550057411194, 0.017138252034783363, -0.058796558529138565, -0.3520418107509613, 0.20239971578121185, 0.1615889072418213, -0.10190399736166, 0.2702959179878235, 0.1931787133216858, -0.16151493787765503, -0.1451471596956253, 0.022736433893442154, -0.06078251823782921, 0.21511419117450714, -0.06172403693199158, -0.09423984587192535, 0.14070209860801697, 0.09072664380073547, -0.20034509897232056, 0.018185384571552277, -0.05393616855144501, 0.09550578892230988, -0.3068030774593353, 0.11514530330896378, -0.1870071291923523, -0.10973969846963882, 0.0641392394900322, 0.20421651005744934, 0.0986485630273819, 0.295001745223999, 0.2562149167060852, -0.03559953719377518, 0.1780724674463272, -0.1525755673646927, -0.20862790942192078, 0.20611825585365295, 0.10571640729904175, -0.06038637459278107, -0.3811379373073578, -0.0626179650425911, -0.25099244713783264, -0.3356308937072754, 0.28078746795654297, -0.04105628654360771, -0.1598018854856491, -0.1870976984500885, -0.2849505543708801, 0.17684592306613922, -0.13410073518753052, -0.07708774507045746, 0.08461280912160873, 0.47788652777671814, 0.18537327647209167, -0.04339950159192085, 0.10627031326293945, 0.14498764276504517, -0.45470336079597473, -0.20990581810474396, -0.3118082284927368, -0.012486966326832771, -0.30421996116638184, -0.006273810751736164, 0.21259471774101257, -0.22438949346542358, 0.05165098235011101, -0.00980500876903534, -0.11267281323671341, -0.30068114399909973, -0.03026585467159748, -0.3916032910346985, 0.04253418743610382, 0.07602563500404358, -0.13294218480587006, 0.11992684006690979, 0.1585036963224411, 0.2412751466035843, 0.27701130509376526, 0.06742235273122787, -0.29701507091522217, -0.06793470680713654, -0.08287539333105087, 0.3365866243839264, 0.0918469950556755, 0.3069261610507965, 0.30798980593681335, -0.04041820392012596, 0.16845598816871643, -0.5296948552131653, -0.3025985062122345, -0.28392788767814636, -0.07675860077142715, -0.2393498718738556, 0.16518333554267883, 0.41495028138160706, -0.39702579379081726, -0.04118960723280907, -0.059656087309122086, -0.15186777710914612, 0.3124691843986511, 0.41511163115501404, -0.01854567602276802, 0.2399636059999466, -0.24229934811592102, 0.5563198924064636, 0.4256542921066284, 0.21050210297107697, -0.22600388526916504, 0.3082878887653351, -0.22190774977207184, -0.11541157960891724, -0.011408478021621704, 0.27795207500457764, 0.11713091284036636, -0.05143432691693306, 0.07476995140314102, 0.14407527446746826, 0.2103518694639206, 0.029851293191313744, -0.20842179656028748, 0.05823017284274101, -0.09231111407279968, 0.27241331338882446, 0.036209046840667725, 0.17512434720993042, 0.31216683983802795, 0.0034279366955161095, 0.30527615547180176, -0.312507301568985, 0.02201739512383938, 0.39754849672317505, 0.09986916184425354, 0.12813274562358856, 0.0966571792960167, -0.2785220742225647, -0.2943824529647827, -0.09486684203147888, 0.1157442182302475, -0.1545650064945221, 0.021906765177845955, 0.08266404271125793, -0.28016170859336853, -0.04264284670352936, -0.041414037346839905, 0.31756293773651123, 0.2019985467195511, 0.26784712076187134, -0.3440852165222168, -0.13273562490940094, -0.12238236516714096, 0.0007298292475752532, -0.16664078831672668, 0.18583078682422638, -0.09020795673131943, 0.3754104971885681, -0.1615150272846222, -0.28036555647850037, 0.09453102946281433, 0.12299150973558426, 0.18821299076080322, -0.26004549860954285, -0.005088598933070898, 0.2639137804508209, 0.2888484597206116, 0.06825926154851913, -0.22388404607772827, -0.03618840500712395, -0.0580214187502861, -0.18494488298892975, 0.025143714621663094, -0.12859757244586945, 0.26149770617485046, -0.05652344226837158, 0.17189690470695496, 0.16329269111156464, -0.03640640899538994, -0.1704014390707016, 0.1638227105140686, -0.20632325112819672, 0.32379150390625, -0.06722627580165863, 0.21830686926841736, -0.3705529570579529, 0.39962640404701233, 0.04356319457292557, -0.0793636217713356, 0.20409135520458221, -0.4026246666908264, -0.13285209238529205, 0.34871041774749756, -0.046835482120513916, 0.2591106593608856, -0.012655625119805336, -0.09931546449661255, 0.0007140680681914091, 0.0944788008928299, 0.08159063011407852, 0.27432990074157715, 0.18482746183872223, 0.12203265726566315, 0.023172743618488312, 0.0956081748008728, -0.24737511575222015, 0.05820830166339874, -0.0076622446067631245, 0.25793883204460144, 0.44388118386268616, -0.2028893083333969, 0.05678504332900047, -0.2751868665218353, -0.23242327570915222, 0.032649822533130646, 0.07552782446146011, -0.36254048347473145, 0.19454169273376465, -0.20143772661685944, -0.21663041412830353, -0.39068126678466797, -0.023477673530578613, -0.09203958511352539, -0.12323245406150818, -0.001787930610589683, 0.014667545445263386, -0.21075519919395447, 0.051010675728321075, -0.11984129250049591, 0.23286846280097961, 0.21879546344280243, 0.08629639446735382, 0.13361205160617828, 0.016544407233595848, -0.1627446860074997, 0.1940353661775589, 0.3345477879047394, 0.35986819863319397, 0.04755910113453865, -0.14959730207920074, 0.034512799233198166, 0.01090838760137558, 0.025849636644124985, 0.06500577181577682, 0.15838532149791718, 0.23244410753250122, 0.03444430232048035, 0.25101926922798157, -0.024645186960697174, -0.5729347467422485, 0.30397936701774597, -0.08597191423177719, -0.09184406697750092, 0.20750415325164795, 0.2160411924123764, -0.023415466770529747, -0.23011836409568787, -0.38523831963539124, -0.08268612623214722, -0.30470868945121765, -0.25362837314605713, 0.2412356585264206, 0.2282344251871109, 0.09569795429706573, 0.045232851058244705, -0.12579463422298431, -0.032651182264089584, 0.09443554282188416, -0.12600621581077576, 0.03793940320611, 0.1743699610233307, -0.29276490211486816, -0.2930840849876404, 0.008331919088959694, -0.027054382488131523, 0.1562524437904358, 0.39285632967948914, -0.3182453215122223, 0.2537463307380676, 0.0486464761197567, -0.1819416880607605, -0.2980528175830841, -0.04574698582291603, -0.21280799806118011, -0.021146826446056366, -0.15622711181640625, -0.07029879838228226, 0.20373976230621338, 0.08629930764436722, -0.30126023292541504, 0.041874777525663376, -0.38646581768989563, 0.20004300773143768, -0.18652310967445374, 0.5864326357841492, 0.09960895031690598, -0.05162087082862854, 0.3794569969177246, -0.05292637273669243, 0.12186405062675476, -0.24625885486602783, -0.2632973790168762, 0.2781934142112732, 0.022511223331093788, -0.23742377758026123, 0.2656649947166443, -0.004943760111927986, -0.1859762966632843, -0.04402119666337967, 0.3229474723339081, -0.4908279776573181, -0.3237417936325073, 0.2502809464931488, 0.30194205045700073, 0.20042076706886292, -0.14731191098690033, 0.33810144662857056, 0.0016387946670874953, -0.10275361686944962, 0.01604967750608921, 0.18737910687923431, 0.04753190279006958, -0.07335745543241501, -0.29051288962364197, -0.05524458363652229, -0.06199115514755249, 0.16589413583278656, 0.18441233038902283, 0.289603054523468, -0.3208639323711395, -0.3134825527667999, 0.04551171883940697, 0.07167090475559235, 0.5198782086372375, 0.14923037588596344, 0.25053656101226807, 0.1802908480167389, -0.03740614652633667, 0.12731245160102844, 0.04287649318575859, -0.24203439056873322, 0.0890878289937973, 0.3656582832336426, 0.1587403267621994, -0.32650402188301086, 0.007560655940324068, 0.11442351341247559, 0.18562304973602295, -0.17043332755565643, -0.0897911861538887, -0.11180085688829422, 0.08812808245420456, -0.15628424286842346, -0.09777175635099411, -0.18506227433681488, 0.3326117694377899, -0.14176595211029053, 0.03020850569009781, -0.05044911801815033, -0.0384627990424633, 0.062269169837236404, 0.14167673885822296, 0.34765350818634033, -0.14541350305080414, 0.0575837604701519, 0.13166877627372742, 0.22893434762954712, 0.5259748697280884, 0.5263408422470093, -0.012284568510949612, -0.12904027104377747, 0.1703239530324936, -0.1136784479022026, 0.11715969443321228, 0.33795759081840515, 0.17479166388511658, -0.12759138643741608, 0.1028061956167221, -0.08628451824188232, -0.27397575974464417, -0.005979742854833603, 0.22941850125789642, 0.013771938160061836, -0.4654071629047394, -0.2474009394645691, -0.029239021241664886, -0.06772425770759583, -0.08211071044206619, 0.1933853030204773, -0.15598662197589874, -0.09273125231266022, 0.46470025181770325, 0.011775132268667221, 0.7372841238975525, -0.09899458289146423, 0.09839095920324326, 0.4046059250831604, 0.2818364202976227, 0.09455637633800507, -0.1256541907787323, 0.13794150948524475, -0.48705101013183594, -0.39804336428642273, -0.02500523068010807, 0.00806464347988367, 0.16809144616127014, 0.2933049499988556, 0.017643941566348076, -0.08513722568750381, -0.060528386384248734, -0.0542319156229496, -0.2686672806739807, 0.07499585300683975, 0.07308825850486755, -0.10776680707931519, -0.105074942111969, 0.24713316559791565, 0.006715431809425354, 0.09708581119775772, -0.27480679750442505, -0.14645279943943024, -0.016788968816399574, -0.04059397801756859, -0.050519123673439026, 0.12594223022460938, -0.13538607954978943, 0.14773954451084137, -0.16009075939655304, -0.2201489359140396, -0.04310205206274986, 0.16915149986743927, -0.05191192030906677, 0.21988075971603394, 0.05364145711064339, 0.11255395412445068, -0.07992507517337799, -0.03628505766391754, -0.05341549217700958, -0.0037580651696771383, 0.4414464235305786, -0.05686308816075325, -0.030745666474103928, -0.06852688640356064, 0.0661887526512146, -0.23435352742671967, 0.2417156845331192, 0.014261318370699883, -0.03695112094283104, -0.561160683631897, -0.26148658990859985, -0.11216617375612259, -0.04176473990082741, -0.15751519799232483, 0.2793927490711212, 0.192330002784729, -0.11796997487545013, -0.03744707629084587, 0.3383514881134033, -0.19739659130573273, -0.16088569164276123, 0.48746636509895325, -0.13935187458992004, -0.1935041844844818, 0.3962818682193756, 0.278784841299057, -0.28908514976501465, -0.49286943674087524, 0.09505683183670044, 0.25759732723236084, -0.33330050110816956, -0.018804792314767838, 0.04015460982918739, 0.029684608802199364, 0.276182621717453, 0.18667709827423096, 0.18251672387123108, 0.005184210371226072, -0.22451597452163696, -0.6104810237884521, -0.21954646706581116, 0.22886547446250916, -0.017765628173947334, 0.1283801645040512, 0.03561653196811676, -0.14912109076976776, -0.18896164000034332, 0.13601218163967133, -0.4579952657222748, 0.1292964369058609, -0.24408362805843353, 0.0076043494045734406, -0.14462147653102875, -0.1335739940404892, -0.12210758775472641, 0.0206516794860363, 0.32626351714134216, 0.10145997256040573, -0.17352944612503052, -0.3321186900138855, -0.007165278308093548, 0.08325906097888947, -0.1919933706521988, -0.16988888382911682, -0.032123297452926636, -0.16836202144622803, 0.036655493080616, -0.20707108080387115, 0.13094614446163177, -0.11666928976774216, -0.06447805464267731, 0.038867540657520294, 0.32205232977867126, 0.11923715472221375, -0.08916027843952179, 0.19561755657196045, -0.2876960039138794, 0.019704781472682953, -0.04756613448262215, -0.09677159041166306, -0.085808664560318, -0.07824964821338654, -0.09864190965890884, 0.08775585889816284, 0.20457975566387177, -0.030461207032203674, 0.3523932099342346, -0.49472707509994507, 0.08614609390497208, 0.2778533101081848, 0.528601884841919, 0.3285605311393738, -0.1789400428533554, 0.1299152672290802, 0.16209237277507782, 0.3914460241794586, -0.006024416536092758, -0.2661214768886566, 0.4205031096935272, -0.16437092423439026, -0.07054280489683151, 0.19325432181358337, 0.06629500538110733, -0.20283092558383942, -0.04058830067515373, -0.11101595312356949, -0.04108322039246559, 0.1897173523902893, 0.1206764280796051, 0.5579273700714111, 0.07080373913049698, 0.06936746090650558, 0.013085552491247654, 0.13596762716770172, 0.06435537338256836, 0.8105239272117615, -0.10320933908224106, 0.31039902567863464, 0.08511151373386383, -0.014426992274820805, -0.42032620310783386, -0.7481577396392822, -0.09422390162944794, 0.13363032042980194, -0.17527027428150177, 0.1538206934928894, -0.08776648342609406, 0.14397582411766052, -0.21561689674854279, -0.18613795936107635, -0.15787844359874725, 0.016605116426944733, -0.480587899684906, 0.08761182427406311, -0.31891828775405884, -0.09465041011571884, -0.030771955847740173, -0.025036392733454704, -0.1700277179479599, 0.0337623693048954, 0.195731058716774, 0.039984285831451416, -0.12368529289960861, -0.02844928950071335, -0.03379971534013748, -0.11370407044887543, -0.1090044155716896, -0.321584016084671, 0.11476275324821472, 0.031343452632427216, 0.2208212912082672, 0.510116696357727, -0.0037916325964033604, 0.32617923617362976, 0.27918511629104614, 0.10218758881092072, -0.25059744715690613, -0.11241123825311661, -0.19147124886512756, -0.19482870399951935, 0.18894346058368683, 0.14227722585201263, 0.49990344047546387, 0.5236245393753052, 0.264491468667984, -0.2810472548007965, 0.0009600270423106849, 0.31050360202789307, 0.12203702330589294, -0.1300876885652542, 0.04693077877163887, -0.28742924332618713, -0.25012367963790894, -0.45647701621055603, -0.23789575695991516, -0.22064726054668427, -0.005240151192992926, 0.09211232513189316, -0.17834098637104034, 0.15390005707740784, 0.10426712781190872, 0.17880401015281677, -0.05900455638766289, 0.4921400249004364, 0.21661479771137238, -0.017505593597888947, -0.2980795204639435, -0.2545434832572937, -0.4730757772922516, 0.308540016412735, 0.05730587616562843, 0.04032052308320999, 0.05213942378759384, 0.08802874386310577, 0.009154119528830051, 0.06284448504447937, -0.11191413551568985, 0.014691728167235851, 0.31477048993110657, 0.4840174913406372, -0.44742652773857117, 0.017852427437901497, 0.04406750947237015, -0.012851256877183914, -0.19063051044940948, -0.22957175970077515, 0.4368817210197449, -0.3327137231826782, 0.22259977459907532, 0.2262485921382904, -0.2896934747695923, -0.2636217176914215, 0.02272164821624756, 0.4546352028846741, -0.09844285994768143, 0.4749031960964203, -0.20931869745254517, -0.00789815466850996, -0.24047937989234924, -0.4546876549720764, 0.19821697473526, 0.2628900408744812, 0.20469176769256592, 0.5681546330451965, -0.052402082830667496, 0.21140000224113464, -0.1214851438999176, 0.04455278441309929, -0.19422738254070282, 0.315960168838501, -0.24666258692741394, 0.1947084665298462, -0.12007451802492142, -0.08764253556728363, 0.17673827707767487, 0.2731652855873108, 0.13015948235988617, 0.014686121605336666, -0.05775175616145134, -0.2914760708808899, 0.33169856667518616, -0.3273865878582001, -0.22627413272857666, -0.26012083888053894, 0.1576814502477646, 0.27393272519111633, 0.007945998571813107, -0.3225410282611847, -0.004778118804097176, 0.21030552685260773, -0.10842310637235641, -0.2817554473876953, 0.12433966994285583, -0.2277824729681015, -0.21898993849754333, 0.05769278109073639, 0.28230246901512146, 0.16165295243263245, -0.2715519368648529, 0.04422453045845032, -0.1925944685935974 ]
https://github.com/huggingface/datasets/issues/3123
Segmentation fault when loading datasets from file
The issue has been fixed in pyarrow 6.0.0, please update pyarrow :) The issue was due to missing fields in the JSON data of type list. Now it's working fine and missing list fields are replaced with empty lists
## Describe the bug Custom dataset loading sometimes segfaults and kills the process if chunks contain a variety of features/ ## Steps to reproduce the bug Download an example file: ``` wget https://gist.githubusercontent.com/TevenLeScao/11e2184394b3fa47d693de2550942c6b/raw/4232704d08fbfcaf93e5b51def9e5051507651ad/tiny_kelm.jsonl ``` Then in Python: ``` import datasets tiny_kelm = datasets.load_dataset("json", data_files="tiny_kelm.jsonl", chunksize=100000) ``` ## Expected results a `tiny_kelm` functional dataset ## Actual results ☠️ `Segmentation fault (core dumped)` ☠️ ## Environment info - `datasets` version: 1.14.0 - Platform: Linux-5.11.0-38-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 5.0.0
39
Segmentation fault when loading datasets from file
[ -0.5560070276260376, 0.01487702690064907, -0.18501289188861847, 0.46718496084213257, 0.34982776641845703, 0.10155385732650757, 0.3750864267349243, 0.4207443296909332, 0.024526409804821014, 0.14756779372692108, -0.0723491981625557, -0.002263841452077031, 0.006010944489389658, -0.1406913697719574, -0.18660226464271545, -0.11936715245246887, 0.12424428015947342, 0.18371915817260742, -0.2388942986726761, -0.1415649801492691, -0.21150097250938416, 0.2605627179145813, -0.18676413595676422, 0.006868842989206314, -0.3923412263393402, 0.002821505768224597, 0.06160721555352211, 0.579744279384613, -0.08457578718662262, -0.21397005021572113, 0.005424020811915398, -0.042775366455316544, 0.19623441994190216, 0.37410426139831543, -0.00009718575893202797, -0.016089821234345436, -0.02537408284842968, -0.045448753982782364, -0.1220165267586708, 0.311330646276474, -0.1971534639596939, -0.02694055438041687, -0.10134070366621017, -0.28313466906547546, -0.11151774227619171, -0.14190852642059326, -0.06251086294651031, -0.13481850922107697, 0.38969507813453674, 0.2545805275440216, 0.33939942717552185, -0.17927707731723785, -0.08515700697898865, -0.159791499376297, 0.275008887052536, 0.15052829682826996, 0.09028750658035278, 0.4584706425666809, 0.05231150984764099, -0.1350780725479126, -0.10777854919433594, 0.2647674083709717, -0.13474959135055542, 0.00981541071087122, 0.06986739486455917, -0.02592797391116619, 0.0054986486211419106, -0.07022115588188171, 0.17892992496490479, 0.08352256566286087, 0.2907857596874237, -0.0970567986369133, -0.14123550057411194, 0.017138252034783363, -0.058796558529138565, -0.3520418107509613, 0.20239971578121185, 0.1615889072418213, -0.10190399736166, 0.2702959179878235, 0.1931787133216858, -0.16151493787765503, -0.1451471596956253, 0.022736433893442154, -0.06078251823782921, 0.21511419117450714, -0.06172403693199158, -0.09423984587192535, 0.14070209860801697, 0.09072664380073547, -0.20034509897232056, 0.018185384571552277, -0.05393616855144501, 0.09550578892230988, -0.3068030774593353, 0.11514530330896378, -0.1870071291923523, -0.10973969846963882, 0.0641392394900322, 0.20421651005744934, 0.0986485630273819, 0.295001745223999, 0.2562149167060852, -0.03559953719377518, 0.1780724674463272, -0.1525755673646927, -0.20862790942192078, 0.20611825585365295, 0.10571640729904175, -0.06038637459278107, -0.3811379373073578, -0.0626179650425911, -0.25099244713783264, -0.3356308937072754, 0.28078746795654297, -0.04105628654360771, -0.1598018854856491, -0.1870976984500885, -0.2849505543708801, 0.17684592306613922, -0.13410073518753052, -0.07708774507045746, 0.08461280912160873, 0.47788652777671814, 0.18537327647209167, -0.04339950159192085, 0.10627031326293945, 0.14498764276504517, -0.45470336079597473, -0.20990581810474396, -0.3118082284927368, -0.012486966326832771, -0.30421996116638184, -0.006273810751736164, 0.21259471774101257, -0.22438949346542358, 0.05165098235011101, -0.00980500876903534, -0.11267281323671341, -0.30068114399909973, -0.03026585467159748, -0.3916032910346985, 0.04253418743610382, 0.07602563500404358, -0.13294218480587006, 0.11992684006690979, 0.1585036963224411, 0.2412751466035843, 0.27701130509376526, 0.06742235273122787, -0.29701507091522217, -0.06793470680713654, -0.08287539333105087, 0.3365866243839264, 0.0918469950556755, 0.3069261610507965, 0.30798980593681335, -0.04041820392012596, 0.16845598816871643, -0.5296948552131653, -0.3025985062122345, -0.28392788767814636, -0.07675860077142715, -0.2393498718738556, 0.16518333554267883, 0.41495028138160706, -0.39702579379081726, -0.04118960723280907, -0.059656087309122086, -0.15186777710914612, 0.3124691843986511, 0.41511163115501404, -0.01854567602276802, 0.2399636059999466, -0.24229934811592102, 0.5563198924064636, 0.4256542921066284, 0.21050210297107697, -0.22600388526916504, 0.3082878887653351, -0.22190774977207184, -0.11541157960891724, -0.011408478021621704, 0.27795207500457764, 0.11713091284036636, -0.05143432691693306, 0.07476995140314102, 0.14407527446746826, 0.2103518694639206, 0.029851293191313744, -0.20842179656028748, 0.05823017284274101, -0.09231111407279968, 0.27241331338882446, 0.036209046840667725, 0.17512434720993042, 0.31216683983802795, 0.0034279366955161095, 0.30527615547180176, -0.312507301568985, 0.02201739512383938, 0.39754849672317505, 0.09986916184425354, 0.12813274562358856, 0.0966571792960167, -0.2785220742225647, -0.2943824529647827, -0.09486684203147888, 0.1157442182302475, -0.1545650064945221, 0.021906765177845955, 0.08266404271125793, -0.28016170859336853, -0.04264284670352936, -0.041414037346839905, 0.31756293773651123, 0.2019985467195511, 0.26784712076187134, -0.3440852165222168, -0.13273562490940094, -0.12238236516714096, 0.0007298292475752532, -0.16664078831672668, 0.18583078682422638, -0.09020795673131943, 0.3754104971885681, -0.1615150272846222, -0.28036555647850037, 0.09453102946281433, 0.12299150973558426, 0.18821299076080322, -0.26004549860954285, -0.005088598933070898, 0.2639137804508209, 0.2888484597206116, 0.06825926154851913, -0.22388404607772827, -0.03618840500712395, -0.0580214187502861, -0.18494488298892975, 0.025143714621663094, -0.12859757244586945, 0.26149770617485046, -0.05652344226837158, 0.17189690470695496, 0.16329269111156464, -0.03640640899538994, -0.1704014390707016, 0.1638227105140686, -0.20632325112819672, 0.32379150390625, -0.06722627580165863, 0.21830686926841736, -0.3705529570579529, 0.39962640404701233, 0.04356319457292557, -0.0793636217713356, 0.20409135520458221, -0.4026246666908264, -0.13285209238529205, 0.34871041774749756, -0.046835482120513916, 0.2591106593608856, -0.012655625119805336, -0.09931546449661255, 0.0007140680681914091, 0.0944788008928299, 0.08159063011407852, 0.27432990074157715, 0.18482746183872223, 0.12203265726566315, 0.023172743618488312, 0.0956081748008728, -0.24737511575222015, 0.05820830166339874, -0.0076622446067631245, 0.25793883204460144, 0.44388118386268616, -0.2028893083333969, 0.05678504332900047, -0.2751868665218353, -0.23242327570915222, 0.032649822533130646, 0.07552782446146011, -0.36254048347473145, 0.19454169273376465, -0.20143772661685944, -0.21663041412830353, -0.39068126678466797, -0.023477673530578613, -0.09203958511352539, -0.12323245406150818, -0.001787930610589683, 0.014667545445263386, -0.21075519919395447, 0.051010675728321075, -0.11984129250049591, 0.23286846280097961, 0.21879546344280243, 0.08629639446735382, 0.13361205160617828, 0.016544407233595848, -0.1627446860074997, 0.1940353661775589, 0.3345477879047394, 0.35986819863319397, 0.04755910113453865, -0.14959730207920074, 0.034512799233198166, 0.01090838760137558, 0.025849636644124985, 0.06500577181577682, 0.15838532149791718, 0.23244410753250122, 0.03444430232048035, 0.25101926922798157, -0.024645186960697174, -0.5729347467422485, 0.30397936701774597, -0.08597191423177719, -0.09184406697750092, 0.20750415325164795, 0.2160411924123764, -0.023415466770529747, -0.23011836409568787, -0.38523831963539124, -0.08268612623214722, -0.30470868945121765, -0.25362837314605713, 0.2412356585264206, 0.2282344251871109, 0.09569795429706573, 0.045232851058244705, -0.12579463422298431, -0.032651182264089584, 0.09443554282188416, -0.12600621581077576, 0.03793940320611, 0.1743699610233307, -0.29276490211486816, -0.2930840849876404, 0.008331919088959694, -0.027054382488131523, 0.1562524437904358, 0.39285632967948914, -0.3182453215122223, 0.2537463307380676, 0.0486464761197567, -0.1819416880607605, -0.2980528175830841, -0.04574698582291603, -0.21280799806118011, -0.021146826446056366, -0.15622711181640625, -0.07029879838228226, 0.20373976230621338, 0.08629930764436722, -0.30126023292541504, 0.041874777525663376, -0.38646581768989563, 0.20004300773143768, -0.18652310967445374, 0.5864326357841492, 0.09960895031690598, -0.05162087082862854, 0.3794569969177246, -0.05292637273669243, 0.12186405062675476, -0.24625885486602783, -0.2632973790168762, 0.2781934142112732, 0.022511223331093788, -0.23742377758026123, 0.2656649947166443, -0.004943760111927986, -0.1859762966632843, -0.04402119666337967, 0.3229474723339081, -0.4908279776573181, -0.3237417936325073, 0.2502809464931488, 0.30194205045700073, 0.20042076706886292, -0.14731191098690033, 0.33810144662857056, 0.0016387946670874953, -0.10275361686944962, 0.01604967750608921, 0.18737910687923431, 0.04753190279006958, -0.07335745543241501, -0.29051288962364197, -0.05524458363652229, -0.06199115514755249, 0.16589413583278656, 0.18441233038902283, 0.289603054523468, -0.3208639323711395, -0.3134825527667999, 0.04551171883940697, 0.07167090475559235, 0.5198782086372375, 0.14923037588596344, 0.25053656101226807, 0.1802908480167389, -0.03740614652633667, 0.12731245160102844, 0.04287649318575859, -0.24203439056873322, 0.0890878289937973, 0.3656582832336426, 0.1587403267621994, -0.32650402188301086, 0.007560655940324068, 0.11442351341247559, 0.18562304973602295, -0.17043332755565643, -0.0897911861538887, -0.11180085688829422, 0.08812808245420456, -0.15628424286842346, -0.09777175635099411, -0.18506227433681488, 0.3326117694377899, -0.14176595211029053, 0.03020850569009781, -0.05044911801815033, -0.0384627990424633, 0.062269169837236404, 0.14167673885822296, 0.34765350818634033, -0.14541350305080414, 0.0575837604701519, 0.13166877627372742, 0.22893434762954712, 0.5259748697280884, 0.5263408422470093, -0.012284568510949612, -0.12904027104377747, 0.1703239530324936, -0.1136784479022026, 0.11715969443321228, 0.33795759081840515, 0.17479166388511658, -0.12759138643741608, 0.1028061956167221, -0.08628451824188232, -0.27397575974464417, -0.005979742854833603, 0.22941850125789642, 0.013771938160061836, -0.4654071629047394, -0.2474009394645691, -0.029239021241664886, -0.06772425770759583, -0.08211071044206619, 0.1933853030204773, -0.15598662197589874, -0.09273125231266022, 0.46470025181770325, 0.011775132268667221, 0.7372841238975525, -0.09899458289146423, 0.09839095920324326, 0.4046059250831604, 0.2818364202976227, 0.09455637633800507, -0.1256541907787323, 0.13794150948524475, -0.48705101013183594, -0.39804336428642273, -0.02500523068010807, 0.00806464347988367, 0.16809144616127014, 0.2933049499988556, 0.017643941566348076, -0.08513722568750381, -0.060528386384248734, -0.0542319156229496, -0.2686672806739807, 0.07499585300683975, 0.07308825850486755, -0.10776680707931519, -0.105074942111969, 0.24713316559791565, 0.006715431809425354, 0.09708581119775772, -0.27480679750442505, -0.14645279943943024, -0.016788968816399574, -0.04059397801756859, -0.050519123673439026, 0.12594223022460938, -0.13538607954978943, 0.14773954451084137, -0.16009075939655304, -0.2201489359140396, -0.04310205206274986, 0.16915149986743927, -0.05191192030906677, 0.21988075971603394, 0.05364145711064339, 0.11255395412445068, -0.07992507517337799, -0.03628505766391754, -0.05341549217700958, -0.0037580651696771383, 0.4414464235305786, -0.05686308816075325, -0.030745666474103928, -0.06852688640356064, 0.0661887526512146, -0.23435352742671967, 0.2417156845331192, 0.014261318370699883, -0.03695112094283104, -0.561160683631897, -0.26148658990859985, -0.11216617375612259, -0.04176473990082741, -0.15751519799232483, 0.2793927490711212, 0.192330002784729, -0.11796997487545013, -0.03744707629084587, 0.3383514881134033, -0.19739659130573273, -0.16088569164276123, 0.48746636509895325, -0.13935187458992004, -0.1935041844844818, 0.3962818682193756, 0.278784841299057, -0.28908514976501465, -0.49286943674087524, 0.09505683183670044, 0.25759732723236084, -0.33330050110816956, -0.018804792314767838, 0.04015460982918739, 0.029684608802199364, 0.276182621717453, 0.18667709827423096, 0.18251672387123108, 0.005184210371226072, -0.22451597452163696, -0.6104810237884521, -0.21954646706581116, 0.22886547446250916, -0.017765628173947334, 0.1283801645040512, 0.03561653196811676, -0.14912109076976776, -0.18896164000034332, 0.13601218163967133, -0.4579952657222748, 0.1292964369058609, -0.24408362805843353, 0.0076043494045734406, -0.14462147653102875, -0.1335739940404892, -0.12210758775472641, 0.0206516794860363, 0.32626351714134216, 0.10145997256040573, -0.17352944612503052, -0.3321186900138855, -0.007165278308093548, 0.08325906097888947, -0.1919933706521988, -0.16988888382911682, -0.032123297452926636, -0.16836202144622803, 0.036655493080616, -0.20707108080387115, 0.13094614446163177, -0.11666928976774216, -0.06447805464267731, 0.038867540657520294, 0.32205232977867126, 0.11923715472221375, -0.08916027843952179, 0.19561755657196045, -0.2876960039138794, 0.019704781472682953, -0.04756613448262215, -0.09677159041166306, -0.085808664560318, -0.07824964821338654, -0.09864190965890884, 0.08775585889816284, 0.20457975566387177, -0.030461207032203674, 0.3523932099342346, -0.49472707509994507, 0.08614609390497208, 0.2778533101081848, 0.528601884841919, 0.3285605311393738, -0.1789400428533554, 0.1299152672290802, 0.16209237277507782, 0.3914460241794586, -0.006024416536092758, -0.2661214768886566, 0.4205031096935272, -0.16437092423439026, -0.07054280489683151, 0.19325432181358337, 0.06629500538110733, -0.20283092558383942, -0.04058830067515373, -0.11101595312356949, -0.04108322039246559, 0.1897173523902893, 0.1206764280796051, 0.5579273700714111, 0.07080373913049698, 0.06936746090650558, 0.013085552491247654, 0.13596762716770172, 0.06435537338256836, 0.8105239272117615, -0.10320933908224106, 0.31039902567863464, 0.08511151373386383, -0.014426992274820805, -0.42032620310783386, -0.7481577396392822, -0.09422390162944794, 0.13363032042980194, -0.17527027428150177, 0.1538206934928894, -0.08776648342609406, 0.14397582411766052, -0.21561689674854279, -0.18613795936107635, -0.15787844359874725, 0.016605116426944733, -0.480587899684906, 0.08761182427406311, -0.31891828775405884, -0.09465041011571884, -0.030771955847740173, -0.025036392733454704, -0.1700277179479599, 0.0337623693048954, 0.195731058716774, 0.039984285831451416, -0.12368529289960861, -0.02844928950071335, -0.03379971534013748, -0.11370407044887543, -0.1090044155716896, -0.321584016084671, 0.11476275324821472, 0.031343452632427216, 0.2208212912082672, 0.510116696357727, -0.0037916325964033604, 0.32617923617362976, 0.27918511629104614, 0.10218758881092072, -0.25059744715690613, -0.11241123825311661, -0.19147124886512756, -0.19482870399951935, 0.18894346058368683, 0.14227722585201263, 0.49990344047546387, 0.5236245393753052, 0.264491468667984, -0.2810472548007965, 0.0009600270423106849, 0.31050360202789307, 0.12203702330589294, -0.1300876885652542, 0.04693077877163887, -0.28742924332618713, -0.25012367963790894, -0.45647701621055603, -0.23789575695991516, -0.22064726054668427, -0.005240151192992926, 0.09211232513189316, -0.17834098637104034, 0.15390005707740784, 0.10426712781190872, 0.17880401015281677, -0.05900455638766289, 0.4921400249004364, 0.21661479771137238, -0.017505593597888947, -0.2980795204639435, -0.2545434832572937, -0.4730757772922516, 0.308540016412735, 0.05730587616562843, 0.04032052308320999, 0.05213942378759384, 0.08802874386310577, 0.009154119528830051, 0.06284448504447937, -0.11191413551568985, 0.014691728167235851, 0.31477048993110657, 0.4840174913406372, -0.44742652773857117, 0.017852427437901497, 0.04406750947237015, -0.012851256877183914, -0.19063051044940948, -0.22957175970077515, 0.4368817210197449, -0.3327137231826782, 0.22259977459907532, 0.2262485921382904, -0.2896934747695923, -0.2636217176914215, 0.02272164821624756, 0.4546352028846741, -0.09844285994768143, 0.4749031960964203, -0.20931869745254517, -0.00789815466850996, -0.24047937989234924, -0.4546876549720764, 0.19821697473526, 0.2628900408744812, 0.20469176769256592, 0.5681546330451965, -0.052402082830667496, 0.21140000224113464, -0.1214851438999176, 0.04455278441309929, -0.19422738254070282, 0.315960168838501, -0.24666258692741394, 0.1947084665298462, -0.12007451802492142, -0.08764253556728363, 0.17673827707767487, 0.2731652855873108, 0.13015948235988617, 0.014686121605336666, -0.05775175616145134, -0.2914760708808899, 0.33169856667518616, -0.3273865878582001, -0.22627413272857666, -0.26012083888053894, 0.1576814502477646, 0.27393272519111633, 0.007945998571813107, -0.3225410282611847, -0.004778118804097176, 0.21030552685260773, -0.10842310637235641, -0.2817554473876953, 0.12433966994285583, -0.2277824729681015, -0.21898993849754333, 0.05769278109073639, 0.28230246901512146, 0.16165295243263245, -0.2715519368648529, 0.04422453045845032, -0.1925944685935974 ]
https://github.com/huggingface/datasets/issues/3122
OSError with a custom dataset loading script
Hi, there is a difference in how the `data_dir` is zipped between the `classla/janes_tag` and the `classla/reldi_hr` dataset. After unzipping, for the former, the data files (`*.conllup`) are in the root directory (root -> data files), and for the latter, they are inside the `data` directory (root -> `data` -> data files). This can be fixed by removing the `os.path.join` call in https://huggingface.co/datasets/classla/janes_tag/blob/main/janes_tag.py#L86 Let me know if this works for you.
## Describe the bug I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag. ## Steps to reproduce the bug ```python dataset = datasets.load_dataset('classla/janes_tag', split='validation') ``` ## Expected results Dataset correctly loaded. ## Actual results Traceback (most recent call last): File "C:/mypath/test.py", line 91, in <module> load_and_print('janes_tag') File "C:/mypath/test.py", line 32, in load_and_print dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation') File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset use_auth_token=use_auth_token, File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare ) from None OSError: Cannot find data file. Original error: [Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.14.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.5 - PyArrow version: 3.0.0
71
OSError with a custom dataset loading script
[ -0.5498795509338379, 0.1101144552230835, -0.15995876491069794, 0.1462833285331726, 0.012686347588896751, -0.1230233833193779, 0.36444297432899475, 0.20309527218341827, 0.5141556262969971, 0.21106010675430298, 0.01613457128405571, 0.2869116961956024, -0.23694944381713867, 0.3652254343032837, -0.17289529740810394, 0.1220061331987381, -0.2584579885005951, 0.33477774262428284, -0.2120210975408554, 0.07650529593229294, -0.3741838335990906, 0.29892903566360474, -0.13617457449436188, 0.14329402148723602, -0.0013518776977434754, 0.10101381689310074, -0.004811824299395084, 0.5213566422462463, -0.19459913671016693, -0.3859959840774536, 0.1465625911951065, 0.3437068462371826, 0.31471148133277893, 0.6336832642555237, -0.00010229679173789918, 0.08480056375265121, 0.1728350818157196, -0.15580926835536957, -0.25104057788848877, 0.07299672067165375, -0.04409501701593399, -0.08762809634208679, 0.07021769136190414, -0.2809644937515259, -0.03190283849835396, -0.11483444273471832, -0.1443280577659607, -0.4850696921348572, 0.17417852580547333, 0.3834567368030548, 0.31793785095214844, 0.140237495303154, -0.1514853835105896, -0.1924903839826584, 0.23451776802539825, 0.22624538838863373, 0.10778754949569702, 0.14628708362579346, 0.16964972019195557, -0.39345890283584595, -0.29566869139671326, -0.054902929812669754, -0.13317294418811798, 0.01919902302324772, 0.1254432201385498, -0.10466513782739639, 0.00790837686508894, 0.044653140008449554, 0.10712170600891113, 0.14473792910575867, 0.615746796131134, -0.19754113256931305, -0.15448641777038574, 0.09834901243448257, 0.019884446635842323, -0.26498594880104065, 0.14296267926692963, -0.01908682845532894, -0.10663915425539017, 0.18953493237495422, -0.0883406400680542, 0.0563434474170208, -0.37374410033226013, 0.23947760462760925, -0.21226239204406738, 0.13528455793857574, -0.1627195179462433, 0.023398496210575104, 0.0687641128897667, -0.16899210214614868, 0.23245497047901154, -0.07810767740011215, -0.03299693018198013, -0.05804360285401344, 0.019140006974339485, -0.10789630562067032, 0.05178660526871681, -0.02046842686831951, 0.16640737652778625, 0.029147202149033546, 0.20467476546764374, 0.24569128453731537, -0.11117143929004669, 0.01822265051305294, 0.4003259241580963, 0.07913925498723984, 0.27277588844299316, -0.06694313883781433, 0.30916827917099, 0.2957618236541748, -0.36134618520736694, 0.1163918673992157, -0.06462042778730392, -0.16161194443702698, 0.0666680634021759, -0.014157402329146862, 0.3413267135620117, -0.1414932906627655, -0.2869444787502289, 0.09568412601947784, 0.284859836101532, -0.23009710013866425, -0.0052700345404446125, 0.4281603693962097, 0.07780344784259796, -0.05454237386584282, 0.28668415546417236, 0.25284096598625183, -0.27060794830322266, -0.20696406066417694, -0.2386769950389862, 0.1608072817325592, 0.05782916769385338, 0.10951687395572662, 0.11727141588926315, 0.13323542475700378, 0.19050608575344086, -0.10627293586730957, 0.09341157972812653, -0.09237898886203766, 0.04522071033716202, 0.08199429512023926, -0.2257869988679886, 0.051772087812423706, 0.1418602615594864, -0.06069491431117058, 0.3566608726978302, -0.09744668751955032, 0.050094109028577805, 0.39518091082572937, -0.08743809163570404, -0.5536112785339355, -0.13492152094841003, 0.288261353969574, -0.24050211906433105, -0.18071751296520233, 0.024034935981035233, -0.04804012551903725, 0.31100594997406006, -0.23558463156223297, -0.27380019426345825, -0.17664092779159546, -0.4065297245979309, -0.24372121691703796, -0.10218727588653564, 0.5570875406265259, -0.6205301284790039, 0.18731117248535156, -0.2016880214214325, -0.16366486251354218, 0.06835682690143585, -0.0036182990297675133, -0.11034119129180908, 0.36224889755249023, -0.340431272983551, 0.09273764491081238, 0.18523825705051422, -0.2370663732290268, -0.20087294280529022, 0.30793726444244385, -0.09004885703325272, 0.05514869838953018, 0.08847101032733917, 0.0669640451669693, 0.2663058638572693, -0.07141128927469254, -0.05277840793132782, 0.1551441252231598, 0.08289507031440735, 0.014512545429170132, -0.10867151618003845, -0.02586616761982441, 0.1254085898399353, 0.30520492792129517, 0.025578586384654045, 0.25632980465888977, 0.11814949661493301, -0.30885860323905945, 0.16258789598941803, -0.0836360901594162, -0.09736412763595581, 0.2971195578575134, 0.09581411629915237, 0.1210155338048935, 0.04665147513151169, -0.07998498529195786, -0.43407562375068665, 0.05125958472490311, 0.2924964725971222, 0.05191081017255783, -0.10734525322914124, 0.02991573140025139, -0.4300056993961334, 0.2223185896873474, -0.1521223783493042, 0.043236006051301956, 0.19976751506328583, 0.20461499691009521, -0.15813739597797394, -0.04267220199108124, -0.33956533670425415, 0.07883798331022263, -0.16198931634426117, -0.0789729580283165, -0.3663361966609955, 0.14597545564174652, -0.01787588745355606, -0.31521183252334595, 0.2322174459695816, 0.12363352626562119, 0.1937350630760193, -0.19659484922885895, -0.13094156980514526, 0.3865371644496918, 0.33193978667259216, -0.21956627070903778, -0.06305468827486038, -0.11678079515695572, -0.18181607127189636, 0.02274526096880436, 0.25694477558135986, -0.009779021143913269, 0.017638064920902252, -0.12017686665058136, -0.24533702433109283, 0.4702824056148529, -0.2424357533454895, 0.011649354360997677, -0.019155023619532585, -0.051321350038051605, 0.2315111607313156, 0.06015967205166817, 0.04314425587654114, -0.4125494956970215, 0.08120429515838623, -0.027041202411055565, 0.16181626915931702, -0.07144367694854736, -0.04109049215912819, 0.05532791092991829, 0.38615331053733826, 0.07015080749988556, 0.16336791217327118, 0.09921147674322128, 0.08512445539236069, 0.02606463059782982, -0.05694990232586861, 0.13139520585536957, 0.5690463185310364, 0.2659406363964081, -0.3224318027496338, 0.17758828401565552, 0.1646326631307602, -0.14076897501945496, -0.022839536890387535, -0.14530055224895477, 0.15815748274326324, 0.2122849076986313, -0.15047933161258698, -0.1783219426870346, -0.20433060824871063, -0.41858258843421936, -0.1348259299993515, 0.3997027277946472, -0.39555567502975464, -0.14513172209262848, -0.2625043988227844, -0.013496761210262775, -0.0029256546404212713, -0.028762314468622208, -0.0739067941904068, -0.27837544679641724, 0.012301645241677761, 0.3573552668094635, -0.24095115065574646, 0.07811977714300156, -0.04169298708438873, 0.10841046273708344, 0.2927946448326111, -0.06652920693159103, 0.20379461348056793, -0.26761525869369507, -0.026624223217368126, 0.1363147348165512, 0.12165777385234833, 0.011305388994514942, 0.20864610373973846, -0.16559121012687683, 0.008771519176661968, -0.17542098462581635, -0.06722283363342285, 0.04947719722986221, 0.08233240246772766, -0.0313524566590786, 0.3418990969657898, 0.36452779173851013, 0.2780829071998596, -0.1613563448190689, 0.254838764667511, -0.2806725800037384, -0.08828606456518173, 0.2735346257686615, 0.21018585562705994, -0.08204440772533417, -0.14571814239025116, -0.3780829906463623, -0.12655307352542877, -0.48217737674713135, -0.1727256029844284, 0.24038149416446686, 0.31625211238861084, 0.11724307388067245, 0.34250280261039734, 0.00941512268036604, 0.20479311048984528, -0.12652651965618134, -0.10142763704061508, -0.3159228563308716, 0.28730136156082153, -0.3316669166088104, -0.29257628321647644, 0.09156610816717148, -0.04400809109210968, 0.17583657801151276, 0.055035561323165894, -0.4974479079246521, -0.17210230231285095, -0.032121021300554276, 0.16017724573612213, -0.2125433385372162, -0.050637099891901016, 0.21167878806591034, 0.09416543692350388, -0.15730690956115723, -0.23436753451824188, -0.3592979609966278, 0.1571885496377945, -0.0948508009314537, -0.11684384942054749, -0.0026355418376624584, 0.6506999135017395, -0.4674195349216461, 0.4451353847980499, -0.3357239365577698, -0.2066788226366043, 0.39069831371307373, -0.22326113283634186, 0.4533888101577759, -0.09724435210227966, -0.2350599616765976, -0.2637701630592346, 0.09472448378801346, -0.0832219272851944, 0.24260415136814117, -0.12613768875598907, 0.011556342244148254, -0.15800848603248596, 0.03222423791885376, -0.10622946172952652, -0.14993804693222046, 0.13628239929676056, 0.07193096727132797, -0.15510298311710358, -0.007721284404397011, 0.26672565937042236, -0.2557421028614044, 0.08067236095666885, -0.028285080567002296, 0.1319212019443512, 0.04803875461220741, -0.16486795246601105, -0.40035203099250793, 0.2981164753437042, -0.18752747774124146, 0.3486734628677368, -0.17231887578964233, 0.11954845488071442, -0.1795436143875122, -0.1626216620206833, -0.08883717656135559, -0.0630875900387764, 0.5444542765617371, -0.27472740411758423, 0.16761508584022522, 0.2166476994752884, -0.16120222210884094, -0.41398918628692627, -0.007912041619420052, -0.1299005150794983, 0.4807349443435669, 0.017601268365979195, 0.34145891666412354, -0.11150768399238586, -0.02010064758360386, 0.23667825758457184, 0.019540973007678986, -0.20927679538726807, -0.7513074278831482, -0.06075885146856308, -0.34268680214881897, -0.44358307123184204, -0.106058269739151, -0.10039225965738297, 0.17160215973854065, -0.18471060693264008, -0.021092815324664116, -0.06374377012252808, -0.17806242406368256, 0.07150758057832718, 0.07524773478507996, 0.13947470486164093, -0.07287314534187317, 0.1444968432188034, -0.10332862287759781, 0.07188409566879272, 0.4982222318649292, 0.6842489242553711, -0.17419403791427612, -0.42518654465675354, 0.21077628433704376, -0.21434158086776733, 0.09277748316526413, 0.15436843037605286, 0.07469535619020462, -0.08106813579797745, 0.03776666522026062, 0.03518373519182205, 0.11369549483060837, 0.17520996928215027, -0.03708131983876228, -0.18050533533096313, -0.19264590740203857, -0.35421109199523926, 0.11120932549238205, -0.14464740455150604, 0.01105264201760292, 0.05538708716630936, 0.026742111891508102, -0.06444838643074036, 0.5584973692893982, -0.13526464998722076, 0.6543348431587219, -0.18053984642028809, 0.12282568961381912, 0.48019394278526306, -0.0819086953997612, 0.18740354478359222, -0.1500018835067749, -0.1544673591852188, -0.6441856622695923, -0.23409634828567505, 0.13494060933589935, -0.06181048974394798, 0.1020570918917656, 0.3955109417438507, -0.17648983001708984, 0.018276682123541832, -0.1626490205526352, 0.16370302438735962, -0.05315617099404335, 0.3650483787059784, 0.05656805634498596, -0.22898153960704803, -0.24116584658622742, 0.23864048719406128, -0.05244573578238487, 0.12071986496448517, -0.15141020715236664, -0.042205359786748886, 0.1080622524023056, -0.2499493807554245, -0.025171561166644096, 0.29267847537994385, -0.11554040759801865, 0.11129485815763474, -0.2075197845697403, -0.12131694704294205, 0.06572313606739044, 0.35932454466819763, 0.05826166644692421, 0.08568823337554932, 0.08301229029893875, -0.035410575568675995, 0.12409397959709167, -0.09811775386333466, -0.08793686330318451, 0.03288920223712921, 0.1680632382631302, -0.12516169250011444, -0.27111729979515076, -0.025710806250572205, 0.11413852870464325, -0.30895060300827026, 0.14082804322242737, 0.18010111153125763, 0.024088768288493156, -0.6812116503715515, -0.35326871275901794, -0.2911854684352875, 0.053615596145391464, -0.11431221663951874, 0.21827268600463867, 0.2628057599067688, -0.10995670408010483, 0.3185694217681885, 0.0900137647986412, -0.27017489075660706, -0.15138788521289825, 0.3602035343647003, 0.06100776791572571, 0.020849836990237236, 0.5932807326316833, 0.3277461528778076, -0.020910050719976425, -0.4109756350517273, 0.10482234507799149, 0.44784075021743774, -0.22022682428359985, 0.16701403260231018, 0.0326838418841362, -0.07440774142742157, 0.2725341022014618, -0.03304089233279228, -0.051931362599134445, 0.1513824462890625, 0.11887481808662415, -0.43646639585494995, -0.35987788438796997, -0.007796827238053083, 0.15513375401496887, 0.23359061777591705, 0.14974242448806763, -0.19389735162258148, -0.27676570415496826, 0.1406383216381073, -0.4393044114112854, -0.007888639345765114, 0.11626554280519485, -0.11966218054294586, 0.3739352822303772, 0.12093383818864822, 0.007211459334939718, 0.011058500036597252, 0.2855364680290222, 0.003164369612932205, -0.11962348222732544, -0.3412726819515228, 0.024646077305078506, 0.08820626139640808, 0.02022375352680683, -0.17980538308620453, -0.0816577598452568, -0.23170478641986847, -0.17799797654151917, -0.0981641635298729, 0.05561298877000809, 0.2570113241672516, -0.1585550308227539, -0.12099882960319519, 0.20153743028640747, 0.13235755264759064, -0.1468091756105423, 0.23001928627490997, -0.15178315341472626, 0.4130310118198395, -0.05323845148086548, 0.06314601004123688, -0.17758406698703766, -0.16253486275672913, 0.2316177487373352, -0.06639458984136581, 0.13922369480133057, 0.25043654441833496, 0.2392825037240982, -0.5021193027496338, -0.004534566309303045, 0.08964162319898605, 0.3458186089992523, 0.22306488454341888, -0.30348166823387146, -0.1904323697090149, 0.03712700679898262, 0.2843429148197174, -0.14958426356315613, 0.024374721571803093, 0.5601712465286255, -0.11939974874258041, 0.03293551132082939, 0.42164739966392517, -0.04846201092004776, -0.05500637739896774, 0.08601844310760498, 0.031129276379942894, 0.48975762724876404, 0.2649720311164856, -0.09628451615571976, 0.03874695301055908, -0.522959291934967, -0.08324389159679413, 0.08304178714752197, 0.363137811422348, 0.06817369163036346, 0.5149304270744324, 0.05403989925980568, 0.18379482626914978, 0.14388693869113922, -0.10378313809633255, -0.06236233562231064, -0.6229856014251709, 0.3064017593860626, 0.20132185518741608, 0.1049651950597763, -0.04748047515749931, 0.10422798246145248, -0.0646800771355629, -0.1890130192041397, 0.2204408496618271, -0.121239572763443, -0.10715077817440033, -0.11260584741830826, 0.22980687022209167, -0.29087454080581665, -0.05500642955303192, -0.08653678745031357, -0.1392166018486023, -0.09735516458749771, -0.026988597586750984, -0.1785479187965393, -0.10702201724052429, -0.12159055471420288, -0.1209891140460968, 0.05734854191541672, -0.1459064930677414, -0.16122838854789734, -0.2328367829322815, 0.2663671672344208, 0.34189513325691223, 0.2653919458389282, 0.5269114971160889, -0.046094417572021484, 0.52843177318573, 0.41501137614250183, 0.004375309217721224, -0.030130749568343163, -0.12329285591840744, -0.13045746088027954, -0.08281510323286057, -0.0420374795794487, -0.09102663397789001, 0.35306695103645325, 0.4692038595676422, 0.2960480749607086, -0.17607873678207397, 0.09193871915340424, 0.5065836906433105, 0.04849295690655708, 0.036158476024866104, -0.2631460428237915, 0.14860595762729645, -0.14265309274196625, -0.17634491622447968, -0.029498320072889328, -0.2748565375804901, -0.3219071328639984, 0.17072638869285583, 0.21166709065437317, 0.24151761829853058, 0.06143660098314285, 0.1525278389453888, -0.17620599269866943, 0.4023228585720062, 0.2859143614768982, 0.18690024316310883, -0.21594977378845215, -0.11318653076887131, -0.5393012166023254, 0.2940543293952942, -0.105168916285038, -0.42155009508132935, -0.2145356833934784, 0.08086748421192169, 0.2461215704679489, -0.02812202461063862, 0.16035676002502441, -0.01856897957623005, -0.004333380609750748, 0.1409822404384613, -0.3757278025150299, -0.35321250557899475, 0.04022373631596565, 0.07105142623186111, 0.02474888041615486, -0.15407800674438477, -0.10635941475629807, -0.02917199395596981, 0.23087164759635925, -0.12257348746061325, -0.03682893514633179, -0.09169898182153702, -0.01159899216145277, 0.31304267048835754, -0.1330595314502716, 0.6163973212242126, -0.16078302264213562, 0.028663014993071556, -0.09625019133090973, -0.17540954053401947, -0.19771838188171387, 0.405049592256546, 0.44802963733673096, 0.33712059259414673, -0.0665978416800499, -0.15028034150600433, -0.19107963144779205, 0.30343249440193176, -0.18731532990932465, 0.18805481493473053, 0.0728510171175003, 0.2579596936702728, 0.11139728873968124, -0.13676917552947998, 0.011100227944552898, -0.09947662800550461, -0.0016508601838722825, 0.339689165353775, -0.055811118334531784, -0.13809873163700104, 0.49275821447372437, 0.018937448039650917, -0.3526231050491333, -0.07210005819797516, 0.10953934490680695, -0.2363547384738922, -0.05541933700442314, -0.272711843252182, 0.25071054697036743, 0.19059543311595917, -0.12796059250831604, 0.018277468159794807, 0.13522516191005707, -0.2598777115345001, 0.01618998497724533, 0.04080653563141823, 0.28788304328918457, 0.06758195906877518, -0.11657380312681198, -0.2597830891609192, -0.054234787821769714 ]
https://github.com/huggingface/datasets/issues/3122
OSError with a custom dataset loading script
Hi Mario, I had already tried that before, but it didn't work. I have now recreated the `classla/janes_tag` zip file so that it also contains the `data` directory, but I am still getting the same error.
## Describe the bug I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag. ## Steps to reproduce the bug ```python dataset = datasets.load_dataset('classla/janes_tag', split='validation') ``` ## Expected results Dataset correctly loaded. ## Actual results Traceback (most recent call last): File "C:/mypath/test.py", line 91, in <module> load_and_print('janes_tag') File "C:/mypath/test.py", line 32, in load_and_print dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation') File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset use_auth_token=use_auth_token, File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare ) from None OSError: Cannot find data file. Original error: [Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.14.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.5 - PyArrow version: 3.0.0
36
OSError with a custom dataset loading script
[ -0.5498795509338379, 0.1101144552230835, -0.15995876491069794, 0.1462833285331726, 0.012686347588896751, -0.1230233833193779, 0.36444297432899475, 0.20309527218341827, 0.5141556262969971, 0.21106010675430298, 0.01613457128405571, 0.2869116961956024, -0.23694944381713867, 0.3652254343032837, -0.17289529740810394, 0.1220061331987381, -0.2584579885005951, 0.33477774262428284, -0.2120210975408554, 0.07650529593229294, -0.3741838335990906, 0.29892903566360474, -0.13617457449436188, 0.14329402148723602, -0.0013518776977434754, 0.10101381689310074, -0.004811824299395084, 0.5213566422462463, -0.19459913671016693, -0.3859959840774536, 0.1465625911951065, 0.3437068462371826, 0.31471148133277893, 0.6336832642555237, -0.00010229679173789918, 0.08480056375265121, 0.1728350818157196, -0.15580926835536957, -0.25104057788848877, 0.07299672067165375, -0.04409501701593399, -0.08762809634208679, 0.07021769136190414, -0.2809644937515259, -0.03190283849835396, -0.11483444273471832, -0.1443280577659607, -0.4850696921348572, 0.17417852580547333, 0.3834567368030548, 0.31793785095214844, 0.140237495303154, -0.1514853835105896, -0.1924903839826584, 0.23451776802539825, 0.22624538838863373, 0.10778754949569702, 0.14628708362579346, 0.16964972019195557, -0.39345890283584595, -0.29566869139671326, -0.054902929812669754, -0.13317294418811798, 0.01919902302324772, 0.1254432201385498, -0.10466513782739639, 0.00790837686508894, 0.044653140008449554, 0.10712170600891113, 0.14473792910575867, 0.615746796131134, -0.19754113256931305, -0.15448641777038574, 0.09834901243448257, 0.019884446635842323, -0.26498594880104065, 0.14296267926692963, -0.01908682845532894, -0.10663915425539017, 0.18953493237495422, -0.0883406400680542, 0.0563434474170208, -0.37374410033226013, 0.23947760462760925, -0.21226239204406738, 0.13528455793857574, -0.1627195179462433, 0.023398496210575104, 0.0687641128897667, -0.16899210214614868, 0.23245497047901154, -0.07810767740011215, -0.03299693018198013, -0.05804360285401344, 0.019140006974339485, -0.10789630562067032, 0.05178660526871681, -0.02046842686831951, 0.16640737652778625, 0.029147202149033546, 0.20467476546764374, 0.24569128453731537, -0.11117143929004669, 0.01822265051305294, 0.4003259241580963, 0.07913925498723984, 0.27277588844299316, -0.06694313883781433, 0.30916827917099, 0.2957618236541748, -0.36134618520736694, 0.1163918673992157, -0.06462042778730392, -0.16161194443702698, 0.0666680634021759, -0.014157402329146862, 0.3413267135620117, -0.1414932906627655, -0.2869444787502289, 0.09568412601947784, 0.284859836101532, -0.23009710013866425, -0.0052700345404446125, 0.4281603693962097, 0.07780344784259796, -0.05454237386584282, 0.28668415546417236, 0.25284096598625183, -0.27060794830322266, -0.20696406066417694, -0.2386769950389862, 0.1608072817325592, 0.05782916769385338, 0.10951687395572662, 0.11727141588926315, 0.13323542475700378, 0.19050608575344086, -0.10627293586730957, 0.09341157972812653, -0.09237898886203766, 0.04522071033716202, 0.08199429512023926, -0.2257869988679886, 0.051772087812423706, 0.1418602615594864, -0.06069491431117058, 0.3566608726978302, -0.09744668751955032, 0.050094109028577805, 0.39518091082572937, -0.08743809163570404, -0.5536112785339355, -0.13492152094841003, 0.288261353969574, -0.24050211906433105, -0.18071751296520233, 0.024034935981035233, -0.04804012551903725, 0.31100594997406006, -0.23558463156223297, -0.27380019426345825, -0.17664092779159546, -0.4065297245979309, -0.24372121691703796, -0.10218727588653564, 0.5570875406265259, -0.6205301284790039, 0.18731117248535156, -0.2016880214214325, -0.16366486251354218, 0.06835682690143585, -0.0036182990297675133, -0.11034119129180908, 0.36224889755249023, -0.340431272983551, 0.09273764491081238, 0.18523825705051422, -0.2370663732290268, -0.20087294280529022, 0.30793726444244385, -0.09004885703325272, 0.05514869838953018, 0.08847101032733917, 0.0669640451669693, 0.2663058638572693, -0.07141128927469254, -0.05277840793132782, 0.1551441252231598, 0.08289507031440735, 0.014512545429170132, -0.10867151618003845, -0.02586616761982441, 0.1254085898399353, 0.30520492792129517, 0.025578586384654045, 0.25632980465888977, 0.11814949661493301, -0.30885860323905945, 0.16258789598941803, -0.0836360901594162, -0.09736412763595581, 0.2971195578575134, 0.09581411629915237, 0.1210155338048935, 0.04665147513151169, -0.07998498529195786, -0.43407562375068665, 0.05125958472490311, 0.2924964725971222, 0.05191081017255783, -0.10734525322914124, 0.02991573140025139, -0.4300056993961334, 0.2223185896873474, -0.1521223783493042, 0.043236006051301956, 0.19976751506328583, 0.20461499691009521, -0.15813739597797394, -0.04267220199108124, -0.33956533670425415, 0.07883798331022263, -0.16198931634426117, -0.0789729580283165, -0.3663361966609955, 0.14597545564174652, -0.01787588745355606, -0.31521183252334595, 0.2322174459695816, 0.12363352626562119, 0.1937350630760193, -0.19659484922885895, -0.13094156980514526, 0.3865371644496918, 0.33193978667259216, -0.21956627070903778, -0.06305468827486038, -0.11678079515695572, -0.18181607127189636, 0.02274526096880436, 0.25694477558135986, -0.009779021143913269, 0.017638064920902252, -0.12017686665058136, -0.24533702433109283, 0.4702824056148529, -0.2424357533454895, 0.011649354360997677, -0.019155023619532585, -0.051321350038051605, 0.2315111607313156, 0.06015967205166817, 0.04314425587654114, -0.4125494956970215, 0.08120429515838623, -0.027041202411055565, 0.16181626915931702, -0.07144367694854736, -0.04109049215912819, 0.05532791092991829, 0.38615331053733826, 0.07015080749988556, 0.16336791217327118, 0.09921147674322128, 0.08512445539236069, 0.02606463059782982, -0.05694990232586861, 0.13139520585536957, 0.5690463185310364, 0.2659406363964081, -0.3224318027496338, 0.17758828401565552, 0.1646326631307602, -0.14076897501945496, -0.022839536890387535, -0.14530055224895477, 0.15815748274326324, 0.2122849076986313, -0.15047933161258698, -0.1783219426870346, -0.20433060824871063, -0.41858258843421936, -0.1348259299993515, 0.3997027277946472, -0.39555567502975464, -0.14513172209262848, -0.2625043988227844, -0.013496761210262775, -0.0029256546404212713, -0.028762314468622208, -0.0739067941904068, -0.27837544679641724, 0.012301645241677761, 0.3573552668094635, -0.24095115065574646, 0.07811977714300156, -0.04169298708438873, 0.10841046273708344, 0.2927946448326111, -0.06652920693159103, 0.20379461348056793, -0.26761525869369507, -0.026624223217368126, 0.1363147348165512, 0.12165777385234833, 0.011305388994514942, 0.20864610373973846, -0.16559121012687683, 0.008771519176661968, -0.17542098462581635, -0.06722283363342285, 0.04947719722986221, 0.08233240246772766, -0.0313524566590786, 0.3418990969657898, 0.36452779173851013, 0.2780829071998596, -0.1613563448190689, 0.254838764667511, -0.2806725800037384, -0.08828606456518173, 0.2735346257686615, 0.21018585562705994, -0.08204440772533417, -0.14571814239025116, -0.3780829906463623, -0.12655307352542877, -0.48217737674713135, -0.1727256029844284, 0.24038149416446686, 0.31625211238861084, 0.11724307388067245, 0.34250280261039734, 0.00941512268036604, 0.20479311048984528, -0.12652651965618134, -0.10142763704061508, -0.3159228563308716, 0.28730136156082153, -0.3316669166088104, -0.29257628321647644, 0.09156610816717148, -0.04400809109210968, 0.17583657801151276, 0.055035561323165894, -0.4974479079246521, -0.17210230231285095, -0.032121021300554276, 0.16017724573612213, -0.2125433385372162, -0.050637099891901016, 0.21167878806591034, 0.09416543692350388, -0.15730690956115723, -0.23436753451824188, -0.3592979609966278, 0.1571885496377945, -0.0948508009314537, -0.11684384942054749, -0.0026355418376624584, 0.6506999135017395, -0.4674195349216461, 0.4451353847980499, -0.3357239365577698, -0.2066788226366043, 0.39069831371307373, -0.22326113283634186, 0.4533888101577759, -0.09724435210227966, -0.2350599616765976, -0.2637701630592346, 0.09472448378801346, -0.0832219272851944, 0.24260415136814117, -0.12613768875598907, 0.011556342244148254, -0.15800848603248596, 0.03222423791885376, -0.10622946172952652, -0.14993804693222046, 0.13628239929676056, 0.07193096727132797, -0.15510298311710358, -0.007721284404397011, 0.26672565937042236, -0.2557421028614044, 0.08067236095666885, -0.028285080567002296, 0.1319212019443512, 0.04803875461220741, -0.16486795246601105, -0.40035203099250793, 0.2981164753437042, -0.18752747774124146, 0.3486734628677368, -0.17231887578964233, 0.11954845488071442, -0.1795436143875122, -0.1626216620206833, -0.08883717656135559, -0.0630875900387764, 0.5444542765617371, -0.27472740411758423, 0.16761508584022522, 0.2166476994752884, -0.16120222210884094, -0.41398918628692627, -0.007912041619420052, -0.1299005150794983, 0.4807349443435669, 0.017601268365979195, 0.34145891666412354, -0.11150768399238586, -0.02010064758360386, 0.23667825758457184, 0.019540973007678986, -0.20927679538726807, -0.7513074278831482, -0.06075885146856308, -0.34268680214881897, -0.44358307123184204, -0.106058269739151, -0.10039225965738297, 0.17160215973854065, -0.18471060693264008, -0.021092815324664116, -0.06374377012252808, -0.17806242406368256, 0.07150758057832718, 0.07524773478507996, 0.13947470486164093, -0.07287314534187317, 0.1444968432188034, -0.10332862287759781, 0.07188409566879272, 0.4982222318649292, 0.6842489242553711, -0.17419403791427612, -0.42518654465675354, 0.21077628433704376, -0.21434158086776733, 0.09277748316526413, 0.15436843037605286, 0.07469535619020462, -0.08106813579797745, 0.03776666522026062, 0.03518373519182205, 0.11369549483060837, 0.17520996928215027, -0.03708131983876228, -0.18050533533096313, -0.19264590740203857, -0.35421109199523926, 0.11120932549238205, -0.14464740455150604, 0.01105264201760292, 0.05538708716630936, 0.026742111891508102, -0.06444838643074036, 0.5584973692893982, -0.13526464998722076, 0.6543348431587219, -0.18053984642028809, 0.12282568961381912, 0.48019394278526306, -0.0819086953997612, 0.18740354478359222, -0.1500018835067749, -0.1544673591852188, -0.6441856622695923, -0.23409634828567505, 0.13494060933589935, -0.06181048974394798, 0.1020570918917656, 0.3955109417438507, -0.17648983001708984, 0.018276682123541832, -0.1626490205526352, 0.16370302438735962, -0.05315617099404335, 0.3650483787059784, 0.05656805634498596, -0.22898153960704803, -0.24116584658622742, 0.23864048719406128, -0.05244573578238487, 0.12071986496448517, -0.15141020715236664, -0.042205359786748886, 0.1080622524023056, -0.2499493807554245, -0.025171561166644096, 0.29267847537994385, -0.11554040759801865, 0.11129485815763474, -0.2075197845697403, -0.12131694704294205, 0.06572313606739044, 0.35932454466819763, 0.05826166644692421, 0.08568823337554932, 0.08301229029893875, -0.035410575568675995, 0.12409397959709167, -0.09811775386333466, -0.08793686330318451, 0.03288920223712921, 0.1680632382631302, -0.12516169250011444, -0.27111729979515076, -0.025710806250572205, 0.11413852870464325, -0.30895060300827026, 0.14082804322242737, 0.18010111153125763, 0.024088768288493156, -0.6812116503715515, -0.35326871275901794, -0.2911854684352875, 0.053615596145391464, -0.11431221663951874, 0.21827268600463867, 0.2628057599067688, -0.10995670408010483, 0.3185694217681885, 0.0900137647986412, -0.27017489075660706, -0.15138788521289825, 0.3602035343647003, 0.06100776791572571, 0.020849836990237236, 0.5932807326316833, 0.3277461528778076, -0.020910050719976425, -0.4109756350517273, 0.10482234507799149, 0.44784075021743774, -0.22022682428359985, 0.16701403260231018, 0.0326838418841362, -0.07440774142742157, 0.2725341022014618, -0.03304089233279228, -0.051931362599134445, 0.1513824462890625, 0.11887481808662415, -0.43646639585494995, -0.35987788438796997, -0.007796827238053083, 0.15513375401496887, 0.23359061777591705, 0.14974242448806763, -0.19389735162258148, -0.27676570415496826, 0.1406383216381073, -0.4393044114112854, -0.007888639345765114, 0.11626554280519485, -0.11966218054294586, 0.3739352822303772, 0.12093383818864822, 0.007211459334939718, 0.011058500036597252, 0.2855364680290222, 0.003164369612932205, -0.11962348222732544, -0.3412726819515228, 0.024646077305078506, 0.08820626139640808, 0.02022375352680683, -0.17980538308620453, -0.0816577598452568, -0.23170478641986847, -0.17799797654151917, -0.0981641635298729, 0.05561298877000809, 0.2570113241672516, -0.1585550308227539, -0.12099882960319519, 0.20153743028640747, 0.13235755264759064, -0.1468091756105423, 0.23001928627490997, -0.15178315341472626, 0.4130310118198395, -0.05323845148086548, 0.06314601004123688, -0.17758406698703766, -0.16253486275672913, 0.2316177487373352, -0.06639458984136581, 0.13922369480133057, 0.25043654441833496, 0.2392825037240982, -0.5021193027496338, -0.004534566309303045, 0.08964162319898605, 0.3458186089992523, 0.22306488454341888, -0.30348166823387146, -0.1904323697090149, 0.03712700679898262, 0.2843429148197174, -0.14958426356315613, 0.024374721571803093, 0.5601712465286255, -0.11939974874258041, 0.03293551132082939, 0.42164739966392517, -0.04846201092004776, -0.05500637739896774, 0.08601844310760498, 0.031129276379942894, 0.48975762724876404, 0.2649720311164856, -0.09628451615571976, 0.03874695301055908, -0.522959291934967, -0.08324389159679413, 0.08304178714752197, 0.363137811422348, 0.06817369163036346, 0.5149304270744324, 0.05403989925980568, 0.18379482626914978, 0.14388693869113922, -0.10378313809633255, -0.06236233562231064, -0.6229856014251709, 0.3064017593860626, 0.20132185518741608, 0.1049651950597763, -0.04748047515749931, 0.10422798246145248, -0.0646800771355629, -0.1890130192041397, 0.2204408496618271, -0.121239572763443, -0.10715077817440033, -0.11260584741830826, 0.22980687022209167, -0.29087454080581665, -0.05500642955303192, -0.08653678745031357, -0.1392166018486023, -0.09735516458749771, -0.026988597586750984, -0.1785479187965393, -0.10702201724052429, -0.12159055471420288, -0.1209891140460968, 0.05734854191541672, -0.1459064930677414, -0.16122838854789734, -0.2328367829322815, 0.2663671672344208, 0.34189513325691223, 0.2653919458389282, 0.5269114971160889, -0.046094417572021484, 0.52843177318573, 0.41501137614250183, 0.004375309217721224, -0.030130749568343163, -0.12329285591840744, -0.13045746088027954, -0.08281510323286057, -0.0420374795794487, -0.09102663397789001, 0.35306695103645325, 0.4692038595676422, 0.2960480749607086, -0.17607873678207397, 0.09193871915340424, 0.5065836906433105, 0.04849295690655708, 0.036158476024866104, -0.2631460428237915, 0.14860595762729645, -0.14265309274196625, -0.17634491622447968, -0.029498320072889328, -0.2748565375804901, -0.3219071328639984, 0.17072638869285583, 0.21166709065437317, 0.24151761829853058, 0.06143660098314285, 0.1525278389453888, -0.17620599269866943, 0.4023228585720062, 0.2859143614768982, 0.18690024316310883, -0.21594977378845215, -0.11318653076887131, -0.5393012166023254, 0.2940543293952942, -0.105168916285038, -0.42155009508132935, -0.2145356833934784, 0.08086748421192169, 0.2461215704679489, -0.02812202461063862, 0.16035676002502441, -0.01856897957623005, -0.004333380609750748, 0.1409822404384613, -0.3757278025150299, -0.35321250557899475, 0.04022373631596565, 0.07105142623186111, 0.02474888041615486, -0.15407800674438477, -0.10635941475629807, -0.02917199395596981, 0.23087164759635925, -0.12257348746061325, -0.03682893514633179, -0.09169898182153702, -0.01159899216145277, 0.31304267048835754, -0.1330595314502716, 0.6163973212242126, -0.16078302264213562, 0.028663014993071556, -0.09625019133090973, -0.17540954053401947, -0.19771838188171387, 0.405049592256546, 0.44802963733673096, 0.33712059259414673, -0.0665978416800499, -0.15028034150600433, -0.19107963144779205, 0.30343249440193176, -0.18731532990932465, 0.18805481493473053, 0.0728510171175003, 0.2579596936702728, 0.11139728873968124, -0.13676917552947998, 0.011100227944552898, -0.09947662800550461, -0.0016508601838722825, 0.339689165353775, -0.055811118334531784, -0.13809873163700104, 0.49275821447372437, 0.018937448039650917, -0.3526231050491333, -0.07210005819797516, 0.10953934490680695, -0.2363547384738922, -0.05541933700442314, -0.272711843252182, 0.25071054697036743, 0.19059543311595917, -0.12796059250831604, 0.018277468159794807, 0.13522516191005707, -0.2598777115345001, 0.01618998497724533, 0.04080653563141823, 0.28788304328918457, 0.06758195906877518, -0.11657380312681198, -0.2597830891609192, -0.054234787821769714 ]
https://github.com/huggingface/datasets/issues/3122
OSError with a custom dataset loading script
Hi, I just tried to download the `classla/janes_tag` dataset, and this time the zip file is extracted correctly. However, the script is now throwing the IndexError, probably due to a bug in the `_generate_examples`. Let me know if you are still getting the same error.
## Describe the bug I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag. ## Steps to reproduce the bug ```python dataset = datasets.load_dataset('classla/janes_tag', split='validation') ``` ## Expected results Dataset correctly loaded. ## Actual results Traceback (most recent call last): File "C:/mypath/test.py", line 91, in <module> load_and_print('janes_tag') File "C:/mypath/test.py", line 32, in load_and_print dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation') File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset use_auth_token=use_auth_token, File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare ) from None OSError: Cannot find data file. Original error: [Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.14.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.5 - PyArrow version: 3.0.0
45
OSError with a custom dataset loading script
[ -0.5498795509338379, 0.1101144552230835, -0.15995876491069794, 0.1462833285331726, 0.012686347588896751, -0.1230233833193779, 0.36444297432899475, 0.20309527218341827, 0.5141556262969971, 0.21106010675430298, 0.01613457128405571, 0.2869116961956024, -0.23694944381713867, 0.3652254343032837, -0.17289529740810394, 0.1220061331987381, -0.2584579885005951, 0.33477774262428284, -0.2120210975408554, 0.07650529593229294, -0.3741838335990906, 0.29892903566360474, -0.13617457449436188, 0.14329402148723602, -0.0013518776977434754, 0.10101381689310074, -0.004811824299395084, 0.5213566422462463, -0.19459913671016693, -0.3859959840774536, 0.1465625911951065, 0.3437068462371826, 0.31471148133277893, 0.6336832642555237, -0.00010229679173789918, 0.08480056375265121, 0.1728350818157196, -0.15580926835536957, -0.25104057788848877, 0.07299672067165375, -0.04409501701593399, -0.08762809634208679, 0.07021769136190414, -0.2809644937515259, -0.03190283849835396, -0.11483444273471832, -0.1443280577659607, -0.4850696921348572, 0.17417852580547333, 0.3834567368030548, 0.31793785095214844, 0.140237495303154, -0.1514853835105896, -0.1924903839826584, 0.23451776802539825, 0.22624538838863373, 0.10778754949569702, 0.14628708362579346, 0.16964972019195557, -0.39345890283584595, -0.29566869139671326, -0.054902929812669754, -0.13317294418811798, 0.01919902302324772, 0.1254432201385498, -0.10466513782739639, 0.00790837686508894, 0.044653140008449554, 0.10712170600891113, 0.14473792910575867, 0.615746796131134, -0.19754113256931305, -0.15448641777038574, 0.09834901243448257, 0.019884446635842323, -0.26498594880104065, 0.14296267926692963, -0.01908682845532894, -0.10663915425539017, 0.18953493237495422, -0.0883406400680542, 0.0563434474170208, -0.37374410033226013, 0.23947760462760925, -0.21226239204406738, 0.13528455793857574, -0.1627195179462433, 0.023398496210575104, 0.0687641128897667, -0.16899210214614868, 0.23245497047901154, -0.07810767740011215, -0.03299693018198013, -0.05804360285401344, 0.019140006974339485, -0.10789630562067032, 0.05178660526871681, -0.02046842686831951, 0.16640737652778625, 0.029147202149033546, 0.20467476546764374, 0.24569128453731537, -0.11117143929004669, 0.01822265051305294, 0.4003259241580963, 0.07913925498723984, 0.27277588844299316, -0.06694313883781433, 0.30916827917099, 0.2957618236541748, -0.36134618520736694, 0.1163918673992157, -0.06462042778730392, -0.16161194443702698, 0.0666680634021759, -0.014157402329146862, 0.3413267135620117, -0.1414932906627655, -0.2869444787502289, 0.09568412601947784, 0.284859836101532, -0.23009710013866425, -0.0052700345404446125, 0.4281603693962097, 0.07780344784259796, -0.05454237386584282, 0.28668415546417236, 0.25284096598625183, -0.27060794830322266, -0.20696406066417694, -0.2386769950389862, 0.1608072817325592, 0.05782916769385338, 0.10951687395572662, 0.11727141588926315, 0.13323542475700378, 0.19050608575344086, -0.10627293586730957, 0.09341157972812653, -0.09237898886203766, 0.04522071033716202, 0.08199429512023926, -0.2257869988679886, 0.051772087812423706, 0.1418602615594864, -0.06069491431117058, 0.3566608726978302, -0.09744668751955032, 0.050094109028577805, 0.39518091082572937, -0.08743809163570404, -0.5536112785339355, -0.13492152094841003, 0.288261353969574, -0.24050211906433105, -0.18071751296520233, 0.024034935981035233, -0.04804012551903725, 0.31100594997406006, -0.23558463156223297, -0.27380019426345825, -0.17664092779159546, -0.4065297245979309, -0.24372121691703796, -0.10218727588653564, 0.5570875406265259, -0.6205301284790039, 0.18731117248535156, -0.2016880214214325, -0.16366486251354218, 0.06835682690143585, -0.0036182990297675133, -0.11034119129180908, 0.36224889755249023, -0.340431272983551, 0.09273764491081238, 0.18523825705051422, -0.2370663732290268, -0.20087294280529022, 0.30793726444244385, -0.09004885703325272, 0.05514869838953018, 0.08847101032733917, 0.0669640451669693, 0.2663058638572693, -0.07141128927469254, -0.05277840793132782, 0.1551441252231598, 0.08289507031440735, 0.014512545429170132, -0.10867151618003845, -0.02586616761982441, 0.1254085898399353, 0.30520492792129517, 0.025578586384654045, 0.25632980465888977, 0.11814949661493301, -0.30885860323905945, 0.16258789598941803, -0.0836360901594162, -0.09736412763595581, 0.2971195578575134, 0.09581411629915237, 0.1210155338048935, 0.04665147513151169, -0.07998498529195786, -0.43407562375068665, 0.05125958472490311, 0.2924964725971222, 0.05191081017255783, -0.10734525322914124, 0.02991573140025139, -0.4300056993961334, 0.2223185896873474, -0.1521223783493042, 0.043236006051301956, 0.19976751506328583, 0.20461499691009521, -0.15813739597797394, -0.04267220199108124, -0.33956533670425415, 0.07883798331022263, -0.16198931634426117, -0.0789729580283165, -0.3663361966609955, 0.14597545564174652, -0.01787588745355606, -0.31521183252334595, 0.2322174459695816, 0.12363352626562119, 0.1937350630760193, -0.19659484922885895, -0.13094156980514526, 0.3865371644496918, 0.33193978667259216, -0.21956627070903778, -0.06305468827486038, -0.11678079515695572, -0.18181607127189636, 0.02274526096880436, 0.25694477558135986, -0.009779021143913269, 0.017638064920902252, -0.12017686665058136, -0.24533702433109283, 0.4702824056148529, -0.2424357533454895, 0.011649354360997677, -0.019155023619532585, -0.051321350038051605, 0.2315111607313156, 0.06015967205166817, 0.04314425587654114, -0.4125494956970215, 0.08120429515838623, -0.027041202411055565, 0.16181626915931702, -0.07144367694854736, -0.04109049215912819, 0.05532791092991829, 0.38615331053733826, 0.07015080749988556, 0.16336791217327118, 0.09921147674322128, 0.08512445539236069, 0.02606463059782982, -0.05694990232586861, 0.13139520585536957, 0.5690463185310364, 0.2659406363964081, -0.3224318027496338, 0.17758828401565552, 0.1646326631307602, -0.14076897501945496, -0.022839536890387535, -0.14530055224895477, 0.15815748274326324, 0.2122849076986313, -0.15047933161258698, -0.1783219426870346, -0.20433060824871063, -0.41858258843421936, -0.1348259299993515, 0.3997027277946472, -0.39555567502975464, -0.14513172209262848, -0.2625043988227844, -0.013496761210262775, -0.0029256546404212713, -0.028762314468622208, -0.0739067941904068, -0.27837544679641724, 0.012301645241677761, 0.3573552668094635, -0.24095115065574646, 0.07811977714300156, -0.04169298708438873, 0.10841046273708344, 0.2927946448326111, -0.06652920693159103, 0.20379461348056793, -0.26761525869369507, -0.026624223217368126, 0.1363147348165512, 0.12165777385234833, 0.011305388994514942, 0.20864610373973846, -0.16559121012687683, 0.008771519176661968, -0.17542098462581635, -0.06722283363342285, 0.04947719722986221, 0.08233240246772766, -0.0313524566590786, 0.3418990969657898, 0.36452779173851013, 0.2780829071998596, -0.1613563448190689, 0.254838764667511, -0.2806725800037384, -0.08828606456518173, 0.2735346257686615, 0.21018585562705994, -0.08204440772533417, -0.14571814239025116, -0.3780829906463623, -0.12655307352542877, -0.48217737674713135, -0.1727256029844284, 0.24038149416446686, 0.31625211238861084, 0.11724307388067245, 0.34250280261039734, 0.00941512268036604, 0.20479311048984528, -0.12652651965618134, -0.10142763704061508, -0.3159228563308716, 0.28730136156082153, -0.3316669166088104, -0.29257628321647644, 0.09156610816717148, -0.04400809109210968, 0.17583657801151276, 0.055035561323165894, -0.4974479079246521, -0.17210230231285095, -0.032121021300554276, 0.16017724573612213, -0.2125433385372162, -0.050637099891901016, 0.21167878806591034, 0.09416543692350388, -0.15730690956115723, -0.23436753451824188, -0.3592979609966278, 0.1571885496377945, -0.0948508009314537, -0.11684384942054749, -0.0026355418376624584, 0.6506999135017395, -0.4674195349216461, 0.4451353847980499, -0.3357239365577698, -0.2066788226366043, 0.39069831371307373, -0.22326113283634186, 0.4533888101577759, -0.09724435210227966, -0.2350599616765976, -0.2637701630592346, 0.09472448378801346, -0.0832219272851944, 0.24260415136814117, -0.12613768875598907, 0.011556342244148254, -0.15800848603248596, 0.03222423791885376, -0.10622946172952652, -0.14993804693222046, 0.13628239929676056, 0.07193096727132797, -0.15510298311710358, -0.007721284404397011, 0.26672565937042236, -0.2557421028614044, 0.08067236095666885, -0.028285080567002296, 0.1319212019443512, 0.04803875461220741, -0.16486795246601105, -0.40035203099250793, 0.2981164753437042, -0.18752747774124146, 0.3486734628677368, -0.17231887578964233, 0.11954845488071442, -0.1795436143875122, -0.1626216620206833, -0.08883717656135559, -0.0630875900387764, 0.5444542765617371, -0.27472740411758423, 0.16761508584022522, 0.2166476994752884, -0.16120222210884094, -0.41398918628692627, -0.007912041619420052, -0.1299005150794983, 0.4807349443435669, 0.017601268365979195, 0.34145891666412354, -0.11150768399238586, -0.02010064758360386, 0.23667825758457184, 0.019540973007678986, -0.20927679538726807, -0.7513074278831482, -0.06075885146856308, -0.34268680214881897, -0.44358307123184204, -0.106058269739151, -0.10039225965738297, 0.17160215973854065, -0.18471060693264008, -0.021092815324664116, -0.06374377012252808, -0.17806242406368256, 0.07150758057832718, 0.07524773478507996, 0.13947470486164093, -0.07287314534187317, 0.1444968432188034, -0.10332862287759781, 0.07188409566879272, 0.4982222318649292, 0.6842489242553711, -0.17419403791427612, -0.42518654465675354, 0.21077628433704376, -0.21434158086776733, 0.09277748316526413, 0.15436843037605286, 0.07469535619020462, -0.08106813579797745, 0.03776666522026062, 0.03518373519182205, 0.11369549483060837, 0.17520996928215027, -0.03708131983876228, -0.18050533533096313, -0.19264590740203857, -0.35421109199523926, 0.11120932549238205, -0.14464740455150604, 0.01105264201760292, 0.05538708716630936, 0.026742111891508102, -0.06444838643074036, 0.5584973692893982, -0.13526464998722076, 0.6543348431587219, -0.18053984642028809, 0.12282568961381912, 0.48019394278526306, -0.0819086953997612, 0.18740354478359222, -0.1500018835067749, -0.1544673591852188, -0.6441856622695923, -0.23409634828567505, 0.13494060933589935, -0.06181048974394798, 0.1020570918917656, 0.3955109417438507, -0.17648983001708984, 0.018276682123541832, -0.1626490205526352, 0.16370302438735962, -0.05315617099404335, 0.3650483787059784, 0.05656805634498596, -0.22898153960704803, -0.24116584658622742, 0.23864048719406128, -0.05244573578238487, 0.12071986496448517, -0.15141020715236664, -0.042205359786748886, 0.1080622524023056, -0.2499493807554245, -0.025171561166644096, 0.29267847537994385, -0.11554040759801865, 0.11129485815763474, -0.2075197845697403, -0.12131694704294205, 0.06572313606739044, 0.35932454466819763, 0.05826166644692421, 0.08568823337554932, 0.08301229029893875, -0.035410575568675995, 0.12409397959709167, -0.09811775386333466, -0.08793686330318451, 0.03288920223712921, 0.1680632382631302, -0.12516169250011444, -0.27111729979515076, -0.025710806250572205, 0.11413852870464325, -0.30895060300827026, 0.14082804322242737, 0.18010111153125763, 0.024088768288493156, -0.6812116503715515, -0.35326871275901794, -0.2911854684352875, 0.053615596145391464, -0.11431221663951874, 0.21827268600463867, 0.2628057599067688, -0.10995670408010483, 0.3185694217681885, 0.0900137647986412, -0.27017489075660706, -0.15138788521289825, 0.3602035343647003, 0.06100776791572571, 0.020849836990237236, 0.5932807326316833, 0.3277461528778076, -0.020910050719976425, -0.4109756350517273, 0.10482234507799149, 0.44784075021743774, -0.22022682428359985, 0.16701403260231018, 0.0326838418841362, -0.07440774142742157, 0.2725341022014618, -0.03304089233279228, -0.051931362599134445, 0.1513824462890625, 0.11887481808662415, -0.43646639585494995, -0.35987788438796997, -0.007796827238053083, 0.15513375401496887, 0.23359061777591705, 0.14974242448806763, -0.19389735162258148, -0.27676570415496826, 0.1406383216381073, -0.4393044114112854, -0.007888639345765114, 0.11626554280519485, -0.11966218054294586, 0.3739352822303772, 0.12093383818864822, 0.007211459334939718, 0.011058500036597252, 0.2855364680290222, 0.003164369612932205, -0.11962348222732544, -0.3412726819515228, 0.024646077305078506, 0.08820626139640808, 0.02022375352680683, -0.17980538308620453, -0.0816577598452568, -0.23170478641986847, -0.17799797654151917, -0.0981641635298729, 0.05561298877000809, 0.2570113241672516, -0.1585550308227539, -0.12099882960319519, 0.20153743028640747, 0.13235755264759064, -0.1468091756105423, 0.23001928627490997, -0.15178315341472626, 0.4130310118198395, -0.05323845148086548, 0.06314601004123688, -0.17758406698703766, -0.16253486275672913, 0.2316177487373352, -0.06639458984136581, 0.13922369480133057, 0.25043654441833496, 0.2392825037240982, -0.5021193027496338, -0.004534566309303045, 0.08964162319898605, 0.3458186089992523, 0.22306488454341888, -0.30348166823387146, -0.1904323697090149, 0.03712700679898262, 0.2843429148197174, -0.14958426356315613, 0.024374721571803093, 0.5601712465286255, -0.11939974874258041, 0.03293551132082939, 0.42164739966392517, -0.04846201092004776, -0.05500637739896774, 0.08601844310760498, 0.031129276379942894, 0.48975762724876404, 0.2649720311164856, -0.09628451615571976, 0.03874695301055908, -0.522959291934967, -0.08324389159679413, 0.08304178714752197, 0.363137811422348, 0.06817369163036346, 0.5149304270744324, 0.05403989925980568, 0.18379482626914978, 0.14388693869113922, -0.10378313809633255, -0.06236233562231064, -0.6229856014251709, 0.3064017593860626, 0.20132185518741608, 0.1049651950597763, -0.04748047515749931, 0.10422798246145248, -0.0646800771355629, -0.1890130192041397, 0.2204408496618271, -0.121239572763443, -0.10715077817440033, -0.11260584741830826, 0.22980687022209167, -0.29087454080581665, -0.05500642955303192, -0.08653678745031357, -0.1392166018486023, -0.09735516458749771, -0.026988597586750984, -0.1785479187965393, -0.10702201724052429, -0.12159055471420288, -0.1209891140460968, 0.05734854191541672, -0.1459064930677414, -0.16122838854789734, -0.2328367829322815, 0.2663671672344208, 0.34189513325691223, 0.2653919458389282, 0.5269114971160889, -0.046094417572021484, 0.52843177318573, 0.41501137614250183, 0.004375309217721224, -0.030130749568343163, -0.12329285591840744, -0.13045746088027954, -0.08281510323286057, -0.0420374795794487, -0.09102663397789001, 0.35306695103645325, 0.4692038595676422, 0.2960480749607086, -0.17607873678207397, 0.09193871915340424, 0.5065836906433105, 0.04849295690655708, 0.036158476024866104, -0.2631460428237915, 0.14860595762729645, -0.14265309274196625, -0.17634491622447968, -0.029498320072889328, -0.2748565375804901, -0.3219071328639984, 0.17072638869285583, 0.21166709065437317, 0.24151761829853058, 0.06143660098314285, 0.1525278389453888, -0.17620599269866943, 0.4023228585720062, 0.2859143614768982, 0.18690024316310883, -0.21594977378845215, -0.11318653076887131, -0.5393012166023254, 0.2940543293952942, -0.105168916285038, -0.42155009508132935, -0.2145356833934784, 0.08086748421192169, 0.2461215704679489, -0.02812202461063862, 0.16035676002502441, -0.01856897957623005, -0.004333380609750748, 0.1409822404384613, -0.3757278025150299, -0.35321250557899475, 0.04022373631596565, 0.07105142623186111, 0.02474888041615486, -0.15407800674438477, -0.10635941475629807, -0.02917199395596981, 0.23087164759635925, -0.12257348746061325, -0.03682893514633179, -0.09169898182153702, -0.01159899216145277, 0.31304267048835754, -0.1330595314502716, 0.6163973212242126, -0.16078302264213562, 0.028663014993071556, -0.09625019133090973, -0.17540954053401947, -0.19771838188171387, 0.405049592256546, 0.44802963733673096, 0.33712059259414673, -0.0665978416800499, -0.15028034150600433, -0.19107963144779205, 0.30343249440193176, -0.18731532990932465, 0.18805481493473053, 0.0728510171175003, 0.2579596936702728, 0.11139728873968124, -0.13676917552947998, 0.011100227944552898, -0.09947662800550461, -0.0016508601838722825, 0.339689165353775, -0.055811118334531784, -0.13809873163700104, 0.49275821447372437, 0.018937448039650917, -0.3526231050491333, -0.07210005819797516, 0.10953934490680695, -0.2363547384738922, -0.05541933700442314, -0.272711843252182, 0.25071054697036743, 0.19059543311595917, -0.12796059250831604, 0.018277468159794807, 0.13522516191005707, -0.2598777115345001, 0.01618998497724533, 0.04080653563141823, 0.28788304328918457, 0.06758195906877518, -0.11657380312681198, -0.2597830891609192, -0.054234787821769714 ]
https://github.com/huggingface/datasets/issues/3122
OSError with a custom dataset loading script
Hi, could you try to download the dataset with a different `cache_dir` like so: ```python import datasets dataset = datasets.load_dataset('classla/janes_tag', split='validation', cache_dir="path/to/different/cache/dir") ``` If this works, then most likely the cached extracted data is causing issues. This data is stored at `~/.cache/huggingface/datasets/downloads/extracted` and needs to be deleted, and then it should work (you can easily locate the directory with the path given in the `OSError` message). Additionally, I'd suggest you to update `datasets` to the newest version with: ``` pip install -U datasets ```
## Describe the bug I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag. ## Steps to reproduce the bug ```python dataset = datasets.load_dataset('classla/janes_tag', split='validation') ``` ## Expected results Dataset correctly loaded. ## Actual results Traceback (most recent call last): File "C:/mypath/test.py", line 91, in <module> load_and_print('janes_tag') File "C:/mypath/test.py", line 32, in load_and_print dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation') File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset use_auth_token=use_auth_token, File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare ) from None OSError: Cannot find data file. Original error: [Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.14.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.5 - PyArrow version: 3.0.0
84
OSError with a custom dataset loading script
[ -0.5498795509338379, 0.1101144552230835, -0.15995876491069794, 0.1462833285331726, 0.012686347588896751, -0.1230233833193779, 0.36444297432899475, 0.20309527218341827, 0.5141556262969971, 0.21106010675430298, 0.01613457128405571, 0.2869116961956024, -0.23694944381713867, 0.3652254343032837, -0.17289529740810394, 0.1220061331987381, -0.2584579885005951, 0.33477774262428284, -0.2120210975408554, 0.07650529593229294, -0.3741838335990906, 0.29892903566360474, -0.13617457449436188, 0.14329402148723602, -0.0013518776977434754, 0.10101381689310074, -0.004811824299395084, 0.5213566422462463, -0.19459913671016693, -0.3859959840774536, 0.1465625911951065, 0.3437068462371826, 0.31471148133277893, 0.6336832642555237, -0.00010229679173789918, 0.08480056375265121, 0.1728350818157196, -0.15580926835536957, -0.25104057788848877, 0.07299672067165375, -0.04409501701593399, -0.08762809634208679, 0.07021769136190414, -0.2809644937515259, -0.03190283849835396, -0.11483444273471832, -0.1443280577659607, -0.4850696921348572, 0.17417852580547333, 0.3834567368030548, 0.31793785095214844, 0.140237495303154, -0.1514853835105896, -0.1924903839826584, 0.23451776802539825, 0.22624538838863373, 0.10778754949569702, 0.14628708362579346, 0.16964972019195557, -0.39345890283584595, -0.29566869139671326, -0.054902929812669754, -0.13317294418811798, 0.01919902302324772, 0.1254432201385498, -0.10466513782739639, 0.00790837686508894, 0.044653140008449554, 0.10712170600891113, 0.14473792910575867, 0.615746796131134, -0.19754113256931305, -0.15448641777038574, 0.09834901243448257, 0.019884446635842323, -0.26498594880104065, 0.14296267926692963, -0.01908682845532894, -0.10663915425539017, 0.18953493237495422, -0.0883406400680542, 0.0563434474170208, -0.37374410033226013, 0.23947760462760925, -0.21226239204406738, 0.13528455793857574, -0.1627195179462433, 0.023398496210575104, 0.0687641128897667, -0.16899210214614868, 0.23245497047901154, -0.07810767740011215, -0.03299693018198013, -0.05804360285401344, 0.019140006974339485, -0.10789630562067032, 0.05178660526871681, -0.02046842686831951, 0.16640737652778625, 0.029147202149033546, 0.20467476546764374, 0.24569128453731537, -0.11117143929004669, 0.01822265051305294, 0.4003259241580963, 0.07913925498723984, 0.27277588844299316, -0.06694313883781433, 0.30916827917099, 0.2957618236541748, -0.36134618520736694, 0.1163918673992157, -0.06462042778730392, -0.16161194443702698, 0.0666680634021759, -0.014157402329146862, 0.3413267135620117, -0.1414932906627655, -0.2869444787502289, 0.09568412601947784, 0.284859836101532, -0.23009710013866425, -0.0052700345404446125, 0.4281603693962097, 0.07780344784259796, -0.05454237386584282, 0.28668415546417236, 0.25284096598625183, -0.27060794830322266, -0.20696406066417694, -0.2386769950389862, 0.1608072817325592, 0.05782916769385338, 0.10951687395572662, 0.11727141588926315, 0.13323542475700378, 0.19050608575344086, -0.10627293586730957, 0.09341157972812653, -0.09237898886203766, 0.04522071033716202, 0.08199429512023926, -0.2257869988679886, 0.051772087812423706, 0.1418602615594864, -0.06069491431117058, 0.3566608726978302, -0.09744668751955032, 0.050094109028577805, 0.39518091082572937, -0.08743809163570404, -0.5536112785339355, -0.13492152094841003, 0.288261353969574, -0.24050211906433105, -0.18071751296520233, 0.024034935981035233, -0.04804012551903725, 0.31100594997406006, -0.23558463156223297, -0.27380019426345825, -0.17664092779159546, -0.4065297245979309, -0.24372121691703796, -0.10218727588653564, 0.5570875406265259, -0.6205301284790039, 0.18731117248535156, -0.2016880214214325, -0.16366486251354218, 0.06835682690143585, -0.0036182990297675133, -0.11034119129180908, 0.36224889755249023, -0.340431272983551, 0.09273764491081238, 0.18523825705051422, -0.2370663732290268, -0.20087294280529022, 0.30793726444244385, -0.09004885703325272, 0.05514869838953018, 0.08847101032733917, 0.0669640451669693, 0.2663058638572693, -0.07141128927469254, -0.05277840793132782, 0.1551441252231598, 0.08289507031440735, 0.014512545429170132, -0.10867151618003845, -0.02586616761982441, 0.1254085898399353, 0.30520492792129517, 0.025578586384654045, 0.25632980465888977, 0.11814949661493301, -0.30885860323905945, 0.16258789598941803, -0.0836360901594162, -0.09736412763595581, 0.2971195578575134, 0.09581411629915237, 0.1210155338048935, 0.04665147513151169, -0.07998498529195786, -0.43407562375068665, 0.05125958472490311, 0.2924964725971222, 0.05191081017255783, -0.10734525322914124, 0.02991573140025139, -0.4300056993961334, 0.2223185896873474, -0.1521223783493042, 0.043236006051301956, 0.19976751506328583, 0.20461499691009521, -0.15813739597797394, -0.04267220199108124, -0.33956533670425415, 0.07883798331022263, -0.16198931634426117, -0.0789729580283165, -0.3663361966609955, 0.14597545564174652, -0.01787588745355606, -0.31521183252334595, 0.2322174459695816, 0.12363352626562119, 0.1937350630760193, -0.19659484922885895, -0.13094156980514526, 0.3865371644496918, 0.33193978667259216, -0.21956627070903778, -0.06305468827486038, -0.11678079515695572, -0.18181607127189636, 0.02274526096880436, 0.25694477558135986, -0.009779021143913269, 0.017638064920902252, -0.12017686665058136, -0.24533702433109283, 0.4702824056148529, -0.2424357533454895, 0.011649354360997677, -0.019155023619532585, -0.051321350038051605, 0.2315111607313156, 0.06015967205166817, 0.04314425587654114, -0.4125494956970215, 0.08120429515838623, -0.027041202411055565, 0.16181626915931702, -0.07144367694854736, -0.04109049215912819, 0.05532791092991829, 0.38615331053733826, 0.07015080749988556, 0.16336791217327118, 0.09921147674322128, 0.08512445539236069, 0.02606463059782982, -0.05694990232586861, 0.13139520585536957, 0.5690463185310364, 0.2659406363964081, -0.3224318027496338, 0.17758828401565552, 0.1646326631307602, -0.14076897501945496, -0.022839536890387535, -0.14530055224895477, 0.15815748274326324, 0.2122849076986313, -0.15047933161258698, -0.1783219426870346, -0.20433060824871063, -0.41858258843421936, -0.1348259299993515, 0.3997027277946472, -0.39555567502975464, -0.14513172209262848, -0.2625043988227844, -0.013496761210262775, -0.0029256546404212713, -0.028762314468622208, -0.0739067941904068, -0.27837544679641724, 0.012301645241677761, 0.3573552668094635, -0.24095115065574646, 0.07811977714300156, -0.04169298708438873, 0.10841046273708344, 0.2927946448326111, -0.06652920693159103, 0.20379461348056793, -0.26761525869369507, -0.026624223217368126, 0.1363147348165512, 0.12165777385234833, 0.011305388994514942, 0.20864610373973846, -0.16559121012687683, 0.008771519176661968, -0.17542098462581635, -0.06722283363342285, 0.04947719722986221, 0.08233240246772766, -0.0313524566590786, 0.3418990969657898, 0.36452779173851013, 0.2780829071998596, -0.1613563448190689, 0.254838764667511, -0.2806725800037384, -0.08828606456518173, 0.2735346257686615, 0.21018585562705994, -0.08204440772533417, -0.14571814239025116, -0.3780829906463623, -0.12655307352542877, -0.48217737674713135, -0.1727256029844284, 0.24038149416446686, 0.31625211238861084, 0.11724307388067245, 0.34250280261039734, 0.00941512268036604, 0.20479311048984528, -0.12652651965618134, -0.10142763704061508, -0.3159228563308716, 0.28730136156082153, -0.3316669166088104, -0.29257628321647644, 0.09156610816717148, -0.04400809109210968, 0.17583657801151276, 0.055035561323165894, -0.4974479079246521, -0.17210230231285095, -0.032121021300554276, 0.16017724573612213, -0.2125433385372162, -0.050637099891901016, 0.21167878806591034, 0.09416543692350388, -0.15730690956115723, -0.23436753451824188, -0.3592979609966278, 0.1571885496377945, -0.0948508009314537, -0.11684384942054749, -0.0026355418376624584, 0.6506999135017395, -0.4674195349216461, 0.4451353847980499, -0.3357239365577698, -0.2066788226366043, 0.39069831371307373, -0.22326113283634186, 0.4533888101577759, -0.09724435210227966, -0.2350599616765976, -0.2637701630592346, 0.09472448378801346, -0.0832219272851944, 0.24260415136814117, -0.12613768875598907, 0.011556342244148254, -0.15800848603248596, 0.03222423791885376, -0.10622946172952652, -0.14993804693222046, 0.13628239929676056, 0.07193096727132797, -0.15510298311710358, -0.007721284404397011, 0.26672565937042236, -0.2557421028614044, 0.08067236095666885, -0.028285080567002296, 0.1319212019443512, 0.04803875461220741, -0.16486795246601105, -0.40035203099250793, 0.2981164753437042, -0.18752747774124146, 0.3486734628677368, -0.17231887578964233, 0.11954845488071442, -0.1795436143875122, -0.1626216620206833, -0.08883717656135559, -0.0630875900387764, 0.5444542765617371, -0.27472740411758423, 0.16761508584022522, 0.2166476994752884, -0.16120222210884094, -0.41398918628692627, -0.007912041619420052, -0.1299005150794983, 0.4807349443435669, 0.017601268365979195, 0.34145891666412354, -0.11150768399238586, -0.02010064758360386, 0.23667825758457184, 0.019540973007678986, -0.20927679538726807, -0.7513074278831482, -0.06075885146856308, -0.34268680214881897, -0.44358307123184204, -0.106058269739151, -0.10039225965738297, 0.17160215973854065, -0.18471060693264008, -0.021092815324664116, -0.06374377012252808, -0.17806242406368256, 0.07150758057832718, 0.07524773478507996, 0.13947470486164093, -0.07287314534187317, 0.1444968432188034, -0.10332862287759781, 0.07188409566879272, 0.4982222318649292, 0.6842489242553711, -0.17419403791427612, -0.42518654465675354, 0.21077628433704376, -0.21434158086776733, 0.09277748316526413, 0.15436843037605286, 0.07469535619020462, -0.08106813579797745, 0.03776666522026062, 0.03518373519182205, 0.11369549483060837, 0.17520996928215027, -0.03708131983876228, -0.18050533533096313, -0.19264590740203857, -0.35421109199523926, 0.11120932549238205, -0.14464740455150604, 0.01105264201760292, 0.05538708716630936, 0.026742111891508102, -0.06444838643074036, 0.5584973692893982, -0.13526464998722076, 0.6543348431587219, -0.18053984642028809, 0.12282568961381912, 0.48019394278526306, -0.0819086953997612, 0.18740354478359222, -0.1500018835067749, -0.1544673591852188, -0.6441856622695923, -0.23409634828567505, 0.13494060933589935, -0.06181048974394798, 0.1020570918917656, 0.3955109417438507, -0.17648983001708984, 0.018276682123541832, -0.1626490205526352, 0.16370302438735962, -0.05315617099404335, 0.3650483787059784, 0.05656805634498596, -0.22898153960704803, -0.24116584658622742, 0.23864048719406128, -0.05244573578238487, 0.12071986496448517, -0.15141020715236664, -0.042205359786748886, 0.1080622524023056, -0.2499493807554245, -0.025171561166644096, 0.29267847537994385, -0.11554040759801865, 0.11129485815763474, -0.2075197845697403, -0.12131694704294205, 0.06572313606739044, 0.35932454466819763, 0.05826166644692421, 0.08568823337554932, 0.08301229029893875, -0.035410575568675995, 0.12409397959709167, -0.09811775386333466, -0.08793686330318451, 0.03288920223712921, 0.1680632382631302, -0.12516169250011444, -0.27111729979515076, -0.025710806250572205, 0.11413852870464325, -0.30895060300827026, 0.14082804322242737, 0.18010111153125763, 0.024088768288493156, -0.6812116503715515, -0.35326871275901794, -0.2911854684352875, 0.053615596145391464, -0.11431221663951874, 0.21827268600463867, 0.2628057599067688, -0.10995670408010483, 0.3185694217681885, 0.0900137647986412, -0.27017489075660706, -0.15138788521289825, 0.3602035343647003, 0.06100776791572571, 0.020849836990237236, 0.5932807326316833, 0.3277461528778076, -0.020910050719976425, -0.4109756350517273, 0.10482234507799149, 0.44784075021743774, -0.22022682428359985, 0.16701403260231018, 0.0326838418841362, -0.07440774142742157, 0.2725341022014618, -0.03304089233279228, -0.051931362599134445, 0.1513824462890625, 0.11887481808662415, -0.43646639585494995, -0.35987788438796997, -0.007796827238053083, 0.15513375401496887, 0.23359061777591705, 0.14974242448806763, -0.19389735162258148, -0.27676570415496826, 0.1406383216381073, -0.4393044114112854, -0.007888639345765114, 0.11626554280519485, -0.11966218054294586, 0.3739352822303772, 0.12093383818864822, 0.007211459334939718, 0.011058500036597252, 0.2855364680290222, 0.003164369612932205, -0.11962348222732544, -0.3412726819515228, 0.024646077305078506, 0.08820626139640808, 0.02022375352680683, -0.17980538308620453, -0.0816577598452568, -0.23170478641986847, -0.17799797654151917, -0.0981641635298729, 0.05561298877000809, 0.2570113241672516, -0.1585550308227539, -0.12099882960319519, 0.20153743028640747, 0.13235755264759064, -0.1468091756105423, 0.23001928627490997, -0.15178315341472626, 0.4130310118198395, -0.05323845148086548, 0.06314601004123688, -0.17758406698703766, -0.16253486275672913, 0.2316177487373352, -0.06639458984136581, 0.13922369480133057, 0.25043654441833496, 0.2392825037240982, -0.5021193027496338, -0.004534566309303045, 0.08964162319898605, 0.3458186089992523, 0.22306488454341888, -0.30348166823387146, -0.1904323697090149, 0.03712700679898262, 0.2843429148197174, -0.14958426356315613, 0.024374721571803093, 0.5601712465286255, -0.11939974874258041, 0.03293551132082939, 0.42164739966392517, -0.04846201092004776, -0.05500637739896774, 0.08601844310760498, 0.031129276379942894, 0.48975762724876404, 0.2649720311164856, -0.09628451615571976, 0.03874695301055908, -0.522959291934967, -0.08324389159679413, 0.08304178714752197, 0.363137811422348, 0.06817369163036346, 0.5149304270744324, 0.05403989925980568, 0.18379482626914978, 0.14388693869113922, -0.10378313809633255, -0.06236233562231064, -0.6229856014251709, 0.3064017593860626, 0.20132185518741608, 0.1049651950597763, -0.04748047515749931, 0.10422798246145248, -0.0646800771355629, -0.1890130192041397, 0.2204408496618271, -0.121239572763443, -0.10715077817440033, -0.11260584741830826, 0.22980687022209167, -0.29087454080581665, -0.05500642955303192, -0.08653678745031357, -0.1392166018486023, -0.09735516458749771, -0.026988597586750984, -0.1785479187965393, -0.10702201724052429, -0.12159055471420288, -0.1209891140460968, 0.05734854191541672, -0.1459064930677414, -0.16122838854789734, -0.2328367829322815, 0.2663671672344208, 0.34189513325691223, 0.2653919458389282, 0.5269114971160889, -0.046094417572021484, 0.52843177318573, 0.41501137614250183, 0.004375309217721224, -0.030130749568343163, -0.12329285591840744, -0.13045746088027954, -0.08281510323286057, -0.0420374795794487, -0.09102663397789001, 0.35306695103645325, 0.4692038595676422, 0.2960480749607086, -0.17607873678207397, 0.09193871915340424, 0.5065836906433105, 0.04849295690655708, 0.036158476024866104, -0.2631460428237915, 0.14860595762729645, -0.14265309274196625, -0.17634491622447968, -0.029498320072889328, -0.2748565375804901, -0.3219071328639984, 0.17072638869285583, 0.21166709065437317, 0.24151761829853058, 0.06143660098314285, 0.1525278389453888, -0.17620599269866943, 0.4023228585720062, 0.2859143614768982, 0.18690024316310883, -0.21594977378845215, -0.11318653076887131, -0.5393012166023254, 0.2940543293952942, -0.105168916285038, -0.42155009508132935, -0.2145356833934784, 0.08086748421192169, 0.2461215704679489, -0.02812202461063862, 0.16035676002502441, -0.01856897957623005, -0.004333380609750748, 0.1409822404384613, -0.3757278025150299, -0.35321250557899475, 0.04022373631596565, 0.07105142623186111, 0.02474888041615486, -0.15407800674438477, -0.10635941475629807, -0.02917199395596981, 0.23087164759635925, -0.12257348746061325, -0.03682893514633179, -0.09169898182153702, -0.01159899216145277, 0.31304267048835754, -0.1330595314502716, 0.6163973212242126, -0.16078302264213562, 0.028663014993071556, -0.09625019133090973, -0.17540954053401947, -0.19771838188171387, 0.405049592256546, 0.44802963733673096, 0.33712059259414673, -0.0665978416800499, -0.15028034150600433, -0.19107963144779205, 0.30343249440193176, -0.18731532990932465, 0.18805481493473053, 0.0728510171175003, 0.2579596936702728, 0.11139728873968124, -0.13676917552947998, 0.011100227944552898, -0.09947662800550461, -0.0016508601838722825, 0.339689165353775, -0.055811118334531784, -0.13809873163700104, 0.49275821447372437, 0.018937448039650917, -0.3526231050491333, -0.07210005819797516, 0.10953934490680695, -0.2363547384738922, -0.05541933700442314, -0.272711843252182, 0.25071054697036743, 0.19059543311595917, -0.12796059250831604, 0.018277468159794807, 0.13522516191005707, -0.2598777115345001, 0.01618998497724533, 0.04080653563141823, 0.28788304328918457, 0.06758195906877518, -0.11657380312681198, -0.2597830891609192, -0.054234787821769714 ]
https://github.com/huggingface/datasets/issues/3122
OSError with a custom dataset loading script
Thank you, deleting the `~/.cache/huggingface/datasets/downloads/extracted` directory helped. However, I am still having problems. There was indeed a bug in the script that was throwing an `IndexError`, which I have now corrected (added the condition to skip the lines starting with '# text') and it is working locally, but still throws an error when I try to load the dataset from HuggingFace. I literally copied and pasted the `_generate_examples` function and ran it on the `dev_all.conllup` file, which I even re-downloaded from the repository to be certain that the files are exactly the same. I also deleted everything again just in case, but it didn't help. The code works locally, but throws an `IndexError` when loading from `datasets.`
## Describe the bug I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag. ## Steps to reproduce the bug ```python dataset = datasets.load_dataset('classla/janes_tag', split='validation') ``` ## Expected results Dataset correctly loaded. ## Actual results Traceback (most recent call last): File "C:/mypath/test.py", line 91, in <module> load_and_print('janes_tag') File "C:/mypath/test.py", line 32, in load_and_print dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation') File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset use_auth_token=use_auth_token, File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare ) from None OSError: Cannot find data file. Original error: [Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.14.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.5 - PyArrow version: 3.0.0
117
OSError with a custom dataset loading script
[ -0.5498795509338379, 0.1101144552230835, -0.15995876491069794, 0.1462833285331726, 0.012686347588896751, -0.1230233833193779, 0.36444297432899475, 0.20309527218341827, 0.5141556262969971, 0.21106010675430298, 0.01613457128405571, 0.2869116961956024, -0.23694944381713867, 0.3652254343032837, -0.17289529740810394, 0.1220061331987381, -0.2584579885005951, 0.33477774262428284, -0.2120210975408554, 0.07650529593229294, -0.3741838335990906, 0.29892903566360474, -0.13617457449436188, 0.14329402148723602, -0.0013518776977434754, 0.10101381689310074, -0.004811824299395084, 0.5213566422462463, -0.19459913671016693, -0.3859959840774536, 0.1465625911951065, 0.3437068462371826, 0.31471148133277893, 0.6336832642555237, -0.00010229679173789918, 0.08480056375265121, 0.1728350818157196, -0.15580926835536957, -0.25104057788848877, 0.07299672067165375, -0.04409501701593399, -0.08762809634208679, 0.07021769136190414, -0.2809644937515259, -0.03190283849835396, -0.11483444273471832, -0.1443280577659607, -0.4850696921348572, 0.17417852580547333, 0.3834567368030548, 0.31793785095214844, 0.140237495303154, -0.1514853835105896, -0.1924903839826584, 0.23451776802539825, 0.22624538838863373, 0.10778754949569702, 0.14628708362579346, 0.16964972019195557, -0.39345890283584595, -0.29566869139671326, -0.054902929812669754, -0.13317294418811798, 0.01919902302324772, 0.1254432201385498, -0.10466513782739639, 0.00790837686508894, 0.044653140008449554, 0.10712170600891113, 0.14473792910575867, 0.615746796131134, -0.19754113256931305, -0.15448641777038574, 0.09834901243448257, 0.019884446635842323, -0.26498594880104065, 0.14296267926692963, -0.01908682845532894, -0.10663915425539017, 0.18953493237495422, -0.0883406400680542, 0.0563434474170208, -0.37374410033226013, 0.23947760462760925, -0.21226239204406738, 0.13528455793857574, -0.1627195179462433, 0.023398496210575104, 0.0687641128897667, -0.16899210214614868, 0.23245497047901154, -0.07810767740011215, -0.03299693018198013, -0.05804360285401344, 0.019140006974339485, -0.10789630562067032, 0.05178660526871681, -0.02046842686831951, 0.16640737652778625, 0.029147202149033546, 0.20467476546764374, 0.24569128453731537, -0.11117143929004669, 0.01822265051305294, 0.4003259241580963, 0.07913925498723984, 0.27277588844299316, -0.06694313883781433, 0.30916827917099, 0.2957618236541748, -0.36134618520736694, 0.1163918673992157, -0.06462042778730392, -0.16161194443702698, 0.0666680634021759, -0.014157402329146862, 0.3413267135620117, -0.1414932906627655, -0.2869444787502289, 0.09568412601947784, 0.284859836101532, -0.23009710013866425, -0.0052700345404446125, 0.4281603693962097, 0.07780344784259796, -0.05454237386584282, 0.28668415546417236, 0.25284096598625183, -0.27060794830322266, -0.20696406066417694, -0.2386769950389862, 0.1608072817325592, 0.05782916769385338, 0.10951687395572662, 0.11727141588926315, 0.13323542475700378, 0.19050608575344086, -0.10627293586730957, 0.09341157972812653, -0.09237898886203766, 0.04522071033716202, 0.08199429512023926, -0.2257869988679886, 0.051772087812423706, 0.1418602615594864, -0.06069491431117058, 0.3566608726978302, -0.09744668751955032, 0.050094109028577805, 0.39518091082572937, -0.08743809163570404, -0.5536112785339355, -0.13492152094841003, 0.288261353969574, -0.24050211906433105, -0.18071751296520233, 0.024034935981035233, -0.04804012551903725, 0.31100594997406006, -0.23558463156223297, -0.27380019426345825, -0.17664092779159546, -0.4065297245979309, -0.24372121691703796, -0.10218727588653564, 0.5570875406265259, -0.6205301284790039, 0.18731117248535156, -0.2016880214214325, -0.16366486251354218, 0.06835682690143585, -0.0036182990297675133, -0.11034119129180908, 0.36224889755249023, -0.340431272983551, 0.09273764491081238, 0.18523825705051422, -0.2370663732290268, -0.20087294280529022, 0.30793726444244385, -0.09004885703325272, 0.05514869838953018, 0.08847101032733917, 0.0669640451669693, 0.2663058638572693, -0.07141128927469254, -0.05277840793132782, 0.1551441252231598, 0.08289507031440735, 0.014512545429170132, -0.10867151618003845, -0.02586616761982441, 0.1254085898399353, 0.30520492792129517, 0.025578586384654045, 0.25632980465888977, 0.11814949661493301, -0.30885860323905945, 0.16258789598941803, -0.0836360901594162, -0.09736412763595581, 0.2971195578575134, 0.09581411629915237, 0.1210155338048935, 0.04665147513151169, -0.07998498529195786, -0.43407562375068665, 0.05125958472490311, 0.2924964725971222, 0.05191081017255783, -0.10734525322914124, 0.02991573140025139, -0.4300056993961334, 0.2223185896873474, -0.1521223783493042, 0.043236006051301956, 0.19976751506328583, 0.20461499691009521, -0.15813739597797394, -0.04267220199108124, -0.33956533670425415, 0.07883798331022263, -0.16198931634426117, -0.0789729580283165, -0.3663361966609955, 0.14597545564174652, -0.01787588745355606, -0.31521183252334595, 0.2322174459695816, 0.12363352626562119, 0.1937350630760193, -0.19659484922885895, -0.13094156980514526, 0.3865371644496918, 0.33193978667259216, -0.21956627070903778, -0.06305468827486038, -0.11678079515695572, -0.18181607127189636, 0.02274526096880436, 0.25694477558135986, -0.009779021143913269, 0.017638064920902252, -0.12017686665058136, -0.24533702433109283, 0.4702824056148529, -0.2424357533454895, 0.011649354360997677, -0.019155023619532585, -0.051321350038051605, 0.2315111607313156, 0.06015967205166817, 0.04314425587654114, -0.4125494956970215, 0.08120429515838623, -0.027041202411055565, 0.16181626915931702, -0.07144367694854736, -0.04109049215912819, 0.05532791092991829, 0.38615331053733826, 0.07015080749988556, 0.16336791217327118, 0.09921147674322128, 0.08512445539236069, 0.02606463059782982, -0.05694990232586861, 0.13139520585536957, 0.5690463185310364, 0.2659406363964081, -0.3224318027496338, 0.17758828401565552, 0.1646326631307602, -0.14076897501945496, -0.022839536890387535, -0.14530055224895477, 0.15815748274326324, 0.2122849076986313, -0.15047933161258698, -0.1783219426870346, -0.20433060824871063, -0.41858258843421936, -0.1348259299993515, 0.3997027277946472, -0.39555567502975464, -0.14513172209262848, -0.2625043988227844, -0.013496761210262775, -0.0029256546404212713, -0.028762314468622208, -0.0739067941904068, -0.27837544679641724, 0.012301645241677761, 0.3573552668094635, -0.24095115065574646, 0.07811977714300156, -0.04169298708438873, 0.10841046273708344, 0.2927946448326111, -0.06652920693159103, 0.20379461348056793, -0.26761525869369507, -0.026624223217368126, 0.1363147348165512, 0.12165777385234833, 0.011305388994514942, 0.20864610373973846, -0.16559121012687683, 0.008771519176661968, -0.17542098462581635, -0.06722283363342285, 0.04947719722986221, 0.08233240246772766, -0.0313524566590786, 0.3418990969657898, 0.36452779173851013, 0.2780829071998596, -0.1613563448190689, 0.254838764667511, -0.2806725800037384, -0.08828606456518173, 0.2735346257686615, 0.21018585562705994, -0.08204440772533417, -0.14571814239025116, -0.3780829906463623, -0.12655307352542877, -0.48217737674713135, -0.1727256029844284, 0.24038149416446686, 0.31625211238861084, 0.11724307388067245, 0.34250280261039734, 0.00941512268036604, 0.20479311048984528, -0.12652651965618134, -0.10142763704061508, -0.3159228563308716, 0.28730136156082153, -0.3316669166088104, -0.29257628321647644, 0.09156610816717148, -0.04400809109210968, 0.17583657801151276, 0.055035561323165894, -0.4974479079246521, -0.17210230231285095, -0.032121021300554276, 0.16017724573612213, -0.2125433385372162, -0.050637099891901016, 0.21167878806591034, 0.09416543692350388, -0.15730690956115723, -0.23436753451824188, -0.3592979609966278, 0.1571885496377945, -0.0948508009314537, -0.11684384942054749, -0.0026355418376624584, 0.6506999135017395, -0.4674195349216461, 0.4451353847980499, -0.3357239365577698, -0.2066788226366043, 0.39069831371307373, -0.22326113283634186, 0.4533888101577759, -0.09724435210227966, -0.2350599616765976, -0.2637701630592346, 0.09472448378801346, -0.0832219272851944, 0.24260415136814117, -0.12613768875598907, 0.011556342244148254, -0.15800848603248596, 0.03222423791885376, -0.10622946172952652, -0.14993804693222046, 0.13628239929676056, 0.07193096727132797, -0.15510298311710358, -0.007721284404397011, 0.26672565937042236, -0.2557421028614044, 0.08067236095666885, -0.028285080567002296, 0.1319212019443512, 0.04803875461220741, -0.16486795246601105, -0.40035203099250793, 0.2981164753437042, -0.18752747774124146, 0.3486734628677368, -0.17231887578964233, 0.11954845488071442, -0.1795436143875122, -0.1626216620206833, -0.08883717656135559, -0.0630875900387764, 0.5444542765617371, -0.27472740411758423, 0.16761508584022522, 0.2166476994752884, -0.16120222210884094, -0.41398918628692627, -0.007912041619420052, -0.1299005150794983, 0.4807349443435669, 0.017601268365979195, 0.34145891666412354, -0.11150768399238586, -0.02010064758360386, 0.23667825758457184, 0.019540973007678986, -0.20927679538726807, -0.7513074278831482, -0.06075885146856308, -0.34268680214881897, -0.44358307123184204, -0.106058269739151, -0.10039225965738297, 0.17160215973854065, -0.18471060693264008, -0.021092815324664116, -0.06374377012252808, -0.17806242406368256, 0.07150758057832718, 0.07524773478507996, 0.13947470486164093, -0.07287314534187317, 0.1444968432188034, -0.10332862287759781, 0.07188409566879272, 0.4982222318649292, 0.6842489242553711, -0.17419403791427612, -0.42518654465675354, 0.21077628433704376, -0.21434158086776733, 0.09277748316526413, 0.15436843037605286, 0.07469535619020462, -0.08106813579797745, 0.03776666522026062, 0.03518373519182205, 0.11369549483060837, 0.17520996928215027, -0.03708131983876228, -0.18050533533096313, -0.19264590740203857, -0.35421109199523926, 0.11120932549238205, -0.14464740455150604, 0.01105264201760292, 0.05538708716630936, 0.026742111891508102, -0.06444838643074036, 0.5584973692893982, -0.13526464998722076, 0.6543348431587219, -0.18053984642028809, 0.12282568961381912, 0.48019394278526306, -0.0819086953997612, 0.18740354478359222, -0.1500018835067749, -0.1544673591852188, -0.6441856622695923, -0.23409634828567505, 0.13494060933589935, -0.06181048974394798, 0.1020570918917656, 0.3955109417438507, -0.17648983001708984, 0.018276682123541832, -0.1626490205526352, 0.16370302438735962, -0.05315617099404335, 0.3650483787059784, 0.05656805634498596, -0.22898153960704803, -0.24116584658622742, 0.23864048719406128, -0.05244573578238487, 0.12071986496448517, -0.15141020715236664, -0.042205359786748886, 0.1080622524023056, -0.2499493807554245, -0.025171561166644096, 0.29267847537994385, -0.11554040759801865, 0.11129485815763474, -0.2075197845697403, -0.12131694704294205, 0.06572313606739044, 0.35932454466819763, 0.05826166644692421, 0.08568823337554932, 0.08301229029893875, -0.035410575568675995, 0.12409397959709167, -0.09811775386333466, -0.08793686330318451, 0.03288920223712921, 0.1680632382631302, -0.12516169250011444, -0.27111729979515076, -0.025710806250572205, 0.11413852870464325, -0.30895060300827026, 0.14082804322242737, 0.18010111153125763, 0.024088768288493156, -0.6812116503715515, -0.35326871275901794, -0.2911854684352875, 0.053615596145391464, -0.11431221663951874, 0.21827268600463867, 0.2628057599067688, -0.10995670408010483, 0.3185694217681885, 0.0900137647986412, -0.27017489075660706, -0.15138788521289825, 0.3602035343647003, 0.06100776791572571, 0.020849836990237236, 0.5932807326316833, 0.3277461528778076, -0.020910050719976425, -0.4109756350517273, 0.10482234507799149, 0.44784075021743774, -0.22022682428359985, 0.16701403260231018, 0.0326838418841362, -0.07440774142742157, 0.2725341022014618, -0.03304089233279228, -0.051931362599134445, 0.1513824462890625, 0.11887481808662415, -0.43646639585494995, -0.35987788438796997, -0.007796827238053083, 0.15513375401496887, 0.23359061777591705, 0.14974242448806763, -0.19389735162258148, -0.27676570415496826, 0.1406383216381073, -0.4393044114112854, -0.007888639345765114, 0.11626554280519485, -0.11966218054294586, 0.3739352822303772, 0.12093383818864822, 0.007211459334939718, 0.011058500036597252, 0.2855364680290222, 0.003164369612932205, -0.11962348222732544, -0.3412726819515228, 0.024646077305078506, 0.08820626139640808, 0.02022375352680683, -0.17980538308620453, -0.0816577598452568, -0.23170478641986847, -0.17799797654151917, -0.0981641635298729, 0.05561298877000809, 0.2570113241672516, -0.1585550308227539, -0.12099882960319519, 0.20153743028640747, 0.13235755264759064, -0.1468091756105423, 0.23001928627490997, -0.15178315341472626, 0.4130310118198395, -0.05323845148086548, 0.06314601004123688, -0.17758406698703766, -0.16253486275672913, 0.2316177487373352, -0.06639458984136581, 0.13922369480133057, 0.25043654441833496, 0.2392825037240982, -0.5021193027496338, -0.004534566309303045, 0.08964162319898605, 0.3458186089992523, 0.22306488454341888, -0.30348166823387146, -0.1904323697090149, 0.03712700679898262, 0.2843429148197174, -0.14958426356315613, 0.024374721571803093, 0.5601712465286255, -0.11939974874258041, 0.03293551132082939, 0.42164739966392517, -0.04846201092004776, -0.05500637739896774, 0.08601844310760498, 0.031129276379942894, 0.48975762724876404, 0.2649720311164856, -0.09628451615571976, 0.03874695301055908, -0.522959291934967, -0.08324389159679413, 0.08304178714752197, 0.363137811422348, 0.06817369163036346, 0.5149304270744324, 0.05403989925980568, 0.18379482626914978, 0.14388693869113922, -0.10378313809633255, -0.06236233562231064, -0.6229856014251709, 0.3064017593860626, 0.20132185518741608, 0.1049651950597763, -0.04748047515749931, 0.10422798246145248, -0.0646800771355629, -0.1890130192041397, 0.2204408496618271, -0.121239572763443, -0.10715077817440033, -0.11260584741830826, 0.22980687022209167, -0.29087454080581665, -0.05500642955303192, -0.08653678745031357, -0.1392166018486023, -0.09735516458749771, -0.026988597586750984, -0.1785479187965393, -0.10702201724052429, -0.12159055471420288, -0.1209891140460968, 0.05734854191541672, -0.1459064930677414, -0.16122838854789734, -0.2328367829322815, 0.2663671672344208, 0.34189513325691223, 0.2653919458389282, 0.5269114971160889, -0.046094417572021484, 0.52843177318573, 0.41501137614250183, 0.004375309217721224, -0.030130749568343163, -0.12329285591840744, -0.13045746088027954, -0.08281510323286057, -0.0420374795794487, -0.09102663397789001, 0.35306695103645325, 0.4692038595676422, 0.2960480749607086, -0.17607873678207397, 0.09193871915340424, 0.5065836906433105, 0.04849295690655708, 0.036158476024866104, -0.2631460428237915, 0.14860595762729645, -0.14265309274196625, -0.17634491622447968, -0.029498320072889328, -0.2748565375804901, -0.3219071328639984, 0.17072638869285583, 0.21166709065437317, 0.24151761829853058, 0.06143660098314285, 0.1525278389453888, -0.17620599269866943, 0.4023228585720062, 0.2859143614768982, 0.18690024316310883, -0.21594977378845215, -0.11318653076887131, -0.5393012166023254, 0.2940543293952942, -0.105168916285038, -0.42155009508132935, -0.2145356833934784, 0.08086748421192169, 0.2461215704679489, -0.02812202461063862, 0.16035676002502441, -0.01856897957623005, -0.004333380609750748, 0.1409822404384613, -0.3757278025150299, -0.35321250557899475, 0.04022373631596565, 0.07105142623186111, 0.02474888041615486, -0.15407800674438477, -0.10635941475629807, -0.02917199395596981, 0.23087164759635925, -0.12257348746061325, -0.03682893514633179, -0.09169898182153702, -0.01159899216145277, 0.31304267048835754, -0.1330595314502716, 0.6163973212242126, -0.16078302264213562, 0.028663014993071556, -0.09625019133090973, -0.17540954053401947, -0.19771838188171387, 0.405049592256546, 0.44802963733673096, 0.33712059259414673, -0.0665978416800499, -0.15028034150600433, -0.19107963144779205, 0.30343249440193176, -0.18731532990932465, 0.18805481493473053, 0.0728510171175003, 0.2579596936702728, 0.11139728873968124, -0.13676917552947998, 0.011100227944552898, -0.09947662800550461, -0.0016508601838722825, 0.339689165353775, -0.055811118334531784, -0.13809873163700104, 0.49275821447372437, 0.018937448039650917, -0.3526231050491333, -0.07210005819797516, 0.10953934490680695, -0.2363547384738922, -0.05541933700442314, -0.272711843252182, 0.25071054697036743, 0.19059543311595917, -0.12796059250831604, 0.018277468159794807, 0.13522516191005707, -0.2598777115345001, 0.01618998497724533, 0.04080653563141823, 0.28788304328918457, 0.06758195906877518, -0.11657380312681198, -0.2597830891609192, -0.054234787821769714 ]
https://github.com/huggingface/datasets/issues/3122
OSError with a custom dataset loading script
Hi, Did some investigation. To fix the dataset script on the Hub, append the following labels to the `names` list of the `upos_tags` field: ```'INTJ NOUN', 'AUX PRON', 'PART ADV', 'PRON ADP', 'INTJ INTJ', 'VERB NOUN', 'NOUN AUX'```. This step is required to avoid an error due to missing labels in the following step which is: ```python load_dataset("classla/janes_tag", split="validation", download_mode="force_redownload") ``` This will generate and cache the dataset, so specifying `download_mode` will not be required anymore unless you update the script/data on the Hub.
## Describe the bug I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag. ## Steps to reproduce the bug ```python dataset = datasets.load_dataset('classla/janes_tag', split='validation') ``` ## Expected results Dataset correctly loaded. ## Actual results Traceback (most recent call last): File "C:/mypath/test.py", line 91, in <module> load_and_print('janes_tag') File "C:/mypath/test.py", line 32, in load_and_print dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation') File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset use_auth_token=use_auth_token, File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare ) from None OSError: Cannot find data file. Original error: [Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.14.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.5 - PyArrow version: 3.0.0
84
OSError with a custom dataset loading script
[ -0.5498795509338379, 0.1101144552230835, -0.15995876491069794, 0.1462833285331726, 0.012686347588896751, -0.1230233833193779, 0.36444297432899475, 0.20309527218341827, 0.5141556262969971, 0.21106010675430298, 0.01613457128405571, 0.2869116961956024, -0.23694944381713867, 0.3652254343032837, -0.17289529740810394, 0.1220061331987381, -0.2584579885005951, 0.33477774262428284, -0.2120210975408554, 0.07650529593229294, -0.3741838335990906, 0.29892903566360474, -0.13617457449436188, 0.14329402148723602, -0.0013518776977434754, 0.10101381689310074, -0.004811824299395084, 0.5213566422462463, -0.19459913671016693, -0.3859959840774536, 0.1465625911951065, 0.3437068462371826, 0.31471148133277893, 0.6336832642555237, -0.00010229679173789918, 0.08480056375265121, 0.1728350818157196, -0.15580926835536957, -0.25104057788848877, 0.07299672067165375, -0.04409501701593399, -0.08762809634208679, 0.07021769136190414, -0.2809644937515259, -0.03190283849835396, -0.11483444273471832, -0.1443280577659607, -0.4850696921348572, 0.17417852580547333, 0.3834567368030548, 0.31793785095214844, 0.140237495303154, -0.1514853835105896, -0.1924903839826584, 0.23451776802539825, 0.22624538838863373, 0.10778754949569702, 0.14628708362579346, 0.16964972019195557, -0.39345890283584595, -0.29566869139671326, -0.054902929812669754, -0.13317294418811798, 0.01919902302324772, 0.1254432201385498, -0.10466513782739639, 0.00790837686508894, 0.044653140008449554, 0.10712170600891113, 0.14473792910575867, 0.615746796131134, -0.19754113256931305, -0.15448641777038574, 0.09834901243448257, 0.019884446635842323, -0.26498594880104065, 0.14296267926692963, -0.01908682845532894, -0.10663915425539017, 0.18953493237495422, -0.0883406400680542, 0.0563434474170208, -0.37374410033226013, 0.23947760462760925, -0.21226239204406738, 0.13528455793857574, -0.1627195179462433, 0.023398496210575104, 0.0687641128897667, -0.16899210214614868, 0.23245497047901154, -0.07810767740011215, -0.03299693018198013, -0.05804360285401344, 0.019140006974339485, -0.10789630562067032, 0.05178660526871681, -0.02046842686831951, 0.16640737652778625, 0.029147202149033546, 0.20467476546764374, 0.24569128453731537, -0.11117143929004669, 0.01822265051305294, 0.4003259241580963, 0.07913925498723984, 0.27277588844299316, -0.06694313883781433, 0.30916827917099, 0.2957618236541748, -0.36134618520736694, 0.1163918673992157, -0.06462042778730392, -0.16161194443702698, 0.0666680634021759, -0.014157402329146862, 0.3413267135620117, -0.1414932906627655, -0.2869444787502289, 0.09568412601947784, 0.284859836101532, -0.23009710013866425, -0.0052700345404446125, 0.4281603693962097, 0.07780344784259796, -0.05454237386584282, 0.28668415546417236, 0.25284096598625183, -0.27060794830322266, -0.20696406066417694, -0.2386769950389862, 0.1608072817325592, 0.05782916769385338, 0.10951687395572662, 0.11727141588926315, 0.13323542475700378, 0.19050608575344086, -0.10627293586730957, 0.09341157972812653, -0.09237898886203766, 0.04522071033716202, 0.08199429512023926, -0.2257869988679886, 0.051772087812423706, 0.1418602615594864, -0.06069491431117058, 0.3566608726978302, -0.09744668751955032, 0.050094109028577805, 0.39518091082572937, -0.08743809163570404, -0.5536112785339355, -0.13492152094841003, 0.288261353969574, -0.24050211906433105, -0.18071751296520233, 0.024034935981035233, -0.04804012551903725, 0.31100594997406006, -0.23558463156223297, -0.27380019426345825, -0.17664092779159546, -0.4065297245979309, -0.24372121691703796, -0.10218727588653564, 0.5570875406265259, -0.6205301284790039, 0.18731117248535156, -0.2016880214214325, -0.16366486251354218, 0.06835682690143585, -0.0036182990297675133, -0.11034119129180908, 0.36224889755249023, -0.340431272983551, 0.09273764491081238, 0.18523825705051422, -0.2370663732290268, -0.20087294280529022, 0.30793726444244385, -0.09004885703325272, 0.05514869838953018, 0.08847101032733917, 0.0669640451669693, 0.2663058638572693, -0.07141128927469254, -0.05277840793132782, 0.1551441252231598, 0.08289507031440735, 0.014512545429170132, -0.10867151618003845, -0.02586616761982441, 0.1254085898399353, 0.30520492792129517, 0.025578586384654045, 0.25632980465888977, 0.11814949661493301, -0.30885860323905945, 0.16258789598941803, -0.0836360901594162, -0.09736412763595581, 0.2971195578575134, 0.09581411629915237, 0.1210155338048935, 0.04665147513151169, -0.07998498529195786, -0.43407562375068665, 0.05125958472490311, 0.2924964725971222, 0.05191081017255783, -0.10734525322914124, 0.02991573140025139, -0.4300056993961334, 0.2223185896873474, -0.1521223783493042, 0.043236006051301956, 0.19976751506328583, 0.20461499691009521, -0.15813739597797394, -0.04267220199108124, -0.33956533670425415, 0.07883798331022263, -0.16198931634426117, -0.0789729580283165, -0.3663361966609955, 0.14597545564174652, -0.01787588745355606, -0.31521183252334595, 0.2322174459695816, 0.12363352626562119, 0.1937350630760193, -0.19659484922885895, -0.13094156980514526, 0.3865371644496918, 0.33193978667259216, -0.21956627070903778, -0.06305468827486038, -0.11678079515695572, -0.18181607127189636, 0.02274526096880436, 0.25694477558135986, -0.009779021143913269, 0.017638064920902252, -0.12017686665058136, -0.24533702433109283, 0.4702824056148529, -0.2424357533454895, 0.011649354360997677, -0.019155023619532585, -0.051321350038051605, 0.2315111607313156, 0.06015967205166817, 0.04314425587654114, -0.4125494956970215, 0.08120429515838623, -0.027041202411055565, 0.16181626915931702, -0.07144367694854736, -0.04109049215912819, 0.05532791092991829, 0.38615331053733826, 0.07015080749988556, 0.16336791217327118, 0.09921147674322128, 0.08512445539236069, 0.02606463059782982, -0.05694990232586861, 0.13139520585536957, 0.5690463185310364, 0.2659406363964081, -0.3224318027496338, 0.17758828401565552, 0.1646326631307602, -0.14076897501945496, -0.022839536890387535, -0.14530055224895477, 0.15815748274326324, 0.2122849076986313, -0.15047933161258698, -0.1783219426870346, -0.20433060824871063, -0.41858258843421936, -0.1348259299993515, 0.3997027277946472, -0.39555567502975464, -0.14513172209262848, -0.2625043988227844, -0.013496761210262775, -0.0029256546404212713, -0.028762314468622208, -0.0739067941904068, -0.27837544679641724, 0.012301645241677761, 0.3573552668094635, -0.24095115065574646, 0.07811977714300156, -0.04169298708438873, 0.10841046273708344, 0.2927946448326111, -0.06652920693159103, 0.20379461348056793, -0.26761525869369507, -0.026624223217368126, 0.1363147348165512, 0.12165777385234833, 0.011305388994514942, 0.20864610373973846, -0.16559121012687683, 0.008771519176661968, -0.17542098462581635, -0.06722283363342285, 0.04947719722986221, 0.08233240246772766, -0.0313524566590786, 0.3418990969657898, 0.36452779173851013, 0.2780829071998596, -0.1613563448190689, 0.254838764667511, -0.2806725800037384, -0.08828606456518173, 0.2735346257686615, 0.21018585562705994, -0.08204440772533417, -0.14571814239025116, -0.3780829906463623, -0.12655307352542877, -0.48217737674713135, -0.1727256029844284, 0.24038149416446686, 0.31625211238861084, 0.11724307388067245, 0.34250280261039734, 0.00941512268036604, 0.20479311048984528, -0.12652651965618134, -0.10142763704061508, -0.3159228563308716, 0.28730136156082153, -0.3316669166088104, -0.29257628321647644, 0.09156610816717148, -0.04400809109210968, 0.17583657801151276, 0.055035561323165894, -0.4974479079246521, -0.17210230231285095, -0.032121021300554276, 0.16017724573612213, -0.2125433385372162, -0.050637099891901016, 0.21167878806591034, 0.09416543692350388, -0.15730690956115723, -0.23436753451824188, -0.3592979609966278, 0.1571885496377945, -0.0948508009314537, -0.11684384942054749, -0.0026355418376624584, 0.6506999135017395, -0.4674195349216461, 0.4451353847980499, -0.3357239365577698, -0.2066788226366043, 0.39069831371307373, -0.22326113283634186, 0.4533888101577759, -0.09724435210227966, -0.2350599616765976, -0.2637701630592346, 0.09472448378801346, -0.0832219272851944, 0.24260415136814117, -0.12613768875598907, 0.011556342244148254, -0.15800848603248596, 0.03222423791885376, -0.10622946172952652, -0.14993804693222046, 0.13628239929676056, 0.07193096727132797, -0.15510298311710358, -0.007721284404397011, 0.26672565937042236, -0.2557421028614044, 0.08067236095666885, -0.028285080567002296, 0.1319212019443512, 0.04803875461220741, -0.16486795246601105, -0.40035203099250793, 0.2981164753437042, -0.18752747774124146, 0.3486734628677368, -0.17231887578964233, 0.11954845488071442, -0.1795436143875122, -0.1626216620206833, -0.08883717656135559, -0.0630875900387764, 0.5444542765617371, -0.27472740411758423, 0.16761508584022522, 0.2166476994752884, -0.16120222210884094, -0.41398918628692627, -0.007912041619420052, -0.1299005150794983, 0.4807349443435669, 0.017601268365979195, 0.34145891666412354, -0.11150768399238586, -0.02010064758360386, 0.23667825758457184, 0.019540973007678986, -0.20927679538726807, -0.7513074278831482, -0.06075885146856308, -0.34268680214881897, -0.44358307123184204, -0.106058269739151, -0.10039225965738297, 0.17160215973854065, -0.18471060693264008, -0.021092815324664116, -0.06374377012252808, -0.17806242406368256, 0.07150758057832718, 0.07524773478507996, 0.13947470486164093, -0.07287314534187317, 0.1444968432188034, -0.10332862287759781, 0.07188409566879272, 0.4982222318649292, 0.6842489242553711, -0.17419403791427612, -0.42518654465675354, 0.21077628433704376, -0.21434158086776733, 0.09277748316526413, 0.15436843037605286, 0.07469535619020462, -0.08106813579797745, 0.03776666522026062, 0.03518373519182205, 0.11369549483060837, 0.17520996928215027, -0.03708131983876228, -0.18050533533096313, -0.19264590740203857, -0.35421109199523926, 0.11120932549238205, -0.14464740455150604, 0.01105264201760292, 0.05538708716630936, 0.026742111891508102, -0.06444838643074036, 0.5584973692893982, -0.13526464998722076, 0.6543348431587219, -0.18053984642028809, 0.12282568961381912, 0.48019394278526306, -0.0819086953997612, 0.18740354478359222, -0.1500018835067749, -0.1544673591852188, -0.6441856622695923, -0.23409634828567505, 0.13494060933589935, -0.06181048974394798, 0.1020570918917656, 0.3955109417438507, -0.17648983001708984, 0.018276682123541832, -0.1626490205526352, 0.16370302438735962, -0.05315617099404335, 0.3650483787059784, 0.05656805634498596, -0.22898153960704803, -0.24116584658622742, 0.23864048719406128, -0.05244573578238487, 0.12071986496448517, -0.15141020715236664, -0.042205359786748886, 0.1080622524023056, -0.2499493807554245, -0.025171561166644096, 0.29267847537994385, -0.11554040759801865, 0.11129485815763474, -0.2075197845697403, -0.12131694704294205, 0.06572313606739044, 0.35932454466819763, 0.05826166644692421, 0.08568823337554932, 0.08301229029893875, -0.035410575568675995, 0.12409397959709167, -0.09811775386333466, -0.08793686330318451, 0.03288920223712921, 0.1680632382631302, -0.12516169250011444, -0.27111729979515076, -0.025710806250572205, 0.11413852870464325, -0.30895060300827026, 0.14082804322242737, 0.18010111153125763, 0.024088768288493156, -0.6812116503715515, -0.35326871275901794, -0.2911854684352875, 0.053615596145391464, -0.11431221663951874, 0.21827268600463867, 0.2628057599067688, -0.10995670408010483, 0.3185694217681885, 0.0900137647986412, -0.27017489075660706, -0.15138788521289825, 0.3602035343647003, 0.06100776791572571, 0.020849836990237236, 0.5932807326316833, 0.3277461528778076, -0.020910050719976425, -0.4109756350517273, 0.10482234507799149, 0.44784075021743774, -0.22022682428359985, 0.16701403260231018, 0.0326838418841362, -0.07440774142742157, 0.2725341022014618, -0.03304089233279228, -0.051931362599134445, 0.1513824462890625, 0.11887481808662415, -0.43646639585494995, -0.35987788438796997, -0.007796827238053083, 0.15513375401496887, 0.23359061777591705, 0.14974242448806763, -0.19389735162258148, -0.27676570415496826, 0.1406383216381073, -0.4393044114112854, -0.007888639345765114, 0.11626554280519485, -0.11966218054294586, 0.3739352822303772, 0.12093383818864822, 0.007211459334939718, 0.011058500036597252, 0.2855364680290222, 0.003164369612932205, -0.11962348222732544, -0.3412726819515228, 0.024646077305078506, 0.08820626139640808, 0.02022375352680683, -0.17980538308620453, -0.0816577598452568, -0.23170478641986847, -0.17799797654151917, -0.0981641635298729, 0.05561298877000809, 0.2570113241672516, -0.1585550308227539, -0.12099882960319519, 0.20153743028640747, 0.13235755264759064, -0.1468091756105423, 0.23001928627490997, -0.15178315341472626, 0.4130310118198395, -0.05323845148086548, 0.06314601004123688, -0.17758406698703766, -0.16253486275672913, 0.2316177487373352, -0.06639458984136581, 0.13922369480133057, 0.25043654441833496, 0.2392825037240982, -0.5021193027496338, -0.004534566309303045, 0.08964162319898605, 0.3458186089992523, 0.22306488454341888, -0.30348166823387146, -0.1904323697090149, 0.03712700679898262, 0.2843429148197174, -0.14958426356315613, 0.024374721571803093, 0.5601712465286255, -0.11939974874258041, 0.03293551132082939, 0.42164739966392517, -0.04846201092004776, -0.05500637739896774, 0.08601844310760498, 0.031129276379942894, 0.48975762724876404, 0.2649720311164856, -0.09628451615571976, 0.03874695301055908, -0.522959291934967, -0.08324389159679413, 0.08304178714752197, 0.363137811422348, 0.06817369163036346, 0.5149304270744324, 0.05403989925980568, 0.18379482626914978, 0.14388693869113922, -0.10378313809633255, -0.06236233562231064, -0.6229856014251709, 0.3064017593860626, 0.20132185518741608, 0.1049651950597763, -0.04748047515749931, 0.10422798246145248, -0.0646800771355629, -0.1890130192041397, 0.2204408496618271, -0.121239572763443, -0.10715077817440033, -0.11260584741830826, 0.22980687022209167, -0.29087454080581665, -0.05500642955303192, -0.08653678745031357, -0.1392166018486023, -0.09735516458749771, -0.026988597586750984, -0.1785479187965393, -0.10702201724052429, -0.12159055471420288, -0.1209891140460968, 0.05734854191541672, -0.1459064930677414, -0.16122838854789734, -0.2328367829322815, 0.2663671672344208, 0.34189513325691223, 0.2653919458389282, 0.5269114971160889, -0.046094417572021484, 0.52843177318573, 0.41501137614250183, 0.004375309217721224, -0.030130749568343163, -0.12329285591840744, -0.13045746088027954, -0.08281510323286057, -0.0420374795794487, -0.09102663397789001, 0.35306695103645325, 0.4692038595676422, 0.2960480749607086, -0.17607873678207397, 0.09193871915340424, 0.5065836906433105, 0.04849295690655708, 0.036158476024866104, -0.2631460428237915, 0.14860595762729645, -0.14265309274196625, -0.17634491622447968, -0.029498320072889328, -0.2748565375804901, -0.3219071328639984, 0.17072638869285583, 0.21166709065437317, 0.24151761829853058, 0.06143660098314285, 0.1525278389453888, -0.17620599269866943, 0.4023228585720062, 0.2859143614768982, 0.18690024316310883, -0.21594977378845215, -0.11318653076887131, -0.5393012166023254, 0.2940543293952942, -0.105168916285038, -0.42155009508132935, -0.2145356833934784, 0.08086748421192169, 0.2461215704679489, -0.02812202461063862, 0.16035676002502441, -0.01856897957623005, -0.004333380609750748, 0.1409822404384613, -0.3757278025150299, -0.35321250557899475, 0.04022373631596565, 0.07105142623186111, 0.02474888041615486, -0.15407800674438477, -0.10635941475629807, -0.02917199395596981, 0.23087164759635925, -0.12257348746061325, -0.03682893514633179, -0.09169898182153702, -0.01159899216145277, 0.31304267048835754, -0.1330595314502716, 0.6163973212242126, -0.16078302264213562, 0.028663014993071556, -0.09625019133090973, -0.17540954053401947, -0.19771838188171387, 0.405049592256546, 0.44802963733673096, 0.33712059259414673, -0.0665978416800499, -0.15028034150600433, -0.19107963144779205, 0.30343249440193176, -0.18731532990932465, 0.18805481493473053, 0.0728510171175003, 0.2579596936702728, 0.11139728873968124, -0.13676917552947998, 0.011100227944552898, -0.09947662800550461, -0.0016508601838722825, 0.339689165353775, -0.055811118334531784, -0.13809873163700104, 0.49275821447372437, 0.018937448039650917, -0.3526231050491333, -0.07210005819797516, 0.10953934490680695, -0.2363547384738922, -0.05541933700442314, -0.272711843252182, 0.25071054697036743, 0.19059543311595917, -0.12796059250831604, 0.018277468159794807, 0.13522516191005707, -0.2598777115345001, 0.01618998497724533, 0.04080653563141823, 0.28788304328918457, 0.06758195906877518, -0.11657380312681198, -0.2597830891609192, -0.054234787821769714 ]
https://github.com/huggingface/datasets/issues/3119
Add OpenSLR 83 - Crowdsourced high-quality UK and Ireland English Dialect speech
Ugh. The index files for SLR83 are CSV, not TSV. I need to add logic to process these index files.
## Adding a Dataset - **Name:** *openslr** - **Description:** *Data set which contains male and female recordings of English from various dialects of the UK and Ireland.* - **Paper:** *https://www.openslr.org/resources/83/about.html* - **Data:** *Eleven separate data files can be found via https://www.openslr.org/resources/83/* - **Motivation:** *Increase english ASR data with UK and Irish dialects* Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). The *openslr* dataset already exists, this will add additional subset, *SLR83*.
20
Add OpenSLR 83 - Crowdsourced high-quality UK and Ireland English Dialect speech
[ -0.318500816822052, 0.375788152217865, -0.16666534543037415, -0.03521041199564934, -0.2046426683664322, -0.3098140358924866, 0.13484801352024078, 0.2543095350265503, -0.06542078405618668, 0.3213534355163574, -0.3923441767692566, 0.300466924905777, -0.1969926506280899, 0.1730305701494217, -0.04459488019347191, 0.08499297499656677, 0.00010430696420371532, -0.14593562483787537, -0.42374658584594727, -0.42100849747657776, 0.14283810555934906, 0.02111288718879223, -0.1129477471113205, -0.1999271810054779, -0.004510483238846064, 0.39830538630485535, 0.07963857799768448, 0.026164542883634567, -0.20444950461387634, -0.004660215228796005, -0.25345712900161743, -0.04938168823719025, -0.13869746029376984, 0.13028237223625183, -0.00010445251973578706, -0.010900139808654785, 0.27005329728126526, -0.07780779898166656, -0.34756404161453247, 0.14584822952747345, 0.06405332684516907, 0.3836004436016083, -0.30370888113975525, -0.0192280076444149, -0.04026208072900772, 0.07862074673175812, 0.1703648567199707, -0.09626904129981995, 0.35822999477386475, 0.2695772647857666, 0.22447040677070618, -0.08718186616897583, -0.0007248969050124288, -0.1694456785917282, 0.04147186875343323, 0.36537259817123413, -0.23887237906455994, -0.44372275471687317, 0.24972553551197052, 0.24157753586769104, -0.2684386074542999, 0.35238608717918396, -0.16277985274791718, -0.3946540355682373, -0.42007821798324585, -0.38642418384552, -0.13364143669605255, 0.1963203251361847, -0.061495084315538406, 0.29062265157699585, 0.1981598436832428, 0.15349161624908447, -0.10073193162679672, 0.015906810760498047, -0.005654179025441408, 0.1776697039604187, -0.3111518323421478, 0.1386895626783371, -0.26678797602653503, 0.3043019771575928, -0.028852395713329315, -0.27616116404533386, -0.330579549074173, 0.019836194813251495, 0.0922694131731987, 0.5265201926231384, 0.1499708890914917, -0.2880379259586334, 0.21047240495681763, -0.20259667932987213, 0.08617835491895676, 0.1976832002401352, -0.1955266296863556, 0.1676601767539978, 0.011170628480613232, -0.06855921447277069, 0.23481778800487518, 0.15357954800128937, 0.3106180727481842, -0.05938640236854553, 0.0781058669090271, 0.0700468197464943, -0.17307116091251373, -0.14762639999389648, 0.1779422014951706, -0.18757937848567963, 0.08982934802770615, 0.24534407258033752, 0.07671148329973221, 0.10322138667106628, -0.024973182007670403, 0.4528200924396515, -0.23412470519542694, -0.03095073066651821, -0.36848124861717224, -0.08604399114847183, -0.2080683708190918, -0.3074200749397278, -0.011909729801118374, 0.24313834309577942, 0.188385009765625, 0.010244558565318584, -0.11141633987426758, -0.05250779911875725, -0.04771977290511131, 0.2669844925403595, 0.10843478888273239, 0.10705351829528809, -0.15830400586128235, -0.387265682220459, -0.10910478979349136, 0.19700850546360016, 0.025960290804505348, 0.11124170571565628, 0.20200927555561066, 0.03830992057919502, 0.18683436512947083, 0.0867619663476944, 0.11552595347166061, 0.021144265308976173, -0.2293172925710678, 0.30545520782470703, -0.022447526454925537, -0.2593120336532593, -0.05216354504227638, -0.26016271114349365, -0.06541451066732407, -0.14204156398773193, -0.05899939686059952, 0.20047694444656372, 0.07950672507286072, -0.34716498851776123, -0.6051333546638489, 0.21528194844722748, -0.053716808557510376, -0.3759273290634155, 0.25339293479919434, 0.2564040422439575, -0.006776285357773304, 0.011541132815182209, 0.06981392949819565, 0.32990702986717224, 0.026054156944155693, 0.23060010373592377, -0.08172387629747391, 0.07910401374101639, -0.21992391347885132, 0.01442393846809864, -0.2765759825706482, -0.17083634436130524, 0.3025190234184265, 0.227991983294487, -0.07027042657136917, -0.15964378416538239, 0.1391356736421585, 0.07229430973529816, 0.15039891004562378, -0.4375647306442261, 0.014831915497779846, 0.314958393573761, 0.16415159404277802, -0.3620266020298004, 0.524185061454773, -0.2795972526073456, 0.41490787267684937, -0.08744323253631592, 0.10373204946517944, 0.5004088282585144, 0.09667612612247467, -0.0744449570775032, -0.39566439390182495, -0.023929713293910027, -0.4085962772369385, 0.5130692720413208, 0.02325209602713585, -0.1371571123600006, -0.009252350777387619, 0.18596576154232025, 0.4094122350215912, -0.2550817131996155, 0.13009829819202423, 0.009929845109581947, 0.2750241756439209, -0.07116014510393143, 0.10232861340045929, 0.09140181541442871, 0.24045242369174957, -0.3718128800392151, -0.1806974560022354, 0.6529371738433838, 0.07812464982271194, -0.2560886740684509, -0.28773754835128784, -0.059724561870098114, 0.0832090675830841, 0.012551744468510151, 0.18464618921279907, -0.25162526965141296, -0.09509069472551346, 0.42836061120033264, -0.009343153797090054, 0.15684084594249725, -0.10421540588140488, -0.29203251004219055, 0.022626670077443123, -0.12829820811748505, -0.1678386777639389, -0.17403408885002136, 0.15684092044830322, 0.39758792519569397, -0.34021228551864624, 0.13482777774333954, 0.02708848938345909, 0.00009820117702474818, 0.10368282347917557, 0.03718050941824913, 0.19794096052646637, 0.1178562268614769, 0.2837328612804413, -0.23083095252513885, 0.059643346816301346, 0.06325479596853256, -0.06701646745204926, -0.06659938395023346, -0.006599718239158392, 0.192991703748703, 0.14300216734409332, -0.03807119280099869, -0.05869343504309654, -0.017302345484495163, -0.22548186779022217, -0.009304744191467762, -0.24614083766937256, -0.2744709551334381, 0.21839487552642822, 0.38884568214416504, -0.1553635448217392, 0.17856557667255402, -0.04728762060403824, 0.1915552020072937, 0.2330394983291626, -0.21430465579032898, 0.28339993953704834, 0.059372127056121826, 0.24465280771255493, -0.13764840364456177, -0.009766590781509876, -0.39576682448387146, 0.05682540312409401, 0.13717253506183624, 0.16390767693519592, 0.04224533960223198, 0.041608184576034546, -0.11345905065536499, -0.006009555887430906, -0.15420213341712952, -0.019428269937634468, 0.1972280740737915, 0.08387932926416397, -0.26650336384773254, -0.3898741900920868, -0.019990811124444008, -0.09022283554077148, -0.09860115498304367, 0.22325587272644043, -0.3521735370159149, -0.2513931393623352, 0.04359755665063858, 0.13882282376289368, -0.15089315176010132, 0.06017583981156349, 0.041728369891643524, 0.4463709890842438, -0.31615597009658813, -0.19602856040000916, 0.16002099215984344, 0.10125438868999481, 0.13190029561519623, -0.15670299530029297, -0.17422516644001007, 0.13125655055046082, -0.49058961868286133, -0.05386839434504509, 0.22558455169200897, 0.015224945731461048, -0.11988334357738495, -0.07213117927312851, -0.09817615896463394, -0.0126100555062294, 0.022647129371762276, -0.2286369800567627, 0.1612587869167328, -0.18773332238197327, -0.04923615977168083, 0.25653234124183655, -0.227814719080925, -0.4014301002025604, -0.2607778012752533, -0.051051244139671326, 0.17789117991924286, -0.2505027651786804, -0.3068576157093048, -0.32543647289276123, -0.22042325139045715, -0.11528688669204712, -0.34667670726776123, -0.04218796640634537, -0.3590540885925293, -0.018848633393645287, -0.2958220839500427, 0.16449211537837982, -0.14892104268074036, 0.10403360426425934, -0.06864920258522034, -0.08801974356174469, 0.23578248918056488, -0.28182050585746765, 0.1779906451702118, 0.17750252783298492, -0.17997443675994873, -0.20347724854946136, -0.21368035674095154, 0.1928001195192337, 0.009086512960493565, -0.19660429656505585, -0.3694577217102051, -0.0325736440718174, 0.1290321946144104, 0.2826548218727112, -0.02957836538553238, 0.3557634949684143, 0.2753026485443115, 0.22419914603233337, -0.22639904916286469, -0.19920934736728668, -0.04015699774026871, 0.21064874529838562, 0.2941378355026245, 0.22208164632320404, -0.10893597453832626, 0.05497489869594574, 0.12434889376163483, 0.4944463074207306, -0.10163374245166779, 0.393466591835022, 0.24779410660266876, 0.16102232038974762, 0.08301988989114761, -0.21678398549556732, 0.23560136556625366, 0.5341043472290039, 0.2813933789730072, -0.17680542171001434, 0.2650134265422821, 0.12053785473108292, -0.2558583915233612, -0.37069937586784363, -0.24181699752807617, -0.308125764131546, -0.06356235593557358, 0.00597397331148386, 0.12297197431325912, 0.22647295892238617, -0.16521283984184265, 0.038585491478443146, 0.05086550489068031, 0.11002594977617264, 0.27712345123291016, -0.24579471349716187, 0.43818047642707825, -0.03214874863624573, -0.12221802026033401, 0.26538151502609253, -0.07298330217599869, -0.0593375638127327, -0.10735726356506348, -0.05992710590362549, -0.16401980817317963, -0.26212653517723083, 0.039042335003614426, 0.1590745449066162, -0.14148105680942535, 0.049958646297454834, -0.2451164871454239, 0.02438485622406006, 0.45497649908065796, -0.2712898850440979, 0.14396537840366364, -0.06433974951505661, -0.7211394309997559, 0.4750172197818756, -0.1724621206521988, -0.46281886100769043, 0.25951480865478516, 0.2988799214363098, -0.031015994027256966, -0.10577144473791122, -0.18304286897182465, 0.13561253249645233, -0.4692627489566803, -0.15782664716243744, 0.1458907425403595, 0.3584112524986267, 0.25286275148391724, 0.18122628331184387, 0.23067568242549896, 0.2674727439880371, 0.27832165360450745, 0.2419433742761612, -0.08876126259565353, -0.22756676375865936, -0.027140041813254356, 0.10657329857349396, -0.3156166672706604, 0.20143379271030426, -0.4060859680175781, 0.253584623336792, 0.2069607824087143, 0.037725891917943954, 0.05370629206299782, -0.3436959683895111, 0.501277506351471, 0.15447476506233215, 0.3040519058704376, -0.2820373773574829, -0.034813232719898224, -0.280916303396225, 0.16531135141849518, -0.015894096344709396, -0.1020091325044632, -0.03191499412059784, -0.4241299331188202, -0.14294104278087616, 0.41663721203804016, 0.04135371744632721, -0.09038589894771576, -0.1099248006939888, 0.2591436505317688, -0.16464559733867645, 0.5602794885635376, 0.19236184656620026, 0.8171100616455078, 0.12443353235721588, 0.3089412748813629, 0.14631536602973938, 0.06448811292648315, -0.15038245916366577, 0.21856240928173065, -0.15403535962104797, -0.029430026188492775, 0.453753262758255, 0.08174000680446625, 0.21095357835292816, -0.12055345624685287, 0.2785669267177582, -0.22546935081481934, -0.1662466824054718, -0.100291907787323, -0.5479621291160583, 0.31499791145324707, 0.18952792882919312, -0.11210204660892487, -0.2998030483722687, 0.07388073951005936, 0.23953105509281158, 0.12201319634914398, 0.1806284785270691, 0.16222743690013885, -0.24939210712909698, -0.01527353748679161, 0.13153156638145447, -0.7015870213508606, 0.31806424260139465, 0.33247867226600647, -0.17517603933811188, 0.43301379680633545, -0.199373260140419, 0.19971464574337006, 0.3502950966358185, 0.3252319097518921, 0.21126224100589752, 0.051691655069589615, 0.23028181493282318, 0.03022081032395363, -0.3171321153640747, 0.27324676513671875, 0.25304728746414185, 0.1511356383562088, -0.42252209782600403, -0.4903099834918976, 0.3463503420352936, 0.10896186530590057, -0.3211168944835663, -0.5351070761680603, -0.205540269613266, 0.07174240797758102, -0.07767368108034134, -0.19070546329021454, 0.3914091885089874, 0.038406338542699814, 0.023879986256361008, 0.19768807291984558, -0.07865557074546814, -0.15327949821949005, 0.11486594378948212, 0.09775404632091522, -0.1316186636686325, -0.18908248841762543, 0.13184930384159088, 0.21975097060203552, -0.15391139686107635, 0.13626807928085327, 0.3364090919494629, -0.010906040668487549, -0.3068891763687134, -0.20650359988212585, 0.08241045475006104, -0.06965996325016022, -0.010863097384572029, 0.13648070394992828, -0.3952142894268036, 0.1529625952243805, 0.4096652567386627, 0.13542363047599792, 0.09500422328710556, -0.08663531392812729, 0.006414778530597687, -0.0726810172200203, -0.01334126852452755, 0.09533242881298065, -0.13550220429897308, -0.11842706799507141, -0.11990255862474442, -0.12850883603096008, -0.1440531611442566, -0.38333195447921753, -0.23137186467647552, 0.15971697866916656, -0.1344633549451828, -0.10687345266342163, -0.12218059599399567, -0.12901447713375092, 0.18093842267990112, 0.300052672624588, -0.15794439613819122, -0.09213416278362274, -0.2850465178489685, -0.34801185131073, 0.07618600875139236, 0.21443580090999603, -0.05002722889184952, 0.0049013616517186165, -0.14146806299686432, -0.07934687286615372, 0.38847076892852783, 0.2018221765756607, 0.2591198682785034, -0.04168000817298889, 0.12441997975111008, -0.3625955879688263, 0.18298295140266418, 0.4222152531147003, -0.007892194204032421, 0.15520820021629333, 0.45421019196510315, 0.2257475107908249, 0.22739621996879578, 0.5180553793907166, -0.2554703950881958, 0.13978761434555054, -0.07818998396396637, 0.26957938075065613, 0.29280248284339905, 0.007477191276848316, -0.15511107444763184, -0.38994261622428894, 0.08395668864250183, 0.05745286867022514, -0.006971914786845446, -0.1225351095199585, -0.1751856803894043, 0.1934158354997635, 0.34909096360206604, -0.2076445370912552, 0.06622487306594849, -0.3095555901527405, 0.043174758553504944, 0.03829561173915863, 0.08600178360939026, 0.13950029015541077, -0.2879309356212616, 0.15086665749549866, 0.13494758307933807, -0.33982568979263306, 0.086929552257061, -0.11590761691331863, 0.0029352952260524035, 0.0158546045422554, -0.10604827851057053, 0.0020403910893946886, -0.23384737968444824, 0.13617971539497375, -0.4619074761867523, -0.15501250326633453, 0.2189425826072693, 0.20681007206439972, 0.44913020730018616, 0.2617957293987274, 0.3327689468860626, 0.3710317313671112, 0.1703951507806778, 0.0020685484632849693, 0.23922909796237946, -0.10384581238031387, 0.45779895782470703, 0.23795878887176514, -0.08387025445699692, -0.23983749747276306, 0.35303446650505066, 0.18578335642814636, -0.4159212112426758, -0.14919058978557587, -0.28304940462112427, -0.19225236773490906, 0.11983636766672134, 0.21467378735542297, 0.05565258488059044, -0.058744512498378754, 0.1683378517627716, -0.10983691364526749, 0.0014456070493906736, -0.08509603142738342, -0.13056102395057678, 0.22043293714523315, -0.03630001097917557, 0.3583732545375824, 0.012462584301829338, 0.0231762882322073, 0.2678218483924866, 0.254391610622406, 0.08567237108945847, 0.12099315226078033, -0.2844495177268982, 0.07342438399791718, -0.5713362693786621, 0.17593473196029663, -0.14757679402828217, 0.5725823044776917, 0.2646530568599701, 0.17017211019992828, 0.27565494179725647, 0.1336900293827057, -0.29161563515663147, -0.034802064299583435, -0.02511582151055336, -0.44731616973876953, 0.44271525740623474, -0.18962650001049042, 0.08061941713094711, 0.07092547416687012, -0.37181374430656433, 0.1846768707036972, -0.2054053395986557, -0.1724058836698532, 0.08454690873622894, 0.008694994263350964, -0.07477807998657227, -0.1987466812133789, 0.1375533789396286, -0.09900320321321487, 0.2868529260158539, 0.5742579102516174, 0.2037789672613144, 0.3761902153491974, -0.4887967109680176, 0.11990349739789963, 0.21139872074127197, -0.13185758888721466, -0.3167693614959717, -0.34274598956108093, 0.06121726334095001, 0.375569611787796, 0.18280144035816193, -0.08246264606714249, -0.12183438241481781, -0.563446581363678, 0.22583948075771332, -0.24616102874279022, 0.3918614983558655, 0.38697054982185364, 0.24461178481578827, -0.0943743884563446, -0.09905748814344406, -0.2456158995628357, 0.2945145070552826, 0.17337565124034882, -0.23085378110408783, -0.013579683378338814, -0.0029768673703074455, 0.07147471606731415, -0.08149662613868713, -0.012288486585021019, -0.007217155769467354, -0.2104412466287613, -0.07941830903291702, 0.05754220858216286, 0.016735143959522247, 0.09020032733678818, -0.1678495556116104, 0.29336121678352356, -0.015949836000800133, 0.1320255845785141, 0.30218786001205444, 0.36923202872276306, 0.6182553172111511, 0.19371865689754486, -0.2564712166786194, -0.31603553891181946, -0.07094317674636841, 0.12581568956375122, -0.24557331204414368, -0.10854780673980713, 0.05407537892460823, -0.004375784192234278, -0.21505698561668396, 0.02384503185749054, -0.2864457666873932, 0.14667047560214996, -0.141219824552536, -0.1655624657869339, -0.1248239055275917, 0.04186561331152916, -0.007712711580097675, 0.009341820143163204, -0.5866249799728394, 0.04989035055041313, 0.03292803838849068, -0.0017128674080595374, -0.005260619800537825, 0.20040029287338257, 0.15856434404850006, -0.1252862811088562, -0.06722132116556168, 0.09854894131422043, 0.05643972381949425, -0.13064520061016083, -0.038478873670101166, 0.04454124718904495 ]
https://github.com/huggingface/datasets/issues/3114
load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem
Hi ! Can you try again with pyarrow 6.0.0 ? I think it includes some changes regarding filesystems compatibility with fsspec.
## Describe the bug Passing a PyArrowHDFS implementation of fsspec.spec.AbstractFileSystem (in the `fs` param required by `load_from_disk` methods in `DatasetDict` (in datasets_dict.py) and `Dataset` (in arrow_dataset.py) results in an error when calling the download method in the `fs` parameter. ## Steps to reproduce the bug The documentation for the `fs` parameter states: ``` fs (:class:`~filesystems.S3FileSystem` or ``fsspec.spec.AbstractFileSystem``, optional, default ``None``): Instance of the remote filesystem used to download the files from. ``` `PyArrowHDFS` from [fsspec](https://filesystem-spec.readthedocs.io/en/latest/_modules/fsspec/implementations/hdfs.html) implements `fsspec.spec.AbstractFileSystem`. However, when using it as shown below, I get an error. ```python from fsspec.implementations.hdfs import PyArrowHDFS ... transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/" fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket) dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True) ``` ## Expected results Previous to load from disk, I have managed to successfully store in HDFS the data and meta-information of a DatasetDict by doing: ```python transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/" fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket) my_datasets.save_to_disk(transformed_corpus_path, fs=fs) ``` As I have 3 datasets in the DatasetDict named `my_datasets`, the previous Python code creates the following contents in HDFS: ```sh $ hadoop fs -ls "/user/my_user/clickbait/transformed_ds/" Found 4 items -rw------- 3 my_user users 43 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/dataset_dict.json drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/test drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/train drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/validation ``` I would expect to recover on `dss` the Arrow-backed datasets I previously saved in HDFS calling the `save_to_disk` method on the `DatasetDict` object when invoking `DatasetDict.load_from_disk(...)` as described above. ## Actual results However, when trying to recover the saved datasets, I get this error: ``` ... File "/home/fperez/dev/neuromancer/neuromancer/corpus.py", line 186, in load_transformed_corpus_from_disk dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True) File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/dataset_dict.py", line 748, in load_from_disk dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory) File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1048, in load_from_disk fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True) File "pyarrow/_hdfsio.pyx", line 438, in pyarrow._hdfsio.HadoopFileSystem.download TypeError: download() got an unexpected keyword argument 'recursive' ``` Examining the [signature of the download method in pyarrow 5.0.0](https://github.com/apache/arrow/blob/54d2bd89c99df72fa091b025452f85dd5d88e3cf/python/pyarrow/_hdfsio.pyx#L438) we can see that there's no download parameter: ```python def download(self, path, stream, buffer_size=None): with self.open(path, 'rb') as f: f.download(stream, buffer_size=buffer_size) ``` ## Environment info - `datasets` version: 1.13.3 - Platform: Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-glibc2.33 - Python version: 3.9.7 - PyArrow version: 5.0.0
21
load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem
[ -0.44231146574020386, 0.19259308278560638, -0.024335132911801338, 0.1918845921754837, 0.2955562472343445, -0.2881154716014862, 0.415726900100708, -0.057419054210186005, 0.08501860499382019, 0.017146823927760124, -0.05435926467180252, 0.1338905394077301, 0.20884260535240173, 0.41140249371528625, 0.23639889061450958, 0.19462287425994873, 0.194937065243721, 0.1188431829214096, -0.13970205187797546, -0.1272362768650055, -0.0634358748793602, 0.19003884494304657, -0.07794282585382462, -0.06492909044027328, -0.14748845994472504, 0.2935090959072113, -0.15628162026405334, 0.5041362047195435, -0.2827562391757965, -0.2242179811000824, 0.48214155435562134, 0.2699849009513855, 0.31677722930908203, 0.09924964606761932, -0.00011400075163692236, 0.14736303687095642, 0.210146963596344, -0.10497505962848663, -0.04828028380870819, 0.20707327127456665, 0.24142102897167206, -0.03772896155714989, 0.05964189022779465, -0.10547950118780136, -0.2898038327693939, -0.2557695806026459, 0.055561766028404236, 0.06387660652399063, 0.08866386860609055, 0.2913261950016022, 0.14613011479377747, 0.25269004702568054, 0.1200043112039566, 0.022103192284703255, 0.3909764587879181, 0.2179919183254242, -0.16767773032188416, 0.18810907006263733, 0.03977062180638313, -0.1899820864200592, -0.3843255937099457, -0.18254411220550537, -0.1673288345336914, 0.10046012699604034, 0.3150538504123688, 0.13088218867778778, -0.10110334306955338, 0.052544329315423965, -0.12154126912355423, -0.02631504088640213, 0.4778391122817993, -0.5678110122680664, -0.18834973871707916, -0.0339597687125206, -0.3347890079021454, 0.06200699135661125, 0.17307154834270477, 0.03976539149880409, -0.2053362876176834, 0.1983422189950943, 0.15517742931842804, -0.1626516878604889, -0.304731160402298, 0.24207742512226105, -0.2028140425682068, -0.1826397180557251, -0.047586023807525635, 0.1070135086774826, 0.25031778216362, -0.01782103069126606, 0.2350073605775833, -0.10367636382579803, 0.048028990626335144, 0.11761144548654556, -0.07252854108810425, -0.05598141625523567, 0.3477802574634552, 0.017746105790138245, 0.11232596635818481, -0.04787479713559151, -0.15033651888370514, 0.26455962657928467, 0.3424417972564697, 0.1484808772802353, 0.1865224391222, -0.0993141457438469, -0.011977109126746655, 0.06498463451862335, 0.10315388441085815, -0.014680974185466766, -0.06474870443344116, 0.04111471399664879, -0.06333425641059875, -0.1216733306646347, -0.03739529848098755, -0.2450145184993744, 0.007005925755947828, -0.22561496496200562, -0.09492436796426773, -0.09398411214351654, 0.31411013007164, -0.03675500303506851, 0.045071303844451904, 0.3336963653564453, 0.28419771790504456, -0.03297525271773338, -0.11842229962348938, 0.06501389294862747, -0.22004783153533936, 0.2008700966835022, -0.23544682562351227, 0.07002227008342743, -0.16411453485488892, 0.03580469265580177, 0.2691805064678192, -0.06266692280769348, 0.11805287003517151, 0.026002664119005203, -0.03782929107546806, 0.1501990705728531, -0.07475722581148148, -0.1350095570087433, 0.19586782157421112, 0.344999223947525, 0.018593238666653633, -0.098309226334095, 0.15893226861953735, 0.09796080738306046, -0.10304597020149231, 0.3302205502986908, -0.11597736924886703, -0.4178454577922821, -0.16100719571113586, 0.19501206278800964, -0.07592509686946869, -0.013373175635933876, -0.553117036819458, -0.05415068566799164, -0.025078771635890007, -0.23227404057979584, -0.10468204319477081, -0.21101237833499908, -0.1798178106546402, -0.1409425139427185, 0.11875886470079422, 0.15689195692539215, -0.36725562810897827, 0.05816173925995827, 0.02565891295671463, -0.527278482913971, 0.15686734020709991, 0.17608103156089783, -0.23744748532772064, 0.3554690182209015, -0.4340561330318451, 0.7189880013465881, 0.2688964903354645, -0.31812816858291626, -0.5022007822990417, 0.5680409669876099, 0.030773164704442024, -0.2513444423675537, 0.23248335719108582, 0.13050028681755066, 0.36795079708099365, -0.0902058407664299, -0.045542847365140915, 0.4133652150630951, 0.1749199777841568, 0.15492463111877441, -0.15933862328529358, -0.1822502464056015, -0.0845201388001442, 0.45664387941360474, -0.009959951974451542, 0.13512343168258667, 0.44232529401779175, 0.015391497872769833, 0.29205384850502014, -0.15933167934417725, -0.11698249727487564, 0.21042487025260925, 0.2764650583267212, -0.0643097534775734, -0.0503157414495945, -0.17494826018810272, -0.6882198452949524, 0.16304650902748108, -0.04519704356789589, 0.10863818228244781, -0.17266352474689484, -0.0962565615773201, -0.05876791849732399, 0.17786414921283722, -0.21987254917621613, -0.0006338558159768581, 0.06163325160741806, 0.013524172827601433, 0.20503079891204834, -0.15951192378997803, -0.11538105458021164, -0.018552592024207115, -0.30083906650543213, 0.12055836617946625, -0.036190204322338104, 0.6506062746047974, -0.03192879259586334, -0.3389306664466858, -0.06291312724351883, 0.16815221309661865, 0.281089186668396, -0.10667995363473892, 0.13875263929367065, 0.4054497182369232, 0.3778490126132965, -0.020555244758725166, -0.14240269362926483, 0.19271740317344666, -0.07156374305486679, -0.041800063103437424, 0.04898840934038162, 0.21058389544487, 0.18708978593349457, 0.04296630993485451, -0.09671526402235031, 0.27270442247390747, 0.06962525099515915, -0.12114845216274261, 0.33865073323249817, -0.3135738670825958, 0.2078835666179657, 0.012183972634375095, 0.18226440250873566, -0.07183051854372025, -0.00283547630533576, 0.36537256836891174, 0.40965551137924194, 0.2986348271369934, 0.10012633353471756, 0.14343611896038055, 0.4457695484161377, -0.18044725060462952, -0.04387227073311806, -0.005900569260120392, -0.09790337085723877, -0.3089536428451538, 0.3519889712333679, 0.2299085557460785, 0.27367615699768066, 0.26701924204826355, 0.10638952255249023, 0.10573194175958633, -0.20333409309387207, -0.07212351262569427, 0.2508986294269562, -0.23573708534240723, 0.0460970476269722, 0.22904284298419952, 0.05195501074194908, -0.320160835981369, -0.7086941003799438, 0.004322606138885021, 0.2170129418373108, 0.1619175225496292, -0.40004774928092957, -0.133630633354187, 0.06858077645301819, -0.01673894189298153, -0.014207002706825733, -0.014782523736357689, -0.011119063012301922, -0.08925484865903854, -0.02494584582746029, 0.5722149014472961, -0.02725284732878208, -0.007446060422807932, -0.004609968978911638, -0.12477834522724152, 0.04523750767111778, -0.2703438997268677, 0.01326061226427555, -0.026577454060316086, -0.23182189464569092, 0.0015914291143417358, 0.2357376366853714, 0.20119766891002655, 0.08585958927869797, -0.005043720826506615, -0.07879357784986496, -0.6310991644859314, -0.07272164523601532, 0.3549846112728119, -0.029691077768802643, 0.3201853930950165, 0.08343531936407089, 0.05839201807975769, 0.16839686036109924, -0.058086417615413666, 0.15401676297187805, -0.29321524500846863, -0.3509059548377991, 0.15224117040634155, 0.004696800839155912, -0.08407341688871384, -0.3390362560749054, -0.2182711511850357, -0.2832258343696594, -0.1280762404203415, -0.06256444752216339, -0.27076420187950134, 0.12190207093954086, 0.12304499000310898, 0.040882453322410583, -0.07627596706151962, -0.0005161333247087896, -0.20659542083740234, -0.18242467939853668, -0.28505775332450867, 0.1828649640083313, -0.024860858917236328, -0.47528141736984253, 0.011256472207605839, 0.0902094915509224, -0.31060048937797546, 0.4120301902294159, -0.321808785200119, -0.343559205532074, -0.00025236562942154706, 0.44813844561576843, 0.039569348096847534, 0.13343332707881927, 0.5098859071731567, 0.0732998177409172, -0.02385728806257248, -0.1984558403491974, -0.042268265038728714, 0.32649409770965576, -0.18307806551456451, -0.3145016133785248, -0.2623732388019562, 0.41896510124206543, -0.10969382524490356, 0.43089956045150757, -0.4012629985809326, 0.04068705067038536, 0.5144060850143433, -0.44222480058670044, 0.23259882628917694, -0.16545537114143372, -0.08933156728744507, 0.15286773443222046, -0.07561525702476501, -0.2332272231578827, 0.3624304234981537, 0.016461221501231194, -0.18270786106586456, 0.17197026312351227, 0.23841947317123413, -0.10900858789682388, -0.05036158859729767, 0.0036143651232123375, 0.4835428297519684, 0.2893317937850952, 0.05961315333843231, 0.2857690751552582, -0.04609540104866028, 0.08914782851934433, 0.05272258445620537, -0.026749378070235252, 0.06860823929309845, -0.07249622046947479, -0.4268142282962799, 0.10504041612148285, -0.3383755683898926, 0.009931979700922966, 0.17578212916851044, 0.07444534450769424, -0.10538134723901749, -0.051320843398571014, 0.229842409491539, -0.3461762070655823, 0.7944486737251282, 0.3208654224872589, 0.5116857886314392, 0.22151833772659302, -0.03710474818944931, -0.44580093026161194, -0.09146621078252792, -0.18855011463165283, -0.07161156088113785, -0.2269701212644577, 0.2907337546348572, -0.48201629519462585, -0.28635019063949585, -0.10544709861278534, -0.13091036677360535, -0.05454481765627861, -0.06393862515687943, -0.11578134447336197, -0.4110496938228607, -0.25068753957748413, -0.21491654217243195, 0.035110075026750565, 0.1288829892873764, -0.1448022425174713, 0.23164916038513184, 0.011403302662074566, -0.08352240920066833, -0.08743184804916382, 0.09445706009864807, 0.4569081664085388, -0.170241579413414, 0.16133564710617065, -0.11699067056179047, 0.22558210790157318, 0.49410176277160645, 0.457391619682312, -0.01697743870317936, 0.08421327918767929, 0.19687572121620178, -0.06420721858739853, 0.08086460828781128, 0.04204702004790306, -0.09457308053970337, -0.06655286997556686, -0.21687178313732147, -0.11448059976100922, -0.36686089634895325, 0.1704757958650589, 0.2924070656299591, -0.165342316031456, 0.2693546414375305, -0.2663230299949646, 0.5823423862457275, 0.043945156037807465, -0.02580253593623638, -0.19532065093517303, 0.4681093096733093, -0.380383163690567, 0.3432217836380005, -0.26537230610847473, 0.2873419523239136, -0.06885827332735062, 0.4313122034072876, 0.7008065581321716, -0.058905430138111115, -0.338080495595932, -0.12301863729953766, -0.10096845030784607, -0.47223541140556335, 0.1753246933221817, -0.08933237940073013, -0.0337911993265152, 0.18793608248233795, 0.4838543236255646, 0.05718120187520981, 0.055863648653030396, 0.1675000786781311, 0.08167281001806259, 0.019006486982107162, 0.23170439898967743, 0.03526879474520683, -0.1436118483543396, -0.4890637695789337, 0.14874088764190674, 0.021169235929846764, -0.20109331607818604, -0.07242532074451447, -0.05817459896206856, 0.1329450011253357, -0.14449843764305115, 0.01425999030470848, 0.29297974705696106, 0.009940979070961475, 0.4108924865722656, 0.09519775956869125, -0.1708308756351471, -0.3517209589481354, -0.049167416989803314, 0.0605442151427269, -0.25931572914123535, -0.16709759831428528, 0.19668100774288177, 0.04788661748170853, 0.21676085889339447, 0.1747458279132843, -0.1166771799325943, 0.23351983726024628, -0.18169862031936646, -0.08690560609102249, -0.34872668981552124, -0.31530261039733887, -0.5555328130722046, -0.026013044640421867, -0.08164184540510178, 0.39582422375679016, -0.4594127833843231, -0.22416839003562927, 0.044008467346429825, 0.06926745921373367, -0.18292388319969177, 0.0737869143486023, 0.0781617984175682, -0.11764093488454819, 0.14903779327869415, -0.19224536418914795, -0.09709987044334412, -0.16458182036876678, 0.39729732275009155, -0.1888645589351654, 0.2733500003814697, 0.3988220691680908, -0.08292359858751297, -0.09657250344753265, -0.24999545514583588, -0.09255999326705933, 0.34214726090431213, -0.1918976753950119, 0.04982182756066322, 0.26263850927352905, -0.23430195450782776, 0.026297714561223984, 0.5211960077285767, -0.0580749437212944, -0.21210893988609314, -0.18127478659152985, -0.1751708835363388, -0.22645319998264313, 0.04197051003575325, 0.04489649459719658, 0.2051747590303421, 0.32484644651412964, 0.0809679925441742, -0.15412646532058716, -0.4303953945636749, -0.2951538860797882, 0.3154313862323761, 0.15234768390655518, 0.06619980186223984, 0.1645580381155014, -0.15097293257713318, 0.10494979470968246, -0.31012046337127686, 0.18639647960662842, -0.12670660018920898, -0.1331552267074585, -0.1835681051015854, 0.0031749799381941557, 0.10305941104888916, 0.18288208544254303, -0.02768794633448124, -0.02460632286965847, -0.2905799448490143, -0.42575937509536743, -0.027252035215497017, 0.38758140802383423, 0.198362797498703, -0.1703229397535324, 0.26533764600753784, 0.39574378728866577, 0.19655679166316986, -0.3041132390499115, 0.18982554972171783, -0.06925952434539795, 0.15498419106006622, -0.09051520377397537, 0.17513173818588257, -0.5252895951271057, 0.12539786100387573, 0.1443905532360077, 0.19435453414916992, 0.45809999108314514, 0.0870855301618576, 0.46627405285835266, -0.47912946343421936, -0.20258617401123047, -0.06799401342868805, 0.6580538749694824, 0.09248675405979156, -0.14098626375198364, -0.14877016842365265, 0.09651827812194824, 0.1704956591129303, -0.34990420937538147, -0.19780249893665314, 0.16988080739974976, -0.5026938915252686, 0.1295885592699051, 0.07658785581588745, 0.3625056743621826, -0.037155602127313614, -0.02041945978999138, 0.1307496577501297, 0.4390919804573059, 0.4028511345386505, -0.42024505138397217, 0.1997433304786682, -0.24733862280845642, 0.30059242248535156, 0.3008420765399933, 0.018423954024910927, 0.015669431537389755, 0.673976719379425, 0.11376352608203888, 0.4838728606700897, -0.16755759716033936, 0.2450694590806961, -0.05959503352642059, -0.5638822317123413, 0.37526735663414, -0.0973973423242569, 0.16044601798057556, -0.12546207010746002, -0.24376598000526428, -0.006852445658296347, -0.04871336370706558, -0.1385122835636139, -0.1230999007821083, 0.05392668768763542, -0.2581233084201813, -0.32217568159103394, 0.1184186115860939, -0.08238530158996582, 0.27485087513923645, 0.23483598232269287, -0.30074188113212585, -0.2715661823749542, 0.14738881587982178, -0.08306168764829636, -0.0787949338555336, 0.12882153689861298, -0.013544485904276371, 0.2350115180015564, -0.09035812318325043, -0.062373507767915726, 0.4040203094482422, -0.4250260591506958, -0.2700785994529724, 0.11390265822410583, 0.11527074128389359, 0.2894170880317688, 0.16577410697937012, -0.15125073492527008, -0.3096247613430023, 0.0017672876128926873, -0.13107849657535553, -0.24564896523952484, 0.02269195020198822, -0.22057664394378662, 0.6052745580673218, 0.26926201581954956, 0.1256556361913681, -0.14016829431056976, -0.30335599184036255, 0.2205299437046051, 0.16922613978385925, -0.04769618436694145, 0.22231343388557434, 0.09025580435991287, -0.25321727991104126, 0.018038753420114517, 0.021880876272916794, -0.25171172618865967, -0.46154749393463135, 0.4515211880207062, 0.04280126094818115, 0.2925055921077728, -0.06525363028049469, 0.09338390082120895, 0.0037472841795533895, 0.4278216063976288, 0.269281804561615, 0.09005104005336761, -0.15277321636676788, -0.11250073462724686, -0.7306481599807739, 0.1001511812210083, 0.010367969051003456, -0.33215585350990295, 0.13848777115345, 0.28088968992233276, 0.3939918577671051, -0.10744620114564896, -0.12967684864997864, 0.0698973536491394, 0.149344339966774, -0.0030222211498767138, -0.14187581837177277, 0.06321222335100174, -0.08748503774404526, -0.02236746810376644, -0.21608588099479675, -0.6449931859970093, 0.2828080654144287, 0.062052227556705475, 0.09241219609975815, 0.05418746545910835, 0.1941908448934555, 0.05307108163833618, -0.5813897252082825, 0.29719409346580505, -0.1118294894695282, 0.40836989879608154, -0.09667275846004486, 0.14129391312599182, 0.004753309302031994, 0.039468713104724884, -0.12422696501016617, -0.16159729659557343, -0.2209189534187317, 0.22780628502368927, 0.013409290462732315, 0.09772804379463196, -0.2143726497888565, 0.1174916997551918, 0.009926020167768002, 0.0010641436092555523, -0.28021344542503357, 0.31302547454833984, -0.17508479952812195, -0.013857406564056873, -0.1837652325630188, 0.17026011645793915, -0.02687974087893963, 0.09224699437618256, -0.2016296535730362, -0.291922003030777, 0.22370117902755737, -0.5323669910430908, -0.21745756268501282, -0.13660094141960144, 0.05307215079665184, -0.22981436550617218, -0.12354264408349991, -0.2737533152103424, 0.11234782636165619, 0.11634132266044617, -0.0054342858493328094, -0.07013507187366486, 0.1906590312719345, -0.0430002324283123, 0.10014886409044266, -0.11133196949958801, 0.46310457587242126, 0.028580855578184128, -0.25694480538368225, -0.12211307138204575, -0.26053300499916077 ]
https://github.com/huggingface/datasets/issues/3114
load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem
Hi @lhoestq! I ended up using `fsspec.implementations.arrow.HadoopFileSystem` which doesn't have the problem I described with pyarrow 5.0.0. I'll try again with `PyArrowHDFS` once I update arrow to 6.0.0. Thanks!
## Describe the bug Passing a PyArrowHDFS implementation of fsspec.spec.AbstractFileSystem (in the `fs` param required by `load_from_disk` methods in `DatasetDict` (in datasets_dict.py) and `Dataset` (in arrow_dataset.py) results in an error when calling the download method in the `fs` parameter. ## Steps to reproduce the bug The documentation for the `fs` parameter states: ``` fs (:class:`~filesystems.S3FileSystem` or ``fsspec.spec.AbstractFileSystem``, optional, default ``None``): Instance of the remote filesystem used to download the files from. ``` `PyArrowHDFS` from [fsspec](https://filesystem-spec.readthedocs.io/en/latest/_modules/fsspec/implementations/hdfs.html) implements `fsspec.spec.AbstractFileSystem`. However, when using it as shown below, I get an error. ```python from fsspec.implementations.hdfs import PyArrowHDFS ... transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/" fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket) dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True) ``` ## Expected results Previous to load from disk, I have managed to successfully store in HDFS the data and meta-information of a DatasetDict by doing: ```python transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/" fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket) my_datasets.save_to_disk(transformed_corpus_path, fs=fs) ``` As I have 3 datasets in the DatasetDict named `my_datasets`, the previous Python code creates the following contents in HDFS: ```sh $ hadoop fs -ls "/user/my_user/clickbait/transformed_ds/" Found 4 items -rw------- 3 my_user users 43 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/dataset_dict.json drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/test drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/train drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/validation ``` I would expect to recover on `dss` the Arrow-backed datasets I previously saved in HDFS calling the `save_to_disk` method on the `DatasetDict` object when invoking `DatasetDict.load_from_disk(...)` as described above. ## Actual results However, when trying to recover the saved datasets, I get this error: ``` ... File "/home/fperez/dev/neuromancer/neuromancer/corpus.py", line 186, in load_transformed_corpus_from_disk dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True) File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/dataset_dict.py", line 748, in load_from_disk dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory) File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1048, in load_from_disk fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True) File "pyarrow/_hdfsio.pyx", line 438, in pyarrow._hdfsio.HadoopFileSystem.download TypeError: download() got an unexpected keyword argument 'recursive' ``` Examining the [signature of the download method in pyarrow 5.0.0](https://github.com/apache/arrow/blob/54d2bd89c99df72fa091b025452f85dd5d88e3cf/python/pyarrow/_hdfsio.pyx#L438) we can see that there's no download parameter: ```python def download(self, path, stream, buffer_size=None): with self.open(path, 'rb') as f: f.download(stream, buffer_size=buffer_size) ``` ## Environment info - `datasets` version: 1.13.3 - Platform: Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-glibc2.33 - Python version: 3.9.7 - PyArrow version: 5.0.0
29
load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem
[ -0.44231146574020386, 0.19259308278560638, -0.024335132911801338, 0.1918845921754837, 0.2955562472343445, -0.2881154716014862, 0.415726900100708, -0.057419054210186005, 0.08501860499382019, 0.017146823927760124, -0.05435926467180252, 0.1338905394077301, 0.20884260535240173, 0.41140249371528625, 0.23639889061450958, 0.19462287425994873, 0.194937065243721, 0.1188431829214096, -0.13970205187797546, -0.1272362768650055, -0.0634358748793602, 0.19003884494304657, -0.07794282585382462, -0.06492909044027328, -0.14748845994472504, 0.2935090959072113, -0.15628162026405334, 0.5041362047195435, -0.2827562391757965, -0.2242179811000824, 0.48214155435562134, 0.2699849009513855, 0.31677722930908203, 0.09924964606761932, -0.00011400075163692236, 0.14736303687095642, 0.210146963596344, -0.10497505962848663, -0.04828028380870819, 0.20707327127456665, 0.24142102897167206, -0.03772896155714989, 0.05964189022779465, -0.10547950118780136, -0.2898038327693939, -0.2557695806026459, 0.055561766028404236, 0.06387660652399063, 0.08866386860609055, 0.2913261950016022, 0.14613011479377747, 0.25269004702568054, 0.1200043112039566, 0.022103192284703255, 0.3909764587879181, 0.2179919183254242, -0.16767773032188416, 0.18810907006263733, 0.03977062180638313, -0.1899820864200592, -0.3843255937099457, -0.18254411220550537, -0.1673288345336914, 0.10046012699604034, 0.3150538504123688, 0.13088218867778778, -0.10110334306955338, 0.052544329315423965, -0.12154126912355423, -0.02631504088640213, 0.4778391122817993, -0.5678110122680664, -0.18834973871707916, -0.0339597687125206, -0.3347890079021454, 0.06200699135661125, 0.17307154834270477, 0.03976539149880409, -0.2053362876176834, 0.1983422189950943, 0.15517742931842804, -0.1626516878604889, -0.304731160402298, 0.24207742512226105, -0.2028140425682068, -0.1826397180557251, -0.047586023807525635, 0.1070135086774826, 0.25031778216362, -0.01782103069126606, 0.2350073605775833, -0.10367636382579803, 0.048028990626335144, 0.11761144548654556, -0.07252854108810425, -0.05598141625523567, 0.3477802574634552, 0.017746105790138245, 0.11232596635818481, -0.04787479713559151, -0.15033651888370514, 0.26455962657928467, 0.3424417972564697, 0.1484808772802353, 0.1865224391222, -0.0993141457438469, -0.011977109126746655, 0.06498463451862335, 0.10315388441085815, -0.014680974185466766, -0.06474870443344116, 0.04111471399664879, -0.06333425641059875, -0.1216733306646347, -0.03739529848098755, -0.2450145184993744, 0.007005925755947828, -0.22561496496200562, -0.09492436796426773, -0.09398411214351654, 0.31411013007164, -0.03675500303506851, 0.045071303844451904, 0.3336963653564453, 0.28419771790504456, -0.03297525271773338, -0.11842229962348938, 0.06501389294862747, -0.22004783153533936, 0.2008700966835022, -0.23544682562351227, 0.07002227008342743, -0.16411453485488892, 0.03580469265580177, 0.2691805064678192, -0.06266692280769348, 0.11805287003517151, 0.026002664119005203, -0.03782929107546806, 0.1501990705728531, -0.07475722581148148, -0.1350095570087433, 0.19586782157421112, 0.344999223947525, 0.018593238666653633, -0.098309226334095, 0.15893226861953735, 0.09796080738306046, -0.10304597020149231, 0.3302205502986908, -0.11597736924886703, -0.4178454577922821, -0.16100719571113586, 0.19501206278800964, -0.07592509686946869, -0.013373175635933876, -0.553117036819458, -0.05415068566799164, -0.025078771635890007, -0.23227404057979584, -0.10468204319477081, -0.21101237833499908, -0.1798178106546402, -0.1409425139427185, 0.11875886470079422, 0.15689195692539215, -0.36725562810897827, 0.05816173925995827, 0.02565891295671463, -0.527278482913971, 0.15686734020709991, 0.17608103156089783, -0.23744748532772064, 0.3554690182209015, -0.4340561330318451, 0.7189880013465881, 0.2688964903354645, -0.31812816858291626, -0.5022007822990417, 0.5680409669876099, 0.030773164704442024, -0.2513444423675537, 0.23248335719108582, 0.13050028681755066, 0.36795079708099365, -0.0902058407664299, -0.045542847365140915, 0.4133652150630951, 0.1749199777841568, 0.15492463111877441, -0.15933862328529358, -0.1822502464056015, -0.0845201388001442, 0.45664387941360474, -0.009959951974451542, 0.13512343168258667, 0.44232529401779175, 0.015391497872769833, 0.29205384850502014, -0.15933167934417725, -0.11698249727487564, 0.21042487025260925, 0.2764650583267212, -0.0643097534775734, -0.0503157414495945, -0.17494826018810272, -0.6882198452949524, 0.16304650902748108, -0.04519704356789589, 0.10863818228244781, -0.17266352474689484, -0.0962565615773201, -0.05876791849732399, 0.17786414921283722, -0.21987254917621613, -0.0006338558159768581, 0.06163325160741806, 0.013524172827601433, 0.20503079891204834, -0.15951192378997803, -0.11538105458021164, -0.018552592024207115, -0.30083906650543213, 0.12055836617946625, -0.036190204322338104, 0.6506062746047974, -0.03192879259586334, -0.3389306664466858, -0.06291312724351883, 0.16815221309661865, 0.281089186668396, -0.10667995363473892, 0.13875263929367065, 0.4054497182369232, 0.3778490126132965, -0.020555244758725166, -0.14240269362926483, 0.19271740317344666, -0.07156374305486679, -0.041800063103437424, 0.04898840934038162, 0.21058389544487, 0.18708978593349457, 0.04296630993485451, -0.09671526402235031, 0.27270442247390747, 0.06962525099515915, -0.12114845216274261, 0.33865073323249817, -0.3135738670825958, 0.2078835666179657, 0.012183972634375095, 0.18226440250873566, -0.07183051854372025, -0.00283547630533576, 0.36537256836891174, 0.40965551137924194, 0.2986348271369934, 0.10012633353471756, 0.14343611896038055, 0.4457695484161377, -0.18044725060462952, -0.04387227073311806, -0.005900569260120392, -0.09790337085723877, -0.3089536428451538, 0.3519889712333679, 0.2299085557460785, 0.27367615699768066, 0.26701924204826355, 0.10638952255249023, 0.10573194175958633, -0.20333409309387207, -0.07212351262569427, 0.2508986294269562, -0.23573708534240723, 0.0460970476269722, 0.22904284298419952, 0.05195501074194908, -0.320160835981369, -0.7086941003799438, 0.004322606138885021, 0.2170129418373108, 0.1619175225496292, -0.40004774928092957, -0.133630633354187, 0.06858077645301819, -0.01673894189298153, -0.014207002706825733, -0.014782523736357689, -0.011119063012301922, -0.08925484865903854, -0.02494584582746029, 0.5722149014472961, -0.02725284732878208, -0.007446060422807932, -0.004609968978911638, -0.12477834522724152, 0.04523750767111778, -0.2703438997268677, 0.01326061226427555, -0.026577454060316086, -0.23182189464569092, 0.0015914291143417358, 0.2357376366853714, 0.20119766891002655, 0.08585958927869797, -0.005043720826506615, -0.07879357784986496, -0.6310991644859314, -0.07272164523601532, 0.3549846112728119, -0.029691077768802643, 0.3201853930950165, 0.08343531936407089, 0.05839201807975769, 0.16839686036109924, -0.058086417615413666, 0.15401676297187805, -0.29321524500846863, -0.3509059548377991, 0.15224117040634155, 0.004696800839155912, -0.08407341688871384, -0.3390362560749054, -0.2182711511850357, -0.2832258343696594, -0.1280762404203415, -0.06256444752216339, -0.27076420187950134, 0.12190207093954086, 0.12304499000310898, 0.040882453322410583, -0.07627596706151962, -0.0005161333247087896, -0.20659542083740234, -0.18242467939853668, -0.28505775332450867, 0.1828649640083313, -0.024860858917236328, -0.47528141736984253, 0.011256472207605839, 0.0902094915509224, -0.31060048937797546, 0.4120301902294159, -0.321808785200119, -0.343559205532074, -0.00025236562942154706, 0.44813844561576843, 0.039569348096847534, 0.13343332707881927, 0.5098859071731567, 0.0732998177409172, -0.02385728806257248, -0.1984558403491974, -0.042268265038728714, 0.32649409770965576, -0.18307806551456451, -0.3145016133785248, -0.2623732388019562, 0.41896510124206543, -0.10969382524490356, 0.43089956045150757, -0.4012629985809326, 0.04068705067038536, 0.5144060850143433, -0.44222480058670044, 0.23259882628917694, -0.16545537114143372, -0.08933156728744507, 0.15286773443222046, -0.07561525702476501, -0.2332272231578827, 0.3624304234981537, 0.016461221501231194, -0.18270786106586456, 0.17197026312351227, 0.23841947317123413, -0.10900858789682388, -0.05036158859729767, 0.0036143651232123375, 0.4835428297519684, 0.2893317937850952, 0.05961315333843231, 0.2857690751552582, -0.04609540104866028, 0.08914782851934433, 0.05272258445620537, -0.026749378070235252, 0.06860823929309845, -0.07249622046947479, -0.4268142282962799, 0.10504041612148285, -0.3383755683898926, 0.009931979700922966, 0.17578212916851044, 0.07444534450769424, -0.10538134723901749, -0.051320843398571014, 0.229842409491539, -0.3461762070655823, 0.7944486737251282, 0.3208654224872589, 0.5116857886314392, 0.22151833772659302, -0.03710474818944931, -0.44580093026161194, -0.09146621078252792, -0.18855011463165283, -0.07161156088113785, -0.2269701212644577, 0.2907337546348572, -0.48201629519462585, -0.28635019063949585, -0.10544709861278534, -0.13091036677360535, -0.05454481765627861, -0.06393862515687943, -0.11578134447336197, -0.4110496938228607, -0.25068753957748413, -0.21491654217243195, 0.035110075026750565, 0.1288829892873764, -0.1448022425174713, 0.23164916038513184, 0.011403302662074566, -0.08352240920066833, -0.08743184804916382, 0.09445706009864807, 0.4569081664085388, -0.170241579413414, 0.16133564710617065, -0.11699067056179047, 0.22558210790157318, 0.49410176277160645, 0.457391619682312, -0.01697743870317936, 0.08421327918767929, 0.19687572121620178, -0.06420721858739853, 0.08086460828781128, 0.04204702004790306, -0.09457308053970337, -0.06655286997556686, -0.21687178313732147, -0.11448059976100922, -0.36686089634895325, 0.1704757958650589, 0.2924070656299591, -0.165342316031456, 0.2693546414375305, -0.2663230299949646, 0.5823423862457275, 0.043945156037807465, -0.02580253593623638, -0.19532065093517303, 0.4681093096733093, -0.380383163690567, 0.3432217836380005, -0.26537230610847473, 0.2873419523239136, -0.06885827332735062, 0.4313122034072876, 0.7008065581321716, -0.058905430138111115, -0.338080495595932, -0.12301863729953766, -0.10096845030784607, -0.47223541140556335, 0.1753246933221817, -0.08933237940073013, -0.0337911993265152, 0.18793608248233795, 0.4838543236255646, 0.05718120187520981, 0.055863648653030396, 0.1675000786781311, 0.08167281001806259, 0.019006486982107162, 0.23170439898967743, 0.03526879474520683, -0.1436118483543396, -0.4890637695789337, 0.14874088764190674, 0.021169235929846764, -0.20109331607818604, -0.07242532074451447, -0.05817459896206856, 0.1329450011253357, -0.14449843764305115, 0.01425999030470848, 0.29297974705696106, 0.009940979070961475, 0.4108924865722656, 0.09519775956869125, -0.1708308756351471, -0.3517209589481354, -0.049167416989803314, 0.0605442151427269, -0.25931572914123535, -0.16709759831428528, 0.19668100774288177, 0.04788661748170853, 0.21676085889339447, 0.1747458279132843, -0.1166771799325943, 0.23351983726024628, -0.18169862031936646, -0.08690560609102249, -0.34872668981552124, -0.31530261039733887, -0.5555328130722046, -0.026013044640421867, -0.08164184540510178, 0.39582422375679016, -0.4594127833843231, -0.22416839003562927, 0.044008467346429825, 0.06926745921373367, -0.18292388319969177, 0.0737869143486023, 0.0781617984175682, -0.11764093488454819, 0.14903779327869415, -0.19224536418914795, -0.09709987044334412, -0.16458182036876678, 0.39729732275009155, -0.1888645589351654, 0.2733500003814697, 0.3988220691680908, -0.08292359858751297, -0.09657250344753265, -0.24999545514583588, -0.09255999326705933, 0.34214726090431213, -0.1918976753950119, 0.04982182756066322, 0.26263850927352905, -0.23430195450782776, 0.026297714561223984, 0.5211960077285767, -0.0580749437212944, -0.21210893988609314, -0.18127478659152985, -0.1751708835363388, -0.22645319998264313, 0.04197051003575325, 0.04489649459719658, 0.2051747590303421, 0.32484644651412964, 0.0809679925441742, -0.15412646532058716, -0.4303953945636749, -0.2951538860797882, 0.3154313862323761, 0.15234768390655518, 0.06619980186223984, 0.1645580381155014, -0.15097293257713318, 0.10494979470968246, -0.31012046337127686, 0.18639647960662842, -0.12670660018920898, -0.1331552267074585, -0.1835681051015854, 0.0031749799381941557, 0.10305941104888916, 0.18288208544254303, -0.02768794633448124, -0.02460632286965847, -0.2905799448490143, -0.42575937509536743, -0.027252035215497017, 0.38758140802383423, 0.198362797498703, -0.1703229397535324, 0.26533764600753784, 0.39574378728866577, 0.19655679166316986, -0.3041132390499115, 0.18982554972171783, -0.06925952434539795, 0.15498419106006622, -0.09051520377397537, 0.17513173818588257, -0.5252895951271057, 0.12539786100387573, 0.1443905532360077, 0.19435453414916992, 0.45809999108314514, 0.0870855301618576, 0.46627405285835266, -0.47912946343421936, -0.20258617401123047, -0.06799401342868805, 0.6580538749694824, 0.09248675405979156, -0.14098626375198364, -0.14877016842365265, 0.09651827812194824, 0.1704956591129303, -0.34990420937538147, -0.19780249893665314, 0.16988080739974976, -0.5026938915252686, 0.1295885592699051, 0.07658785581588745, 0.3625056743621826, -0.037155602127313614, -0.02041945978999138, 0.1307496577501297, 0.4390919804573059, 0.4028511345386505, -0.42024505138397217, 0.1997433304786682, -0.24733862280845642, 0.30059242248535156, 0.3008420765399933, 0.018423954024910927, 0.015669431537389755, 0.673976719379425, 0.11376352608203888, 0.4838728606700897, -0.16755759716033936, 0.2450694590806961, -0.05959503352642059, -0.5638822317123413, 0.37526735663414, -0.0973973423242569, 0.16044601798057556, -0.12546207010746002, -0.24376598000526428, -0.006852445658296347, -0.04871336370706558, -0.1385122835636139, -0.1230999007821083, 0.05392668768763542, -0.2581233084201813, -0.32217568159103394, 0.1184186115860939, -0.08238530158996582, 0.27485087513923645, 0.23483598232269287, -0.30074188113212585, -0.2715661823749542, 0.14738881587982178, -0.08306168764829636, -0.0787949338555336, 0.12882153689861298, -0.013544485904276371, 0.2350115180015564, -0.09035812318325043, -0.062373507767915726, 0.4040203094482422, -0.4250260591506958, -0.2700785994529724, 0.11390265822410583, 0.11527074128389359, 0.2894170880317688, 0.16577410697937012, -0.15125073492527008, -0.3096247613430023, 0.0017672876128926873, -0.13107849657535553, -0.24564896523952484, 0.02269195020198822, -0.22057664394378662, 0.6052745580673218, 0.26926201581954956, 0.1256556361913681, -0.14016829431056976, -0.30335599184036255, 0.2205299437046051, 0.16922613978385925, -0.04769618436694145, 0.22231343388557434, 0.09025580435991287, -0.25321727991104126, 0.018038753420114517, 0.021880876272916794, -0.25171172618865967, -0.46154749393463135, 0.4515211880207062, 0.04280126094818115, 0.2925055921077728, -0.06525363028049469, 0.09338390082120895, 0.0037472841795533895, 0.4278216063976288, 0.269281804561615, 0.09005104005336761, -0.15277321636676788, -0.11250073462724686, -0.7306481599807739, 0.1001511812210083, 0.010367969051003456, -0.33215585350990295, 0.13848777115345, 0.28088968992233276, 0.3939918577671051, -0.10744620114564896, -0.12967684864997864, 0.0698973536491394, 0.149344339966774, -0.0030222211498767138, -0.14187581837177277, 0.06321222335100174, -0.08748503774404526, -0.02236746810376644, -0.21608588099479675, -0.6449931859970093, 0.2828080654144287, 0.062052227556705475, 0.09241219609975815, 0.05418746545910835, 0.1941908448934555, 0.05307108163833618, -0.5813897252082825, 0.29719409346580505, -0.1118294894695282, 0.40836989879608154, -0.09667275846004486, 0.14129391312599182, 0.004753309302031994, 0.039468713104724884, -0.12422696501016617, -0.16159729659557343, -0.2209189534187317, 0.22780628502368927, 0.013409290462732315, 0.09772804379463196, -0.2143726497888565, 0.1174916997551918, 0.009926020167768002, 0.0010641436092555523, -0.28021344542503357, 0.31302547454833984, -0.17508479952812195, -0.013857406564056873, -0.1837652325630188, 0.17026011645793915, -0.02687974087893963, 0.09224699437618256, -0.2016296535730362, -0.291922003030777, 0.22370117902755737, -0.5323669910430908, -0.21745756268501282, -0.13660094141960144, 0.05307215079665184, -0.22981436550617218, -0.12354264408349991, -0.2737533152103424, 0.11234782636165619, 0.11634132266044617, -0.0054342858493328094, -0.07013507187366486, 0.1906590312719345, -0.0430002324283123, 0.10014886409044266, -0.11133196949958801, 0.46310457587242126, 0.028580855578184128, -0.25694480538368225, -0.12211307138204575, -0.26053300499916077 ]
https://github.com/huggingface/datasets/issues/3113
Loading Data from HDF files
I would also like this support or something similar. Geospatial datasets come in netcdf which is derived from hdf5, or zarr. I've gotten zarr stores to work with datasets and streaming, but it takes awhile to convert the data to zarr if it's not stored in that natively.
**Is your feature request related to a problem? Please describe.** More often than not I come along big HDF datasets, and currently there is no straight forward way to feed them to a dataset. **Describe the solution you'd like** I would love to see a `from_h5` method that gets an interface implemented by the user on how items are extracted from dataset (in case of multiple datasets containing elements like arrays and metadata and etc). **Describe alternatives you've considered** Currently I manually load hdf files using `h5py` and implement PyTorch dataset interface. For small h5 files I load them into a pandas dataframe and use `from_pandas` function in the `datasets` package to load them, but for big datasets this is not feasible. **Additional context** HDF files are widespread throughout different domains and are one of the go to's for many researchers/scientists/engineers who work with numerical data. Given `datasets`' usecases have outgrown NLP use cases, it will make a lot of sense focusing on things like supporting HDF files.
48
Loading Data from HDF files
[ -0.32506072521209717, 0.007684177719056606, -0.15652869641780853, 0.3161044120788574, -0.024933526292443275, 0.1889023780822754, 0.1782037913799286, 0.3778652846813202, 0.2864287495613098, 0.21401019394397736, -0.42155927419662476, -0.18491148948669434, 0.2638891935348511, 0.1619223803281784, -0.17733658850193024, 0.06198234111070633, 0.007461722940206528, 0.2316368967294693, 0.029201772063970566, -0.34862884879112244, -0.20642711222171783, 0.10896676778793335, 0.08307377994060516, 0.09489062428474426, -0.36958107352256775, -0.025485869497060776, -0.07110452651977539, 0.5868324637413025, 0.008394504897296429, 0.12252026051282883, -0.017774859443306923, 0.35872483253479004, 0.46887698769569397, 0.2896465063095093, -0.00010472509893588722, 0.07419934868812561, 0.01808382384479046, -0.09935668110847473, -0.055174604058265686, 0.28322821855545044, 0.3965977430343628, -0.179061159491539, 0.00285357516258955, -0.3039640486240387, -0.21239615976810455, -0.12375912815332413, -0.03751862421631813, -0.006627566646784544, 0.3160112798213959, -0.08581743389368057, 0.27530038356781006, -0.03380291908979416, -0.09726996719837189, 0.07808041572570801, 0.3722647726535797, 0.4057905972003937, 0.16526982188224792, 0.41975027322769165, 0.36205601692199707, -0.13711412250995636, -0.0767747163772583, 0.3678973615169525, -0.10749475657939911, 0.15318447351455688, 0.15022806823253632, 0.10680088400840759, 0.017763467505574226, -0.047431912273168564, 0.036859527230262756, 0.19053412973880768, 0.37570178508758545, -0.018517296761274338, -0.13750046491622925, -0.0848340392112732, -0.23242954909801483, 0.008878796361386776, 0.22400441765785217, 0.06606611609458923, -0.26089906692504883, 0.10794221609830856, 0.1824677288532257, -0.30504050850868225, -0.12706226110458374, 0.06872208416461945, -0.17518462240695953, -0.10551668703556061, -0.018186762928962708, -0.149886816740036, 0.23455581068992615, 0.0667264387011528, 0.075660340487957, -0.23460522294044495, 0.028647668659687042, 0.10631091892719269, 0.0819920226931572, -0.0712457001209259, -0.24552424252033234, 0.07005961984395981, -0.024563439190387726, -0.27764037251472473, 0.1315438151359558, 0.20988553762435913, -0.37088334560394287, 0.058936551213264465, 0.086239755153656, -0.2913529574871063, -0.1367652267217636, -0.1263875514268875, -0.07331635802984238, 0.07476449012756348, -0.35178402066230774, -0.17764438688755035, -0.33988332748413086, 0.17627350986003876, -0.42046335339546204, -0.11027401685714722, -0.2374488264322281, -0.4253694415092468, -0.22536808252334595, 0.0942268818616867, 0.39533793926239014, -0.10143223404884338, 0.15603968501091003, 0.6129899024963379, 0.03637821227312088, 0.12371604889631271, 0.08554276078939438, 0.04750165343284607, -0.18686118721961975, -0.25658297538757324, -0.09010505676269531, 0.07337846606969833, -0.05436079204082489, 0.00019517866894602776, 0.08139161765575409, -0.08966007828712463, 0.004732654895633459, -0.024413611739873886, 0.2895452678203583, -0.007513556629419327, 0.29516640305519104, -0.41077861189842224, 0.21489648520946503, 0.12084652483463287, -0.007424468640238047, -0.10231844335794449, 0.3620584011077881, -0.18953317403793335, 0.06056906282901764, 0.10302208364009857, -0.31618764996528625, 0.034844283014535904, -0.19226716458797455, 0.2811337113380432, 0.37217989563941956, 0.02538921870291233, -0.24732555449008942, 0.07975505292415619, -0.2945762872695923, -0.4909389019012451, -0.08625082671642303, 0.05375247076153755, 0.10722356289625168, -0.17264540493488312, -0.0029205360915511847, 0.4402158558368683, -0.45157015323638916, 0.08901139348745346, 0.02836282178759575, -0.31572428345680237, 0.06787960231304169, -0.02217305451631546, -0.15252867341041565, 0.2654285132884979, -0.3511582612991333, 0.16478635370731354, 0.20218998193740845, -0.13702571392059326, -0.08904200792312622, 0.6702113151550293, 0.18169644474983215, 0.01972704380750656, 0.04548828303813934, 0.20153123140335083, 0.3225010335445404, -0.23443257808685303, 0.1175462007522583, 0.16385792195796967, 0.21287725865840912, -0.14571735262870789, -0.06885133683681488, -0.12590064108371735, -0.25813162326812744, 0.3148646652698517, -0.018004409968852997, 0.45311617851257324, 0.34723302721977234, -0.29392334818840027, 0.4970342516899109, -0.17092789709568024, -0.13220524787902832, 0.4564363360404968, -0.03656677156686783, 0.3832424581050873, -0.11448104679584503, 0.14235751330852509, -0.22867679595947266, -0.05335342139005661, -0.10515175759792328, -0.5148615837097168, 0.3475952744483948, -0.12408657371997833, 0.11615251749753952, -0.000303533481201157, 0.12638723850250244, 0.4376642107963562, 0.20590543746948242, 0.3113657832145691, -0.24307216703891754, -0.2097521275281906, -0.2777003049850464, 0.32711100578308105, -0.28013062477111816, 0.019333887845277786, 0.13147354125976562, 0.6298840045928955, 0.09014785289764404, -0.029150083661079407, 0.09641256928443909, 0.062059249728918076, 0.14992663264274597, -0.07937402278184891, 0.16669237613677979, 0.11771731078624725, 0.06995104998350143, 0.13021019101142883, 0.2935190200805664, 0.1260162889957428, -0.03763875365257263, 0.08100659400224686, 0.21161113679409027, 0.005520425271242857, 0.23536598682403564, 0.059668295085430145, -0.023288637399673462, 0.4813321530818939, -0.09665323048830032, -0.06828507781028748, 0.18201275169849396, -0.1336970180273056, 0.05802854895591736, -0.03289433568716049, 0.18441958725452423, -0.22495053708553314, 0.2747502028942108, 0.2406722456216812, 0.1605590283870697, -0.030831240117549896, -0.4998815655708313, 0.12486813217401505, 0.1492309868335724, -0.013572591356933117, -0.07540252804756165, 0.24125440418720245, 0.010871587321162224, 0.07388237863779068, 0.3337429165840149, 0.037431612610816956, 0.06213006749749184, 0.3694382905960083, 0.02954128198325634, -0.07661640644073486, -0.13232000172138214, -0.015954459086060524, -0.07040344178676605, -0.12185061722993851, -0.15953075885772705, 0.17515622079372406, -0.31068533658981323, 0.07920708507299423, -0.4384348392486572, -0.0705772414803505, 0.05960323289036751, -0.08172458410263062, -0.22526666522026062, 0.016241591423749924, -0.126961812376976, -0.26110514998435974, 0.07697248458862305, -0.09370195865631104, -0.15164639055728912, -0.157949760556221, 0.07312793284654617, 0.2126528024673462, -0.00606203731149435, -0.2463650405406952, -0.11934000253677368, 0.1206398606300354, -0.23834677040576935, 0.3181355893611908, -0.32205766439437866, 0.0347105972468853, -0.20410020649433136, 0.1903713196516037, 0.23940764367580414, 0.23663291335105896, 0.22685514390468597, 0.07438985258340836, 0.11987531185150146, -0.3998974561691284, 0.016537033021450043, 0.08859201520681381, 0.0655476376414299, -0.13067562878131866, -0.26420164108276367, 0.21496544778347015, -0.1069120541214943, -0.26129618287086487, 0.04175690934062004, 0.10273005068302155, -0.018031125888228416, -0.07190722227096558, 0.011536157689988613, -0.10176138579845428, 0.018634196370840073, 0.28732219338417053, -0.18346567451953888, -0.30867406725883484, -0.2617343068122864, 0.19939613342285156, 0.2969958484172821, -0.17143642902374268, -0.07543915510177612, -0.06199576333165169, -0.09529820084571838, 0.007484212517738342, -0.18456418812274933, -0.41353392601013184, -0.033552128821611404, -0.26210495829582214, -0.2863920331001282, 0.11027957499027252, -0.14057029783725739, -0.46411702036857605, 0.09004910290241241, -0.3984285295009613, -0.33890002965927124, 0.11588522791862488, -0.20751141011714935, -0.422591894865036, 0.03220301866531372, -0.00007172864570748061, -0.16129963099956512, -0.23192110657691956, -0.19609807431697845, 0.038092609494924545, 0.14268527925014496, -0.08387361466884613, 0.053976692259311676, -0.3517153561115265, 0.1086401715874672, -0.3396461308002472, 0.18219047784805298, -0.011260617524385452, -0.1576894372701645, 0.5689947009086609, 0.00769819738343358, 0.30657443404197693, 0.023281143978238106, -0.06596358865499496, -0.13602326810359955, 0.10882504284381866, -0.004598085768520832, 0.2592446208000183, 0.013664080761373043, -0.17952950298786163, -0.07505220174789429, 0.21338266134262085, -0.35449695587158203, -0.06210020184516907, -0.06282689422369003, -0.1515161544084549, -0.005888723768293858, 0.13007794320583344, 0.18719957768917084, -0.18947771191596985, -0.004787419456988573, 0.2497238963842392, 0.2919798195362091, 0.21357083320617676, -0.11213327199220657, -0.0073784226551651955, -0.05768764764070511, 0.11544523388147354, 0.238303542137146, 0.110306017100811, -0.21629565954208374, -0.266353040933609, -0.06979953497648239, 0.21506379544734955, -0.1308434009552002, 0.8304200768470764, -0.026182496920228004, 0.14767394959926605, 0.12377028167247772, -0.15870420634746552, 0.22657154500484467, 0.17602145671844482, -0.23469863831996918, -0.18615058064460754, -0.11475690454244614, 0.5591118931770325, -0.20472481846809387, -0.1413271427154541, -0.04172394052147865, -0.10670005530118942, -0.31583184003829956, -0.1798115074634552, -0.018441788852214813, -0.12890774011611938, -0.1624021679162979, -0.17797565460205078, -0.33105891942977905, -0.10289865732192993, -0.07183187454938889, 0.09932421147823334, -0.21866731345653534, 0.22916731238365173, 0.34477946162223816, -0.0661432147026062, 0.3481188416481018, 0.2497936338186264, 0.09028373658657074, -0.0797792300581932, 0.6408854126930237, 0.2598282992839813, 0.5038313865661621, 0.05871567502617836, 0.451351523399353, 0.13664135336875916, -0.2901535928249359, 0.01742698810994625, 0.4600391089916229, 0.23056772351264954, 0.16437920928001404, -0.01655416004359722, 0.06517347693443298, -0.35098761320114136, 0.1634453982114792, 0.023333542048931122, -0.12107870727777481, -0.014973627403378487, -0.160454660654068, 0.43591466546058655, -0.4659665524959564, -0.12019139528274536, 0.16145114600658417, 0.3467419445514679, 0.13483773171901703, 0.3176809549331665, 0.22107650339603424, 0.8990130424499512, -0.2028723806142807, 0.21210335195064545, 0.3568911850452423, -0.2907075583934784, -0.3380432426929474, -0.6298674941062927, -0.3769029378890991, -0.32049116492271423, -0.2781391739845276, -0.22952300310134888, 0.03769972547888756, 0.10623788088560104, 0.29199331998825073, 0.010491747409105301, -0.016839072108268738, 0.24621523916721344, -0.03639913350343704, 0.029119422659277916, 0.10260208696126938, 0.16629450023174286, -0.20811790227890015, -0.25947073101997375, 0.23481227457523346, 0.08238149434328079, 0.005018026102334261, -0.20707322657108307, -0.2507174611091614, 0.206009641289711, 0.01725216954946518, 0.20768091082572937, 0.016635574400424957, -0.04913761466741562, 0.244795560836792, 0.06790616363286972, -0.23454013466835022, -0.4967086613178253, -0.03274422138929367, 0.19970038533210754, -0.017248909920454025, -0.1097976565361023, -0.07310249656438828, 0.2939799726009369, -0.09120136499404907, -0.2496192306280136, 0.04421497881412506, 0.2743249833583832, -0.17523866891860962, -0.017850402742624283, 0.18933705985546112, 0.06006104499101639, -0.22745583951473236, 0.31883248686790466, 0.06713411957025528, 0.01968872733414173, -0.23844337463378906, -0.4301283061504364, 0.11770796030759811, -0.17113302648067474, 0.01876724325120449, 0.19490642845630646, 0.03768320009112358, -0.08593754470348358, -0.035220205783843994, 0.22150012850761414, -0.13562501966953278, -0.2034328132867813, 0.33001911640167236, -0.10020257532596588, -0.07541865110397339, 0.30189043283462524, 0.07156988978385925, -0.22182825207710266, -0.3146355152130127, 0.05262566730380058, 0.2486620545387268, -0.29361122846603394, -0.09746522456407547, 0.03978395462036133, -0.1528247892856598, -0.0019163870019838214, -0.12809790670871735, 0.05584266781806946, -0.35200220346450806, -0.2372390329837799, -0.21216973662376404, -0.33421799540519714, 0.3928898274898529, -0.19203472137451172, 0.16625237464904785, 0.1516546756029129, -0.024929266422986984, -0.14041058719158173, 0.0005960527341812849, -0.43117693066596985, 0.2471403032541275, -0.014479628764092922, -0.016673441976308823, -0.1911943405866623, -0.02788335643708706, -0.021704955026507378, 0.11842084676027298, 0.3164997696876526, 0.016257787123322487, -0.03316092863678932, -0.3324142098426819, -0.07944874465465546, 0.08820874243974686, -0.06501998007297516, 0.017177850008010864, -0.1667499989271164, -0.24007561802864075, -0.27088746428489685, -0.00952905137091875, -0.059648968279361725, -0.10022896528244019, -0.058727480471134186, 0.1041494682431221, 0.5707889795303345, 0.0060067251324653625, -0.3993646502494812, 0.12850092351436615, 0.26436206698417664, 0.38440796732902527, -0.2670677900314331, -0.2668153643608093, -0.3814983367919922, -0.11801769584417343, -0.031094614416360855, 0.3227998912334442, 0.2919018864631653, -0.29689517617225647, 0.5123331546783447, -0.07216175645589828, 0.30020925402641296, -0.07671438902616501, 0.31757864356040955, -0.06263567507266998, -0.02300068363547325, 0.13473288714885712, 0.05989908054471016, 0.18537162244319916, -0.15115952491760254, -0.0708659291267395, -0.11036998778581619, -0.47354280948638916, 0.14595237374305725, 0.2246878445148468, 0.2031702846288681, 0.1484774947166443, 0.04230283200740814, 0.011342517100274563, -0.03163039684295654, 0.27789872884750366, -0.5150641798973083, 0.4636705219745636, 0.09772292524576187, 0.17148412764072418, -0.1717173308134079, 0.5033444166183472, -0.033524781465530396, 0.2847486734390259, 0.23488914966583252, -0.04114757478237152, 0.1634381264448166, 0.0834784060716629, -0.34737542271614075, -0.9479158520698547, 0.25182411074638367, 0.1210952177643776, 0.14625903964042664, 0.14583629369735718, -0.20654438436031342, -0.44887807965278625, 0.0469435453414917, -0.15985624492168427, -0.19970524311065674, 0.11006370931863785, 0.00861931499093771, -0.05689426511526108, 0.12255978584289551, -0.09422194212675095, -0.24071471393108368, 0.16637727618217468, -0.09463154524564743, 0.0006809296901337802, -0.05330515280365944, -0.11264179646968842, 0.13007371127605438, 0.17644603550434113, 0.2946472764015198, 0.17215469479560852, -0.1177482083439827, -0.09683959186077118, 0.31071487069129944, 0.03673543035984039, 0.37167614698410034, 0.7192559242248535, 0.008334267884492874, 0.20777231454849243, 0.06566230952739716, -0.1414228081703186, -0.037375032901763916, -0.09075600653886795, -0.21978972852230072, -0.1321774274110794, 0.0020507185254245996, 0.19000481069087982, 0.4574648439884186, 0.49662503600120544, 0.26349076628685, -0.2908991575241089, -0.12287559360265732, -0.21275927126407623, 0.1394447386264801, -0.08726569265127182, 0.5241575241088867, 0.0354149155318737, -0.04528087005019188, -0.23621930181980133, -0.3176491856575012, -0.4405004382133484, -0.2735997140407562, 0.1920834332704544, -0.19311271607875824, 0.18522314727306366, 0.4128831624984741, 0.1407175213098526, -0.2816234827041626, 0.43491417169570923, 0.44987502694129944, 0.1743902713060379, -0.2831307053565979, -0.2648613750934601, -0.43506234884262085, 0.04130809009075165, 0.03062906675040722, -0.3326571583747864, 0.16338525712490082, -0.00828174501657486, 0.5289196968078613, -0.06663389503955841, 0.049297116696834564, -0.22281399369239807, 0.30826854705810547, 0.04080266132950783, -0.2330857366323471, -0.22597640752792358, 0.06953515112400055, 0.3373223841190338, -0.33792778849601746, -0.4209166169166565, 0.28855955600738525, 0.30960801243782043, 0.2118861824274063, 0.24172669649124146, 0.037968993186950684, -0.1851680874824524, -0.44106677174568176, 0.07415814697742462, -0.33717069029808044, 0.34953853487968445, -0.3599034547805786, -0.02662179246544838, 0.38505277037620544, -0.12698833644390106, -0.050829846411943436, -0.32031548023223877, -0.15112939476966858, 0.5077915787696838, -0.01738414168357849, 0.016011444851756096, 0.12655505537986755, -0.1531783789396286, -0.004821471404284239, 0.4526059627532959, -0.19576320052146912, 0.1708143949508667, -0.0713343471288681, -0.06885737925767899, 0.3143496513366699, 0.2996097207069397, 0.3142436146736145, 0.2425721138715744, -0.14491814374923706, 0.05101465433835983, 0.5088931322097778, 0.14934828877449036, -0.04108753427863121, 0.10442019999027252, 0.18289439380168915, -0.04525376111268997, 0.02526441030204296, -0.41642051935195923, 0.027793917804956436, 0.29045361280441284, -0.27973783016204834, -0.01809730753302574, 0.019278118386864662, -0.20775702595710754, -0.057804837822914124, -0.004372894298285246, -0.16476088762283325, 0.1149321123957634, 0.022978350520133972, -0.36983948945999146, -0.03395642340183258 ]
https://github.com/huggingface/datasets/issues/3113
Loading Data from HDF files
@mariosasko , I would like to contribute on this "good second issue" . Is there anything in the works for this Issue or can I go ahead ?
**Is your feature request related to a problem? Please describe.** More often than not I come along big HDF datasets, and currently there is no straight forward way to feed them to a dataset. **Describe the solution you'd like** I would love to see a `from_h5` method that gets an interface implemented by the user on how items are extracted from dataset (in case of multiple datasets containing elements like arrays and metadata and etc). **Describe alternatives you've considered** Currently I manually load hdf files using `h5py` and implement PyTorch dataset interface. For small h5 files I load them into a pandas dataframe and use `from_pandas` function in the `datasets` package to load them, but for big datasets this is not feasible. **Additional context** HDF files are widespread throughout different domains and are one of the go to's for many researchers/scientists/engineers who work with numerical data. Given `datasets`' usecases have outgrown NLP use cases, it will make a lot of sense focusing on things like supporting HDF files.
28
Loading Data from HDF files
[ -0.32506072521209717, 0.007684177719056606, -0.15652869641780853, 0.3161044120788574, -0.024933526292443275, 0.1889023780822754, 0.1782037913799286, 0.3778652846813202, 0.2864287495613098, 0.21401019394397736, -0.42155927419662476, -0.18491148948669434, 0.2638891935348511, 0.1619223803281784, -0.17733658850193024, 0.06198234111070633, 0.007461722940206528, 0.2316368967294693, 0.029201772063970566, -0.34862884879112244, -0.20642711222171783, 0.10896676778793335, 0.08307377994060516, 0.09489062428474426, -0.36958107352256775, -0.025485869497060776, -0.07110452651977539, 0.5868324637413025, 0.008394504897296429, 0.12252026051282883, -0.017774859443306923, 0.35872483253479004, 0.46887698769569397, 0.2896465063095093, -0.00010472509893588722, 0.07419934868812561, 0.01808382384479046, -0.09935668110847473, -0.055174604058265686, 0.28322821855545044, 0.3965977430343628, -0.179061159491539, 0.00285357516258955, -0.3039640486240387, -0.21239615976810455, -0.12375912815332413, -0.03751862421631813, -0.006627566646784544, 0.3160112798213959, -0.08581743389368057, 0.27530038356781006, -0.03380291908979416, -0.09726996719837189, 0.07808041572570801, 0.3722647726535797, 0.4057905972003937, 0.16526982188224792, 0.41975027322769165, 0.36205601692199707, -0.13711412250995636, -0.0767747163772583, 0.3678973615169525, -0.10749475657939911, 0.15318447351455688, 0.15022806823253632, 0.10680088400840759, 0.017763467505574226, -0.047431912273168564, 0.036859527230262756, 0.19053412973880768, 0.37570178508758545, -0.018517296761274338, -0.13750046491622925, -0.0848340392112732, -0.23242954909801483, 0.008878796361386776, 0.22400441765785217, 0.06606611609458923, -0.26089906692504883, 0.10794221609830856, 0.1824677288532257, -0.30504050850868225, -0.12706226110458374, 0.06872208416461945, -0.17518462240695953, -0.10551668703556061, -0.018186762928962708, -0.149886816740036, 0.23455581068992615, 0.0667264387011528, 0.075660340487957, -0.23460522294044495, 0.028647668659687042, 0.10631091892719269, 0.0819920226931572, -0.0712457001209259, -0.24552424252033234, 0.07005961984395981, -0.024563439190387726, -0.27764037251472473, 0.1315438151359558, 0.20988553762435913, -0.37088334560394287, 0.058936551213264465, 0.086239755153656, -0.2913529574871063, -0.1367652267217636, -0.1263875514268875, -0.07331635802984238, 0.07476449012756348, -0.35178402066230774, -0.17764438688755035, -0.33988332748413086, 0.17627350986003876, -0.42046335339546204, -0.11027401685714722, -0.2374488264322281, -0.4253694415092468, -0.22536808252334595, 0.0942268818616867, 0.39533793926239014, -0.10143223404884338, 0.15603968501091003, 0.6129899024963379, 0.03637821227312088, 0.12371604889631271, 0.08554276078939438, 0.04750165343284607, -0.18686118721961975, -0.25658297538757324, -0.09010505676269531, 0.07337846606969833, -0.05436079204082489, 0.00019517866894602776, 0.08139161765575409, -0.08966007828712463, 0.004732654895633459, -0.024413611739873886, 0.2895452678203583, -0.007513556629419327, 0.29516640305519104, -0.41077861189842224, 0.21489648520946503, 0.12084652483463287, -0.007424468640238047, -0.10231844335794449, 0.3620584011077881, -0.18953317403793335, 0.06056906282901764, 0.10302208364009857, -0.31618764996528625, 0.034844283014535904, -0.19226716458797455, 0.2811337113380432, 0.37217989563941956, 0.02538921870291233, -0.24732555449008942, 0.07975505292415619, -0.2945762872695923, -0.4909389019012451, -0.08625082671642303, 0.05375247076153755, 0.10722356289625168, -0.17264540493488312, -0.0029205360915511847, 0.4402158558368683, -0.45157015323638916, 0.08901139348745346, 0.02836282178759575, -0.31572428345680237, 0.06787960231304169, -0.02217305451631546, -0.15252867341041565, 0.2654285132884979, -0.3511582612991333, 0.16478635370731354, 0.20218998193740845, -0.13702571392059326, -0.08904200792312622, 0.6702113151550293, 0.18169644474983215, 0.01972704380750656, 0.04548828303813934, 0.20153123140335083, 0.3225010335445404, -0.23443257808685303, 0.1175462007522583, 0.16385792195796967, 0.21287725865840912, -0.14571735262870789, -0.06885133683681488, -0.12590064108371735, -0.25813162326812744, 0.3148646652698517, -0.018004409968852997, 0.45311617851257324, 0.34723302721977234, -0.29392334818840027, 0.4970342516899109, -0.17092789709568024, -0.13220524787902832, 0.4564363360404968, -0.03656677156686783, 0.3832424581050873, -0.11448104679584503, 0.14235751330852509, -0.22867679595947266, -0.05335342139005661, -0.10515175759792328, -0.5148615837097168, 0.3475952744483948, -0.12408657371997833, 0.11615251749753952, -0.000303533481201157, 0.12638723850250244, 0.4376642107963562, 0.20590543746948242, 0.3113657832145691, -0.24307216703891754, -0.2097521275281906, -0.2777003049850464, 0.32711100578308105, -0.28013062477111816, 0.019333887845277786, 0.13147354125976562, 0.6298840045928955, 0.09014785289764404, -0.029150083661079407, 0.09641256928443909, 0.062059249728918076, 0.14992663264274597, -0.07937402278184891, 0.16669237613677979, 0.11771731078624725, 0.06995104998350143, 0.13021019101142883, 0.2935190200805664, 0.1260162889957428, -0.03763875365257263, 0.08100659400224686, 0.21161113679409027, 0.005520425271242857, 0.23536598682403564, 0.059668295085430145, -0.023288637399673462, 0.4813321530818939, -0.09665323048830032, -0.06828507781028748, 0.18201275169849396, -0.1336970180273056, 0.05802854895591736, -0.03289433568716049, 0.18441958725452423, -0.22495053708553314, 0.2747502028942108, 0.2406722456216812, 0.1605590283870697, -0.030831240117549896, -0.4998815655708313, 0.12486813217401505, 0.1492309868335724, -0.013572591356933117, -0.07540252804756165, 0.24125440418720245, 0.010871587321162224, 0.07388237863779068, 0.3337429165840149, 0.037431612610816956, 0.06213006749749184, 0.3694382905960083, 0.02954128198325634, -0.07661640644073486, -0.13232000172138214, -0.015954459086060524, -0.07040344178676605, -0.12185061722993851, -0.15953075885772705, 0.17515622079372406, -0.31068533658981323, 0.07920708507299423, -0.4384348392486572, -0.0705772414803505, 0.05960323289036751, -0.08172458410263062, -0.22526666522026062, 0.016241591423749924, -0.126961812376976, -0.26110514998435974, 0.07697248458862305, -0.09370195865631104, -0.15164639055728912, -0.157949760556221, 0.07312793284654617, 0.2126528024673462, -0.00606203731149435, -0.2463650405406952, -0.11934000253677368, 0.1206398606300354, -0.23834677040576935, 0.3181355893611908, -0.32205766439437866, 0.0347105972468853, -0.20410020649433136, 0.1903713196516037, 0.23940764367580414, 0.23663291335105896, 0.22685514390468597, 0.07438985258340836, 0.11987531185150146, -0.3998974561691284, 0.016537033021450043, 0.08859201520681381, 0.0655476376414299, -0.13067562878131866, -0.26420164108276367, 0.21496544778347015, -0.1069120541214943, -0.26129618287086487, 0.04175690934062004, 0.10273005068302155, -0.018031125888228416, -0.07190722227096558, 0.011536157689988613, -0.10176138579845428, 0.018634196370840073, 0.28732219338417053, -0.18346567451953888, -0.30867406725883484, -0.2617343068122864, 0.19939613342285156, 0.2969958484172821, -0.17143642902374268, -0.07543915510177612, -0.06199576333165169, -0.09529820084571838, 0.007484212517738342, -0.18456418812274933, -0.41353392601013184, -0.033552128821611404, -0.26210495829582214, -0.2863920331001282, 0.11027957499027252, -0.14057029783725739, -0.46411702036857605, 0.09004910290241241, -0.3984285295009613, -0.33890002965927124, 0.11588522791862488, -0.20751141011714935, -0.422591894865036, 0.03220301866531372, -0.00007172864570748061, -0.16129963099956512, -0.23192110657691956, -0.19609807431697845, 0.038092609494924545, 0.14268527925014496, -0.08387361466884613, 0.053976692259311676, -0.3517153561115265, 0.1086401715874672, -0.3396461308002472, 0.18219047784805298, -0.011260617524385452, -0.1576894372701645, 0.5689947009086609, 0.00769819738343358, 0.30657443404197693, 0.023281143978238106, -0.06596358865499496, -0.13602326810359955, 0.10882504284381866, -0.004598085768520832, 0.2592446208000183, 0.013664080761373043, -0.17952950298786163, -0.07505220174789429, 0.21338266134262085, -0.35449695587158203, -0.06210020184516907, -0.06282689422369003, -0.1515161544084549, -0.005888723768293858, 0.13007794320583344, 0.18719957768917084, -0.18947771191596985, -0.004787419456988573, 0.2497238963842392, 0.2919798195362091, 0.21357083320617676, -0.11213327199220657, -0.0073784226551651955, -0.05768764764070511, 0.11544523388147354, 0.238303542137146, 0.110306017100811, -0.21629565954208374, -0.266353040933609, -0.06979953497648239, 0.21506379544734955, -0.1308434009552002, 0.8304200768470764, -0.026182496920228004, 0.14767394959926605, 0.12377028167247772, -0.15870420634746552, 0.22657154500484467, 0.17602145671844482, -0.23469863831996918, -0.18615058064460754, -0.11475690454244614, 0.5591118931770325, -0.20472481846809387, -0.1413271427154541, -0.04172394052147865, -0.10670005530118942, -0.31583184003829956, -0.1798115074634552, -0.018441788852214813, -0.12890774011611938, -0.1624021679162979, -0.17797565460205078, -0.33105891942977905, -0.10289865732192993, -0.07183187454938889, 0.09932421147823334, -0.21866731345653534, 0.22916731238365173, 0.34477946162223816, -0.0661432147026062, 0.3481188416481018, 0.2497936338186264, 0.09028373658657074, -0.0797792300581932, 0.6408854126930237, 0.2598282992839813, 0.5038313865661621, 0.05871567502617836, 0.451351523399353, 0.13664135336875916, -0.2901535928249359, 0.01742698810994625, 0.4600391089916229, 0.23056772351264954, 0.16437920928001404, -0.01655416004359722, 0.06517347693443298, -0.35098761320114136, 0.1634453982114792, 0.023333542048931122, -0.12107870727777481, -0.014973627403378487, -0.160454660654068, 0.43591466546058655, -0.4659665524959564, -0.12019139528274536, 0.16145114600658417, 0.3467419445514679, 0.13483773171901703, 0.3176809549331665, 0.22107650339603424, 0.8990130424499512, -0.2028723806142807, 0.21210335195064545, 0.3568911850452423, -0.2907075583934784, -0.3380432426929474, -0.6298674941062927, -0.3769029378890991, -0.32049116492271423, -0.2781391739845276, -0.22952300310134888, 0.03769972547888756, 0.10623788088560104, 0.29199331998825073, 0.010491747409105301, -0.016839072108268738, 0.24621523916721344, -0.03639913350343704, 0.029119422659277916, 0.10260208696126938, 0.16629450023174286, -0.20811790227890015, -0.25947073101997375, 0.23481227457523346, 0.08238149434328079, 0.005018026102334261, -0.20707322657108307, -0.2507174611091614, 0.206009641289711, 0.01725216954946518, 0.20768091082572937, 0.016635574400424957, -0.04913761466741562, 0.244795560836792, 0.06790616363286972, -0.23454013466835022, -0.4967086613178253, -0.03274422138929367, 0.19970038533210754, -0.017248909920454025, -0.1097976565361023, -0.07310249656438828, 0.2939799726009369, -0.09120136499404907, -0.2496192306280136, 0.04421497881412506, 0.2743249833583832, -0.17523866891860962, -0.017850402742624283, 0.18933705985546112, 0.06006104499101639, -0.22745583951473236, 0.31883248686790466, 0.06713411957025528, 0.01968872733414173, -0.23844337463378906, -0.4301283061504364, 0.11770796030759811, -0.17113302648067474, 0.01876724325120449, 0.19490642845630646, 0.03768320009112358, -0.08593754470348358, -0.035220205783843994, 0.22150012850761414, -0.13562501966953278, -0.2034328132867813, 0.33001911640167236, -0.10020257532596588, -0.07541865110397339, 0.30189043283462524, 0.07156988978385925, -0.22182825207710266, -0.3146355152130127, 0.05262566730380058, 0.2486620545387268, -0.29361122846603394, -0.09746522456407547, 0.03978395462036133, -0.1528247892856598, -0.0019163870019838214, -0.12809790670871735, 0.05584266781806946, -0.35200220346450806, -0.2372390329837799, -0.21216973662376404, -0.33421799540519714, 0.3928898274898529, -0.19203472137451172, 0.16625237464904785, 0.1516546756029129, -0.024929266422986984, -0.14041058719158173, 0.0005960527341812849, -0.43117693066596985, 0.2471403032541275, -0.014479628764092922, -0.016673441976308823, -0.1911943405866623, -0.02788335643708706, -0.021704955026507378, 0.11842084676027298, 0.3164997696876526, 0.016257787123322487, -0.03316092863678932, -0.3324142098426819, -0.07944874465465546, 0.08820874243974686, -0.06501998007297516, 0.017177850008010864, -0.1667499989271164, -0.24007561802864075, -0.27088746428489685, -0.00952905137091875, -0.059648968279361725, -0.10022896528244019, -0.058727480471134186, 0.1041494682431221, 0.5707889795303345, 0.0060067251324653625, -0.3993646502494812, 0.12850092351436615, 0.26436206698417664, 0.38440796732902527, -0.2670677900314331, -0.2668153643608093, -0.3814983367919922, -0.11801769584417343, -0.031094614416360855, 0.3227998912334442, 0.2919018864631653, -0.29689517617225647, 0.5123331546783447, -0.07216175645589828, 0.30020925402641296, -0.07671438902616501, 0.31757864356040955, -0.06263567507266998, -0.02300068363547325, 0.13473288714885712, 0.05989908054471016, 0.18537162244319916, -0.15115952491760254, -0.0708659291267395, -0.11036998778581619, -0.47354280948638916, 0.14595237374305725, 0.2246878445148468, 0.2031702846288681, 0.1484774947166443, 0.04230283200740814, 0.011342517100274563, -0.03163039684295654, 0.27789872884750366, -0.5150641798973083, 0.4636705219745636, 0.09772292524576187, 0.17148412764072418, -0.1717173308134079, 0.5033444166183472, -0.033524781465530396, 0.2847486734390259, 0.23488914966583252, -0.04114757478237152, 0.1634381264448166, 0.0834784060716629, -0.34737542271614075, -0.9479158520698547, 0.25182411074638367, 0.1210952177643776, 0.14625903964042664, 0.14583629369735718, -0.20654438436031342, -0.44887807965278625, 0.0469435453414917, -0.15985624492168427, -0.19970524311065674, 0.11006370931863785, 0.00861931499093771, -0.05689426511526108, 0.12255978584289551, -0.09422194212675095, -0.24071471393108368, 0.16637727618217468, -0.09463154524564743, 0.0006809296901337802, -0.05330515280365944, -0.11264179646968842, 0.13007371127605438, 0.17644603550434113, 0.2946472764015198, 0.17215469479560852, -0.1177482083439827, -0.09683959186077118, 0.31071487069129944, 0.03673543035984039, 0.37167614698410034, 0.7192559242248535, 0.008334267884492874, 0.20777231454849243, 0.06566230952739716, -0.1414228081703186, -0.037375032901763916, -0.09075600653886795, -0.21978972852230072, -0.1321774274110794, 0.0020507185254245996, 0.19000481069087982, 0.4574648439884186, 0.49662503600120544, 0.26349076628685, -0.2908991575241089, -0.12287559360265732, -0.21275927126407623, 0.1394447386264801, -0.08726569265127182, 0.5241575241088867, 0.0354149155318737, -0.04528087005019188, -0.23621930181980133, -0.3176491856575012, -0.4405004382133484, -0.2735997140407562, 0.1920834332704544, -0.19311271607875824, 0.18522314727306366, 0.4128831624984741, 0.1407175213098526, -0.2816234827041626, 0.43491417169570923, 0.44987502694129944, 0.1743902713060379, -0.2831307053565979, -0.2648613750934601, -0.43506234884262085, 0.04130809009075165, 0.03062906675040722, -0.3326571583747864, 0.16338525712490082, -0.00828174501657486, 0.5289196968078613, -0.06663389503955841, 0.049297116696834564, -0.22281399369239807, 0.30826854705810547, 0.04080266132950783, -0.2330857366323471, -0.22597640752792358, 0.06953515112400055, 0.3373223841190338, -0.33792778849601746, -0.4209166169166565, 0.28855955600738525, 0.30960801243782043, 0.2118861824274063, 0.24172669649124146, 0.037968993186950684, -0.1851680874824524, -0.44106677174568176, 0.07415814697742462, -0.33717069029808044, 0.34953853487968445, -0.3599034547805786, -0.02662179246544838, 0.38505277037620544, -0.12698833644390106, -0.050829846411943436, -0.32031548023223877, -0.15112939476966858, 0.5077915787696838, -0.01738414168357849, 0.016011444851756096, 0.12655505537986755, -0.1531783789396286, -0.004821471404284239, 0.4526059627532959, -0.19576320052146912, 0.1708143949508667, -0.0713343471288681, -0.06885737925767899, 0.3143496513366699, 0.2996097207069397, 0.3142436146736145, 0.2425721138715744, -0.14491814374923706, 0.05101465433835983, 0.5088931322097778, 0.14934828877449036, -0.04108753427863121, 0.10442019999027252, 0.18289439380168915, -0.04525376111268997, 0.02526441030204296, -0.41642051935195923, 0.027793917804956436, 0.29045361280441284, -0.27973783016204834, -0.01809730753302574, 0.019278118386864662, -0.20775702595710754, -0.057804837822914124, -0.004372894298285246, -0.16476088762283325, 0.1149321123957634, 0.022978350520133972, -0.36983948945999146, -0.03395642340183258 ]
https://github.com/huggingface/datasets/issues/3113
Loading Data from HDF files
Hi @VijayKalmath! As far as I know, nobody is working on it, so feel free to take over. Also, before you start, I suggest you comment `#self-assign` on this issue to assign it to yourself.
**Is your feature request related to a problem? Please describe.** More often than not I come along big HDF datasets, and currently there is no straight forward way to feed them to a dataset. **Describe the solution you'd like** I would love to see a `from_h5` method that gets an interface implemented by the user on how items are extracted from dataset (in case of multiple datasets containing elements like arrays and metadata and etc). **Describe alternatives you've considered** Currently I manually load hdf files using `h5py` and implement PyTorch dataset interface. For small h5 files I load them into a pandas dataframe and use `from_pandas` function in the `datasets` package to load them, but for big datasets this is not feasible. **Additional context** HDF files are widespread throughout different domains and are one of the go to's for many researchers/scientists/engineers who work with numerical data. Given `datasets`' usecases have outgrown NLP use cases, it will make a lot of sense focusing on things like supporting HDF files.
35
Loading Data from HDF files
[ -0.32506072521209717, 0.007684177719056606, -0.15652869641780853, 0.3161044120788574, -0.024933526292443275, 0.1889023780822754, 0.1782037913799286, 0.3778652846813202, 0.2864287495613098, 0.21401019394397736, -0.42155927419662476, -0.18491148948669434, 0.2638891935348511, 0.1619223803281784, -0.17733658850193024, 0.06198234111070633, 0.007461722940206528, 0.2316368967294693, 0.029201772063970566, -0.34862884879112244, -0.20642711222171783, 0.10896676778793335, 0.08307377994060516, 0.09489062428474426, -0.36958107352256775, -0.025485869497060776, -0.07110452651977539, 0.5868324637413025, 0.008394504897296429, 0.12252026051282883, -0.017774859443306923, 0.35872483253479004, 0.46887698769569397, 0.2896465063095093, -0.00010472509893588722, 0.07419934868812561, 0.01808382384479046, -0.09935668110847473, -0.055174604058265686, 0.28322821855545044, 0.3965977430343628, -0.179061159491539, 0.00285357516258955, -0.3039640486240387, -0.21239615976810455, -0.12375912815332413, -0.03751862421631813, -0.006627566646784544, 0.3160112798213959, -0.08581743389368057, 0.27530038356781006, -0.03380291908979416, -0.09726996719837189, 0.07808041572570801, 0.3722647726535797, 0.4057905972003937, 0.16526982188224792, 0.41975027322769165, 0.36205601692199707, -0.13711412250995636, -0.0767747163772583, 0.3678973615169525, -0.10749475657939911, 0.15318447351455688, 0.15022806823253632, 0.10680088400840759, 0.017763467505574226, -0.047431912273168564, 0.036859527230262756, 0.19053412973880768, 0.37570178508758545, -0.018517296761274338, -0.13750046491622925, -0.0848340392112732, -0.23242954909801483, 0.008878796361386776, 0.22400441765785217, 0.06606611609458923, -0.26089906692504883, 0.10794221609830856, 0.1824677288532257, -0.30504050850868225, -0.12706226110458374, 0.06872208416461945, -0.17518462240695953, -0.10551668703556061, -0.018186762928962708, -0.149886816740036, 0.23455581068992615, 0.0667264387011528, 0.075660340487957, -0.23460522294044495, 0.028647668659687042, 0.10631091892719269, 0.0819920226931572, -0.0712457001209259, -0.24552424252033234, 0.07005961984395981, -0.024563439190387726, -0.27764037251472473, 0.1315438151359558, 0.20988553762435913, -0.37088334560394287, 0.058936551213264465, 0.086239755153656, -0.2913529574871063, -0.1367652267217636, -0.1263875514268875, -0.07331635802984238, 0.07476449012756348, -0.35178402066230774, -0.17764438688755035, -0.33988332748413086, 0.17627350986003876, -0.42046335339546204, -0.11027401685714722, -0.2374488264322281, -0.4253694415092468, -0.22536808252334595, 0.0942268818616867, 0.39533793926239014, -0.10143223404884338, 0.15603968501091003, 0.6129899024963379, 0.03637821227312088, 0.12371604889631271, 0.08554276078939438, 0.04750165343284607, -0.18686118721961975, -0.25658297538757324, -0.09010505676269531, 0.07337846606969833, -0.05436079204082489, 0.00019517866894602776, 0.08139161765575409, -0.08966007828712463, 0.004732654895633459, -0.024413611739873886, 0.2895452678203583, -0.007513556629419327, 0.29516640305519104, -0.41077861189842224, 0.21489648520946503, 0.12084652483463287, -0.007424468640238047, -0.10231844335794449, 0.3620584011077881, -0.18953317403793335, 0.06056906282901764, 0.10302208364009857, -0.31618764996528625, 0.034844283014535904, -0.19226716458797455, 0.2811337113380432, 0.37217989563941956, 0.02538921870291233, -0.24732555449008942, 0.07975505292415619, -0.2945762872695923, -0.4909389019012451, -0.08625082671642303, 0.05375247076153755, 0.10722356289625168, -0.17264540493488312, -0.0029205360915511847, 0.4402158558368683, -0.45157015323638916, 0.08901139348745346, 0.02836282178759575, -0.31572428345680237, 0.06787960231304169, -0.02217305451631546, -0.15252867341041565, 0.2654285132884979, -0.3511582612991333, 0.16478635370731354, 0.20218998193740845, -0.13702571392059326, -0.08904200792312622, 0.6702113151550293, 0.18169644474983215, 0.01972704380750656, 0.04548828303813934, 0.20153123140335083, 0.3225010335445404, -0.23443257808685303, 0.1175462007522583, 0.16385792195796967, 0.21287725865840912, -0.14571735262870789, -0.06885133683681488, -0.12590064108371735, -0.25813162326812744, 0.3148646652698517, -0.018004409968852997, 0.45311617851257324, 0.34723302721977234, -0.29392334818840027, 0.4970342516899109, -0.17092789709568024, -0.13220524787902832, 0.4564363360404968, -0.03656677156686783, 0.3832424581050873, -0.11448104679584503, 0.14235751330852509, -0.22867679595947266, -0.05335342139005661, -0.10515175759792328, -0.5148615837097168, 0.3475952744483948, -0.12408657371997833, 0.11615251749753952, -0.000303533481201157, 0.12638723850250244, 0.4376642107963562, 0.20590543746948242, 0.3113657832145691, -0.24307216703891754, -0.2097521275281906, -0.2777003049850464, 0.32711100578308105, -0.28013062477111816, 0.019333887845277786, 0.13147354125976562, 0.6298840045928955, 0.09014785289764404, -0.029150083661079407, 0.09641256928443909, 0.062059249728918076, 0.14992663264274597, -0.07937402278184891, 0.16669237613677979, 0.11771731078624725, 0.06995104998350143, 0.13021019101142883, 0.2935190200805664, 0.1260162889957428, -0.03763875365257263, 0.08100659400224686, 0.21161113679409027, 0.005520425271242857, 0.23536598682403564, 0.059668295085430145, -0.023288637399673462, 0.4813321530818939, -0.09665323048830032, -0.06828507781028748, 0.18201275169849396, -0.1336970180273056, 0.05802854895591736, -0.03289433568716049, 0.18441958725452423, -0.22495053708553314, 0.2747502028942108, 0.2406722456216812, 0.1605590283870697, -0.030831240117549896, -0.4998815655708313, 0.12486813217401505, 0.1492309868335724, -0.013572591356933117, -0.07540252804756165, 0.24125440418720245, 0.010871587321162224, 0.07388237863779068, 0.3337429165840149, 0.037431612610816956, 0.06213006749749184, 0.3694382905960083, 0.02954128198325634, -0.07661640644073486, -0.13232000172138214, -0.015954459086060524, -0.07040344178676605, -0.12185061722993851, -0.15953075885772705, 0.17515622079372406, -0.31068533658981323, 0.07920708507299423, -0.4384348392486572, -0.0705772414803505, 0.05960323289036751, -0.08172458410263062, -0.22526666522026062, 0.016241591423749924, -0.126961812376976, -0.26110514998435974, 0.07697248458862305, -0.09370195865631104, -0.15164639055728912, -0.157949760556221, 0.07312793284654617, 0.2126528024673462, -0.00606203731149435, -0.2463650405406952, -0.11934000253677368, 0.1206398606300354, -0.23834677040576935, 0.3181355893611908, -0.32205766439437866, 0.0347105972468853, -0.20410020649433136, 0.1903713196516037, 0.23940764367580414, 0.23663291335105896, 0.22685514390468597, 0.07438985258340836, 0.11987531185150146, -0.3998974561691284, 0.016537033021450043, 0.08859201520681381, 0.0655476376414299, -0.13067562878131866, -0.26420164108276367, 0.21496544778347015, -0.1069120541214943, -0.26129618287086487, 0.04175690934062004, 0.10273005068302155, -0.018031125888228416, -0.07190722227096558, 0.011536157689988613, -0.10176138579845428, 0.018634196370840073, 0.28732219338417053, -0.18346567451953888, -0.30867406725883484, -0.2617343068122864, 0.19939613342285156, 0.2969958484172821, -0.17143642902374268, -0.07543915510177612, -0.06199576333165169, -0.09529820084571838, 0.007484212517738342, -0.18456418812274933, -0.41353392601013184, -0.033552128821611404, -0.26210495829582214, -0.2863920331001282, 0.11027957499027252, -0.14057029783725739, -0.46411702036857605, 0.09004910290241241, -0.3984285295009613, -0.33890002965927124, 0.11588522791862488, -0.20751141011714935, -0.422591894865036, 0.03220301866531372, -0.00007172864570748061, -0.16129963099956512, -0.23192110657691956, -0.19609807431697845, 0.038092609494924545, 0.14268527925014496, -0.08387361466884613, 0.053976692259311676, -0.3517153561115265, 0.1086401715874672, -0.3396461308002472, 0.18219047784805298, -0.011260617524385452, -0.1576894372701645, 0.5689947009086609, 0.00769819738343358, 0.30657443404197693, 0.023281143978238106, -0.06596358865499496, -0.13602326810359955, 0.10882504284381866, -0.004598085768520832, 0.2592446208000183, 0.013664080761373043, -0.17952950298786163, -0.07505220174789429, 0.21338266134262085, -0.35449695587158203, -0.06210020184516907, -0.06282689422369003, -0.1515161544084549, -0.005888723768293858, 0.13007794320583344, 0.18719957768917084, -0.18947771191596985, -0.004787419456988573, 0.2497238963842392, 0.2919798195362091, 0.21357083320617676, -0.11213327199220657, -0.0073784226551651955, -0.05768764764070511, 0.11544523388147354, 0.238303542137146, 0.110306017100811, -0.21629565954208374, -0.266353040933609, -0.06979953497648239, 0.21506379544734955, -0.1308434009552002, 0.8304200768470764, -0.026182496920228004, 0.14767394959926605, 0.12377028167247772, -0.15870420634746552, 0.22657154500484467, 0.17602145671844482, -0.23469863831996918, -0.18615058064460754, -0.11475690454244614, 0.5591118931770325, -0.20472481846809387, -0.1413271427154541, -0.04172394052147865, -0.10670005530118942, -0.31583184003829956, -0.1798115074634552, -0.018441788852214813, -0.12890774011611938, -0.1624021679162979, -0.17797565460205078, -0.33105891942977905, -0.10289865732192993, -0.07183187454938889, 0.09932421147823334, -0.21866731345653534, 0.22916731238365173, 0.34477946162223816, -0.0661432147026062, 0.3481188416481018, 0.2497936338186264, 0.09028373658657074, -0.0797792300581932, 0.6408854126930237, 0.2598282992839813, 0.5038313865661621, 0.05871567502617836, 0.451351523399353, 0.13664135336875916, -0.2901535928249359, 0.01742698810994625, 0.4600391089916229, 0.23056772351264954, 0.16437920928001404, -0.01655416004359722, 0.06517347693443298, -0.35098761320114136, 0.1634453982114792, 0.023333542048931122, -0.12107870727777481, -0.014973627403378487, -0.160454660654068, 0.43591466546058655, -0.4659665524959564, -0.12019139528274536, 0.16145114600658417, 0.3467419445514679, 0.13483773171901703, 0.3176809549331665, 0.22107650339603424, 0.8990130424499512, -0.2028723806142807, 0.21210335195064545, 0.3568911850452423, -0.2907075583934784, -0.3380432426929474, -0.6298674941062927, -0.3769029378890991, -0.32049116492271423, -0.2781391739845276, -0.22952300310134888, 0.03769972547888756, 0.10623788088560104, 0.29199331998825073, 0.010491747409105301, -0.016839072108268738, 0.24621523916721344, -0.03639913350343704, 0.029119422659277916, 0.10260208696126938, 0.16629450023174286, -0.20811790227890015, -0.25947073101997375, 0.23481227457523346, 0.08238149434328079, 0.005018026102334261, -0.20707322657108307, -0.2507174611091614, 0.206009641289711, 0.01725216954946518, 0.20768091082572937, 0.016635574400424957, -0.04913761466741562, 0.244795560836792, 0.06790616363286972, -0.23454013466835022, -0.4967086613178253, -0.03274422138929367, 0.19970038533210754, -0.017248909920454025, -0.1097976565361023, -0.07310249656438828, 0.2939799726009369, -0.09120136499404907, -0.2496192306280136, 0.04421497881412506, 0.2743249833583832, -0.17523866891860962, -0.017850402742624283, 0.18933705985546112, 0.06006104499101639, -0.22745583951473236, 0.31883248686790466, 0.06713411957025528, 0.01968872733414173, -0.23844337463378906, -0.4301283061504364, 0.11770796030759811, -0.17113302648067474, 0.01876724325120449, 0.19490642845630646, 0.03768320009112358, -0.08593754470348358, -0.035220205783843994, 0.22150012850761414, -0.13562501966953278, -0.2034328132867813, 0.33001911640167236, -0.10020257532596588, -0.07541865110397339, 0.30189043283462524, 0.07156988978385925, -0.22182825207710266, -0.3146355152130127, 0.05262566730380058, 0.2486620545387268, -0.29361122846603394, -0.09746522456407547, 0.03978395462036133, -0.1528247892856598, -0.0019163870019838214, -0.12809790670871735, 0.05584266781806946, -0.35200220346450806, -0.2372390329837799, -0.21216973662376404, -0.33421799540519714, 0.3928898274898529, -0.19203472137451172, 0.16625237464904785, 0.1516546756029129, -0.024929266422986984, -0.14041058719158173, 0.0005960527341812849, -0.43117693066596985, 0.2471403032541275, -0.014479628764092922, -0.016673441976308823, -0.1911943405866623, -0.02788335643708706, -0.021704955026507378, 0.11842084676027298, 0.3164997696876526, 0.016257787123322487, -0.03316092863678932, -0.3324142098426819, -0.07944874465465546, 0.08820874243974686, -0.06501998007297516, 0.017177850008010864, -0.1667499989271164, -0.24007561802864075, -0.27088746428489685, -0.00952905137091875, -0.059648968279361725, -0.10022896528244019, -0.058727480471134186, 0.1041494682431221, 0.5707889795303345, 0.0060067251324653625, -0.3993646502494812, 0.12850092351436615, 0.26436206698417664, 0.38440796732902527, -0.2670677900314331, -0.2668153643608093, -0.3814983367919922, -0.11801769584417343, -0.031094614416360855, 0.3227998912334442, 0.2919018864631653, -0.29689517617225647, 0.5123331546783447, -0.07216175645589828, 0.30020925402641296, -0.07671438902616501, 0.31757864356040955, -0.06263567507266998, -0.02300068363547325, 0.13473288714885712, 0.05989908054471016, 0.18537162244319916, -0.15115952491760254, -0.0708659291267395, -0.11036998778581619, -0.47354280948638916, 0.14595237374305725, 0.2246878445148468, 0.2031702846288681, 0.1484774947166443, 0.04230283200740814, 0.011342517100274563, -0.03163039684295654, 0.27789872884750366, -0.5150641798973083, 0.4636705219745636, 0.09772292524576187, 0.17148412764072418, -0.1717173308134079, 0.5033444166183472, -0.033524781465530396, 0.2847486734390259, 0.23488914966583252, -0.04114757478237152, 0.1634381264448166, 0.0834784060716629, -0.34737542271614075, -0.9479158520698547, 0.25182411074638367, 0.1210952177643776, 0.14625903964042664, 0.14583629369735718, -0.20654438436031342, -0.44887807965278625, 0.0469435453414917, -0.15985624492168427, -0.19970524311065674, 0.11006370931863785, 0.00861931499093771, -0.05689426511526108, 0.12255978584289551, -0.09422194212675095, -0.24071471393108368, 0.16637727618217468, -0.09463154524564743, 0.0006809296901337802, -0.05330515280365944, -0.11264179646968842, 0.13007371127605438, 0.17644603550434113, 0.2946472764015198, 0.17215469479560852, -0.1177482083439827, -0.09683959186077118, 0.31071487069129944, 0.03673543035984039, 0.37167614698410034, 0.7192559242248535, 0.008334267884492874, 0.20777231454849243, 0.06566230952739716, -0.1414228081703186, -0.037375032901763916, -0.09075600653886795, -0.21978972852230072, -0.1321774274110794, 0.0020507185254245996, 0.19000481069087982, 0.4574648439884186, 0.49662503600120544, 0.26349076628685, -0.2908991575241089, -0.12287559360265732, -0.21275927126407623, 0.1394447386264801, -0.08726569265127182, 0.5241575241088867, 0.0354149155318737, -0.04528087005019188, -0.23621930181980133, -0.3176491856575012, -0.4405004382133484, -0.2735997140407562, 0.1920834332704544, -0.19311271607875824, 0.18522314727306366, 0.4128831624984741, 0.1407175213098526, -0.2816234827041626, 0.43491417169570923, 0.44987502694129944, 0.1743902713060379, -0.2831307053565979, -0.2648613750934601, -0.43506234884262085, 0.04130809009075165, 0.03062906675040722, -0.3326571583747864, 0.16338525712490082, -0.00828174501657486, 0.5289196968078613, -0.06663389503955841, 0.049297116696834564, -0.22281399369239807, 0.30826854705810547, 0.04080266132950783, -0.2330857366323471, -0.22597640752792358, 0.06953515112400055, 0.3373223841190338, -0.33792778849601746, -0.4209166169166565, 0.28855955600738525, 0.30960801243782043, 0.2118861824274063, 0.24172669649124146, 0.037968993186950684, -0.1851680874824524, -0.44106677174568176, 0.07415814697742462, -0.33717069029808044, 0.34953853487968445, -0.3599034547805786, -0.02662179246544838, 0.38505277037620544, -0.12698833644390106, -0.050829846411943436, -0.32031548023223877, -0.15112939476966858, 0.5077915787696838, -0.01738414168357849, 0.016011444851756096, 0.12655505537986755, -0.1531783789396286, -0.004821471404284239, 0.4526059627532959, -0.19576320052146912, 0.1708143949508667, -0.0713343471288681, -0.06885737925767899, 0.3143496513366699, 0.2996097207069397, 0.3142436146736145, 0.2425721138715744, -0.14491814374923706, 0.05101465433835983, 0.5088931322097778, 0.14934828877449036, -0.04108753427863121, 0.10442019999027252, 0.18289439380168915, -0.04525376111268997, 0.02526441030204296, -0.41642051935195923, 0.027793917804956436, 0.29045361280441284, -0.27973783016204834, -0.01809730753302574, 0.019278118386864662, -0.20775702595710754, -0.057804837822914124, -0.004372894298285246, -0.16476088762283325, 0.1149321123957634, 0.022978350520133972, -0.36983948945999146, -0.03395642340183258 ]
https://github.com/huggingface/datasets/issues/3113
Loading Data from HDF files
#self-assign Hi! I'd love to take a shot at implementing this feature to allow loading HDF5 datasets via Hugging Face Datasets. Will keep you updated here!
**Is your feature request related to a problem? Please describe.** More often than not I come along big HDF datasets, and currently there is no straight forward way to feed them to a dataset. **Describe the solution you'd like** I would love to see a `from_h5` method that gets an interface implemented by the user on how items are extracted from dataset (in case of multiple datasets containing elements like arrays and metadata and etc). **Describe alternatives you've considered** Currently I manually load hdf files using `h5py` and implement PyTorch dataset interface. For small h5 files I load them into a pandas dataframe and use `from_pandas` function in the `datasets` package to load them, but for big datasets this is not feasible. **Additional context** HDF files are widespread throughout different domains and are one of the go to's for many researchers/scientists/engineers who work with numerical data. Given `datasets`' usecases have outgrown NLP use cases, it will make a lot of sense focusing on things like supporting HDF files.
26
Loading Data from HDF files
[ -0.32506072521209717, 0.007684177719056606, -0.15652869641780853, 0.3161044120788574, -0.024933526292443275, 0.1889023780822754, 0.1782037913799286, 0.3778652846813202, 0.2864287495613098, 0.21401019394397736, -0.42155927419662476, -0.18491148948669434, 0.2638891935348511, 0.1619223803281784, -0.17733658850193024, 0.06198234111070633, 0.007461722940206528, 0.2316368967294693, 0.029201772063970566, -0.34862884879112244, -0.20642711222171783, 0.10896676778793335, 0.08307377994060516, 0.09489062428474426, -0.36958107352256775, -0.025485869497060776, -0.07110452651977539, 0.5868324637413025, 0.008394504897296429, 0.12252026051282883, -0.017774859443306923, 0.35872483253479004, 0.46887698769569397, 0.2896465063095093, -0.00010472509893588722, 0.07419934868812561, 0.01808382384479046, -0.09935668110847473, -0.055174604058265686, 0.28322821855545044, 0.3965977430343628, -0.179061159491539, 0.00285357516258955, -0.3039640486240387, -0.21239615976810455, -0.12375912815332413, -0.03751862421631813, -0.006627566646784544, 0.3160112798213959, -0.08581743389368057, 0.27530038356781006, -0.03380291908979416, -0.09726996719837189, 0.07808041572570801, 0.3722647726535797, 0.4057905972003937, 0.16526982188224792, 0.41975027322769165, 0.36205601692199707, -0.13711412250995636, -0.0767747163772583, 0.3678973615169525, -0.10749475657939911, 0.15318447351455688, 0.15022806823253632, 0.10680088400840759, 0.017763467505574226, -0.047431912273168564, 0.036859527230262756, 0.19053412973880768, 0.37570178508758545, -0.018517296761274338, -0.13750046491622925, -0.0848340392112732, -0.23242954909801483, 0.008878796361386776, 0.22400441765785217, 0.06606611609458923, -0.26089906692504883, 0.10794221609830856, 0.1824677288532257, -0.30504050850868225, -0.12706226110458374, 0.06872208416461945, -0.17518462240695953, -0.10551668703556061, -0.018186762928962708, -0.149886816740036, 0.23455581068992615, 0.0667264387011528, 0.075660340487957, -0.23460522294044495, 0.028647668659687042, 0.10631091892719269, 0.0819920226931572, -0.0712457001209259, -0.24552424252033234, 0.07005961984395981, -0.024563439190387726, -0.27764037251472473, 0.1315438151359558, 0.20988553762435913, -0.37088334560394287, 0.058936551213264465, 0.086239755153656, -0.2913529574871063, -0.1367652267217636, -0.1263875514268875, -0.07331635802984238, 0.07476449012756348, -0.35178402066230774, -0.17764438688755035, -0.33988332748413086, 0.17627350986003876, -0.42046335339546204, -0.11027401685714722, -0.2374488264322281, -0.4253694415092468, -0.22536808252334595, 0.0942268818616867, 0.39533793926239014, -0.10143223404884338, 0.15603968501091003, 0.6129899024963379, 0.03637821227312088, 0.12371604889631271, 0.08554276078939438, 0.04750165343284607, -0.18686118721961975, -0.25658297538757324, -0.09010505676269531, 0.07337846606969833, -0.05436079204082489, 0.00019517866894602776, 0.08139161765575409, -0.08966007828712463, 0.004732654895633459, -0.024413611739873886, 0.2895452678203583, -0.007513556629419327, 0.29516640305519104, -0.41077861189842224, 0.21489648520946503, 0.12084652483463287, -0.007424468640238047, -0.10231844335794449, 0.3620584011077881, -0.18953317403793335, 0.06056906282901764, 0.10302208364009857, -0.31618764996528625, 0.034844283014535904, -0.19226716458797455, 0.2811337113380432, 0.37217989563941956, 0.02538921870291233, -0.24732555449008942, 0.07975505292415619, -0.2945762872695923, -0.4909389019012451, -0.08625082671642303, 0.05375247076153755, 0.10722356289625168, -0.17264540493488312, -0.0029205360915511847, 0.4402158558368683, -0.45157015323638916, 0.08901139348745346, 0.02836282178759575, -0.31572428345680237, 0.06787960231304169, -0.02217305451631546, -0.15252867341041565, 0.2654285132884979, -0.3511582612991333, 0.16478635370731354, 0.20218998193740845, -0.13702571392059326, -0.08904200792312622, 0.6702113151550293, 0.18169644474983215, 0.01972704380750656, 0.04548828303813934, 0.20153123140335083, 0.3225010335445404, -0.23443257808685303, 0.1175462007522583, 0.16385792195796967, 0.21287725865840912, -0.14571735262870789, -0.06885133683681488, -0.12590064108371735, -0.25813162326812744, 0.3148646652698517, -0.018004409968852997, 0.45311617851257324, 0.34723302721977234, -0.29392334818840027, 0.4970342516899109, -0.17092789709568024, -0.13220524787902832, 0.4564363360404968, -0.03656677156686783, 0.3832424581050873, -0.11448104679584503, 0.14235751330852509, -0.22867679595947266, -0.05335342139005661, -0.10515175759792328, -0.5148615837097168, 0.3475952744483948, -0.12408657371997833, 0.11615251749753952, -0.000303533481201157, 0.12638723850250244, 0.4376642107963562, 0.20590543746948242, 0.3113657832145691, -0.24307216703891754, -0.2097521275281906, -0.2777003049850464, 0.32711100578308105, -0.28013062477111816, 0.019333887845277786, 0.13147354125976562, 0.6298840045928955, 0.09014785289764404, -0.029150083661079407, 0.09641256928443909, 0.062059249728918076, 0.14992663264274597, -0.07937402278184891, 0.16669237613677979, 0.11771731078624725, 0.06995104998350143, 0.13021019101142883, 0.2935190200805664, 0.1260162889957428, -0.03763875365257263, 0.08100659400224686, 0.21161113679409027, 0.005520425271242857, 0.23536598682403564, 0.059668295085430145, -0.023288637399673462, 0.4813321530818939, -0.09665323048830032, -0.06828507781028748, 0.18201275169849396, -0.1336970180273056, 0.05802854895591736, -0.03289433568716049, 0.18441958725452423, -0.22495053708553314, 0.2747502028942108, 0.2406722456216812, 0.1605590283870697, -0.030831240117549896, -0.4998815655708313, 0.12486813217401505, 0.1492309868335724, -0.013572591356933117, -0.07540252804756165, 0.24125440418720245, 0.010871587321162224, 0.07388237863779068, 0.3337429165840149, 0.037431612610816956, 0.06213006749749184, 0.3694382905960083, 0.02954128198325634, -0.07661640644073486, -0.13232000172138214, -0.015954459086060524, -0.07040344178676605, -0.12185061722993851, -0.15953075885772705, 0.17515622079372406, -0.31068533658981323, 0.07920708507299423, -0.4384348392486572, -0.0705772414803505, 0.05960323289036751, -0.08172458410263062, -0.22526666522026062, 0.016241591423749924, -0.126961812376976, -0.26110514998435974, 0.07697248458862305, -0.09370195865631104, -0.15164639055728912, -0.157949760556221, 0.07312793284654617, 0.2126528024673462, -0.00606203731149435, -0.2463650405406952, -0.11934000253677368, 0.1206398606300354, -0.23834677040576935, 0.3181355893611908, -0.32205766439437866, 0.0347105972468853, -0.20410020649433136, 0.1903713196516037, 0.23940764367580414, 0.23663291335105896, 0.22685514390468597, 0.07438985258340836, 0.11987531185150146, -0.3998974561691284, 0.016537033021450043, 0.08859201520681381, 0.0655476376414299, -0.13067562878131866, -0.26420164108276367, 0.21496544778347015, -0.1069120541214943, -0.26129618287086487, 0.04175690934062004, 0.10273005068302155, -0.018031125888228416, -0.07190722227096558, 0.011536157689988613, -0.10176138579845428, 0.018634196370840073, 0.28732219338417053, -0.18346567451953888, -0.30867406725883484, -0.2617343068122864, 0.19939613342285156, 0.2969958484172821, -0.17143642902374268, -0.07543915510177612, -0.06199576333165169, -0.09529820084571838, 0.007484212517738342, -0.18456418812274933, -0.41353392601013184, -0.033552128821611404, -0.26210495829582214, -0.2863920331001282, 0.11027957499027252, -0.14057029783725739, -0.46411702036857605, 0.09004910290241241, -0.3984285295009613, -0.33890002965927124, 0.11588522791862488, -0.20751141011714935, -0.422591894865036, 0.03220301866531372, -0.00007172864570748061, -0.16129963099956512, -0.23192110657691956, -0.19609807431697845, 0.038092609494924545, 0.14268527925014496, -0.08387361466884613, 0.053976692259311676, -0.3517153561115265, 0.1086401715874672, -0.3396461308002472, 0.18219047784805298, -0.011260617524385452, -0.1576894372701645, 0.5689947009086609, 0.00769819738343358, 0.30657443404197693, 0.023281143978238106, -0.06596358865499496, -0.13602326810359955, 0.10882504284381866, -0.004598085768520832, 0.2592446208000183, 0.013664080761373043, -0.17952950298786163, -0.07505220174789429, 0.21338266134262085, -0.35449695587158203, -0.06210020184516907, -0.06282689422369003, -0.1515161544084549, -0.005888723768293858, 0.13007794320583344, 0.18719957768917084, -0.18947771191596985, -0.004787419456988573, 0.2497238963842392, 0.2919798195362091, 0.21357083320617676, -0.11213327199220657, -0.0073784226551651955, -0.05768764764070511, 0.11544523388147354, 0.238303542137146, 0.110306017100811, -0.21629565954208374, -0.266353040933609, -0.06979953497648239, 0.21506379544734955, -0.1308434009552002, 0.8304200768470764, -0.026182496920228004, 0.14767394959926605, 0.12377028167247772, -0.15870420634746552, 0.22657154500484467, 0.17602145671844482, -0.23469863831996918, -0.18615058064460754, -0.11475690454244614, 0.5591118931770325, -0.20472481846809387, -0.1413271427154541, -0.04172394052147865, -0.10670005530118942, -0.31583184003829956, -0.1798115074634552, -0.018441788852214813, -0.12890774011611938, -0.1624021679162979, -0.17797565460205078, -0.33105891942977905, -0.10289865732192993, -0.07183187454938889, 0.09932421147823334, -0.21866731345653534, 0.22916731238365173, 0.34477946162223816, -0.0661432147026062, 0.3481188416481018, 0.2497936338186264, 0.09028373658657074, -0.0797792300581932, 0.6408854126930237, 0.2598282992839813, 0.5038313865661621, 0.05871567502617836, 0.451351523399353, 0.13664135336875916, -0.2901535928249359, 0.01742698810994625, 0.4600391089916229, 0.23056772351264954, 0.16437920928001404, -0.01655416004359722, 0.06517347693443298, -0.35098761320114136, 0.1634453982114792, 0.023333542048931122, -0.12107870727777481, -0.014973627403378487, -0.160454660654068, 0.43591466546058655, -0.4659665524959564, -0.12019139528274536, 0.16145114600658417, 0.3467419445514679, 0.13483773171901703, 0.3176809549331665, 0.22107650339603424, 0.8990130424499512, -0.2028723806142807, 0.21210335195064545, 0.3568911850452423, -0.2907075583934784, -0.3380432426929474, -0.6298674941062927, -0.3769029378890991, -0.32049116492271423, -0.2781391739845276, -0.22952300310134888, 0.03769972547888756, 0.10623788088560104, 0.29199331998825073, 0.010491747409105301, -0.016839072108268738, 0.24621523916721344, -0.03639913350343704, 0.029119422659277916, 0.10260208696126938, 0.16629450023174286, -0.20811790227890015, -0.25947073101997375, 0.23481227457523346, 0.08238149434328079, 0.005018026102334261, -0.20707322657108307, -0.2507174611091614, 0.206009641289711, 0.01725216954946518, 0.20768091082572937, 0.016635574400424957, -0.04913761466741562, 0.244795560836792, 0.06790616363286972, -0.23454013466835022, -0.4967086613178253, -0.03274422138929367, 0.19970038533210754, -0.017248909920454025, -0.1097976565361023, -0.07310249656438828, 0.2939799726009369, -0.09120136499404907, -0.2496192306280136, 0.04421497881412506, 0.2743249833583832, -0.17523866891860962, -0.017850402742624283, 0.18933705985546112, 0.06006104499101639, -0.22745583951473236, 0.31883248686790466, 0.06713411957025528, 0.01968872733414173, -0.23844337463378906, -0.4301283061504364, 0.11770796030759811, -0.17113302648067474, 0.01876724325120449, 0.19490642845630646, 0.03768320009112358, -0.08593754470348358, -0.035220205783843994, 0.22150012850761414, -0.13562501966953278, -0.2034328132867813, 0.33001911640167236, -0.10020257532596588, -0.07541865110397339, 0.30189043283462524, 0.07156988978385925, -0.22182825207710266, -0.3146355152130127, 0.05262566730380058, 0.2486620545387268, -0.29361122846603394, -0.09746522456407547, 0.03978395462036133, -0.1528247892856598, -0.0019163870019838214, -0.12809790670871735, 0.05584266781806946, -0.35200220346450806, -0.2372390329837799, -0.21216973662376404, -0.33421799540519714, 0.3928898274898529, -0.19203472137451172, 0.16625237464904785, 0.1516546756029129, -0.024929266422986984, -0.14041058719158173, 0.0005960527341812849, -0.43117693066596985, 0.2471403032541275, -0.014479628764092922, -0.016673441976308823, -0.1911943405866623, -0.02788335643708706, -0.021704955026507378, 0.11842084676027298, 0.3164997696876526, 0.016257787123322487, -0.03316092863678932, -0.3324142098426819, -0.07944874465465546, 0.08820874243974686, -0.06501998007297516, 0.017177850008010864, -0.1667499989271164, -0.24007561802864075, -0.27088746428489685, -0.00952905137091875, -0.059648968279361725, -0.10022896528244019, -0.058727480471134186, 0.1041494682431221, 0.5707889795303345, 0.0060067251324653625, -0.3993646502494812, 0.12850092351436615, 0.26436206698417664, 0.38440796732902527, -0.2670677900314331, -0.2668153643608093, -0.3814983367919922, -0.11801769584417343, -0.031094614416360855, 0.3227998912334442, 0.2919018864631653, -0.29689517617225647, 0.5123331546783447, -0.07216175645589828, 0.30020925402641296, -0.07671438902616501, 0.31757864356040955, -0.06263567507266998, -0.02300068363547325, 0.13473288714885712, 0.05989908054471016, 0.18537162244319916, -0.15115952491760254, -0.0708659291267395, -0.11036998778581619, -0.47354280948638916, 0.14595237374305725, 0.2246878445148468, 0.2031702846288681, 0.1484774947166443, 0.04230283200740814, 0.011342517100274563, -0.03163039684295654, 0.27789872884750366, -0.5150641798973083, 0.4636705219745636, 0.09772292524576187, 0.17148412764072418, -0.1717173308134079, 0.5033444166183472, -0.033524781465530396, 0.2847486734390259, 0.23488914966583252, -0.04114757478237152, 0.1634381264448166, 0.0834784060716629, -0.34737542271614075, -0.9479158520698547, 0.25182411074638367, 0.1210952177643776, 0.14625903964042664, 0.14583629369735718, -0.20654438436031342, -0.44887807965278625, 0.0469435453414917, -0.15985624492168427, -0.19970524311065674, 0.11006370931863785, 0.00861931499093771, -0.05689426511526108, 0.12255978584289551, -0.09422194212675095, -0.24071471393108368, 0.16637727618217468, -0.09463154524564743, 0.0006809296901337802, -0.05330515280365944, -0.11264179646968842, 0.13007371127605438, 0.17644603550434113, 0.2946472764015198, 0.17215469479560852, -0.1177482083439827, -0.09683959186077118, 0.31071487069129944, 0.03673543035984039, 0.37167614698410034, 0.7192559242248535, 0.008334267884492874, 0.20777231454849243, 0.06566230952739716, -0.1414228081703186, -0.037375032901763916, -0.09075600653886795, -0.21978972852230072, -0.1321774274110794, 0.0020507185254245996, 0.19000481069087982, 0.4574648439884186, 0.49662503600120544, 0.26349076628685, -0.2908991575241089, -0.12287559360265732, -0.21275927126407623, 0.1394447386264801, -0.08726569265127182, 0.5241575241088867, 0.0354149155318737, -0.04528087005019188, -0.23621930181980133, -0.3176491856575012, -0.4405004382133484, -0.2735997140407562, 0.1920834332704544, -0.19311271607875824, 0.18522314727306366, 0.4128831624984741, 0.1407175213098526, -0.2816234827041626, 0.43491417169570923, 0.44987502694129944, 0.1743902713060379, -0.2831307053565979, -0.2648613750934601, -0.43506234884262085, 0.04130809009075165, 0.03062906675040722, -0.3326571583747864, 0.16338525712490082, -0.00828174501657486, 0.5289196968078613, -0.06663389503955841, 0.049297116696834564, -0.22281399369239807, 0.30826854705810547, 0.04080266132950783, -0.2330857366323471, -0.22597640752792358, 0.06953515112400055, 0.3373223841190338, -0.33792778849601746, -0.4209166169166565, 0.28855955600738525, 0.30960801243782043, 0.2118861824274063, 0.24172669649124146, 0.037968993186950684, -0.1851680874824524, -0.44106677174568176, 0.07415814697742462, -0.33717069029808044, 0.34953853487968445, -0.3599034547805786, -0.02662179246544838, 0.38505277037620544, -0.12698833644390106, -0.050829846411943436, -0.32031548023223877, -0.15112939476966858, 0.5077915787696838, -0.01738414168357849, 0.016011444851756096, 0.12655505537986755, -0.1531783789396286, -0.004821471404284239, 0.4526059627532959, -0.19576320052146912, 0.1708143949508667, -0.0713343471288681, -0.06885737925767899, 0.3143496513366699, 0.2996097207069397, 0.3142436146736145, 0.2425721138715744, -0.14491814374923706, 0.05101465433835983, 0.5088931322097778, 0.14934828877449036, -0.04108753427863121, 0.10442019999027252, 0.18289439380168915, -0.04525376111268997, 0.02526441030204296, -0.41642051935195923, 0.027793917804956436, 0.29045361280441284, -0.27973783016204834, -0.01809730753302574, 0.019278118386864662, -0.20775702595710754, -0.057804837822914124, -0.004372894298285246, -0.16476088762283325, 0.1149321123957634, 0.022978350520133972, -0.36983948945999146, -0.03395642340183258 ]
https://github.com/huggingface/datasets/issues/3113
Loading Data from HDF files
Hey @mariosasko, I've opened a PR to address this: #7625 It adds a new h5folder loader to support .h5 files via load_dataset("h5folder", data_dir=...). Feedback welcome!
**Is your feature request related to a problem? Please describe.** More often than not I come along big HDF datasets, and currently there is no straight forward way to feed them to a dataset. **Describe the solution you'd like** I would love to see a `from_h5` method that gets an interface implemented by the user on how items are extracted from dataset (in case of multiple datasets containing elements like arrays and metadata and etc). **Describe alternatives you've considered** Currently I manually load hdf files using `h5py` and implement PyTorch dataset interface. For small h5 files I load them into a pandas dataframe and use `from_pandas` function in the `datasets` package to load them, but for big datasets this is not feasible. **Additional context** HDF files are widespread throughout different domains and are one of the go to's for many researchers/scientists/engineers who work with numerical data. Given `datasets`' usecases have outgrown NLP use cases, it will make a lot of sense focusing on things like supporting HDF files.
25
Loading Data from HDF files
[ -0.32506072521209717, 0.007684177719056606, -0.15652869641780853, 0.3161044120788574, -0.024933526292443275, 0.1889023780822754, 0.1782037913799286, 0.3778652846813202, 0.2864287495613098, 0.21401019394397736, -0.42155927419662476, -0.18491148948669434, 0.2638891935348511, 0.1619223803281784, -0.17733658850193024, 0.06198234111070633, 0.007461722940206528, 0.2316368967294693, 0.029201772063970566, -0.34862884879112244, -0.20642711222171783, 0.10896676778793335, 0.08307377994060516, 0.09489062428474426, -0.36958107352256775, -0.025485869497060776, -0.07110452651977539, 0.5868324637413025, 0.008394504897296429, 0.12252026051282883, -0.017774859443306923, 0.35872483253479004, 0.46887698769569397, 0.2896465063095093, -0.00010472509893588722, 0.07419934868812561, 0.01808382384479046, -0.09935668110847473, -0.055174604058265686, 0.28322821855545044, 0.3965977430343628, -0.179061159491539, 0.00285357516258955, -0.3039640486240387, -0.21239615976810455, -0.12375912815332413, -0.03751862421631813, -0.006627566646784544, 0.3160112798213959, -0.08581743389368057, 0.27530038356781006, -0.03380291908979416, -0.09726996719837189, 0.07808041572570801, 0.3722647726535797, 0.4057905972003937, 0.16526982188224792, 0.41975027322769165, 0.36205601692199707, -0.13711412250995636, -0.0767747163772583, 0.3678973615169525, -0.10749475657939911, 0.15318447351455688, 0.15022806823253632, 0.10680088400840759, 0.017763467505574226, -0.047431912273168564, 0.036859527230262756, 0.19053412973880768, 0.37570178508758545, -0.018517296761274338, -0.13750046491622925, -0.0848340392112732, -0.23242954909801483, 0.008878796361386776, 0.22400441765785217, 0.06606611609458923, -0.26089906692504883, 0.10794221609830856, 0.1824677288532257, -0.30504050850868225, -0.12706226110458374, 0.06872208416461945, -0.17518462240695953, -0.10551668703556061, -0.018186762928962708, -0.149886816740036, 0.23455581068992615, 0.0667264387011528, 0.075660340487957, -0.23460522294044495, 0.028647668659687042, 0.10631091892719269, 0.0819920226931572, -0.0712457001209259, -0.24552424252033234, 0.07005961984395981, -0.024563439190387726, -0.27764037251472473, 0.1315438151359558, 0.20988553762435913, -0.37088334560394287, 0.058936551213264465, 0.086239755153656, -0.2913529574871063, -0.1367652267217636, -0.1263875514268875, -0.07331635802984238, 0.07476449012756348, -0.35178402066230774, -0.17764438688755035, -0.33988332748413086, 0.17627350986003876, -0.42046335339546204, -0.11027401685714722, -0.2374488264322281, -0.4253694415092468, -0.22536808252334595, 0.0942268818616867, 0.39533793926239014, -0.10143223404884338, 0.15603968501091003, 0.6129899024963379, 0.03637821227312088, 0.12371604889631271, 0.08554276078939438, 0.04750165343284607, -0.18686118721961975, -0.25658297538757324, -0.09010505676269531, 0.07337846606969833, -0.05436079204082489, 0.00019517866894602776, 0.08139161765575409, -0.08966007828712463, 0.004732654895633459, -0.024413611739873886, 0.2895452678203583, -0.007513556629419327, 0.29516640305519104, -0.41077861189842224, 0.21489648520946503, 0.12084652483463287, -0.007424468640238047, -0.10231844335794449, 0.3620584011077881, -0.18953317403793335, 0.06056906282901764, 0.10302208364009857, -0.31618764996528625, 0.034844283014535904, -0.19226716458797455, 0.2811337113380432, 0.37217989563941956, 0.02538921870291233, -0.24732555449008942, 0.07975505292415619, -0.2945762872695923, -0.4909389019012451, -0.08625082671642303, 0.05375247076153755, 0.10722356289625168, -0.17264540493488312, -0.0029205360915511847, 0.4402158558368683, -0.45157015323638916, 0.08901139348745346, 0.02836282178759575, -0.31572428345680237, 0.06787960231304169, -0.02217305451631546, -0.15252867341041565, 0.2654285132884979, -0.3511582612991333, 0.16478635370731354, 0.20218998193740845, -0.13702571392059326, -0.08904200792312622, 0.6702113151550293, 0.18169644474983215, 0.01972704380750656, 0.04548828303813934, 0.20153123140335083, 0.3225010335445404, -0.23443257808685303, 0.1175462007522583, 0.16385792195796967, 0.21287725865840912, -0.14571735262870789, -0.06885133683681488, -0.12590064108371735, -0.25813162326812744, 0.3148646652698517, -0.018004409968852997, 0.45311617851257324, 0.34723302721977234, -0.29392334818840027, 0.4970342516899109, -0.17092789709568024, -0.13220524787902832, 0.4564363360404968, -0.03656677156686783, 0.3832424581050873, -0.11448104679584503, 0.14235751330852509, -0.22867679595947266, -0.05335342139005661, -0.10515175759792328, -0.5148615837097168, 0.3475952744483948, -0.12408657371997833, 0.11615251749753952, -0.000303533481201157, 0.12638723850250244, 0.4376642107963562, 0.20590543746948242, 0.3113657832145691, -0.24307216703891754, -0.2097521275281906, -0.2777003049850464, 0.32711100578308105, -0.28013062477111816, 0.019333887845277786, 0.13147354125976562, 0.6298840045928955, 0.09014785289764404, -0.029150083661079407, 0.09641256928443909, 0.062059249728918076, 0.14992663264274597, -0.07937402278184891, 0.16669237613677979, 0.11771731078624725, 0.06995104998350143, 0.13021019101142883, 0.2935190200805664, 0.1260162889957428, -0.03763875365257263, 0.08100659400224686, 0.21161113679409027, 0.005520425271242857, 0.23536598682403564, 0.059668295085430145, -0.023288637399673462, 0.4813321530818939, -0.09665323048830032, -0.06828507781028748, 0.18201275169849396, -0.1336970180273056, 0.05802854895591736, -0.03289433568716049, 0.18441958725452423, -0.22495053708553314, 0.2747502028942108, 0.2406722456216812, 0.1605590283870697, -0.030831240117549896, -0.4998815655708313, 0.12486813217401505, 0.1492309868335724, -0.013572591356933117, -0.07540252804756165, 0.24125440418720245, 0.010871587321162224, 0.07388237863779068, 0.3337429165840149, 0.037431612610816956, 0.06213006749749184, 0.3694382905960083, 0.02954128198325634, -0.07661640644073486, -0.13232000172138214, -0.015954459086060524, -0.07040344178676605, -0.12185061722993851, -0.15953075885772705, 0.17515622079372406, -0.31068533658981323, 0.07920708507299423, -0.4384348392486572, -0.0705772414803505, 0.05960323289036751, -0.08172458410263062, -0.22526666522026062, 0.016241591423749924, -0.126961812376976, -0.26110514998435974, 0.07697248458862305, -0.09370195865631104, -0.15164639055728912, -0.157949760556221, 0.07312793284654617, 0.2126528024673462, -0.00606203731149435, -0.2463650405406952, -0.11934000253677368, 0.1206398606300354, -0.23834677040576935, 0.3181355893611908, -0.32205766439437866, 0.0347105972468853, -0.20410020649433136, 0.1903713196516037, 0.23940764367580414, 0.23663291335105896, 0.22685514390468597, 0.07438985258340836, 0.11987531185150146, -0.3998974561691284, 0.016537033021450043, 0.08859201520681381, 0.0655476376414299, -0.13067562878131866, -0.26420164108276367, 0.21496544778347015, -0.1069120541214943, -0.26129618287086487, 0.04175690934062004, 0.10273005068302155, -0.018031125888228416, -0.07190722227096558, 0.011536157689988613, -0.10176138579845428, 0.018634196370840073, 0.28732219338417053, -0.18346567451953888, -0.30867406725883484, -0.2617343068122864, 0.19939613342285156, 0.2969958484172821, -0.17143642902374268, -0.07543915510177612, -0.06199576333165169, -0.09529820084571838, 0.007484212517738342, -0.18456418812274933, -0.41353392601013184, -0.033552128821611404, -0.26210495829582214, -0.2863920331001282, 0.11027957499027252, -0.14057029783725739, -0.46411702036857605, 0.09004910290241241, -0.3984285295009613, -0.33890002965927124, 0.11588522791862488, -0.20751141011714935, -0.422591894865036, 0.03220301866531372, -0.00007172864570748061, -0.16129963099956512, -0.23192110657691956, -0.19609807431697845, 0.038092609494924545, 0.14268527925014496, -0.08387361466884613, 0.053976692259311676, -0.3517153561115265, 0.1086401715874672, -0.3396461308002472, 0.18219047784805298, -0.011260617524385452, -0.1576894372701645, 0.5689947009086609, 0.00769819738343358, 0.30657443404197693, 0.023281143978238106, -0.06596358865499496, -0.13602326810359955, 0.10882504284381866, -0.004598085768520832, 0.2592446208000183, 0.013664080761373043, -0.17952950298786163, -0.07505220174789429, 0.21338266134262085, -0.35449695587158203, -0.06210020184516907, -0.06282689422369003, -0.1515161544084549, -0.005888723768293858, 0.13007794320583344, 0.18719957768917084, -0.18947771191596985, -0.004787419456988573, 0.2497238963842392, 0.2919798195362091, 0.21357083320617676, -0.11213327199220657, -0.0073784226551651955, -0.05768764764070511, 0.11544523388147354, 0.238303542137146, 0.110306017100811, -0.21629565954208374, -0.266353040933609, -0.06979953497648239, 0.21506379544734955, -0.1308434009552002, 0.8304200768470764, -0.026182496920228004, 0.14767394959926605, 0.12377028167247772, -0.15870420634746552, 0.22657154500484467, 0.17602145671844482, -0.23469863831996918, -0.18615058064460754, -0.11475690454244614, 0.5591118931770325, -0.20472481846809387, -0.1413271427154541, -0.04172394052147865, -0.10670005530118942, -0.31583184003829956, -0.1798115074634552, -0.018441788852214813, -0.12890774011611938, -0.1624021679162979, -0.17797565460205078, -0.33105891942977905, -0.10289865732192993, -0.07183187454938889, 0.09932421147823334, -0.21866731345653534, 0.22916731238365173, 0.34477946162223816, -0.0661432147026062, 0.3481188416481018, 0.2497936338186264, 0.09028373658657074, -0.0797792300581932, 0.6408854126930237, 0.2598282992839813, 0.5038313865661621, 0.05871567502617836, 0.451351523399353, 0.13664135336875916, -0.2901535928249359, 0.01742698810994625, 0.4600391089916229, 0.23056772351264954, 0.16437920928001404, -0.01655416004359722, 0.06517347693443298, -0.35098761320114136, 0.1634453982114792, 0.023333542048931122, -0.12107870727777481, -0.014973627403378487, -0.160454660654068, 0.43591466546058655, -0.4659665524959564, -0.12019139528274536, 0.16145114600658417, 0.3467419445514679, 0.13483773171901703, 0.3176809549331665, 0.22107650339603424, 0.8990130424499512, -0.2028723806142807, 0.21210335195064545, 0.3568911850452423, -0.2907075583934784, -0.3380432426929474, -0.6298674941062927, -0.3769029378890991, -0.32049116492271423, -0.2781391739845276, -0.22952300310134888, 0.03769972547888756, 0.10623788088560104, 0.29199331998825073, 0.010491747409105301, -0.016839072108268738, 0.24621523916721344, -0.03639913350343704, 0.029119422659277916, 0.10260208696126938, 0.16629450023174286, -0.20811790227890015, -0.25947073101997375, 0.23481227457523346, 0.08238149434328079, 0.005018026102334261, -0.20707322657108307, -0.2507174611091614, 0.206009641289711, 0.01725216954946518, 0.20768091082572937, 0.016635574400424957, -0.04913761466741562, 0.244795560836792, 0.06790616363286972, -0.23454013466835022, -0.4967086613178253, -0.03274422138929367, 0.19970038533210754, -0.017248909920454025, -0.1097976565361023, -0.07310249656438828, 0.2939799726009369, -0.09120136499404907, -0.2496192306280136, 0.04421497881412506, 0.2743249833583832, -0.17523866891860962, -0.017850402742624283, 0.18933705985546112, 0.06006104499101639, -0.22745583951473236, 0.31883248686790466, 0.06713411957025528, 0.01968872733414173, -0.23844337463378906, -0.4301283061504364, 0.11770796030759811, -0.17113302648067474, 0.01876724325120449, 0.19490642845630646, 0.03768320009112358, -0.08593754470348358, -0.035220205783843994, 0.22150012850761414, -0.13562501966953278, -0.2034328132867813, 0.33001911640167236, -0.10020257532596588, -0.07541865110397339, 0.30189043283462524, 0.07156988978385925, -0.22182825207710266, -0.3146355152130127, 0.05262566730380058, 0.2486620545387268, -0.29361122846603394, -0.09746522456407547, 0.03978395462036133, -0.1528247892856598, -0.0019163870019838214, -0.12809790670871735, 0.05584266781806946, -0.35200220346450806, -0.2372390329837799, -0.21216973662376404, -0.33421799540519714, 0.3928898274898529, -0.19203472137451172, 0.16625237464904785, 0.1516546756029129, -0.024929266422986984, -0.14041058719158173, 0.0005960527341812849, -0.43117693066596985, 0.2471403032541275, -0.014479628764092922, -0.016673441976308823, -0.1911943405866623, -0.02788335643708706, -0.021704955026507378, 0.11842084676027298, 0.3164997696876526, 0.016257787123322487, -0.03316092863678932, -0.3324142098426819, -0.07944874465465546, 0.08820874243974686, -0.06501998007297516, 0.017177850008010864, -0.1667499989271164, -0.24007561802864075, -0.27088746428489685, -0.00952905137091875, -0.059648968279361725, -0.10022896528244019, -0.058727480471134186, 0.1041494682431221, 0.5707889795303345, 0.0060067251324653625, -0.3993646502494812, 0.12850092351436615, 0.26436206698417664, 0.38440796732902527, -0.2670677900314331, -0.2668153643608093, -0.3814983367919922, -0.11801769584417343, -0.031094614416360855, 0.3227998912334442, 0.2919018864631653, -0.29689517617225647, 0.5123331546783447, -0.07216175645589828, 0.30020925402641296, -0.07671438902616501, 0.31757864356040955, -0.06263567507266998, -0.02300068363547325, 0.13473288714885712, 0.05989908054471016, 0.18537162244319916, -0.15115952491760254, -0.0708659291267395, -0.11036998778581619, -0.47354280948638916, 0.14595237374305725, 0.2246878445148468, 0.2031702846288681, 0.1484774947166443, 0.04230283200740814, 0.011342517100274563, -0.03163039684295654, 0.27789872884750366, -0.5150641798973083, 0.4636705219745636, 0.09772292524576187, 0.17148412764072418, -0.1717173308134079, 0.5033444166183472, -0.033524781465530396, 0.2847486734390259, 0.23488914966583252, -0.04114757478237152, 0.1634381264448166, 0.0834784060716629, -0.34737542271614075, -0.9479158520698547, 0.25182411074638367, 0.1210952177643776, 0.14625903964042664, 0.14583629369735718, -0.20654438436031342, -0.44887807965278625, 0.0469435453414917, -0.15985624492168427, -0.19970524311065674, 0.11006370931863785, 0.00861931499093771, -0.05689426511526108, 0.12255978584289551, -0.09422194212675095, -0.24071471393108368, 0.16637727618217468, -0.09463154524564743, 0.0006809296901337802, -0.05330515280365944, -0.11264179646968842, 0.13007371127605438, 0.17644603550434113, 0.2946472764015198, 0.17215469479560852, -0.1177482083439827, -0.09683959186077118, 0.31071487069129944, 0.03673543035984039, 0.37167614698410034, 0.7192559242248535, 0.008334267884492874, 0.20777231454849243, 0.06566230952739716, -0.1414228081703186, -0.037375032901763916, -0.09075600653886795, -0.21978972852230072, -0.1321774274110794, 0.0020507185254245996, 0.19000481069087982, 0.4574648439884186, 0.49662503600120544, 0.26349076628685, -0.2908991575241089, -0.12287559360265732, -0.21275927126407623, 0.1394447386264801, -0.08726569265127182, 0.5241575241088867, 0.0354149155318737, -0.04528087005019188, -0.23621930181980133, -0.3176491856575012, -0.4405004382133484, -0.2735997140407562, 0.1920834332704544, -0.19311271607875824, 0.18522314727306366, 0.4128831624984741, 0.1407175213098526, -0.2816234827041626, 0.43491417169570923, 0.44987502694129944, 0.1743902713060379, -0.2831307053565979, -0.2648613750934601, -0.43506234884262085, 0.04130809009075165, 0.03062906675040722, -0.3326571583747864, 0.16338525712490082, -0.00828174501657486, 0.5289196968078613, -0.06663389503955841, 0.049297116696834564, -0.22281399369239807, 0.30826854705810547, 0.04080266132950783, -0.2330857366323471, -0.22597640752792358, 0.06953515112400055, 0.3373223841190338, -0.33792778849601746, -0.4209166169166565, 0.28855955600738525, 0.30960801243782043, 0.2118861824274063, 0.24172669649124146, 0.037968993186950684, -0.1851680874824524, -0.44106677174568176, 0.07415814697742462, -0.33717069029808044, 0.34953853487968445, -0.3599034547805786, -0.02662179246544838, 0.38505277037620544, -0.12698833644390106, -0.050829846411943436, -0.32031548023223877, -0.15112939476966858, 0.5077915787696838, -0.01738414168357849, 0.016011444851756096, 0.12655505537986755, -0.1531783789396286, -0.004821471404284239, 0.4526059627532959, -0.19576320052146912, 0.1708143949508667, -0.0713343471288681, -0.06885737925767899, 0.3143496513366699, 0.2996097207069397, 0.3142436146736145, 0.2425721138715744, -0.14491814374923706, 0.05101465433835983, 0.5088931322097778, 0.14934828877449036, -0.04108753427863121, 0.10442019999027252, 0.18289439380168915, -0.04525376111268997, 0.02526441030204296, -0.41642051935195923, 0.027793917804956436, 0.29045361280441284, -0.27973783016204834, -0.01809730753302574, 0.019278118386864662, -0.20775702595710754, -0.057804837822914124, -0.004372894298285246, -0.16476088762283325, 0.1149321123957634, 0.022978350520133972, -0.36983948945999146, -0.03395642340183258 ]
https://github.com/huggingface/datasets/issues/3112
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
I am very unsure on why you tagged me here. I am not a maintainer of the Datasets library and have no idea how to help you.
## Describe the bug Despite having batches way under 2Gb when running `datasets.map()`, after processing correctly the data of the first batch without fuss and irrespective of writer_batch_size (say 2,4,8,16,32,64 and 128 in my case), it returns the following error : > OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB Note that I always run `batch_size=writer_batch_size` : ## Steps to reproduce the bug ```python datasets.map(lambda example : {"column_name" : function(arguments)}, batched=False, remove_columns = datasets.column_names, batch_size=batch_size, writer_batch_size=batch_size, disable_nullable=True, num_proc=None, desc="blablabla") ``` ## Introspecting CUDA memory during bug Placed within `function(arguments)` the following statement to introspect memory usage, merely a little over 1/4 of 2Gb `print(torch.cuda.memory_summary(device=device, abbreviated=False))` > |===========================================================================| | PyTorch CUDA memory summary, device ID 0 | |---------------------------------------------------------------------------| | CUDA OOMs: 0 | cudaMalloc retries: 0 | |===========================================================================| | Metric | Cur Usage | Peak Usage | Tot Alloc | Tot Freed | |---------------------------------------------------------------------------| | Allocated memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB | | from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB | | from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB | |---------------------------------------------------------------------------| | Active memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB | | from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB | | from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB | |---------------------------------------------------------------------------| | GPU reserved memory | 598016 KB | 598016 KB | 598016 KB | 0 B | | from large pool | 595968 KB | 595968 KB | 595968 KB | 0 B | | from small pool | 2048 KB | 2048 KB | 2048 KB | 0 B | |---------------------------------------------------------------------------| | Non-releasable memory | 36117 KB | 52292 KB | 274275 KB | 238158 KB | | from large pool | 34816 KB | 51537 KB | 261713 KB | 226897 KB | | from small pool | 1301 KB | 2045 KB | 12562 KB | 11261 KB | |---------------------------------------------------------------------------| | Allocations | 198 | 224 | 478 | 280 | | from large pool | 74 | 75 | 75 | 1 | | from small pool | 124 | 150 | 403 | 279 | |---------------------------------------------------------------------------| | Active allocs | 198 | 224 | 478 | 280 | | from large pool | 74 | 75 | 75 | 1 | | from small pool | 124 | 150 | 403 | 279 | |---------------------------------------------------------------------------| | GPU reserved segments | 21 | 21 | 21 | 0 | | from large pool | 20 | 20 | 20 | 0 | | from small pool | 1 | 1 | 1 | 0 | |---------------------------------------------------------------------------| | Non-releasable allocs | 18 | 23 | 166 | 148 | | from large pool | 17 | 18 | 19 | 2 | | from small pool | 1 | 6 | 147 | 146 | |===========================================================================| ## Expected results Efficiently process the datasets and write it down to disk. ## Actual results -------------------------------------------------------------------------- OverflowError Traceback (most recent call last) ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2390 else: -> 2391 writer.write(example) 2392 else: ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write(self, example, key, writer_batch_size) 367 --> 368 self.write_examples_on_file() 369 ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self) 316 if not isinstance(pa_array[0], pa.lib.FloatScalar): --> 317 raise OverflowError( 318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format( OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB During handling of the above exception, another exception occurred: OverflowError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_16268/2456940807.py in <module> 3 #tracker = OfflineEmissionsTracker(country_iso_code="FRA", project_name='xxx'+time_stamp,output_dir='./codecarbon') 4 #tracker.start() ----> 5 process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection=['wikipedia'], from_scratch=True, 6 clean_sentences=False, negative_sampling=False, translate=False, tokenize=False, generate_embeddings=True, concatenate_embeddings=False, 7 max_sample=10000, padding='do_not_pad', truncation=True, cpu_batch_size=1000, gpu_batch_size=2, cpu_writer_batch_size=1000, gpu_writer_batch_size=2, disable_nullable=True, num_proc=None) # ~\xxx\xxx.py in process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection, from_scratch, clean_sentences, translate, negative_sampling, tokenize, generate_embeddings, concatenate_embeddings, max_sample, padding, truncation, cpu_batch_size, gpu_batch_size, cpu_writer_batch_size, gpu_writer_batch_size, disable_nullable, num_proc) 481 for column in tqdm(dataset.column_names, desc=f'Processing column', leave=False): 482 if "xxx_" in column: --> 483 dataset = dataset.map(lambda example : 484 {"embeddings_"+str(column).replace("translated_",""):function(input_ids=example[column], 485 token_type_ids=example[column.replace("input_ids","token_type_ids")], ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 2034 2035 if num_proc is None or num_proc == 1: -> 2036 return self._map_single( 2037 function=function, 2038 with_indices=with_indices, ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs) 501 self: "Dataset" = kwargs.pop("self") 502 # apply actual function --> 503 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 504 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 505 for dataset in datasets: ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs) 468 } 469 # apply actual function --> 470 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 471 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 472 # re-apply format to the output ~\anaconda3\envs\xxx\lib\site-packages\datasets\fingerprint.py in wrapper(*args, **kwargs) 404 # Call actual function 405 --> 406 out = func(self, *args, **kwargs) 407 408 # Update fingerprint of in-place transforms + update in-place history of transforms ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2425 if update_data: 2426 if writer is not None: -> 2427 writer.finalize() 2428 if tmp_file is not None: 2429 tmp_file.close() ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in finalize(self, close_stream) 440 # Re-intializing to empty list for next batch 441 self.hkey_record = [] --> 442 self.write_examples_on_file() 443 if self.pa_writer is None: 444 if self._schema is not None: ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self) 315 # This check fails with FloatArrays with nans, which is not what we want, so account for that: 316 if not isinstance(pa_array[0], pa.lib.FloatScalar): --> 317 raise OverflowError( 318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format( 319 type(pa_array) OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: Windows-10-10.0.19042-SP0 - Python version: 3.8.11 - PyArrow version: 3.0.0 ##Next steps Testing on Linux. @albertvillanova
27
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
[ -0.21762029826641083, -0.09120343625545502, -0.25341516733169556, 0.19241462647914886, 0.23211410641670227, -0.12171962857246399, 0.12532101571559906, 0.321885347366333, -0.1419285237789154, 0.3799871504306793, 0.171177938580513, 0.13400320708751678, -0.16703712940216064, 0.07818226516246796, 0.03648703545331955, -0.11528632789850235, -0.004777331370860338, 0.19233684241771698, 0.06656038016080856, 0.07074099034070969, 0.0674552321434021, 0.1792597770690918, 0.02307223528623581, 0.15444612503051758, -0.003833068534731865, -0.1226709708571434, 0.014444529078900814, 0.16384769976139069, -0.3409920334815979, -0.302722692489624, 0.05041281506419182, -0.12332365661859512, 0.1205638200044632, 0.13678297400474548, -0.00009945384226739407, 0.0009480807348154485, 0.3333154618740082, 0.03499102592468262, -0.052614327520132065, 0.22807174921035767, 0.3321240544319153, -0.18497692048549652, 0.08098586648702621, -0.23449492454528809, 0.11601522564888, -0.3057189881801605, 0.1558293104171753, 0.27856600284576416, 0.31365057826042175, 0.28338712453842163, 0.36692991852760315, 0.08931498974561691, 0.36369839310646057, -0.05269520357251167, 0.7395967841148376, -0.20145922899246216, -0.11778464913368225, 0.33431336283683777, 0.37337392568588257, -0.15258105099201202, -0.25870993733406067, 0.050251662731170654, -0.24979116022586823, 0.07761752605438232, 0.16736072301864624, 0.024630751460790634, 0.150791734457016, -0.19546297192573547, -0.06677961349487305, -0.13063377141952515, 0.22057101130485535, -0.3516447842121124, -0.0015191719867289066, -0.0743420422077179, 0.0620148703455925, -0.4076814353466034, 0.006064932327717543, 0.2481895536184311, -0.2533096373081207, -0.05016224831342697, -0.10555406659841537, -0.08293469250202179, -0.30417871475219727, 0.03586532548069954, 0.18248414993286133, 0.10658836364746094, 0.10065483301877975, 0.003774952609091997, 0.31273549795150757, 0.06524061411619186, 0.4305354952812195, 0.12407315522432327, -0.20034144818782806, 0.024246184155344963, -0.0848899856209755, -0.05503537133336067, 0.11665929853916168, 0.0739893987774849, 0.25050264596939087, -0.11152653396129608, 0.19661958515644073, 0.05023935064673424, 0.5043162107467651, 0.10032634437084198, 0.09995409846305847, 0.2565688490867615, -0.1800711303949356, 0.21436470746994019, 0.14384178817272186, 0.06733047962188721, 0.07186832278966904, 0.039788611233234406, -0.11021813005208969, -0.26756376028060913, 0.3130459189414978, -0.15165427327156067, -0.037874337285757065, -0.09569033235311508, -0.12266591191291809, -0.008104651235044003, -0.27141088247299194, 0.0466340146958828, -0.10155166685581207, 0.36532631516456604, -0.09088031202554703, -0.2226731777191162, 0.07980412244796753, 0.14568211138248444, -0.1521901786327362, -0.006391310598701239, -0.27443841099739075, 0.20459267497062683, -0.23192287981510162, -0.12203395366668701, 0.02272208034992218, -0.10546929389238358, 0.24347642064094543, -0.04043625295162201, 0.408608078956604, -0.027645600959658623, 0.16501614451408386, 0.0013288217596709728, -0.13736873865127563, 0.29637986421585083, 0.15678676962852478, -0.06821166723966599, 0.07242098450660706, 0.06662940979003906, 0.008783492259681225, 0.40348395705223083, -0.11243544518947601, -0.30764830112457275, 0.003874804824590683, 0.3100244402885437, 0.1327320784330368, 0.12570467591285706, 0.023894624784588814, -0.19784298539161682, 0.45196086168289185, -0.04355774447321892, -0.12418325245380402, -0.23891597986221313, 0.2940865159034729, -0.4397973120212555, 0.024900957942008972, -0.0051725744269788265, -0.41518139839172363, 0.18766073882579803, 0.09022349119186401, -0.08408302068710327, 0.30154937505722046, 0.5396497845649719, -0.2819603681564331, 0.13869686424732208, -0.21572867035865784, 0.30734145641326904, 0.157805398106575, 0.0287790484726429, -0.28925180435180664, 0.038330573588609695, -0.12478942424058914, -0.3276699483394623, 0.11963869631290436, 0.03261450678110123, 0.2268577665090561, 0.05362950265407562, 0.05217354744672775, 0.14596731960773468, -0.18396614491939545, 0.2789855897426605, -0.3861553370952606, -0.232232466340065, -0.13927508890628815, 0.08456572145223618, 0.14915642142295837, -0.22318615019321442, -0.08408226817846298, -0.12527340650558472, 0.2052546888589859, -0.3027876019477844, 0.14699433743953705, 0.30326709151268005, 0.19813179969787598, 0.12987597286701202, -0.12410695105791092, 0.0038857555482536554, 0.023468174040317535, -0.12538011372089386, -0.4875797629356384, 0.019704967737197876, -0.1407504379749298, -0.2337052971124649, -0.10266820341348648, 0.19727185368537903, 0.018387354910373688, 0.06380292028188705, 0.33068588376045227, -0.05235582962632179, 0.2351590245962143, -0.15479761362075806, 0.045639898627996445, -0.15123599767684937, -0.22302380204200745, 0.04552624747157097, -0.11277448385953903, 0.13496382534503937, -0.4713751971721649, -0.5687726736068726, 0.15396864712238312, -0.08269946277141571, 0.018995169550180435, -0.17306192219257355, 0.07491714507341385, 0.2164943367242813, -0.18915003538131714, -0.2856725752353668, -0.15462259948253632, -0.026038633659482002, 0.016044996678829193, -0.3015079200267792, 0.30342742800712585, 0.09868797659873962, -0.04150417819619179, -0.0642632469534874, 0.09112460166215897, 0.2355140894651413, 0.1298905313014984, -0.11533530056476593, 0.09345690906047821, -0.24479781091213226, -0.05732676014304161, 0.02824515290558338, 0.21101930737495422, 0.03796853497624397, 0.23086142539978027, -0.03137960284948349, 0.11188074946403503, -0.04498046264052391, -0.14322999119758606, -0.06136475130915642, 0.4022385776042938, 0.03552041947841644, 0.14734876155853271, 0.10086869448423386, 0.039410658180713654, -0.12209010869264603, -0.02793576568365097, -0.25406134128570557, 0.26161935925483704, 0.38163742423057556, -0.13092371821403503, -0.14621374011039734, -0.08968823403120041, -0.2910540699958801, 0.1288498193025589, -0.07752342522144318, 0.3662181496620178, 0.11020292341709137, 0.28440970182418823, -0.2939845323562622, -0.45191043615341187, -0.13541191816329956, -0.09018275886774063, 0.20743751525878906, 0.05720758065581322, -0.06766659766435623, 0.12542887032032013, -0.29602953791618347, -0.033643901348114014, -0.18791329860687256, -0.09725911915302277, -0.06709251552820206, 0.23898524045944214, 0.2701942026615143, -0.1507464349269867, 0.08273542672395706, 0.3701634109020233, 0.053856346756219864, 0.17567594349384308, 0.102678082883358, 0.07700420916080475, 0.0054662274196743965, -0.29523375630378723, 0.24544355273246765, 0.1885869801044464, -0.24680612981319427, 0.32281258702278137, 0.21230873465538025, -0.13793876767158508, -0.056377045810222626, -0.12359707057476044, -0.09511206299066544, -0.0978679433465004, 0.09233714640140533, 0.16854368150234222, 0.41580262780189514, -0.15193314850330353, -0.23357447981834412, 0.14105036854743958, -0.23475851118564606, -0.3119398355484009, 0.04597112163901329, 0.09076499938964844, -0.10215836018323898, -0.26859262585639954, -0.09203211218118668, -0.12951606512069702, -0.389070987701416, 0.028468064963817596, 0.14144191145896912, 0.2318311631679535, 0.10459644347429276, 0.49148988723754883, 0.10441035777330399, -0.0140139264985919, -0.014990691095590591, 0.15486697852611542, -0.11722837388515472, 0.16162896156311035, -0.16970239579677582, -0.3941350281238556, 0.027459725737571716, 0.0029638423584401608, -0.05132322013378143, -0.04025030881166458, -0.33747604489326477, -0.17595045268535614, -0.1147148534655571, 0.18770304322242737, -0.09971659630537033, 0.031780973076820374, 0.2794191837310791, 0.17231228947639465, -0.289110392332077, 0.0675976499915123, -0.12049853056669235, 0.1485000103712082, -0.1962605118751526, 0.07822375744581223, -0.25603461265563965, 0.1960677206516266, -0.07707944512367249, 0.650026798248291, -0.14486178755760193, 0.11410962045192719, 0.27211833000183105, 0.09778876602649689, 0.10373047739267349, -0.15118196606636047, -0.049169305711984634, 0.04532516375184059, 0.05878507345914841, -0.3067627549171448, 0.18784169852733612, -0.11425149440765381, -0.37249985337257385, 0.21691270172595978, 0.06906285881996155, -0.14572052657604218, -0.017279814928770065, 0.35270604491233826, 0.333319753408432, 0.08056658506393433, -0.19801564514636993, -0.18256254494190216, -0.12430629879236221, -0.0818246454000473, -0.21512888371944427, -0.1994447261095047, -0.009271207265555859, -0.015981756150722504, -0.0700940191745758, -0.34838375449180603, -0.36628594994544983, 0.17455549538135529, 0.1475653052330017, -0.15252459049224854, -0.07361860573291779, -0.031156238168478012, 0.23338495194911957, -0.23446179926395416, 0.8700185418128967, 0.190953329205513, -0.13005612790584564, 0.1610994040966034, 0.17451587319374084, -0.15761269629001617, -0.2468412220478058, -0.23816736042499542, 0.08577379584312439, 0.2579020857810974, -0.1673494577407837, -0.39089342951774597, 0.1567554771900177, 0.25119394063949585, 0.10615676641464233, -0.1112518236041069, -0.10064103454351425, -0.30830293893814087, -0.4754803478717804, -0.3116041421890259, 0.1141514927148819, 0.16849350929260254, 0.332135409116745, -0.0467207133769989, -0.2472413033246994, 0.1721276491880417, -0.13139447569847107, -0.2855757176876068, -0.04181765019893646, 0.3257638216018677, -0.32142287492752075, -0.15605120360851288, -0.2585050165653229, 0.02545982412993908, 0.4362488090991974, 0.0323435515165329, -0.032754141837358475, 0.12550823390483856, 0.030530452728271484, -0.1590825319290161, 0.13911931216716766, 0.1716059148311615, -0.13066676259040833, 0.2243518978357315, -0.11926676332950592, 0.29594677686691284, 0.320513516664505, -0.15972349047660828, 0.19233228266239166, -0.16929548978805542, -0.058230262249708176, -0.08762327581644058, 0.13743551075458527, -0.0370977520942688, 0.1780213862657547, 0.12024448066949844, -0.32267481088638306, -0.24494268000125885, 0.35401830077171326, 0.16864047944545746, 0.8437936902046204, -0.3358015716075897, 0.19224625825881958, 0.24525201320648193, -0.043990254402160645, 0.20328107476234436, -0.03219703957438469, 0.3013531565666199, -0.4818742871284485, -0.2494383007287979, 0.28692883253097534, -0.22864635288715363, 0.11263274401426315, -0.008489098399877548, -0.17990660667419434, -0.00472291698679328, -0.09011062979698181, 0.11033035814762115, -0.10117035359144211, 0.0747455507516861, 0.046897485852241516, 0.02510691061615944, -0.41098371148109436, 0.2580210268497467, -0.06427937746047974, -0.27000096440315247, -0.25752928853034973, -0.2110522985458374, -0.09612033516168594, -0.15409386157989502, -0.2559393644332886, 0.0576724037528038, -0.28301072120666504, 0.14547257125377655, 0.09488994628190994, -0.1670973002910614, -0.27968496084213257, 0.03014078177511692, -0.14633657038211823, 0.1389882117509842, 0.11473435163497925, -0.08303309231996536, 0.07137714326381683, -0.38236287236213684, -0.23384173214435577, 0.10730785131454468, -0.05999498441815376, -0.262115478515625, -0.15280507504940033, 0.3242528736591339, -0.04747829586267471, -0.30449509620666504, -0.14913178980350494, 0.18277737498283386, 0.3204934000968933, -0.3355744183063507, -0.10553397238254547, -0.24409069120883942, -0.24446745216846466, -0.19060973823070526, 0.24517004191875458, 0.2264343947172165, -0.15647603571414948, 0.1409798115491867, 0.09131500124931335, -0.11604492366313934, -0.1378907859325409, 0.15818996727466583, 0.32988670468330383, 0.11418620496988297, 0.3373856246471405, 0.23603641986846924, -0.13957200944423676, -0.297807902097702, -0.1741064190864563, -0.021597638726234436, -0.4105699360370636, 0.3832146227359772, 0.1518164426088333, -0.12140005081892014, 0.08805729448795319, 0.24989192187786102, 0.2717583477497101, 0.34267470240592957, -0.17928966879844666, -0.14873269200325012, -0.355707049369812, 0.13314613699913025, 0.19443894922733307, 0.1823815405368805, 0.07179276645183563, 0.23775866627693176, 0.16273149847984314, 0.08278708904981613, -0.45327669382095337, -0.11048975586891174, -0.2526964843273163, 0.17484459280967712, -0.232098788022995, -0.18106667697429657, 0.0389893501996994, 0.21566565334796906, 0.21976791322231293, 0.24789664149284363, -0.20186282694339752, -0.4131035804748535, 0.22236010432243347, 0.008303796872496605, -0.13273879885673523, 0.0485621839761734, 0.1098133996129036, -0.16267119348049164, 0.0032736831344664097, 0.04676055535674095, 0.20948970317840576, -0.21364626288414001, -0.00222131609916687, -0.27631497383117676, 0.487165629863739, -0.027353480458259583, 0.10062599182128906, -0.057167898863554, -0.2476205974817276, 0.054438769817352295, 0.1335606426000595, 0.10996266454458237, 0.11295000463724136, -0.20759326219558716, 0.16078855097293854, -0.050480470061302185, 0.040615443140268326, 0.08672952651977539, 0.06693168729543686, -0.3409624695777893, -0.373185932636261, 0.005866191815584898, 0.42204007506370544, 0.1719711869955063, -0.11567096412181854, -0.011814202181994915, 0.17563967406749725, 0.3669951558113098, -0.20485827326774597, -0.15496042370796204, 0.04048648849129677, -0.14637184143066406, -0.04388981685042381, 0.23783428966999054, -0.0006910255178809166, -0.1817065328359604, 0.16354362666606903, 0.33889421820640564, 0.3349946141242981, 0.07114571332931519, -0.24598738551139832, 0.22392316162586212, -0.0556500144302845, -0.17205123603343964, 0.392600953578949, 0.04778234660625458, 0.3426295220851898, 0.2767655849456787, -0.003707733005285263, 0.25191670656204224, -0.1336839199066162, 0.08186915516853333, -0.22569653391838074, -0.2021685540676117, 0.0023473910987377167, 0.46948546171188354, 0.41959503293037415, 0.03667778521776199, 0.05183695629239082, 0.27177897095680237, 0.28621524572372437, -0.16616827249526978, 0.0016907837707549334, 0.2546248137950897, -0.3560536801815033, 0.0625087171792984, -0.19249187409877777, 0.008555377833545208, 0.06851782649755478, 0.15627886354923248, 0.00019270226766820997, -0.08324049413204193, 0.23158712685108185, 0.009742306545376778, -0.17924287915229797, -0.1870657056570053, 0.23247861862182617, 0.11629801243543625, -0.15967482328414917, -0.20217745006084442, 0.25230681896209717, 0.0316360741853714, -0.05851935222744942, -0.22109800577163696, 0.30854472517967224, 0.5103345513343811, 0.36532101035118103, 0.033292803913354874, 0.012726821936666965, -0.1613786816596985, -0.09648676216602325, -0.3900899589061737, -0.078887440264225, 0.41124823689460754, 0.306840717792511, -0.020420119166374207, 0.27744314074516296, -0.33835530281066895, 0.23741751909255981, 0.25217002630233765, -0.11196750402450562, 0.2261652648448944, -0.14987801015377045, 0.15659022331237793, -0.6265778541564941, -0.08315776288509369, -0.11900776624679565, -0.5077874660491943, 0.30869683623313904, 0.19987069070339203, -0.06534504145383835, -0.008969413116574287, -0.052921343594789505, 0.1613793671131134, -0.05649267137050629, 0.6135860681533813, 0.30682268738746643, 0.2939070463180542, -0.33312472701072693, -0.26534026861190796, -0.10361196100711823, 0.2896706461906433, -0.5137919783592224, 0.06753364205360413, 0.044600050896406174, 0.3639431297779083, -0.1880774199962616, 0.02717539854347706, 0.19979016482830048, 0.22512319684028625, -0.256192684173584, 0.3063570559024811, -0.3540523648262024, 0.1609322428703308, 0.3303051292896271, -0.1530722677707672, 0.24649207293987274, -0.2328627109527588, 0.1920275241136551, -0.3819643557071686, 0.34469592571258545, -0.2700933516025543, 0.08195391297340393, 0.1358117312192917, -0.014647492207586765, 0.15839914977550507, -0.0855119526386261, 0.11522077023983002, -0.10495894402265549, -0.1093200296163559, -0.035995662212371826, -0.10834658145904541, -0.29773658514022827, 0.08605054765939713, 0.41820845007896423, 0.4281243681907654, -0.18013744056224823, -0.17295007407665253, -0.20257455110549927, 0.49131250381469727, 0.1776670217514038, 0.0937729999423027, 0.2762756049633026, 0.11510729044675827, 0.171925887465477, -0.16969040036201477, 0.022694140672683716, -0.0916612520813942, 0.050109654664993286, -0.10286521166563034, -0.5056654214859009, -0.3507876694202423, 0.2899601459503174, -0.37979575991630554, -0.19020767509937286, 0.13051298260688782, 0.16538088023662567, -0.08364690095186234, -0.258974552154541, -0.33337339758872986, 0.18363408744335175, 0.1349198818206787, 0.02657480537891388, -0.29264822602272034, 0.3502376079559326, -0.14413712918758392, -0.03554970398545265, 0.04038388654589653, 0.2089535892009735, 0.1294994354248047, -0.20796169340610504, -0.1653376668691635, -0.422521710395813 ]
https://github.com/huggingface/datasets/issues/3112
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
Ok got it, tensor full of NaNs, cf. ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self) 315 # This check fails with FloatArrays with nans, which is not what we want, so account for that:
## Describe the bug Despite having batches way under 2Gb when running `datasets.map()`, after processing correctly the data of the first batch without fuss and irrespective of writer_batch_size (say 2,4,8,16,32,64 and 128 in my case), it returns the following error : > OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB Note that I always run `batch_size=writer_batch_size` : ## Steps to reproduce the bug ```python datasets.map(lambda example : {"column_name" : function(arguments)}, batched=False, remove_columns = datasets.column_names, batch_size=batch_size, writer_batch_size=batch_size, disable_nullable=True, num_proc=None, desc="blablabla") ``` ## Introspecting CUDA memory during bug Placed within `function(arguments)` the following statement to introspect memory usage, merely a little over 1/4 of 2Gb `print(torch.cuda.memory_summary(device=device, abbreviated=False))` > |===========================================================================| | PyTorch CUDA memory summary, device ID 0 | |---------------------------------------------------------------------------| | CUDA OOMs: 0 | cudaMalloc retries: 0 | |===========================================================================| | Metric | Cur Usage | Peak Usage | Tot Alloc | Tot Freed | |---------------------------------------------------------------------------| | Allocated memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB | | from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB | | from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB | |---------------------------------------------------------------------------| | Active memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB | | from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB | | from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB | |---------------------------------------------------------------------------| | GPU reserved memory | 598016 KB | 598016 KB | 598016 KB | 0 B | | from large pool | 595968 KB | 595968 KB | 595968 KB | 0 B | | from small pool | 2048 KB | 2048 KB | 2048 KB | 0 B | |---------------------------------------------------------------------------| | Non-releasable memory | 36117 KB | 52292 KB | 274275 KB | 238158 KB | | from large pool | 34816 KB | 51537 KB | 261713 KB | 226897 KB | | from small pool | 1301 KB | 2045 KB | 12562 KB | 11261 KB | |---------------------------------------------------------------------------| | Allocations | 198 | 224 | 478 | 280 | | from large pool | 74 | 75 | 75 | 1 | | from small pool | 124 | 150 | 403 | 279 | |---------------------------------------------------------------------------| | Active allocs | 198 | 224 | 478 | 280 | | from large pool | 74 | 75 | 75 | 1 | | from small pool | 124 | 150 | 403 | 279 | |---------------------------------------------------------------------------| | GPU reserved segments | 21 | 21 | 21 | 0 | | from large pool | 20 | 20 | 20 | 0 | | from small pool | 1 | 1 | 1 | 0 | |---------------------------------------------------------------------------| | Non-releasable allocs | 18 | 23 | 166 | 148 | | from large pool | 17 | 18 | 19 | 2 | | from small pool | 1 | 6 | 147 | 146 | |===========================================================================| ## Expected results Efficiently process the datasets and write it down to disk. ## Actual results -------------------------------------------------------------------------- OverflowError Traceback (most recent call last) ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2390 else: -> 2391 writer.write(example) 2392 else: ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write(self, example, key, writer_batch_size) 367 --> 368 self.write_examples_on_file() 369 ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self) 316 if not isinstance(pa_array[0], pa.lib.FloatScalar): --> 317 raise OverflowError( 318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format( OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB During handling of the above exception, another exception occurred: OverflowError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_16268/2456940807.py in <module> 3 #tracker = OfflineEmissionsTracker(country_iso_code="FRA", project_name='xxx'+time_stamp,output_dir='./codecarbon') 4 #tracker.start() ----> 5 process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection=['wikipedia'], from_scratch=True, 6 clean_sentences=False, negative_sampling=False, translate=False, tokenize=False, generate_embeddings=True, concatenate_embeddings=False, 7 max_sample=10000, padding='do_not_pad', truncation=True, cpu_batch_size=1000, gpu_batch_size=2, cpu_writer_batch_size=1000, gpu_writer_batch_size=2, disable_nullable=True, num_proc=None) # ~\xxx\xxx.py in process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection, from_scratch, clean_sentences, translate, negative_sampling, tokenize, generate_embeddings, concatenate_embeddings, max_sample, padding, truncation, cpu_batch_size, gpu_batch_size, cpu_writer_batch_size, gpu_writer_batch_size, disable_nullable, num_proc) 481 for column in tqdm(dataset.column_names, desc=f'Processing column', leave=False): 482 if "xxx_" in column: --> 483 dataset = dataset.map(lambda example : 484 {"embeddings_"+str(column).replace("translated_",""):function(input_ids=example[column], 485 token_type_ids=example[column.replace("input_ids","token_type_ids")], ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 2034 2035 if num_proc is None or num_proc == 1: -> 2036 return self._map_single( 2037 function=function, 2038 with_indices=with_indices, ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs) 501 self: "Dataset" = kwargs.pop("self") 502 # apply actual function --> 503 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 504 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 505 for dataset in datasets: ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs) 468 } 469 # apply actual function --> 470 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 471 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 472 # re-apply format to the output ~\anaconda3\envs\xxx\lib\site-packages\datasets\fingerprint.py in wrapper(*args, **kwargs) 404 # Call actual function 405 --> 406 out = func(self, *args, **kwargs) 407 408 # Update fingerprint of in-place transforms + update in-place history of transforms ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only) 2425 if update_data: 2426 if writer is not None: -> 2427 writer.finalize() 2428 if tmp_file is not None: 2429 tmp_file.close() ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in finalize(self, close_stream) 440 # Re-intializing to empty list for next batch 441 self.hkey_record = [] --> 442 self.write_examples_on_file() 443 if self.pa_writer is None: 444 if self._schema is not None: ~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self) 315 # This check fails with FloatArrays with nans, which is not what we want, so account for that: 316 if not isinstance(pa_array[0], pa.lib.FloatScalar): --> 317 raise OverflowError( 318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format( 319 type(pa_array) OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: Windows-10-10.0.19042-SP0 - Python version: 3.8.11 - PyArrow version: 3.0.0 ##Next steps Testing on Linux. @albertvillanova
30
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
[ -0.21762029826641083, -0.09120343625545502, -0.25341516733169556, 0.19241462647914886, 0.23211410641670227, -0.12171962857246399, 0.12532101571559906, 0.321885347366333, -0.1419285237789154, 0.3799871504306793, 0.171177938580513, 0.13400320708751678, -0.16703712940216064, 0.07818226516246796, 0.03648703545331955, -0.11528632789850235, -0.004777331370860338, 0.19233684241771698, 0.06656038016080856, 0.07074099034070969, 0.0674552321434021, 0.1792597770690918, 0.02307223528623581, 0.15444612503051758, -0.003833068534731865, -0.1226709708571434, 0.014444529078900814, 0.16384769976139069, -0.3409920334815979, -0.302722692489624, 0.05041281506419182, -0.12332365661859512, 0.1205638200044632, 0.13678297400474548, -0.00009945384226739407, 0.0009480807348154485, 0.3333154618740082, 0.03499102592468262, -0.052614327520132065, 0.22807174921035767, 0.3321240544319153, -0.18497692048549652, 0.08098586648702621, -0.23449492454528809, 0.11601522564888, -0.3057189881801605, 0.1558293104171753, 0.27856600284576416, 0.31365057826042175, 0.28338712453842163, 0.36692991852760315, 0.08931498974561691, 0.36369839310646057, -0.05269520357251167, 0.7395967841148376, -0.20145922899246216, -0.11778464913368225, 0.33431336283683777, 0.37337392568588257, -0.15258105099201202, -0.25870993733406067, 0.050251662731170654, -0.24979116022586823, 0.07761752605438232, 0.16736072301864624, 0.024630751460790634, 0.150791734457016, -0.19546297192573547, -0.06677961349487305, -0.13063377141952515, 0.22057101130485535, -0.3516447842121124, -0.0015191719867289066, -0.0743420422077179, 0.0620148703455925, -0.4076814353466034, 0.006064932327717543, 0.2481895536184311, -0.2533096373081207, -0.05016224831342697, -0.10555406659841537, -0.08293469250202179, -0.30417871475219727, 0.03586532548069954, 0.18248414993286133, 0.10658836364746094, 0.10065483301877975, 0.003774952609091997, 0.31273549795150757, 0.06524061411619186, 0.4305354952812195, 0.12407315522432327, -0.20034144818782806, 0.024246184155344963, -0.0848899856209755, -0.05503537133336067, 0.11665929853916168, 0.0739893987774849, 0.25050264596939087, -0.11152653396129608, 0.19661958515644073, 0.05023935064673424, 0.5043162107467651, 0.10032634437084198, 0.09995409846305847, 0.2565688490867615, -0.1800711303949356, 0.21436470746994019, 0.14384178817272186, 0.06733047962188721, 0.07186832278966904, 0.039788611233234406, -0.11021813005208969, -0.26756376028060913, 0.3130459189414978, -0.15165427327156067, -0.037874337285757065, -0.09569033235311508, -0.12266591191291809, -0.008104651235044003, -0.27141088247299194, 0.0466340146958828, -0.10155166685581207, 0.36532631516456604, -0.09088031202554703, -0.2226731777191162, 0.07980412244796753, 0.14568211138248444, -0.1521901786327362, -0.006391310598701239, -0.27443841099739075, 0.20459267497062683, -0.23192287981510162, -0.12203395366668701, 0.02272208034992218, -0.10546929389238358, 0.24347642064094543, -0.04043625295162201, 0.408608078956604, -0.027645600959658623, 0.16501614451408386, 0.0013288217596709728, -0.13736873865127563, 0.29637986421585083, 0.15678676962852478, -0.06821166723966599, 0.07242098450660706, 0.06662940979003906, 0.008783492259681225, 0.40348395705223083, -0.11243544518947601, -0.30764830112457275, 0.003874804824590683, 0.3100244402885437, 0.1327320784330368, 0.12570467591285706, 0.023894624784588814, -0.19784298539161682, 0.45196086168289185, -0.04355774447321892, -0.12418325245380402, -0.23891597986221313, 0.2940865159034729, -0.4397973120212555, 0.024900957942008972, -0.0051725744269788265, -0.41518139839172363, 0.18766073882579803, 0.09022349119186401, -0.08408302068710327, 0.30154937505722046, 0.5396497845649719, -0.2819603681564331, 0.13869686424732208, -0.21572867035865784, 0.30734145641326904, 0.157805398106575, 0.0287790484726429, -0.28925180435180664, 0.038330573588609695, -0.12478942424058914, -0.3276699483394623, 0.11963869631290436, 0.03261450678110123, 0.2268577665090561, 0.05362950265407562, 0.05217354744672775, 0.14596731960773468, -0.18396614491939545, 0.2789855897426605, -0.3861553370952606, -0.232232466340065, -0.13927508890628815, 0.08456572145223618, 0.14915642142295837, -0.22318615019321442, -0.08408226817846298, -0.12527340650558472, 0.2052546888589859, -0.3027876019477844, 0.14699433743953705, 0.30326709151268005, 0.19813179969787598, 0.12987597286701202, -0.12410695105791092, 0.0038857555482536554, 0.023468174040317535, -0.12538011372089386, -0.4875797629356384, 0.019704967737197876, -0.1407504379749298, -0.2337052971124649, -0.10266820341348648, 0.19727185368537903, 0.018387354910373688, 0.06380292028188705, 0.33068588376045227, -0.05235582962632179, 0.2351590245962143, -0.15479761362075806, 0.045639898627996445, -0.15123599767684937, -0.22302380204200745, 0.04552624747157097, -0.11277448385953903, 0.13496382534503937, -0.4713751971721649, -0.5687726736068726, 0.15396864712238312, -0.08269946277141571, 0.018995169550180435, -0.17306192219257355, 0.07491714507341385, 0.2164943367242813, -0.18915003538131714, -0.2856725752353668, -0.15462259948253632, -0.026038633659482002, 0.016044996678829193, -0.3015079200267792, 0.30342742800712585, 0.09868797659873962, -0.04150417819619179, -0.0642632469534874, 0.09112460166215897, 0.2355140894651413, 0.1298905313014984, -0.11533530056476593, 0.09345690906047821, -0.24479781091213226, -0.05732676014304161, 0.02824515290558338, 0.21101930737495422, 0.03796853497624397, 0.23086142539978027, -0.03137960284948349, 0.11188074946403503, -0.04498046264052391, -0.14322999119758606, -0.06136475130915642, 0.4022385776042938, 0.03552041947841644, 0.14734876155853271, 0.10086869448423386, 0.039410658180713654, -0.12209010869264603, -0.02793576568365097, -0.25406134128570557, 0.26161935925483704, 0.38163742423057556, -0.13092371821403503, -0.14621374011039734, -0.08968823403120041, -0.2910540699958801, 0.1288498193025589, -0.07752342522144318, 0.3662181496620178, 0.11020292341709137, 0.28440970182418823, -0.2939845323562622, -0.45191043615341187, -0.13541191816329956, -0.09018275886774063, 0.20743751525878906, 0.05720758065581322, -0.06766659766435623, 0.12542887032032013, -0.29602953791618347, -0.033643901348114014, -0.18791329860687256, -0.09725911915302277, -0.06709251552820206, 0.23898524045944214, 0.2701942026615143, -0.1507464349269867, 0.08273542672395706, 0.3701634109020233, 0.053856346756219864, 0.17567594349384308, 0.102678082883358, 0.07700420916080475, 0.0054662274196743965, -0.29523375630378723, 0.24544355273246765, 0.1885869801044464, -0.24680612981319427, 0.32281258702278137, 0.21230873465538025, -0.13793876767158508, -0.056377045810222626, -0.12359707057476044, -0.09511206299066544, -0.0978679433465004, 0.09233714640140533, 0.16854368150234222, 0.41580262780189514, -0.15193314850330353, -0.23357447981834412, 0.14105036854743958, -0.23475851118564606, -0.3119398355484009, 0.04597112163901329, 0.09076499938964844, -0.10215836018323898, -0.26859262585639954, -0.09203211218118668, -0.12951606512069702, -0.389070987701416, 0.028468064963817596, 0.14144191145896912, 0.2318311631679535, 0.10459644347429276, 0.49148988723754883, 0.10441035777330399, -0.0140139264985919, -0.014990691095590591, 0.15486697852611542, -0.11722837388515472, 0.16162896156311035, -0.16970239579677582, -0.3941350281238556, 0.027459725737571716, 0.0029638423584401608, -0.05132322013378143, -0.04025030881166458, -0.33747604489326477, -0.17595045268535614, -0.1147148534655571, 0.18770304322242737, -0.09971659630537033, 0.031780973076820374, 0.2794191837310791, 0.17231228947639465, -0.289110392332077, 0.0675976499915123, -0.12049853056669235, 0.1485000103712082, -0.1962605118751526, 0.07822375744581223, -0.25603461265563965, 0.1960677206516266, -0.07707944512367249, 0.650026798248291, -0.14486178755760193, 0.11410962045192719, 0.27211833000183105, 0.09778876602649689, 0.10373047739267349, -0.15118196606636047, -0.049169305711984634, 0.04532516375184059, 0.05878507345914841, -0.3067627549171448, 0.18784169852733612, -0.11425149440765381, -0.37249985337257385, 0.21691270172595978, 0.06906285881996155, -0.14572052657604218, -0.017279814928770065, 0.35270604491233826, 0.333319753408432, 0.08056658506393433, -0.19801564514636993, -0.18256254494190216, -0.12430629879236221, -0.0818246454000473, -0.21512888371944427, -0.1994447261095047, -0.009271207265555859, -0.015981756150722504, -0.0700940191745758, -0.34838375449180603, -0.36628594994544983, 0.17455549538135529, 0.1475653052330017, -0.15252459049224854, -0.07361860573291779, -0.031156238168478012, 0.23338495194911957, -0.23446179926395416, 0.8700185418128967, 0.190953329205513, -0.13005612790584564, 0.1610994040966034, 0.17451587319374084, -0.15761269629001617, -0.2468412220478058, -0.23816736042499542, 0.08577379584312439, 0.2579020857810974, -0.1673494577407837, -0.39089342951774597, 0.1567554771900177, 0.25119394063949585, 0.10615676641464233, -0.1112518236041069, -0.10064103454351425, -0.30830293893814087, -0.4754803478717804, -0.3116041421890259, 0.1141514927148819, 0.16849350929260254, 0.332135409116745, -0.0467207133769989, -0.2472413033246994, 0.1721276491880417, -0.13139447569847107, -0.2855757176876068, -0.04181765019893646, 0.3257638216018677, -0.32142287492752075, -0.15605120360851288, -0.2585050165653229, 0.02545982412993908, 0.4362488090991974, 0.0323435515165329, -0.032754141837358475, 0.12550823390483856, 0.030530452728271484, -0.1590825319290161, 0.13911931216716766, 0.1716059148311615, -0.13066676259040833, 0.2243518978357315, -0.11926676332950592, 0.29594677686691284, 0.320513516664505, -0.15972349047660828, 0.19233228266239166, -0.16929548978805542, -0.058230262249708176, -0.08762327581644058, 0.13743551075458527, -0.0370977520942688, 0.1780213862657547, 0.12024448066949844, -0.32267481088638306, -0.24494268000125885, 0.35401830077171326, 0.16864047944545746, 0.8437936902046204, -0.3358015716075897, 0.19224625825881958, 0.24525201320648193, -0.043990254402160645, 0.20328107476234436, -0.03219703957438469, 0.3013531565666199, -0.4818742871284485, -0.2494383007287979, 0.28692883253097534, -0.22864635288715363, 0.11263274401426315, -0.008489098399877548, -0.17990660667419434, -0.00472291698679328, -0.09011062979698181, 0.11033035814762115, -0.10117035359144211, 0.0747455507516861, 0.046897485852241516, 0.02510691061615944, -0.41098371148109436, 0.2580210268497467, -0.06427937746047974, -0.27000096440315247, -0.25752928853034973, -0.2110522985458374, -0.09612033516168594, -0.15409386157989502, -0.2559393644332886, 0.0576724037528038, -0.28301072120666504, 0.14547257125377655, 0.09488994628190994, -0.1670973002910614, -0.27968496084213257, 0.03014078177511692, -0.14633657038211823, 0.1389882117509842, 0.11473435163497925, -0.08303309231996536, 0.07137714326381683, -0.38236287236213684, -0.23384173214435577, 0.10730785131454468, -0.05999498441815376, -0.262115478515625, -0.15280507504940033, 0.3242528736591339, -0.04747829586267471, -0.30449509620666504, -0.14913178980350494, 0.18277737498283386, 0.3204934000968933, -0.3355744183063507, -0.10553397238254547, -0.24409069120883942, -0.24446745216846466, -0.19060973823070526, 0.24517004191875458, 0.2264343947172165, -0.15647603571414948, 0.1409798115491867, 0.09131500124931335, -0.11604492366313934, -0.1378907859325409, 0.15818996727466583, 0.32988670468330383, 0.11418620496988297, 0.3373856246471405, 0.23603641986846924, -0.13957200944423676, -0.297807902097702, -0.1741064190864563, -0.021597638726234436, -0.4105699360370636, 0.3832146227359772, 0.1518164426088333, -0.12140005081892014, 0.08805729448795319, 0.24989192187786102, 0.2717583477497101, 0.34267470240592957, -0.17928966879844666, -0.14873269200325012, -0.355707049369812, 0.13314613699913025, 0.19443894922733307, 0.1823815405368805, 0.07179276645183563, 0.23775866627693176, 0.16273149847984314, 0.08278708904981613, -0.45327669382095337, -0.11048975586891174, -0.2526964843273163, 0.17484459280967712, -0.232098788022995, -0.18106667697429657, 0.0389893501996994, 0.21566565334796906, 0.21976791322231293, 0.24789664149284363, -0.20186282694339752, -0.4131035804748535, 0.22236010432243347, 0.008303796872496605, -0.13273879885673523, 0.0485621839761734, 0.1098133996129036, -0.16267119348049164, 0.0032736831344664097, 0.04676055535674095, 0.20948970317840576, -0.21364626288414001, -0.00222131609916687, -0.27631497383117676, 0.487165629863739, -0.027353480458259583, 0.10062599182128906, -0.057167898863554, -0.2476205974817276, 0.054438769817352295, 0.1335606426000595, 0.10996266454458237, 0.11295000463724136, -0.20759326219558716, 0.16078855097293854, -0.050480470061302185, 0.040615443140268326, 0.08672952651977539, 0.06693168729543686, -0.3409624695777893, -0.373185932636261, 0.005866191815584898, 0.42204007506370544, 0.1719711869955063, -0.11567096412181854, -0.011814202181994915, 0.17563967406749725, 0.3669951558113098, -0.20485827326774597, -0.15496042370796204, 0.04048648849129677, -0.14637184143066406, -0.04388981685042381, 0.23783428966999054, -0.0006910255178809166, -0.1817065328359604, 0.16354362666606903, 0.33889421820640564, 0.3349946141242981, 0.07114571332931519, -0.24598738551139832, 0.22392316162586212, -0.0556500144302845, -0.17205123603343964, 0.392600953578949, 0.04778234660625458, 0.3426295220851898, 0.2767655849456787, -0.003707733005285263, 0.25191670656204224, -0.1336839199066162, 0.08186915516853333, -0.22569653391838074, -0.2021685540676117, 0.0023473910987377167, 0.46948546171188354, 0.41959503293037415, 0.03667778521776199, 0.05183695629239082, 0.27177897095680237, 0.28621524572372437, -0.16616827249526978, 0.0016907837707549334, 0.2546248137950897, -0.3560536801815033, 0.0625087171792984, -0.19249187409877777, 0.008555377833545208, 0.06851782649755478, 0.15627886354923248, 0.00019270226766820997, -0.08324049413204193, 0.23158712685108185, 0.009742306545376778, -0.17924287915229797, -0.1870657056570053, 0.23247861862182617, 0.11629801243543625, -0.15967482328414917, -0.20217745006084442, 0.25230681896209717, 0.0316360741853714, -0.05851935222744942, -0.22109800577163696, 0.30854472517967224, 0.5103345513343811, 0.36532101035118103, 0.033292803913354874, 0.012726821936666965, -0.1613786816596985, -0.09648676216602325, -0.3900899589061737, -0.078887440264225, 0.41124823689460754, 0.306840717792511, -0.020420119166374207, 0.27744314074516296, -0.33835530281066895, 0.23741751909255981, 0.25217002630233765, -0.11196750402450562, 0.2261652648448944, -0.14987801015377045, 0.15659022331237793, -0.6265778541564941, -0.08315776288509369, -0.11900776624679565, -0.5077874660491943, 0.30869683623313904, 0.19987069070339203, -0.06534504145383835, -0.008969413116574287, -0.052921343594789505, 0.1613793671131134, -0.05649267137050629, 0.6135860681533813, 0.30682268738746643, 0.2939070463180542, -0.33312472701072693, -0.26534026861190796, -0.10361196100711823, 0.2896706461906433, -0.5137919783592224, 0.06753364205360413, 0.044600050896406174, 0.3639431297779083, -0.1880774199962616, 0.02717539854347706, 0.19979016482830048, 0.22512319684028625, -0.256192684173584, 0.3063570559024811, -0.3540523648262024, 0.1609322428703308, 0.3303051292896271, -0.1530722677707672, 0.24649207293987274, -0.2328627109527588, 0.1920275241136551, -0.3819643557071686, 0.34469592571258545, -0.2700933516025543, 0.08195391297340393, 0.1358117312192917, -0.014647492207586765, 0.15839914977550507, -0.0855119526386261, 0.11522077023983002, -0.10495894402265549, -0.1093200296163559, -0.035995662212371826, -0.10834658145904541, -0.29773658514022827, 0.08605054765939713, 0.41820845007896423, 0.4281243681907654, -0.18013744056224823, -0.17295007407665253, -0.20257455110549927, 0.49131250381469727, 0.1776670217514038, 0.0937729999423027, 0.2762756049633026, 0.11510729044675827, 0.171925887465477, -0.16969040036201477, 0.022694140672683716, -0.0916612520813942, 0.050109654664993286, -0.10286521166563034, -0.5056654214859009, -0.3507876694202423, 0.2899601459503174, -0.37979575991630554, -0.19020767509937286, 0.13051298260688782, 0.16538088023662567, -0.08364690095186234, -0.258974552154541, -0.33337339758872986, 0.18363408744335175, 0.1349198818206787, 0.02657480537891388, -0.29264822602272034, 0.3502376079559326, -0.14413712918758392, -0.03554970398545265, 0.04038388654589653, 0.2089535892009735, 0.1294994354248047, -0.20796169340610504, -0.1653376668691635, -0.422521710395813 ]
https://github.com/huggingface/datasets/issues/3099
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
Hi @JTWang2000, thanks for reporting. However, I cannot reproduce your reported bug: ```python >>> from datasets import load_dataset >>> dataset = load_dataset("sst", "default") >>> dataset DatasetDict({ train: Dataset({ features: ['sentence', 'label', 'tokens', 'tree'], num_rows: 8544 }) validation: Dataset({ features: ['sentence', 'label', 'tokens', 'tree'], num_rows: 1101 }) test: Dataset({ features: ['sentence', 'label', 'tokens', 'tree'], num_rows: 2210 }) }) ``` Maybe, the cause is that you have a quite old version of `huggingface_hub`. Could you please try to update it and confirm if the problem persists? ``` pip install -U huggingface_hub ```
## Describe the bug When using `pip install datasets` or use `conda install -c huggingface -c conda-forge datasets` cannot install datasets ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("sst", "default") ``` ## Actual results --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-fbe7981e6e21> in <module> 1 import torch 2 import transformers ----> 3 from datasets import load_dataset 4 5 dataset = load_dataset("sst", "default") ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module> 35 from .arrow_reader import ArrowReader, ReadInstruction 36 from .arrow_writer import ArrowWriter ---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder 38 from .combine import interleave_datasets 39 from .dataset_dict import DatasetDict, IterableDatasetDict ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module> 42 ) 43 from .arrow_writer import ArrowWriter, BeamWriter ---> 44 from .data_files import DataFilesDict, _sanitize_patterns 45 from .dataset_dict import DatasetDict, IterableDatasetDict 46 from .fingerprint import Hasher ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module> 118 119 def _exec_patterns_in_dataset_repository( --> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo, 121 patterns: List[str], 122 allowed_extensions: Optional[list] = None, AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: macOS-11.3.1-arm64-arm-64bit - Python version: 3.8.10 - PyArrow version: 5.0.0
90
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
[ -0.39160454273223877, -0.15211550891399384, -0.13808207213878632, 0.23526084423065186, 0.1553620547056198, 0.1055447980761528, 0.057578276842832565, 0.593558669090271, 0.26969006657600403, 0.2378150224685669, -0.1463099867105484, 0.1336035132408142, 0.09289821237325668, 0.3756861090660095, 0.03229367733001709, -0.11700761318206787, 0.04446304589509964, 0.11278808116912842, -0.22064711153507233, -0.12625189125537872, -0.035933442413806915, 0.24784478545188904, -0.013489258475601673, 0.11124961078166962, -0.2622172236442566, -0.21366071701049805, 0.14049023389816284, 0.28903302550315857, -0.21626631915569305, -0.2256653904914856, 0.23542273044586182, 0.06873798370361328, -0.018082894384860992, 0.19831568002700806, -0.0001033231383189559, 0.12033848464488983, 0.16916176676750183, 0.04270971938967705, -0.21480420231819153, 0.12013640254735947, -0.23188024759292603, 0.10478279739618301, -0.014285736717283726, -0.0314025804400444, -0.15870603919029236, -0.08111569285392761, -0.11095482856035233, -0.04194967821240425, 0.24063590168952942, 0.25917983055114746, 0.3073020875453949, 0.40740275382995605, 0.1330677717924118, -0.33816763758659363, 0.0049292040057480335, 0.2057764232158661, -0.1827889084815979, -0.020062025636434555, -0.00171397824306041, -0.2618049383163452, 0.0018288594437763095, 0.34723982214927673, -0.026418033987283707, 0.2612534761428833, 0.3973754346370697, -0.03725365176796913, -0.31631919741630554, -0.1981053650379181, 0.32680097222328186, 0.10558323562145233, 0.27875590324401855, -0.36697882413864136, -0.27163708209991455, -0.04490415006875992, -0.09676714986562729, -0.082265205681324, 0.08779986202716827, -0.017327986657619476, 0.009584547951817513, 0.12122990936040878, 0.1672275811433792, -0.22961406409740448, -0.016357548534870148, -0.025090422481298447, -0.026859212666749954, 0.09637746959924698, -0.11388389021158218, 0.041535716503858566, 0.04985387623310089, -0.12163367867469788, -0.03504597023129463, 0.026356881484389305, -0.2354021817445755, -0.0462004728615284, -0.18830260634422302, -0.01484599057585001, 0.27860531210899353, 0.2761763632297516, 0.3980928957462311, 0.08726068586111069, -0.2345971167087555, 0.16060346364974976, -0.21318380534648895, 0.14582231640815735, 0.13547147810459137, 0.03307022899389267, 0.03907966613769531, 0.09560627490282059, 0.375748872756958, 0.3536839187145233, 0.11194463819265366, 0.008308292366564274, 0.1076294481754303, -0.08142238110303879, -0.09810082614421844, -0.17635412514209747, 0.3912636339664459, -0.13406263291835785, -0.3515785038471222, 0.12952010333538055, 0.08234304189682007, -0.06721432507038116, 0.07556234300136566, 0.4758170545101166, -0.000012146949302405119, -0.014759981073439121, 0.015249560587108135, 0.21500252187252045, -0.230364128947258, -0.1201581135392189, -0.35068798065185547, 0.3433763086795807, 0.12272538989782333, 0.09643654525279999, 0.08133377134799957, -0.16378441452980042, 0.23584386706352234, -0.10761237144470215, 0.3179655075073242, 0.054059166461229324, 0.09680459648370743, -0.04305953159928322, -0.08412924408912659, 0.39598527550697327, 0.17821356654167175, 0.11498165130615234, 0.28753671050071716, -0.04641842097043991, -0.17098459601402283, -0.1868501603603363, -0.25816330313682556, -0.287198543548584, -0.22048236429691315, 0.2820087671279907, 0.05092984810471535, -0.13185299932956696, -0.15812434256076813, -0.03286977484822273, -0.07814133912324905, -0.022133126854896545, 0.06265762448310852, 0.07334117591381073, -0.020430898293852806, -0.005375375971198082, 0.20599251985549927, 0.3893537223339081, 0.052929386496543884, -0.05464353784918785, 0.3443620204925537, -0.22651280462741852, -0.23245784640312195, 0.25837525725364685, -0.07393073290586472, 0.24172089993953705, -0.12961822748184204, 0.2026204764842987, 0.242051362991333, -0.7032074332237244, -0.5026519894599915, -0.10461845993995667, 0.2141377031803131, -0.19808541238307953, -0.002777454908937216, -0.12720508873462677, -0.08351873606443405, 0.10569383949041367, 0.10424889624118805, 0.16242071986198425, 0.1232903003692627, 0.13128350675106049, -0.11729191988706589, -0.2767678201198578, -0.11622169613838196, 0.25428250432014465, 0.24703408777713776, 0.1023550033569336, 0.1004415974020958, -0.05081009864807129, 0.20974425971508026, -0.08405890315771103, 0.24326352775096893, 0.29042792320251465, 0.2596389055252075, 0.08175871521234512, 0.028229989111423492, -0.33608174324035645, -0.1427181512117386, 0.04890964552760124, 0.024296363815665245, 0.3186476528644562, -0.318509966135025, -0.27284902334213257, -0.32258179783821106, 0.09846457839012146, -0.2656037211418152, -0.20210038125514984, 0.2757145166397095, -0.00021408231987152249, -0.03659571334719658, 0.058299705386161804, -0.37613528966903687, 0.5112549662590027, -0.009505145251750946, 0.18242588639259338, -0.3905116021633148, 0.44111353158950806, -0.2614386975765228, -0.10315286368131638, 0.17042389512062073, 0.19648608565330505, 0.11089442670345306, -0.07881638407707214, -0.10149644315242767, 0.12248041480779648, -0.11166150867938995, 0.056428998708724976, 0.21325545012950897, 0.14963853359222412, 0.12400355935096741, -0.24452032148838043, 0.08747986704111099, -0.2977723181247711, 0.09098301827907562, 0.06786873191595078, 0.07397201657295227, -0.045038145035505295, 0.018347030505537987, 0.10002380609512329, 0.10113748162984848, -0.016192857176065445, 0.19604147970676422, 0.06557676196098328, 0.0956924706697464, -0.2991964817047119, 0.08988507837057114, -0.15101931989192963, 0.07373163849115372, -0.17714378237724304, -0.019752901047468185, 0.13513538241386414, 0.55845707654953, 0.10402293503284454, 0.25257858633995056, -0.04376530274748802, -0.030814995989203453, 0.03416844457387924, 0.32104602456092834, -0.04938511922955513, 0.20287200808525085, 0.10724591463804245, -0.1603681743144989, 0.32914164662361145, -0.022344820201396942, 0.10544803738594055, 0.007198716979473829, -0.038438186049461365, 0.08700128644704819, 0.05476103723049164, -0.05902629718184471, -0.030824610963463783, -0.5330869555473328, -0.3781009614467621, -0.11766856163740158, 0.2412334531545639, -0.33194050192832947, -0.035585545003414154, -0.3240318298339844, -0.1417253315448761, 0.1995282769203186, -0.3823082447052002, -0.34420013427734375, -0.3109014928340912, -0.031033199280500412, 0.2675541043281555, 0.01789912022650242, 0.21863359212875366, -0.09557938575744629, 0.14294938743114471, 0.139568030834198, 0.028280116617679596, -0.3179899752140045, -0.04825180768966675, 0.02631564624607563, 0.0947059616446495, 0.02466835081577301, 0.2688777446746826, 0.38125720620155334, -0.2967834174633026, 0.1758246272802353, -0.3504902422428131, -0.2470305860042572, 0.2500491142272949, -0.14289507269859314, 0.08104216307401657, 0.3316229581832886, 0.2882024645805359, 0.025248747318983078, -0.03835267573595047, 0.4173083007335663, -0.23590055108070374, -0.14987985789775848, -0.0830046609044075, -0.12414282560348511, -0.297264963388443, -0.029133636504411697, -0.05329671502113342, -0.1984693557024002, -0.47444015741348267, 0.054902542382478714, 0.10891104489564896, 0.05171743780374527, 0.46206575632095337, -0.012244600802659988, 0.17967315018177032, -0.06919117271900177, 0.09578938037157059, -0.3809860348701477, -0.2650175094604492, 0.05907543748617172, -0.3163229823112488, -0.2556483745574951, 0.07575763016939163, 0.028680985793471336, 0.2957622706890106, -0.19603627920150757, -0.38749995827674866, -0.6907895803451538, -0.051771800965070724, 0.3160461187362671, -0.218714639544487, 0.26277461647987366, 0.2621433436870575, 0.05272940546274185, -0.09779772162437439, -0.22100627422332764, -0.28911980986595154, 0.1142129972577095, 0.16044244170188904, -0.16368788480758667, -0.09309476613998413, 0.22702938318252563, -0.1408635675907135, 0.18211838603019714, 0.2940789461135864, 0.23893333971500397, 0.6686433553695679, -0.20304277539253235, 0.48854658007621765, -0.2984120547771454, -0.347598135471344, -0.08357192575931549, 0.2312951534986496, 0.0895947739481926, 0.059312570840120316, -0.009896419942378998, 0.30994468927383423, -0.0051599773578345776, -0.2713174819946289, -0.11705708503723145, -0.1949884444475174, -0.2481316775083542, 0.21150332689285278, -0.0637175515294075, 0.18878185749053955, 0.1035892441868782, -0.22493620216846466, 0.06373792886734009, 0.509543776512146, 0.35687944293022156, -0.28642579913139343, 0.0756073147058487, -0.2943659722805023, -0.27938205003738403, -0.5817884206771851, 0.21477235853672028, -0.08266913145780563, 0.1663247048854828, -0.30604618787765503, 0.057754237204790115, -0.038368936628103256, -0.11878318339586258, 0.5260900855064392, -0.22749774158000946, 0.0013434005668386817, 0.019711149856448174, -0.15615932643413544, -0.07473409920930862, 0.013439955189824104, 0.034582722932100296, 0.2120773047208786, -0.33352595567703247, 0.2382885068655014, -0.1281595230102539, -0.3382023870944977, 0.4237881600856781, -0.15690891444683075, 0.056003741919994354, 0.09962522983551025, -0.29323288798332214, -0.5668522715568542, -0.45563557744026184, -0.2376651167869568, 0.1261175125837326, 0.10825682431459427, 0.41079410910606384, -0.00021112502145115286, -0.05426206439733505, -0.05095970630645752, 0.05258306488394737, 0.1432609111070633, 0.14546018838882446, 0.23067858815193176, 0.0010072336299344897, 0.05269473046064377, 0.2379559576511383, 0.2899809777736664, 0.6680663228034973, -0.16434089839458466, -0.3440217971801758, 0.03984840586781502, 0.06005061790347099, 0.034691210836172104, 0.22177660465240479, -0.06433756649494171, 0.25775253772735596, 0.0058193448930978775, 0.32947155833244324, -0.24273525178432465, 0.031630635261535645, 0.2670682668685913, 0.128189817070961, -0.15173618495464325, -0.17356349527835846, 0.4961378574371338, -0.14485257863998413, 0.11691959947347641, 0.3491838276386261, 0.8243528008460999, -0.11365702748298645, 0.10056935995817184, -0.11672435700893402, 0.5823099613189697, 0.23804181814193726, 0.12811674177646637, 0.3509892225265503, -0.07036047428846359, 0.2940555810928345, -0.26568159461021423, 0.03411010652780533, -0.3832048773765564, -0.3680582642555237, -0.06402656435966492, -0.004078106954693794, 0.23115555942058563, -0.36305758357048035, -0.013375364243984222, 0.11843894422054291, 0.06001549959182739, 0.23247583210468292, -0.33481836318969727, 0.08000244200229645, -0.28929176926612854, -0.3699805438518524, -0.493208110332489, 0.32081538438796997, -0.09324413537979126, 0.37909969687461853, -0.2439214289188385, 0.0035032019950449467, -0.12662862241268158, -0.08895670622587204, -0.0647483766078949, -0.01364397443830967, -0.049472227692604065, 0.2925676703453064, 0.21782687306404114, 0.05802266299724579, -0.05851411819458008, -0.26009657979011536, 0.38780784606933594, -0.11946552991867065, -0.30499133467674255, 0.1338282972574234, -0.3263323903083801, -0.04632748290896416, -0.22593334317207336, 0.09964443743228912, 0.4914301037788391, -0.17609210312366486, -0.3633381426334381, -0.022819973528385162, -0.04086826369166374, -0.0911734402179718, 0.10351601243019104, -0.10115816444158554, -0.009216555394232273, -0.30795103311538696, -0.006965055596083403, 0.13721799850463867, 0.16950790584087372, -0.1543322652578354, 0.18333140015602112, 0.17753930389881134, -0.03521145135164261, -0.028138542547822, 0.43137216567993164, -0.19158703088760376, -0.13769593834877014, 0.2789464294910431, -0.17780780792236328, 0.01649080216884613, 0.36545443534851074, 0.08187410980463028, -0.15991686284542084, -0.3032497465610504, 0.02678748592734337, 0.44835925102233887, -0.2397863268852234, -0.015194827690720558, 0.053952112793922424, -0.3313845992088318, -0.024486973881721497, 0.3212287127971649, 0.014022999443113804, -0.15280194580554962, 0.02426639385521412, -0.3217566907405853, -0.35780030488967896, 0.35793405771255493, -0.16389347612857819, 0.11765755712985992, 0.03836630657315254, -0.040426675230264664, 0.047088973224163055, -0.06159789860248566, -0.4144233465194702, -0.08936818689107895, -0.2823743224143982, -0.11631590873003006, 0.03179604560136795, -0.14593970775604248, 0.27580589056015015, -0.1049535796046257, 0.20616336166858673, 0.06577149033546448, -0.5201628804206848, -0.3065197467803955, -0.2251283824443817, 0.08658946305513382, 0.0377347394824028, -0.03206906467676163, 0.10825510323047638, -0.15779514610767365, -0.3529733419418335, -0.1834273636341095, 0.38048255443573, 0.13173025846481323, -0.009635340422391891, 0.1459498256444931, 0.018926985561847687, -0.29205942153930664, -0.062221966683864594, 0.015750888735055923, 0.3618345856666565, 0.16613468527793884, -0.24936895072460175, -0.1526089757680893, -0.2893615961074829, 0.05846426635980606, 0.17709419131278992, 0.31285038590431213, 0.2024737000465393, -0.08682006597518921, 0.24929404258728027, -0.3110406994819641, 0.07871663570404053, 0.24642282724380493, 0.4171747863292694, 0.1301141381263733, -0.20641006529331207, 0.1258244514465332, 0.12753146886825562, 0.2737805247306824, -0.31657904386520386, -0.10175113379955292, 0.4006587266921997, -0.20143501460552216, 0.13569657504558563, 0.18687641620635986, 0.17594695091247559, 0.08043932914733887, 0.20907944440841675, 0.1746579110622406, 0.5866339802742004, -0.13232947885990143, -0.000909364374820143, -0.04136867821216583, -0.2876622974872589, 0.19701607525348663, 0.4617127776145935, 0.35681694746017456, 0.2876889407634735, 0.6656832695007324, -0.19646984338760376, 0.3735591769218445, -0.1488843560218811, 0.008812000043690205, 0.14074616134166718, -0.37669655680656433, 0.20677492022514343, -0.05451613664627075, 0.15727455914020538, -0.04731706529855728, -0.07500186562538147, 0.33881863951683044, -0.393768310546875, -0.2731878161430359, -0.2021578699350357, 0.14969240128993988, -0.25355762243270874, 0.13716842234134674, 0.13975271582603455, 0.027297213673591614, -0.10641741007566452, -0.12746906280517578, 0.10346487164497375, -0.13530482351779938, 0.22879493236541748, -0.14402739703655243, -0.0365169495344162, -0.2736489474773407, -0.006776927970349789, 0.13754379749298096, 0.054457686841487885, -0.08413108438253403, 0.1239565908908844, -0.049753617495298386, -0.19736333191394806, -0.09848719835281372, 0.42642778158187866, 0.4894966781139374, 0.022961290553212166, 0.058942582458257675, -0.0060233501717448235, -0.12646055221557617, -0.08103816956281662, 0.004304482601583004, -0.038803428411483765, 0.12143941968679428, 0.20349302887916565, 0.25206777453422546, 0.21399664878845215, -0.21029682457447052, -0.20680086314678192, -0.11043871939182281, 0.14967601001262665, -0.151966392993927, 0.12040899693965912, -0.2655849754810333, -0.05472763627767563, -0.12347456067800522, -0.14460094273090363, -0.39552798867225647, -0.0020488116424530745, 0.22645017504692078, -0.1545681357383728, 0.1588759571313858, -0.368813157081604, 0.12490253895521164, -0.12162822484970093, 0.4434172809123993, 0.27927640080451965, -0.04862724244594574, 0.1364201158285141, -0.052495893090963364, -0.4589959383010864, 0.15876953303813934, 0.014894469641149044, -0.2020353227853775, 0.08697894215583801, 0.01734071783721447, 0.12016580253839493, -0.07841581106185913, 0.3208487629890442, -0.058355625718832016, 0.22582249343395233, -0.27876797318458557, -0.21163906157016754, -0.08113857358694077, -0.29501622915267944, -0.07258401811122894, 0.05726424977183342, -0.21080775558948517, 0.1821863204240799, 0.028499210253357887, 0.0968649759888649, -0.21464699506759644, 0.034117281436920166, 0.04610435664653778, -0.6555631756782532, 0.3715861737728119, 0.017018646001815796, 0.32119521498680115, -0.14575250446796417, -0.12270388752222061, -0.08496831357479095, -0.3955245316028595, -0.1650729477405548, 0.1614527851343155, -0.0812600702047348, 0.29810798168182373, 0.0852813720703125, -0.3054753243923187, -0.22399547696113586, 0.40673190355300903, 0.16005027294158936, 0.18029552698135376, -0.163005530834198, 0.49085545539855957, -0.08874134719371796, 0.05177715793251991, 0.25217440724372864, 0.07217605412006378, -0.009043863043189049, 0.08602243661880493, -0.23374928534030914, -0.3747982978820801, 0.4682329595088959, -0.12081483751535416, -0.3869240880012512, -0.17464043200016022, 0.23201774060726166, 0.12342610955238342, -0.47118380665779114, -0.6277890801429749, 0.21299569308757782, -0.01946653425693512, -0.024297302588820457, -0.26047730445861816, 0.42985984683036804, -0.15170344710350037, 0.04686403274536133, 0.03911007195711136, 0.31645721197128296, -0.00759784784168005, -0.12141316384077072, 0.3703796863555908, 0.06051236391067505 ]
https://github.com/huggingface/datasets/issues/3099
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
Im facing the same issue. I did run the upgrade command but that doesnt seem to resolve the issue
## Describe the bug When using `pip install datasets` or use `conda install -c huggingface -c conda-forge datasets` cannot install datasets ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("sst", "default") ``` ## Actual results --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-fbe7981e6e21> in <module> 1 import torch 2 import transformers ----> 3 from datasets import load_dataset 4 5 dataset = load_dataset("sst", "default") ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module> 35 from .arrow_reader import ArrowReader, ReadInstruction 36 from .arrow_writer import ArrowWriter ---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder 38 from .combine import interleave_datasets 39 from .dataset_dict import DatasetDict, IterableDatasetDict ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module> 42 ) 43 from .arrow_writer import ArrowWriter, BeamWriter ---> 44 from .data_files import DataFilesDict, _sanitize_patterns 45 from .dataset_dict import DatasetDict, IterableDatasetDict 46 from .fingerprint import Hasher ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module> 118 119 def _exec_patterns_in_dataset_repository( --> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo, 121 patterns: List[str], 122 allowed_extensions: Optional[list] = None, AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: macOS-11.3.1-arm64-arm-64bit - Python version: 3.8.10 - PyArrow version: 5.0.0
19
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
[ -0.39160454273223877, -0.15211550891399384, -0.13808207213878632, 0.23526084423065186, 0.1553620547056198, 0.1055447980761528, 0.057578276842832565, 0.593558669090271, 0.26969006657600403, 0.2378150224685669, -0.1463099867105484, 0.1336035132408142, 0.09289821237325668, 0.3756861090660095, 0.03229367733001709, -0.11700761318206787, 0.04446304589509964, 0.11278808116912842, -0.22064711153507233, -0.12625189125537872, -0.035933442413806915, 0.24784478545188904, -0.013489258475601673, 0.11124961078166962, -0.2622172236442566, -0.21366071701049805, 0.14049023389816284, 0.28903302550315857, -0.21626631915569305, -0.2256653904914856, 0.23542273044586182, 0.06873798370361328, -0.018082894384860992, 0.19831568002700806, -0.0001033231383189559, 0.12033848464488983, 0.16916176676750183, 0.04270971938967705, -0.21480420231819153, 0.12013640254735947, -0.23188024759292603, 0.10478279739618301, -0.014285736717283726, -0.0314025804400444, -0.15870603919029236, -0.08111569285392761, -0.11095482856035233, -0.04194967821240425, 0.24063590168952942, 0.25917983055114746, 0.3073020875453949, 0.40740275382995605, 0.1330677717924118, -0.33816763758659363, 0.0049292040057480335, 0.2057764232158661, -0.1827889084815979, -0.020062025636434555, -0.00171397824306041, -0.2618049383163452, 0.0018288594437763095, 0.34723982214927673, -0.026418033987283707, 0.2612534761428833, 0.3973754346370697, -0.03725365176796913, -0.31631919741630554, -0.1981053650379181, 0.32680097222328186, 0.10558323562145233, 0.27875590324401855, -0.36697882413864136, -0.27163708209991455, -0.04490415006875992, -0.09676714986562729, -0.082265205681324, 0.08779986202716827, -0.017327986657619476, 0.009584547951817513, 0.12122990936040878, 0.1672275811433792, -0.22961406409740448, -0.016357548534870148, -0.025090422481298447, -0.026859212666749954, 0.09637746959924698, -0.11388389021158218, 0.041535716503858566, 0.04985387623310089, -0.12163367867469788, -0.03504597023129463, 0.026356881484389305, -0.2354021817445755, -0.0462004728615284, -0.18830260634422302, -0.01484599057585001, 0.27860531210899353, 0.2761763632297516, 0.3980928957462311, 0.08726068586111069, -0.2345971167087555, 0.16060346364974976, -0.21318380534648895, 0.14582231640815735, 0.13547147810459137, 0.03307022899389267, 0.03907966613769531, 0.09560627490282059, 0.375748872756958, 0.3536839187145233, 0.11194463819265366, 0.008308292366564274, 0.1076294481754303, -0.08142238110303879, -0.09810082614421844, -0.17635412514209747, 0.3912636339664459, -0.13406263291835785, -0.3515785038471222, 0.12952010333538055, 0.08234304189682007, -0.06721432507038116, 0.07556234300136566, 0.4758170545101166, -0.000012146949302405119, -0.014759981073439121, 0.015249560587108135, 0.21500252187252045, -0.230364128947258, -0.1201581135392189, -0.35068798065185547, 0.3433763086795807, 0.12272538989782333, 0.09643654525279999, 0.08133377134799957, -0.16378441452980042, 0.23584386706352234, -0.10761237144470215, 0.3179655075073242, 0.054059166461229324, 0.09680459648370743, -0.04305953159928322, -0.08412924408912659, 0.39598527550697327, 0.17821356654167175, 0.11498165130615234, 0.28753671050071716, -0.04641842097043991, -0.17098459601402283, -0.1868501603603363, -0.25816330313682556, -0.287198543548584, -0.22048236429691315, 0.2820087671279907, 0.05092984810471535, -0.13185299932956696, -0.15812434256076813, -0.03286977484822273, -0.07814133912324905, -0.022133126854896545, 0.06265762448310852, 0.07334117591381073, -0.020430898293852806, -0.005375375971198082, 0.20599251985549927, 0.3893537223339081, 0.052929386496543884, -0.05464353784918785, 0.3443620204925537, -0.22651280462741852, -0.23245784640312195, 0.25837525725364685, -0.07393073290586472, 0.24172089993953705, -0.12961822748184204, 0.2026204764842987, 0.242051362991333, -0.7032074332237244, -0.5026519894599915, -0.10461845993995667, 0.2141377031803131, -0.19808541238307953, -0.002777454908937216, -0.12720508873462677, -0.08351873606443405, 0.10569383949041367, 0.10424889624118805, 0.16242071986198425, 0.1232903003692627, 0.13128350675106049, -0.11729191988706589, -0.2767678201198578, -0.11622169613838196, 0.25428250432014465, 0.24703408777713776, 0.1023550033569336, 0.1004415974020958, -0.05081009864807129, 0.20974425971508026, -0.08405890315771103, 0.24326352775096893, 0.29042792320251465, 0.2596389055252075, 0.08175871521234512, 0.028229989111423492, -0.33608174324035645, -0.1427181512117386, 0.04890964552760124, 0.024296363815665245, 0.3186476528644562, -0.318509966135025, -0.27284902334213257, -0.32258179783821106, 0.09846457839012146, -0.2656037211418152, -0.20210038125514984, 0.2757145166397095, -0.00021408231987152249, -0.03659571334719658, 0.058299705386161804, -0.37613528966903687, 0.5112549662590027, -0.009505145251750946, 0.18242588639259338, -0.3905116021633148, 0.44111353158950806, -0.2614386975765228, -0.10315286368131638, 0.17042389512062073, 0.19648608565330505, 0.11089442670345306, -0.07881638407707214, -0.10149644315242767, 0.12248041480779648, -0.11166150867938995, 0.056428998708724976, 0.21325545012950897, 0.14963853359222412, 0.12400355935096741, -0.24452032148838043, 0.08747986704111099, -0.2977723181247711, 0.09098301827907562, 0.06786873191595078, 0.07397201657295227, -0.045038145035505295, 0.018347030505537987, 0.10002380609512329, 0.10113748162984848, -0.016192857176065445, 0.19604147970676422, 0.06557676196098328, 0.0956924706697464, -0.2991964817047119, 0.08988507837057114, -0.15101931989192963, 0.07373163849115372, -0.17714378237724304, -0.019752901047468185, 0.13513538241386414, 0.55845707654953, 0.10402293503284454, 0.25257858633995056, -0.04376530274748802, -0.030814995989203453, 0.03416844457387924, 0.32104602456092834, -0.04938511922955513, 0.20287200808525085, 0.10724591463804245, -0.1603681743144989, 0.32914164662361145, -0.022344820201396942, 0.10544803738594055, 0.007198716979473829, -0.038438186049461365, 0.08700128644704819, 0.05476103723049164, -0.05902629718184471, -0.030824610963463783, -0.5330869555473328, -0.3781009614467621, -0.11766856163740158, 0.2412334531545639, -0.33194050192832947, -0.035585545003414154, -0.3240318298339844, -0.1417253315448761, 0.1995282769203186, -0.3823082447052002, -0.34420013427734375, -0.3109014928340912, -0.031033199280500412, 0.2675541043281555, 0.01789912022650242, 0.21863359212875366, -0.09557938575744629, 0.14294938743114471, 0.139568030834198, 0.028280116617679596, -0.3179899752140045, -0.04825180768966675, 0.02631564624607563, 0.0947059616446495, 0.02466835081577301, 0.2688777446746826, 0.38125720620155334, -0.2967834174633026, 0.1758246272802353, -0.3504902422428131, -0.2470305860042572, 0.2500491142272949, -0.14289507269859314, 0.08104216307401657, 0.3316229581832886, 0.2882024645805359, 0.025248747318983078, -0.03835267573595047, 0.4173083007335663, -0.23590055108070374, -0.14987985789775848, -0.0830046609044075, -0.12414282560348511, -0.297264963388443, -0.029133636504411697, -0.05329671502113342, -0.1984693557024002, -0.47444015741348267, 0.054902542382478714, 0.10891104489564896, 0.05171743780374527, 0.46206575632095337, -0.012244600802659988, 0.17967315018177032, -0.06919117271900177, 0.09578938037157059, -0.3809860348701477, -0.2650175094604492, 0.05907543748617172, -0.3163229823112488, -0.2556483745574951, 0.07575763016939163, 0.028680985793471336, 0.2957622706890106, -0.19603627920150757, -0.38749995827674866, -0.6907895803451538, -0.051771800965070724, 0.3160461187362671, -0.218714639544487, 0.26277461647987366, 0.2621433436870575, 0.05272940546274185, -0.09779772162437439, -0.22100627422332764, -0.28911980986595154, 0.1142129972577095, 0.16044244170188904, -0.16368788480758667, -0.09309476613998413, 0.22702938318252563, -0.1408635675907135, 0.18211838603019714, 0.2940789461135864, 0.23893333971500397, 0.6686433553695679, -0.20304277539253235, 0.48854658007621765, -0.2984120547771454, -0.347598135471344, -0.08357192575931549, 0.2312951534986496, 0.0895947739481926, 0.059312570840120316, -0.009896419942378998, 0.30994468927383423, -0.0051599773578345776, -0.2713174819946289, -0.11705708503723145, -0.1949884444475174, -0.2481316775083542, 0.21150332689285278, -0.0637175515294075, 0.18878185749053955, 0.1035892441868782, -0.22493620216846466, 0.06373792886734009, 0.509543776512146, 0.35687944293022156, -0.28642579913139343, 0.0756073147058487, -0.2943659722805023, -0.27938205003738403, -0.5817884206771851, 0.21477235853672028, -0.08266913145780563, 0.1663247048854828, -0.30604618787765503, 0.057754237204790115, -0.038368936628103256, -0.11878318339586258, 0.5260900855064392, -0.22749774158000946, 0.0013434005668386817, 0.019711149856448174, -0.15615932643413544, -0.07473409920930862, 0.013439955189824104, 0.034582722932100296, 0.2120773047208786, -0.33352595567703247, 0.2382885068655014, -0.1281595230102539, -0.3382023870944977, 0.4237881600856781, -0.15690891444683075, 0.056003741919994354, 0.09962522983551025, -0.29323288798332214, -0.5668522715568542, -0.45563557744026184, -0.2376651167869568, 0.1261175125837326, 0.10825682431459427, 0.41079410910606384, -0.00021112502145115286, -0.05426206439733505, -0.05095970630645752, 0.05258306488394737, 0.1432609111070633, 0.14546018838882446, 0.23067858815193176, 0.0010072336299344897, 0.05269473046064377, 0.2379559576511383, 0.2899809777736664, 0.6680663228034973, -0.16434089839458466, -0.3440217971801758, 0.03984840586781502, 0.06005061790347099, 0.034691210836172104, 0.22177660465240479, -0.06433756649494171, 0.25775253772735596, 0.0058193448930978775, 0.32947155833244324, -0.24273525178432465, 0.031630635261535645, 0.2670682668685913, 0.128189817070961, -0.15173618495464325, -0.17356349527835846, 0.4961378574371338, -0.14485257863998413, 0.11691959947347641, 0.3491838276386261, 0.8243528008460999, -0.11365702748298645, 0.10056935995817184, -0.11672435700893402, 0.5823099613189697, 0.23804181814193726, 0.12811674177646637, 0.3509892225265503, -0.07036047428846359, 0.2940555810928345, -0.26568159461021423, 0.03411010652780533, -0.3832048773765564, -0.3680582642555237, -0.06402656435966492, -0.004078106954693794, 0.23115555942058563, -0.36305758357048035, -0.013375364243984222, 0.11843894422054291, 0.06001549959182739, 0.23247583210468292, -0.33481836318969727, 0.08000244200229645, -0.28929176926612854, -0.3699805438518524, -0.493208110332489, 0.32081538438796997, -0.09324413537979126, 0.37909969687461853, -0.2439214289188385, 0.0035032019950449467, -0.12662862241268158, -0.08895670622587204, -0.0647483766078949, -0.01364397443830967, -0.049472227692604065, 0.2925676703453064, 0.21782687306404114, 0.05802266299724579, -0.05851411819458008, -0.26009657979011536, 0.38780784606933594, -0.11946552991867065, -0.30499133467674255, 0.1338282972574234, -0.3263323903083801, -0.04632748290896416, -0.22593334317207336, 0.09964443743228912, 0.4914301037788391, -0.17609210312366486, -0.3633381426334381, -0.022819973528385162, -0.04086826369166374, -0.0911734402179718, 0.10351601243019104, -0.10115816444158554, -0.009216555394232273, -0.30795103311538696, -0.006965055596083403, 0.13721799850463867, 0.16950790584087372, -0.1543322652578354, 0.18333140015602112, 0.17753930389881134, -0.03521145135164261, -0.028138542547822, 0.43137216567993164, -0.19158703088760376, -0.13769593834877014, 0.2789464294910431, -0.17780780792236328, 0.01649080216884613, 0.36545443534851074, 0.08187410980463028, -0.15991686284542084, -0.3032497465610504, 0.02678748592734337, 0.44835925102233887, -0.2397863268852234, -0.015194827690720558, 0.053952112793922424, -0.3313845992088318, -0.024486973881721497, 0.3212287127971649, 0.014022999443113804, -0.15280194580554962, 0.02426639385521412, -0.3217566907405853, -0.35780030488967896, 0.35793405771255493, -0.16389347612857819, 0.11765755712985992, 0.03836630657315254, -0.040426675230264664, 0.047088973224163055, -0.06159789860248566, -0.4144233465194702, -0.08936818689107895, -0.2823743224143982, -0.11631590873003006, 0.03179604560136795, -0.14593970775604248, 0.27580589056015015, -0.1049535796046257, 0.20616336166858673, 0.06577149033546448, -0.5201628804206848, -0.3065197467803955, -0.2251283824443817, 0.08658946305513382, 0.0377347394824028, -0.03206906467676163, 0.10825510323047638, -0.15779514610767365, -0.3529733419418335, -0.1834273636341095, 0.38048255443573, 0.13173025846481323, -0.009635340422391891, 0.1459498256444931, 0.018926985561847687, -0.29205942153930664, -0.062221966683864594, 0.015750888735055923, 0.3618345856666565, 0.16613468527793884, -0.24936895072460175, -0.1526089757680893, -0.2893615961074829, 0.05846426635980606, 0.17709419131278992, 0.31285038590431213, 0.2024737000465393, -0.08682006597518921, 0.24929404258728027, -0.3110406994819641, 0.07871663570404053, 0.24642282724380493, 0.4171747863292694, 0.1301141381263733, -0.20641006529331207, 0.1258244514465332, 0.12753146886825562, 0.2737805247306824, -0.31657904386520386, -0.10175113379955292, 0.4006587266921997, -0.20143501460552216, 0.13569657504558563, 0.18687641620635986, 0.17594695091247559, 0.08043932914733887, 0.20907944440841675, 0.1746579110622406, 0.5866339802742004, -0.13232947885990143, -0.000909364374820143, -0.04136867821216583, -0.2876622974872589, 0.19701607525348663, 0.4617127776145935, 0.35681694746017456, 0.2876889407634735, 0.6656832695007324, -0.19646984338760376, 0.3735591769218445, -0.1488843560218811, 0.008812000043690205, 0.14074616134166718, -0.37669655680656433, 0.20677492022514343, -0.05451613664627075, 0.15727455914020538, -0.04731706529855728, -0.07500186562538147, 0.33881863951683044, -0.393768310546875, -0.2731878161430359, -0.2021578699350357, 0.14969240128993988, -0.25355762243270874, 0.13716842234134674, 0.13975271582603455, 0.027297213673591614, -0.10641741007566452, -0.12746906280517578, 0.10346487164497375, -0.13530482351779938, 0.22879493236541748, -0.14402739703655243, -0.0365169495344162, -0.2736489474773407, -0.006776927970349789, 0.13754379749298096, 0.054457686841487885, -0.08413108438253403, 0.1239565908908844, -0.049753617495298386, -0.19736333191394806, -0.09848719835281372, 0.42642778158187866, 0.4894966781139374, 0.022961290553212166, 0.058942582458257675, -0.0060233501717448235, -0.12646055221557617, -0.08103816956281662, 0.004304482601583004, -0.038803428411483765, 0.12143941968679428, 0.20349302887916565, 0.25206777453422546, 0.21399664878845215, -0.21029682457447052, -0.20680086314678192, -0.11043871939182281, 0.14967601001262665, -0.151966392993927, 0.12040899693965912, -0.2655849754810333, -0.05472763627767563, -0.12347456067800522, -0.14460094273090363, -0.39552798867225647, -0.0020488116424530745, 0.22645017504692078, -0.1545681357383728, 0.1588759571313858, -0.368813157081604, 0.12490253895521164, -0.12162822484970093, 0.4434172809123993, 0.27927640080451965, -0.04862724244594574, 0.1364201158285141, -0.052495893090963364, -0.4589959383010864, 0.15876953303813934, 0.014894469641149044, -0.2020353227853775, 0.08697894215583801, 0.01734071783721447, 0.12016580253839493, -0.07841581106185913, 0.3208487629890442, -0.058355625718832016, 0.22582249343395233, -0.27876797318458557, -0.21163906157016754, -0.08113857358694077, -0.29501622915267944, -0.07258401811122894, 0.05726424977183342, -0.21080775558948517, 0.1821863204240799, 0.028499210253357887, 0.0968649759888649, -0.21464699506759644, 0.034117281436920166, 0.04610435664653778, -0.6555631756782532, 0.3715861737728119, 0.017018646001815796, 0.32119521498680115, -0.14575250446796417, -0.12270388752222061, -0.08496831357479095, -0.3955245316028595, -0.1650729477405548, 0.1614527851343155, -0.0812600702047348, 0.29810798168182373, 0.0852813720703125, -0.3054753243923187, -0.22399547696113586, 0.40673190355300903, 0.16005027294158936, 0.18029552698135376, -0.163005530834198, 0.49085545539855957, -0.08874134719371796, 0.05177715793251991, 0.25217440724372864, 0.07217605412006378, -0.009043863043189049, 0.08602243661880493, -0.23374928534030914, -0.3747982978820801, 0.4682329595088959, -0.12081483751535416, -0.3869240880012512, -0.17464043200016022, 0.23201774060726166, 0.12342610955238342, -0.47118380665779114, -0.6277890801429749, 0.21299569308757782, -0.01946653425693512, -0.024297302588820457, -0.26047730445861816, 0.42985984683036804, -0.15170344710350037, 0.04686403274536133, 0.03911007195711136, 0.31645721197128296, -0.00759784784168005, -0.12141316384077072, 0.3703796863555908, 0.06051236391067505 ]
https://github.com/huggingface/datasets/issues/3099
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
Hi @aneeshjain, could you please specify which `huggingface_hub` version you are using? Besides that, please run `datasets-cli env` and copy-and-paste its output below.
## Describe the bug When using `pip install datasets` or use `conda install -c huggingface -c conda-forge datasets` cannot install datasets ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("sst", "default") ``` ## Actual results --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-fbe7981e6e21> in <module> 1 import torch 2 import transformers ----> 3 from datasets import load_dataset 4 5 dataset = load_dataset("sst", "default") ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module> 35 from .arrow_reader import ArrowReader, ReadInstruction 36 from .arrow_writer import ArrowWriter ---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder 38 from .combine import interleave_datasets 39 from .dataset_dict import DatasetDict, IterableDatasetDict ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module> 42 ) 43 from .arrow_writer import ArrowWriter, BeamWriter ---> 44 from .data_files import DataFilesDict, _sanitize_patterns 45 from .dataset_dict import DatasetDict, IterableDatasetDict 46 from .fingerprint import Hasher ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module> 118 119 def _exec_patterns_in_dataset_repository( --> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo, 121 patterns: List[str], 122 allowed_extensions: Optional[list] = None, AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: macOS-11.3.1-arm64-arm-64bit - Python version: 3.8.10 - PyArrow version: 5.0.0
23
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
[ -0.39160454273223877, -0.15211550891399384, -0.13808207213878632, 0.23526084423065186, 0.1553620547056198, 0.1055447980761528, 0.057578276842832565, 0.593558669090271, 0.26969006657600403, 0.2378150224685669, -0.1463099867105484, 0.1336035132408142, 0.09289821237325668, 0.3756861090660095, 0.03229367733001709, -0.11700761318206787, 0.04446304589509964, 0.11278808116912842, -0.22064711153507233, -0.12625189125537872, -0.035933442413806915, 0.24784478545188904, -0.013489258475601673, 0.11124961078166962, -0.2622172236442566, -0.21366071701049805, 0.14049023389816284, 0.28903302550315857, -0.21626631915569305, -0.2256653904914856, 0.23542273044586182, 0.06873798370361328, -0.018082894384860992, 0.19831568002700806, -0.0001033231383189559, 0.12033848464488983, 0.16916176676750183, 0.04270971938967705, -0.21480420231819153, 0.12013640254735947, -0.23188024759292603, 0.10478279739618301, -0.014285736717283726, -0.0314025804400444, -0.15870603919029236, -0.08111569285392761, -0.11095482856035233, -0.04194967821240425, 0.24063590168952942, 0.25917983055114746, 0.3073020875453949, 0.40740275382995605, 0.1330677717924118, -0.33816763758659363, 0.0049292040057480335, 0.2057764232158661, -0.1827889084815979, -0.020062025636434555, -0.00171397824306041, -0.2618049383163452, 0.0018288594437763095, 0.34723982214927673, -0.026418033987283707, 0.2612534761428833, 0.3973754346370697, -0.03725365176796913, -0.31631919741630554, -0.1981053650379181, 0.32680097222328186, 0.10558323562145233, 0.27875590324401855, -0.36697882413864136, -0.27163708209991455, -0.04490415006875992, -0.09676714986562729, -0.082265205681324, 0.08779986202716827, -0.017327986657619476, 0.009584547951817513, 0.12122990936040878, 0.1672275811433792, -0.22961406409740448, -0.016357548534870148, -0.025090422481298447, -0.026859212666749954, 0.09637746959924698, -0.11388389021158218, 0.041535716503858566, 0.04985387623310089, -0.12163367867469788, -0.03504597023129463, 0.026356881484389305, -0.2354021817445755, -0.0462004728615284, -0.18830260634422302, -0.01484599057585001, 0.27860531210899353, 0.2761763632297516, 0.3980928957462311, 0.08726068586111069, -0.2345971167087555, 0.16060346364974976, -0.21318380534648895, 0.14582231640815735, 0.13547147810459137, 0.03307022899389267, 0.03907966613769531, 0.09560627490282059, 0.375748872756958, 0.3536839187145233, 0.11194463819265366, 0.008308292366564274, 0.1076294481754303, -0.08142238110303879, -0.09810082614421844, -0.17635412514209747, 0.3912636339664459, -0.13406263291835785, -0.3515785038471222, 0.12952010333538055, 0.08234304189682007, -0.06721432507038116, 0.07556234300136566, 0.4758170545101166, -0.000012146949302405119, -0.014759981073439121, 0.015249560587108135, 0.21500252187252045, -0.230364128947258, -0.1201581135392189, -0.35068798065185547, 0.3433763086795807, 0.12272538989782333, 0.09643654525279999, 0.08133377134799957, -0.16378441452980042, 0.23584386706352234, -0.10761237144470215, 0.3179655075073242, 0.054059166461229324, 0.09680459648370743, -0.04305953159928322, -0.08412924408912659, 0.39598527550697327, 0.17821356654167175, 0.11498165130615234, 0.28753671050071716, -0.04641842097043991, -0.17098459601402283, -0.1868501603603363, -0.25816330313682556, -0.287198543548584, -0.22048236429691315, 0.2820087671279907, 0.05092984810471535, -0.13185299932956696, -0.15812434256076813, -0.03286977484822273, -0.07814133912324905, -0.022133126854896545, 0.06265762448310852, 0.07334117591381073, -0.020430898293852806, -0.005375375971198082, 0.20599251985549927, 0.3893537223339081, 0.052929386496543884, -0.05464353784918785, 0.3443620204925537, -0.22651280462741852, -0.23245784640312195, 0.25837525725364685, -0.07393073290586472, 0.24172089993953705, -0.12961822748184204, 0.2026204764842987, 0.242051362991333, -0.7032074332237244, -0.5026519894599915, -0.10461845993995667, 0.2141377031803131, -0.19808541238307953, -0.002777454908937216, -0.12720508873462677, -0.08351873606443405, 0.10569383949041367, 0.10424889624118805, 0.16242071986198425, 0.1232903003692627, 0.13128350675106049, -0.11729191988706589, -0.2767678201198578, -0.11622169613838196, 0.25428250432014465, 0.24703408777713776, 0.1023550033569336, 0.1004415974020958, -0.05081009864807129, 0.20974425971508026, -0.08405890315771103, 0.24326352775096893, 0.29042792320251465, 0.2596389055252075, 0.08175871521234512, 0.028229989111423492, -0.33608174324035645, -0.1427181512117386, 0.04890964552760124, 0.024296363815665245, 0.3186476528644562, -0.318509966135025, -0.27284902334213257, -0.32258179783821106, 0.09846457839012146, -0.2656037211418152, -0.20210038125514984, 0.2757145166397095, -0.00021408231987152249, -0.03659571334719658, 0.058299705386161804, -0.37613528966903687, 0.5112549662590027, -0.009505145251750946, 0.18242588639259338, -0.3905116021633148, 0.44111353158950806, -0.2614386975765228, -0.10315286368131638, 0.17042389512062073, 0.19648608565330505, 0.11089442670345306, -0.07881638407707214, -0.10149644315242767, 0.12248041480779648, -0.11166150867938995, 0.056428998708724976, 0.21325545012950897, 0.14963853359222412, 0.12400355935096741, -0.24452032148838043, 0.08747986704111099, -0.2977723181247711, 0.09098301827907562, 0.06786873191595078, 0.07397201657295227, -0.045038145035505295, 0.018347030505537987, 0.10002380609512329, 0.10113748162984848, -0.016192857176065445, 0.19604147970676422, 0.06557676196098328, 0.0956924706697464, -0.2991964817047119, 0.08988507837057114, -0.15101931989192963, 0.07373163849115372, -0.17714378237724304, -0.019752901047468185, 0.13513538241386414, 0.55845707654953, 0.10402293503284454, 0.25257858633995056, -0.04376530274748802, -0.030814995989203453, 0.03416844457387924, 0.32104602456092834, -0.04938511922955513, 0.20287200808525085, 0.10724591463804245, -0.1603681743144989, 0.32914164662361145, -0.022344820201396942, 0.10544803738594055, 0.007198716979473829, -0.038438186049461365, 0.08700128644704819, 0.05476103723049164, -0.05902629718184471, -0.030824610963463783, -0.5330869555473328, -0.3781009614467621, -0.11766856163740158, 0.2412334531545639, -0.33194050192832947, -0.035585545003414154, -0.3240318298339844, -0.1417253315448761, 0.1995282769203186, -0.3823082447052002, -0.34420013427734375, -0.3109014928340912, -0.031033199280500412, 0.2675541043281555, 0.01789912022650242, 0.21863359212875366, -0.09557938575744629, 0.14294938743114471, 0.139568030834198, 0.028280116617679596, -0.3179899752140045, -0.04825180768966675, 0.02631564624607563, 0.0947059616446495, 0.02466835081577301, 0.2688777446746826, 0.38125720620155334, -0.2967834174633026, 0.1758246272802353, -0.3504902422428131, -0.2470305860042572, 0.2500491142272949, -0.14289507269859314, 0.08104216307401657, 0.3316229581832886, 0.2882024645805359, 0.025248747318983078, -0.03835267573595047, 0.4173083007335663, -0.23590055108070374, -0.14987985789775848, -0.0830046609044075, -0.12414282560348511, -0.297264963388443, -0.029133636504411697, -0.05329671502113342, -0.1984693557024002, -0.47444015741348267, 0.054902542382478714, 0.10891104489564896, 0.05171743780374527, 0.46206575632095337, -0.012244600802659988, 0.17967315018177032, -0.06919117271900177, 0.09578938037157059, -0.3809860348701477, -0.2650175094604492, 0.05907543748617172, -0.3163229823112488, -0.2556483745574951, 0.07575763016939163, 0.028680985793471336, 0.2957622706890106, -0.19603627920150757, -0.38749995827674866, -0.6907895803451538, -0.051771800965070724, 0.3160461187362671, -0.218714639544487, 0.26277461647987366, 0.2621433436870575, 0.05272940546274185, -0.09779772162437439, -0.22100627422332764, -0.28911980986595154, 0.1142129972577095, 0.16044244170188904, -0.16368788480758667, -0.09309476613998413, 0.22702938318252563, -0.1408635675907135, 0.18211838603019714, 0.2940789461135864, 0.23893333971500397, 0.6686433553695679, -0.20304277539253235, 0.48854658007621765, -0.2984120547771454, -0.347598135471344, -0.08357192575931549, 0.2312951534986496, 0.0895947739481926, 0.059312570840120316, -0.009896419942378998, 0.30994468927383423, -0.0051599773578345776, -0.2713174819946289, -0.11705708503723145, -0.1949884444475174, -0.2481316775083542, 0.21150332689285278, -0.0637175515294075, 0.18878185749053955, 0.1035892441868782, -0.22493620216846466, 0.06373792886734009, 0.509543776512146, 0.35687944293022156, -0.28642579913139343, 0.0756073147058487, -0.2943659722805023, -0.27938205003738403, -0.5817884206771851, 0.21477235853672028, -0.08266913145780563, 0.1663247048854828, -0.30604618787765503, 0.057754237204790115, -0.038368936628103256, -0.11878318339586258, 0.5260900855064392, -0.22749774158000946, 0.0013434005668386817, 0.019711149856448174, -0.15615932643413544, -0.07473409920930862, 0.013439955189824104, 0.034582722932100296, 0.2120773047208786, -0.33352595567703247, 0.2382885068655014, -0.1281595230102539, -0.3382023870944977, 0.4237881600856781, -0.15690891444683075, 0.056003741919994354, 0.09962522983551025, -0.29323288798332214, -0.5668522715568542, -0.45563557744026184, -0.2376651167869568, 0.1261175125837326, 0.10825682431459427, 0.41079410910606384, -0.00021112502145115286, -0.05426206439733505, -0.05095970630645752, 0.05258306488394737, 0.1432609111070633, 0.14546018838882446, 0.23067858815193176, 0.0010072336299344897, 0.05269473046064377, 0.2379559576511383, 0.2899809777736664, 0.6680663228034973, -0.16434089839458466, -0.3440217971801758, 0.03984840586781502, 0.06005061790347099, 0.034691210836172104, 0.22177660465240479, -0.06433756649494171, 0.25775253772735596, 0.0058193448930978775, 0.32947155833244324, -0.24273525178432465, 0.031630635261535645, 0.2670682668685913, 0.128189817070961, -0.15173618495464325, -0.17356349527835846, 0.4961378574371338, -0.14485257863998413, 0.11691959947347641, 0.3491838276386261, 0.8243528008460999, -0.11365702748298645, 0.10056935995817184, -0.11672435700893402, 0.5823099613189697, 0.23804181814193726, 0.12811674177646637, 0.3509892225265503, -0.07036047428846359, 0.2940555810928345, -0.26568159461021423, 0.03411010652780533, -0.3832048773765564, -0.3680582642555237, -0.06402656435966492, -0.004078106954693794, 0.23115555942058563, -0.36305758357048035, -0.013375364243984222, 0.11843894422054291, 0.06001549959182739, 0.23247583210468292, -0.33481836318969727, 0.08000244200229645, -0.28929176926612854, -0.3699805438518524, -0.493208110332489, 0.32081538438796997, -0.09324413537979126, 0.37909969687461853, -0.2439214289188385, 0.0035032019950449467, -0.12662862241268158, -0.08895670622587204, -0.0647483766078949, -0.01364397443830967, -0.049472227692604065, 0.2925676703453064, 0.21782687306404114, 0.05802266299724579, -0.05851411819458008, -0.26009657979011536, 0.38780784606933594, -0.11946552991867065, -0.30499133467674255, 0.1338282972574234, -0.3263323903083801, -0.04632748290896416, -0.22593334317207336, 0.09964443743228912, 0.4914301037788391, -0.17609210312366486, -0.3633381426334381, -0.022819973528385162, -0.04086826369166374, -0.0911734402179718, 0.10351601243019104, -0.10115816444158554, -0.009216555394232273, -0.30795103311538696, -0.006965055596083403, 0.13721799850463867, 0.16950790584087372, -0.1543322652578354, 0.18333140015602112, 0.17753930389881134, -0.03521145135164261, -0.028138542547822, 0.43137216567993164, -0.19158703088760376, -0.13769593834877014, 0.2789464294910431, -0.17780780792236328, 0.01649080216884613, 0.36545443534851074, 0.08187410980463028, -0.15991686284542084, -0.3032497465610504, 0.02678748592734337, 0.44835925102233887, -0.2397863268852234, -0.015194827690720558, 0.053952112793922424, -0.3313845992088318, -0.024486973881721497, 0.3212287127971649, 0.014022999443113804, -0.15280194580554962, 0.02426639385521412, -0.3217566907405853, -0.35780030488967896, 0.35793405771255493, -0.16389347612857819, 0.11765755712985992, 0.03836630657315254, -0.040426675230264664, 0.047088973224163055, -0.06159789860248566, -0.4144233465194702, -0.08936818689107895, -0.2823743224143982, -0.11631590873003006, 0.03179604560136795, -0.14593970775604248, 0.27580589056015015, -0.1049535796046257, 0.20616336166858673, 0.06577149033546448, -0.5201628804206848, -0.3065197467803955, -0.2251283824443817, 0.08658946305513382, 0.0377347394824028, -0.03206906467676163, 0.10825510323047638, -0.15779514610767365, -0.3529733419418335, -0.1834273636341095, 0.38048255443573, 0.13173025846481323, -0.009635340422391891, 0.1459498256444931, 0.018926985561847687, -0.29205942153930664, -0.062221966683864594, 0.015750888735055923, 0.3618345856666565, 0.16613468527793884, -0.24936895072460175, -0.1526089757680893, -0.2893615961074829, 0.05846426635980606, 0.17709419131278992, 0.31285038590431213, 0.2024737000465393, -0.08682006597518921, 0.24929404258728027, -0.3110406994819641, 0.07871663570404053, 0.24642282724380493, 0.4171747863292694, 0.1301141381263733, -0.20641006529331207, 0.1258244514465332, 0.12753146886825562, 0.2737805247306824, -0.31657904386520386, -0.10175113379955292, 0.4006587266921997, -0.20143501460552216, 0.13569657504558563, 0.18687641620635986, 0.17594695091247559, 0.08043932914733887, 0.20907944440841675, 0.1746579110622406, 0.5866339802742004, -0.13232947885990143, -0.000909364374820143, -0.04136867821216583, -0.2876622974872589, 0.19701607525348663, 0.4617127776145935, 0.35681694746017456, 0.2876889407634735, 0.6656832695007324, -0.19646984338760376, 0.3735591769218445, -0.1488843560218811, 0.008812000043690205, 0.14074616134166718, -0.37669655680656433, 0.20677492022514343, -0.05451613664627075, 0.15727455914020538, -0.04731706529855728, -0.07500186562538147, 0.33881863951683044, -0.393768310546875, -0.2731878161430359, -0.2021578699350357, 0.14969240128993988, -0.25355762243270874, 0.13716842234134674, 0.13975271582603455, 0.027297213673591614, -0.10641741007566452, -0.12746906280517578, 0.10346487164497375, -0.13530482351779938, 0.22879493236541748, -0.14402739703655243, -0.0365169495344162, -0.2736489474773407, -0.006776927970349789, 0.13754379749298096, 0.054457686841487885, -0.08413108438253403, 0.1239565908908844, -0.049753617495298386, -0.19736333191394806, -0.09848719835281372, 0.42642778158187866, 0.4894966781139374, 0.022961290553212166, 0.058942582458257675, -0.0060233501717448235, -0.12646055221557617, -0.08103816956281662, 0.004304482601583004, -0.038803428411483765, 0.12143941968679428, 0.20349302887916565, 0.25206777453422546, 0.21399664878845215, -0.21029682457447052, -0.20680086314678192, -0.11043871939182281, 0.14967601001262665, -0.151966392993927, 0.12040899693965912, -0.2655849754810333, -0.05472763627767563, -0.12347456067800522, -0.14460094273090363, -0.39552798867225647, -0.0020488116424530745, 0.22645017504692078, -0.1545681357383728, 0.1588759571313858, -0.368813157081604, 0.12490253895521164, -0.12162822484970093, 0.4434172809123993, 0.27927640080451965, -0.04862724244594574, 0.1364201158285141, -0.052495893090963364, -0.4589959383010864, 0.15876953303813934, 0.014894469641149044, -0.2020353227853775, 0.08697894215583801, 0.01734071783721447, 0.12016580253839493, -0.07841581106185913, 0.3208487629890442, -0.058355625718832016, 0.22582249343395233, -0.27876797318458557, -0.21163906157016754, -0.08113857358694077, -0.29501622915267944, -0.07258401811122894, 0.05726424977183342, -0.21080775558948517, 0.1821863204240799, 0.028499210253357887, 0.0968649759888649, -0.21464699506759644, 0.034117281436920166, 0.04610435664653778, -0.6555631756782532, 0.3715861737728119, 0.017018646001815796, 0.32119521498680115, -0.14575250446796417, -0.12270388752222061, -0.08496831357479095, -0.3955245316028595, -0.1650729477405548, 0.1614527851343155, -0.0812600702047348, 0.29810798168182373, 0.0852813720703125, -0.3054753243923187, -0.22399547696113586, 0.40673190355300903, 0.16005027294158936, 0.18029552698135376, -0.163005530834198, 0.49085545539855957, -0.08874134719371796, 0.05177715793251991, 0.25217440724372864, 0.07217605412006378, -0.009043863043189049, 0.08602243661880493, -0.23374928534030914, -0.3747982978820801, 0.4682329595088959, -0.12081483751535416, -0.3869240880012512, -0.17464043200016022, 0.23201774060726166, 0.12342610955238342, -0.47118380665779114, -0.6277890801429749, 0.21299569308757782, -0.01946653425693512, -0.024297302588820457, -0.26047730445861816, 0.42985984683036804, -0.15170344710350037, 0.04686403274536133, 0.03911007195711136, 0.31645721197128296, -0.00759784784168005, -0.12141316384077072, 0.3703796863555908, 0.06051236391067505 ]
https://github.com/huggingface/datasets/issues/3099
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
The problem seems to be with the latest version of `datasets`. After running `pip install -U datasets huggingface_hub`, I get the following: ```bash python -c "import huggingface_hub; print(f'hbvers={huggingface_hub.__version__}'); import datasets; print(f'dvers={datasets.__version__}')" hbvers=0.0.8 Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/conda/lib/python3.6/site-packages/datasets/__init__.py", line 37, in <module> from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File "/opt/conda/lib/python3.6/site-packages/datasets/builder.py", line 44, in <module> from .data_files import DataFilesDict, _sanitize_patterns File "/opt/conda/lib/python3.6/site-packages/datasets/data_files.py", line 122, in <module> allowed_extensions: Optional[list] = None, AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' ```` Note that pip reports the latest `datasets` version as ```bash pip show datasets Name: datasets Version: 1.14.0 ``` However, if I downgrade datasets with `pip install datasets==1.11.0`, things now work ```bash python -c "import huggingface_hub; print(f'hbvers={huggingface_hub.__version__}'); import datasets; print(f'dvers={datasets.__version__}')" hbvers=0.0.8 dvers=1.11.0 ````
## Describe the bug When using `pip install datasets` or use `conda install -c huggingface -c conda-forge datasets` cannot install datasets ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("sst", "default") ``` ## Actual results --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-fbe7981e6e21> in <module> 1 import torch 2 import transformers ----> 3 from datasets import load_dataset 4 5 dataset = load_dataset("sst", "default") ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module> 35 from .arrow_reader import ArrowReader, ReadInstruction 36 from .arrow_writer import ArrowWriter ---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder 38 from .combine import interleave_datasets 39 from .dataset_dict import DatasetDict, IterableDatasetDict ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module> 42 ) 43 from .arrow_writer import ArrowWriter, BeamWriter ---> 44 from .data_files import DataFilesDict, _sanitize_patterns 45 from .dataset_dict import DatasetDict, IterableDatasetDict 46 from .fingerprint import Hasher ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module> 118 119 def _exec_patterns_in_dataset_repository( --> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo, 121 patterns: List[str], 122 allowed_extensions: Optional[list] = None, AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: macOS-11.3.1-arm64-arm-64bit - Python version: 3.8.10 - PyArrow version: 5.0.0
128
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
[ -0.39160454273223877, -0.15211550891399384, -0.13808207213878632, 0.23526084423065186, 0.1553620547056198, 0.1055447980761528, 0.057578276842832565, 0.593558669090271, 0.26969006657600403, 0.2378150224685669, -0.1463099867105484, 0.1336035132408142, 0.09289821237325668, 0.3756861090660095, 0.03229367733001709, -0.11700761318206787, 0.04446304589509964, 0.11278808116912842, -0.22064711153507233, -0.12625189125537872, -0.035933442413806915, 0.24784478545188904, -0.013489258475601673, 0.11124961078166962, -0.2622172236442566, -0.21366071701049805, 0.14049023389816284, 0.28903302550315857, -0.21626631915569305, -0.2256653904914856, 0.23542273044586182, 0.06873798370361328, -0.018082894384860992, 0.19831568002700806, -0.0001033231383189559, 0.12033848464488983, 0.16916176676750183, 0.04270971938967705, -0.21480420231819153, 0.12013640254735947, -0.23188024759292603, 0.10478279739618301, -0.014285736717283726, -0.0314025804400444, -0.15870603919029236, -0.08111569285392761, -0.11095482856035233, -0.04194967821240425, 0.24063590168952942, 0.25917983055114746, 0.3073020875453949, 0.40740275382995605, 0.1330677717924118, -0.33816763758659363, 0.0049292040057480335, 0.2057764232158661, -0.1827889084815979, -0.020062025636434555, -0.00171397824306041, -0.2618049383163452, 0.0018288594437763095, 0.34723982214927673, -0.026418033987283707, 0.2612534761428833, 0.3973754346370697, -0.03725365176796913, -0.31631919741630554, -0.1981053650379181, 0.32680097222328186, 0.10558323562145233, 0.27875590324401855, -0.36697882413864136, -0.27163708209991455, -0.04490415006875992, -0.09676714986562729, -0.082265205681324, 0.08779986202716827, -0.017327986657619476, 0.009584547951817513, 0.12122990936040878, 0.1672275811433792, -0.22961406409740448, -0.016357548534870148, -0.025090422481298447, -0.026859212666749954, 0.09637746959924698, -0.11388389021158218, 0.041535716503858566, 0.04985387623310089, -0.12163367867469788, -0.03504597023129463, 0.026356881484389305, -0.2354021817445755, -0.0462004728615284, -0.18830260634422302, -0.01484599057585001, 0.27860531210899353, 0.2761763632297516, 0.3980928957462311, 0.08726068586111069, -0.2345971167087555, 0.16060346364974976, -0.21318380534648895, 0.14582231640815735, 0.13547147810459137, 0.03307022899389267, 0.03907966613769531, 0.09560627490282059, 0.375748872756958, 0.3536839187145233, 0.11194463819265366, 0.008308292366564274, 0.1076294481754303, -0.08142238110303879, -0.09810082614421844, -0.17635412514209747, 0.3912636339664459, -0.13406263291835785, -0.3515785038471222, 0.12952010333538055, 0.08234304189682007, -0.06721432507038116, 0.07556234300136566, 0.4758170545101166, -0.000012146949302405119, -0.014759981073439121, 0.015249560587108135, 0.21500252187252045, -0.230364128947258, -0.1201581135392189, -0.35068798065185547, 0.3433763086795807, 0.12272538989782333, 0.09643654525279999, 0.08133377134799957, -0.16378441452980042, 0.23584386706352234, -0.10761237144470215, 0.3179655075073242, 0.054059166461229324, 0.09680459648370743, -0.04305953159928322, -0.08412924408912659, 0.39598527550697327, 0.17821356654167175, 0.11498165130615234, 0.28753671050071716, -0.04641842097043991, -0.17098459601402283, -0.1868501603603363, -0.25816330313682556, -0.287198543548584, -0.22048236429691315, 0.2820087671279907, 0.05092984810471535, -0.13185299932956696, -0.15812434256076813, -0.03286977484822273, -0.07814133912324905, -0.022133126854896545, 0.06265762448310852, 0.07334117591381073, -0.020430898293852806, -0.005375375971198082, 0.20599251985549927, 0.3893537223339081, 0.052929386496543884, -0.05464353784918785, 0.3443620204925537, -0.22651280462741852, -0.23245784640312195, 0.25837525725364685, -0.07393073290586472, 0.24172089993953705, -0.12961822748184204, 0.2026204764842987, 0.242051362991333, -0.7032074332237244, -0.5026519894599915, -0.10461845993995667, 0.2141377031803131, -0.19808541238307953, -0.002777454908937216, -0.12720508873462677, -0.08351873606443405, 0.10569383949041367, 0.10424889624118805, 0.16242071986198425, 0.1232903003692627, 0.13128350675106049, -0.11729191988706589, -0.2767678201198578, -0.11622169613838196, 0.25428250432014465, 0.24703408777713776, 0.1023550033569336, 0.1004415974020958, -0.05081009864807129, 0.20974425971508026, -0.08405890315771103, 0.24326352775096893, 0.29042792320251465, 0.2596389055252075, 0.08175871521234512, 0.028229989111423492, -0.33608174324035645, -0.1427181512117386, 0.04890964552760124, 0.024296363815665245, 0.3186476528644562, -0.318509966135025, -0.27284902334213257, -0.32258179783821106, 0.09846457839012146, -0.2656037211418152, -0.20210038125514984, 0.2757145166397095, -0.00021408231987152249, -0.03659571334719658, 0.058299705386161804, -0.37613528966903687, 0.5112549662590027, -0.009505145251750946, 0.18242588639259338, -0.3905116021633148, 0.44111353158950806, -0.2614386975765228, -0.10315286368131638, 0.17042389512062073, 0.19648608565330505, 0.11089442670345306, -0.07881638407707214, -0.10149644315242767, 0.12248041480779648, -0.11166150867938995, 0.056428998708724976, 0.21325545012950897, 0.14963853359222412, 0.12400355935096741, -0.24452032148838043, 0.08747986704111099, -0.2977723181247711, 0.09098301827907562, 0.06786873191595078, 0.07397201657295227, -0.045038145035505295, 0.018347030505537987, 0.10002380609512329, 0.10113748162984848, -0.016192857176065445, 0.19604147970676422, 0.06557676196098328, 0.0956924706697464, -0.2991964817047119, 0.08988507837057114, -0.15101931989192963, 0.07373163849115372, -0.17714378237724304, -0.019752901047468185, 0.13513538241386414, 0.55845707654953, 0.10402293503284454, 0.25257858633995056, -0.04376530274748802, -0.030814995989203453, 0.03416844457387924, 0.32104602456092834, -0.04938511922955513, 0.20287200808525085, 0.10724591463804245, -0.1603681743144989, 0.32914164662361145, -0.022344820201396942, 0.10544803738594055, 0.007198716979473829, -0.038438186049461365, 0.08700128644704819, 0.05476103723049164, -0.05902629718184471, -0.030824610963463783, -0.5330869555473328, -0.3781009614467621, -0.11766856163740158, 0.2412334531545639, -0.33194050192832947, -0.035585545003414154, -0.3240318298339844, -0.1417253315448761, 0.1995282769203186, -0.3823082447052002, -0.34420013427734375, -0.3109014928340912, -0.031033199280500412, 0.2675541043281555, 0.01789912022650242, 0.21863359212875366, -0.09557938575744629, 0.14294938743114471, 0.139568030834198, 0.028280116617679596, -0.3179899752140045, -0.04825180768966675, 0.02631564624607563, 0.0947059616446495, 0.02466835081577301, 0.2688777446746826, 0.38125720620155334, -0.2967834174633026, 0.1758246272802353, -0.3504902422428131, -0.2470305860042572, 0.2500491142272949, -0.14289507269859314, 0.08104216307401657, 0.3316229581832886, 0.2882024645805359, 0.025248747318983078, -0.03835267573595047, 0.4173083007335663, -0.23590055108070374, -0.14987985789775848, -0.0830046609044075, -0.12414282560348511, -0.297264963388443, -0.029133636504411697, -0.05329671502113342, -0.1984693557024002, -0.47444015741348267, 0.054902542382478714, 0.10891104489564896, 0.05171743780374527, 0.46206575632095337, -0.012244600802659988, 0.17967315018177032, -0.06919117271900177, 0.09578938037157059, -0.3809860348701477, -0.2650175094604492, 0.05907543748617172, -0.3163229823112488, -0.2556483745574951, 0.07575763016939163, 0.028680985793471336, 0.2957622706890106, -0.19603627920150757, -0.38749995827674866, -0.6907895803451538, -0.051771800965070724, 0.3160461187362671, -0.218714639544487, 0.26277461647987366, 0.2621433436870575, 0.05272940546274185, -0.09779772162437439, -0.22100627422332764, -0.28911980986595154, 0.1142129972577095, 0.16044244170188904, -0.16368788480758667, -0.09309476613998413, 0.22702938318252563, -0.1408635675907135, 0.18211838603019714, 0.2940789461135864, 0.23893333971500397, 0.6686433553695679, -0.20304277539253235, 0.48854658007621765, -0.2984120547771454, -0.347598135471344, -0.08357192575931549, 0.2312951534986496, 0.0895947739481926, 0.059312570840120316, -0.009896419942378998, 0.30994468927383423, -0.0051599773578345776, -0.2713174819946289, -0.11705708503723145, -0.1949884444475174, -0.2481316775083542, 0.21150332689285278, -0.0637175515294075, 0.18878185749053955, 0.1035892441868782, -0.22493620216846466, 0.06373792886734009, 0.509543776512146, 0.35687944293022156, -0.28642579913139343, 0.0756073147058487, -0.2943659722805023, -0.27938205003738403, -0.5817884206771851, 0.21477235853672028, -0.08266913145780563, 0.1663247048854828, -0.30604618787765503, 0.057754237204790115, -0.038368936628103256, -0.11878318339586258, 0.5260900855064392, -0.22749774158000946, 0.0013434005668386817, 0.019711149856448174, -0.15615932643413544, -0.07473409920930862, 0.013439955189824104, 0.034582722932100296, 0.2120773047208786, -0.33352595567703247, 0.2382885068655014, -0.1281595230102539, -0.3382023870944977, 0.4237881600856781, -0.15690891444683075, 0.056003741919994354, 0.09962522983551025, -0.29323288798332214, -0.5668522715568542, -0.45563557744026184, -0.2376651167869568, 0.1261175125837326, 0.10825682431459427, 0.41079410910606384, -0.00021112502145115286, -0.05426206439733505, -0.05095970630645752, 0.05258306488394737, 0.1432609111070633, 0.14546018838882446, 0.23067858815193176, 0.0010072336299344897, 0.05269473046064377, 0.2379559576511383, 0.2899809777736664, 0.6680663228034973, -0.16434089839458466, -0.3440217971801758, 0.03984840586781502, 0.06005061790347099, 0.034691210836172104, 0.22177660465240479, -0.06433756649494171, 0.25775253772735596, 0.0058193448930978775, 0.32947155833244324, -0.24273525178432465, 0.031630635261535645, 0.2670682668685913, 0.128189817070961, -0.15173618495464325, -0.17356349527835846, 0.4961378574371338, -0.14485257863998413, 0.11691959947347641, 0.3491838276386261, 0.8243528008460999, -0.11365702748298645, 0.10056935995817184, -0.11672435700893402, 0.5823099613189697, 0.23804181814193726, 0.12811674177646637, 0.3509892225265503, -0.07036047428846359, 0.2940555810928345, -0.26568159461021423, 0.03411010652780533, -0.3832048773765564, -0.3680582642555237, -0.06402656435966492, -0.004078106954693794, 0.23115555942058563, -0.36305758357048035, -0.013375364243984222, 0.11843894422054291, 0.06001549959182739, 0.23247583210468292, -0.33481836318969727, 0.08000244200229645, -0.28929176926612854, -0.3699805438518524, -0.493208110332489, 0.32081538438796997, -0.09324413537979126, 0.37909969687461853, -0.2439214289188385, 0.0035032019950449467, -0.12662862241268158, -0.08895670622587204, -0.0647483766078949, -0.01364397443830967, -0.049472227692604065, 0.2925676703453064, 0.21782687306404114, 0.05802266299724579, -0.05851411819458008, -0.26009657979011536, 0.38780784606933594, -0.11946552991867065, -0.30499133467674255, 0.1338282972574234, -0.3263323903083801, -0.04632748290896416, -0.22593334317207336, 0.09964443743228912, 0.4914301037788391, -0.17609210312366486, -0.3633381426334381, -0.022819973528385162, -0.04086826369166374, -0.0911734402179718, 0.10351601243019104, -0.10115816444158554, -0.009216555394232273, -0.30795103311538696, -0.006965055596083403, 0.13721799850463867, 0.16950790584087372, -0.1543322652578354, 0.18333140015602112, 0.17753930389881134, -0.03521145135164261, -0.028138542547822, 0.43137216567993164, -0.19158703088760376, -0.13769593834877014, 0.2789464294910431, -0.17780780792236328, 0.01649080216884613, 0.36545443534851074, 0.08187410980463028, -0.15991686284542084, -0.3032497465610504, 0.02678748592734337, 0.44835925102233887, -0.2397863268852234, -0.015194827690720558, 0.053952112793922424, -0.3313845992088318, -0.024486973881721497, 0.3212287127971649, 0.014022999443113804, -0.15280194580554962, 0.02426639385521412, -0.3217566907405853, -0.35780030488967896, 0.35793405771255493, -0.16389347612857819, 0.11765755712985992, 0.03836630657315254, -0.040426675230264664, 0.047088973224163055, -0.06159789860248566, -0.4144233465194702, -0.08936818689107895, -0.2823743224143982, -0.11631590873003006, 0.03179604560136795, -0.14593970775604248, 0.27580589056015015, -0.1049535796046257, 0.20616336166858673, 0.06577149033546448, -0.5201628804206848, -0.3065197467803955, -0.2251283824443817, 0.08658946305513382, 0.0377347394824028, -0.03206906467676163, 0.10825510323047638, -0.15779514610767365, -0.3529733419418335, -0.1834273636341095, 0.38048255443573, 0.13173025846481323, -0.009635340422391891, 0.1459498256444931, 0.018926985561847687, -0.29205942153930664, -0.062221966683864594, 0.015750888735055923, 0.3618345856666565, 0.16613468527793884, -0.24936895072460175, -0.1526089757680893, -0.2893615961074829, 0.05846426635980606, 0.17709419131278992, 0.31285038590431213, 0.2024737000465393, -0.08682006597518921, 0.24929404258728027, -0.3110406994819641, 0.07871663570404053, 0.24642282724380493, 0.4171747863292694, 0.1301141381263733, -0.20641006529331207, 0.1258244514465332, 0.12753146886825562, 0.2737805247306824, -0.31657904386520386, -0.10175113379955292, 0.4006587266921997, -0.20143501460552216, 0.13569657504558563, 0.18687641620635986, 0.17594695091247559, 0.08043932914733887, 0.20907944440841675, 0.1746579110622406, 0.5866339802742004, -0.13232947885990143, -0.000909364374820143, -0.04136867821216583, -0.2876622974872589, 0.19701607525348663, 0.4617127776145935, 0.35681694746017456, 0.2876889407634735, 0.6656832695007324, -0.19646984338760376, 0.3735591769218445, -0.1488843560218811, 0.008812000043690205, 0.14074616134166718, -0.37669655680656433, 0.20677492022514343, -0.05451613664627075, 0.15727455914020538, -0.04731706529855728, -0.07500186562538147, 0.33881863951683044, -0.393768310546875, -0.2731878161430359, -0.2021578699350357, 0.14969240128993988, -0.25355762243270874, 0.13716842234134674, 0.13975271582603455, 0.027297213673591614, -0.10641741007566452, -0.12746906280517578, 0.10346487164497375, -0.13530482351779938, 0.22879493236541748, -0.14402739703655243, -0.0365169495344162, -0.2736489474773407, -0.006776927970349789, 0.13754379749298096, 0.054457686841487885, -0.08413108438253403, 0.1239565908908844, -0.049753617495298386, -0.19736333191394806, -0.09848719835281372, 0.42642778158187866, 0.4894966781139374, 0.022961290553212166, 0.058942582458257675, -0.0060233501717448235, -0.12646055221557617, -0.08103816956281662, 0.004304482601583004, -0.038803428411483765, 0.12143941968679428, 0.20349302887916565, 0.25206777453422546, 0.21399664878845215, -0.21029682457447052, -0.20680086314678192, -0.11043871939182281, 0.14967601001262665, -0.151966392993927, 0.12040899693965912, -0.2655849754810333, -0.05472763627767563, -0.12347456067800522, -0.14460094273090363, -0.39552798867225647, -0.0020488116424530745, 0.22645017504692078, -0.1545681357383728, 0.1588759571313858, -0.368813157081604, 0.12490253895521164, -0.12162822484970093, 0.4434172809123993, 0.27927640080451965, -0.04862724244594574, 0.1364201158285141, -0.052495893090963364, -0.4589959383010864, 0.15876953303813934, 0.014894469641149044, -0.2020353227853775, 0.08697894215583801, 0.01734071783721447, 0.12016580253839493, -0.07841581106185913, 0.3208487629890442, -0.058355625718832016, 0.22582249343395233, -0.27876797318458557, -0.21163906157016754, -0.08113857358694077, -0.29501622915267944, -0.07258401811122894, 0.05726424977183342, -0.21080775558948517, 0.1821863204240799, 0.028499210253357887, 0.0968649759888649, -0.21464699506759644, 0.034117281436920166, 0.04610435664653778, -0.6555631756782532, 0.3715861737728119, 0.017018646001815796, 0.32119521498680115, -0.14575250446796417, -0.12270388752222061, -0.08496831357479095, -0.3955245316028595, -0.1650729477405548, 0.1614527851343155, -0.0812600702047348, 0.29810798168182373, 0.0852813720703125, -0.3054753243923187, -0.22399547696113586, 0.40673190355300903, 0.16005027294158936, 0.18029552698135376, -0.163005530834198, 0.49085545539855957, -0.08874134719371796, 0.05177715793251991, 0.25217440724372864, 0.07217605412006378, -0.009043863043189049, 0.08602243661880493, -0.23374928534030914, -0.3747982978820801, 0.4682329595088959, -0.12081483751535416, -0.3869240880012512, -0.17464043200016022, 0.23201774060726166, 0.12342610955238342, -0.47118380665779114, -0.6277890801429749, 0.21299569308757782, -0.01946653425693512, -0.024297302588820457, -0.26047730445861816, 0.42985984683036804, -0.15170344710350037, 0.04686403274536133, 0.03911007195711136, 0.31645721197128296, -0.00759784784168005, -0.12141316384077072, 0.3703796863555908, 0.06051236391067505 ]
https://github.com/huggingface/datasets/issues/3099
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
> Hi @JTWang2000, thanks for reporting. > > However, I cannot reproduce your reported bug: > > ```python > >>> from datasets import load_dataset > > >>> dataset = load_dataset("sst", "default") > >>> dataset > DatasetDict({ > train: Dataset({ > features: ['sentence', 'label', 'tokens', 'tree'], > num_rows: 8544 > }) > validation: Dataset({ > features: ['sentence', 'label', 'tokens', 'tree'], > num_rows: 1101 > }) > test: Dataset({ > features: ['sentence', 'label', 'tokens', 'tree'], > num_rows: 2210 > }) > }) > ``` > > Maybe, the cause is that you have a quite old version of `huggingface_hub`. Could you please try to update it and confirm if the problem persists? > > ``` > pip install -U huggingface_hub > ``` My problem solved after updating huggingface hub command. Thanks a lot and sorry for the late reply.
## Describe the bug When using `pip install datasets` or use `conda install -c huggingface -c conda-forge datasets` cannot install datasets ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("sst", "default") ``` ## Actual results --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-fbe7981e6e21> in <module> 1 import torch 2 import transformers ----> 3 from datasets import load_dataset 4 5 dataset = load_dataset("sst", "default") ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module> 35 from .arrow_reader import ArrowReader, ReadInstruction 36 from .arrow_writer import ArrowWriter ---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder 38 from .combine import interleave_datasets 39 from .dataset_dict import DatasetDict, IterableDatasetDict ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module> 42 ) 43 from .arrow_writer import ArrowWriter, BeamWriter ---> 44 from .data_files import DataFilesDict, _sanitize_patterns 45 from .dataset_dict import DatasetDict, IterableDatasetDict 46 from .fingerprint import Hasher ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module> 118 119 def _exec_patterns_in_dataset_repository( --> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo, 121 patterns: List[str], 122 allowed_extensions: Optional[list] = None, AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: macOS-11.3.1-arm64-arm-64bit - Python version: 3.8.10 - PyArrow version: 5.0.0
137
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
[ -0.39160454273223877, -0.15211550891399384, -0.13808207213878632, 0.23526084423065186, 0.1553620547056198, 0.1055447980761528, 0.057578276842832565, 0.593558669090271, 0.26969006657600403, 0.2378150224685669, -0.1463099867105484, 0.1336035132408142, 0.09289821237325668, 0.3756861090660095, 0.03229367733001709, -0.11700761318206787, 0.04446304589509964, 0.11278808116912842, -0.22064711153507233, -0.12625189125537872, -0.035933442413806915, 0.24784478545188904, -0.013489258475601673, 0.11124961078166962, -0.2622172236442566, -0.21366071701049805, 0.14049023389816284, 0.28903302550315857, -0.21626631915569305, -0.2256653904914856, 0.23542273044586182, 0.06873798370361328, -0.018082894384860992, 0.19831568002700806, -0.0001033231383189559, 0.12033848464488983, 0.16916176676750183, 0.04270971938967705, -0.21480420231819153, 0.12013640254735947, -0.23188024759292603, 0.10478279739618301, -0.014285736717283726, -0.0314025804400444, -0.15870603919029236, -0.08111569285392761, -0.11095482856035233, -0.04194967821240425, 0.24063590168952942, 0.25917983055114746, 0.3073020875453949, 0.40740275382995605, 0.1330677717924118, -0.33816763758659363, 0.0049292040057480335, 0.2057764232158661, -0.1827889084815979, -0.020062025636434555, -0.00171397824306041, -0.2618049383163452, 0.0018288594437763095, 0.34723982214927673, -0.026418033987283707, 0.2612534761428833, 0.3973754346370697, -0.03725365176796913, -0.31631919741630554, -0.1981053650379181, 0.32680097222328186, 0.10558323562145233, 0.27875590324401855, -0.36697882413864136, -0.27163708209991455, -0.04490415006875992, -0.09676714986562729, -0.082265205681324, 0.08779986202716827, -0.017327986657619476, 0.009584547951817513, 0.12122990936040878, 0.1672275811433792, -0.22961406409740448, -0.016357548534870148, -0.025090422481298447, -0.026859212666749954, 0.09637746959924698, -0.11388389021158218, 0.041535716503858566, 0.04985387623310089, -0.12163367867469788, -0.03504597023129463, 0.026356881484389305, -0.2354021817445755, -0.0462004728615284, -0.18830260634422302, -0.01484599057585001, 0.27860531210899353, 0.2761763632297516, 0.3980928957462311, 0.08726068586111069, -0.2345971167087555, 0.16060346364974976, -0.21318380534648895, 0.14582231640815735, 0.13547147810459137, 0.03307022899389267, 0.03907966613769531, 0.09560627490282059, 0.375748872756958, 0.3536839187145233, 0.11194463819265366, 0.008308292366564274, 0.1076294481754303, -0.08142238110303879, -0.09810082614421844, -0.17635412514209747, 0.3912636339664459, -0.13406263291835785, -0.3515785038471222, 0.12952010333538055, 0.08234304189682007, -0.06721432507038116, 0.07556234300136566, 0.4758170545101166, -0.000012146949302405119, -0.014759981073439121, 0.015249560587108135, 0.21500252187252045, -0.230364128947258, -0.1201581135392189, -0.35068798065185547, 0.3433763086795807, 0.12272538989782333, 0.09643654525279999, 0.08133377134799957, -0.16378441452980042, 0.23584386706352234, -0.10761237144470215, 0.3179655075073242, 0.054059166461229324, 0.09680459648370743, -0.04305953159928322, -0.08412924408912659, 0.39598527550697327, 0.17821356654167175, 0.11498165130615234, 0.28753671050071716, -0.04641842097043991, -0.17098459601402283, -0.1868501603603363, -0.25816330313682556, -0.287198543548584, -0.22048236429691315, 0.2820087671279907, 0.05092984810471535, -0.13185299932956696, -0.15812434256076813, -0.03286977484822273, -0.07814133912324905, -0.022133126854896545, 0.06265762448310852, 0.07334117591381073, -0.020430898293852806, -0.005375375971198082, 0.20599251985549927, 0.3893537223339081, 0.052929386496543884, -0.05464353784918785, 0.3443620204925537, -0.22651280462741852, -0.23245784640312195, 0.25837525725364685, -0.07393073290586472, 0.24172089993953705, -0.12961822748184204, 0.2026204764842987, 0.242051362991333, -0.7032074332237244, -0.5026519894599915, -0.10461845993995667, 0.2141377031803131, -0.19808541238307953, -0.002777454908937216, -0.12720508873462677, -0.08351873606443405, 0.10569383949041367, 0.10424889624118805, 0.16242071986198425, 0.1232903003692627, 0.13128350675106049, -0.11729191988706589, -0.2767678201198578, -0.11622169613838196, 0.25428250432014465, 0.24703408777713776, 0.1023550033569336, 0.1004415974020958, -0.05081009864807129, 0.20974425971508026, -0.08405890315771103, 0.24326352775096893, 0.29042792320251465, 0.2596389055252075, 0.08175871521234512, 0.028229989111423492, -0.33608174324035645, -0.1427181512117386, 0.04890964552760124, 0.024296363815665245, 0.3186476528644562, -0.318509966135025, -0.27284902334213257, -0.32258179783821106, 0.09846457839012146, -0.2656037211418152, -0.20210038125514984, 0.2757145166397095, -0.00021408231987152249, -0.03659571334719658, 0.058299705386161804, -0.37613528966903687, 0.5112549662590027, -0.009505145251750946, 0.18242588639259338, -0.3905116021633148, 0.44111353158950806, -0.2614386975765228, -0.10315286368131638, 0.17042389512062073, 0.19648608565330505, 0.11089442670345306, -0.07881638407707214, -0.10149644315242767, 0.12248041480779648, -0.11166150867938995, 0.056428998708724976, 0.21325545012950897, 0.14963853359222412, 0.12400355935096741, -0.24452032148838043, 0.08747986704111099, -0.2977723181247711, 0.09098301827907562, 0.06786873191595078, 0.07397201657295227, -0.045038145035505295, 0.018347030505537987, 0.10002380609512329, 0.10113748162984848, -0.016192857176065445, 0.19604147970676422, 0.06557676196098328, 0.0956924706697464, -0.2991964817047119, 0.08988507837057114, -0.15101931989192963, 0.07373163849115372, -0.17714378237724304, -0.019752901047468185, 0.13513538241386414, 0.55845707654953, 0.10402293503284454, 0.25257858633995056, -0.04376530274748802, -0.030814995989203453, 0.03416844457387924, 0.32104602456092834, -0.04938511922955513, 0.20287200808525085, 0.10724591463804245, -0.1603681743144989, 0.32914164662361145, -0.022344820201396942, 0.10544803738594055, 0.007198716979473829, -0.038438186049461365, 0.08700128644704819, 0.05476103723049164, -0.05902629718184471, -0.030824610963463783, -0.5330869555473328, -0.3781009614467621, -0.11766856163740158, 0.2412334531545639, -0.33194050192832947, -0.035585545003414154, -0.3240318298339844, -0.1417253315448761, 0.1995282769203186, -0.3823082447052002, -0.34420013427734375, -0.3109014928340912, -0.031033199280500412, 0.2675541043281555, 0.01789912022650242, 0.21863359212875366, -0.09557938575744629, 0.14294938743114471, 0.139568030834198, 0.028280116617679596, -0.3179899752140045, -0.04825180768966675, 0.02631564624607563, 0.0947059616446495, 0.02466835081577301, 0.2688777446746826, 0.38125720620155334, -0.2967834174633026, 0.1758246272802353, -0.3504902422428131, -0.2470305860042572, 0.2500491142272949, -0.14289507269859314, 0.08104216307401657, 0.3316229581832886, 0.2882024645805359, 0.025248747318983078, -0.03835267573595047, 0.4173083007335663, -0.23590055108070374, -0.14987985789775848, -0.0830046609044075, -0.12414282560348511, -0.297264963388443, -0.029133636504411697, -0.05329671502113342, -0.1984693557024002, -0.47444015741348267, 0.054902542382478714, 0.10891104489564896, 0.05171743780374527, 0.46206575632095337, -0.012244600802659988, 0.17967315018177032, -0.06919117271900177, 0.09578938037157059, -0.3809860348701477, -0.2650175094604492, 0.05907543748617172, -0.3163229823112488, -0.2556483745574951, 0.07575763016939163, 0.028680985793471336, 0.2957622706890106, -0.19603627920150757, -0.38749995827674866, -0.6907895803451538, -0.051771800965070724, 0.3160461187362671, -0.218714639544487, 0.26277461647987366, 0.2621433436870575, 0.05272940546274185, -0.09779772162437439, -0.22100627422332764, -0.28911980986595154, 0.1142129972577095, 0.16044244170188904, -0.16368788480758667, -0.09309476613998413, 0.22702938318252563, -0.1408635675907135, 0.18211838603019714, 0.2940789461135864, 0.23893333971500397, 0.6686433553695679, -0.20304277539253235, 0.48854658007621765, -0.2984120547771454, -0.347598135471344, -0.08357192575931549, 0.2312951534986496, 0.0895947739481926, 0.059312570840120316, -0.009896419942378998, 0.30994468927383423, -0.0051599773578345776, -0.2713174819946289, -0.11705708503723145, -0.1949884444475174, -0.2481316775083542, 0.21150332689285278, -0.0637175515294075, 0.18878185749053955, 0.1035892441868782, -0.22493620216846466, 0.06373792886734009, 0.509543776512146, 0.35687944293022156, -0.28642579913139343, 0.0756073147058487, -0.2943659722805023, -0.27938205003738403, -0.5817884206771851, 0.21477235853672028, -0.08266913145780563, 0.1663247048854828, -0.30604618787765503, 0.057754237204790115, -0.038368936628103256, -0.11878318339586258, 0.5260900855064392, -0.22749774158000946, 0.0013434005668386817, 0.019711149856448174, -0.15615932643413544, -0.07473409920930862, 0.013439955189824104, 0.034582722932100296, 0.2120773047208786, -0.33352595567703247, 0.2382885068655014, -0.1281595230102539, -0.3382023870944977, 0.4237881600856781, -0.15690891444683075, 0.056003741919994354, 0.09962522983551025, -0.29323288798332214, -0.5668522715568542, -0.45563557744026184, -0.2376651167869568, 0.1261175125837326, 0.10825682431459427, 0.41079410910606384, -0.00021112502145115286, -0.05426206439733505, -0.05095970630645752, 0.05258306488394737, 0.1432609111070633, 0.14546018838882446, 0.23067858815193176, 0.0010072336299344897, 0.05269473046064377, 0.2379559576511383, 0.2899809777736664, 0.6680663228034973, -0.16434089839458466, -0.3440217971801758, 0.03984840586781502, 0.06005061790347099, 0.034691210836172104, 0.22177660465240479, -0.06433756649494171, 0.25775253772735596, 0.0058193448930978775, 0.32947155833244324, -0.24273525178432465, 0.031630635261535645, 0.2670682668685913, 0.128189817070961, -0.15173618495464325, -0.17356349527835846, 0.4961378574371338, -0.14485257863998413, 0.11691959947347641, 0.3491838276386261, 0.8243528008460999, -0.11365702748298645, 0.10056935995817184, -0.11672435700893402, 0.5823099613189697, 0.23804181814193726, 0.12811674177646637, 0.3509892225265503, -0.07036047428846359, 0.2940555810928345, -0.26568159461021423, 0.03411010652780533, -0.3832048773765564, -0.3680582642555237, -0.06402656435966492, -0.004078106954693794, 0.23115555942058563, -0.36305758357048035, -0.013375364243984222, 0.11843894422054291, 0.06001549959182739, 0.23247583210468292, -0.33481836318969727, 0.08000244200229645, -0.28929176926612854, -0.3699805438518524, -0.493208110332489, 0.32081538438796997, -0.09324413537979126, 0.37909969687461853, -0.2439214289188385, 0.0035032019950449467, -0.12662862241268158, -0.08895670622587204, -0.0647483766078949, -0.01364397443830967, -0.049472227692604065, 0.2925676703453064, 0.21782687306404114, 0.05802266299724579, -0.05851411819458008, -0.26009657979011536, 0.38780784606933594, -0.11946552991867065, -0.30499133467674255, 0.1338282972574234, -0.3263323903083801, -0.04632748290896416, -0.22593334317207336, 0.09964443743228912, 0.4914301037788391, -0.17609210312366486, -0.3633381426334381, -0.022819973528385162, -0.04086826369166374, -0.0911734402179718, 0.10351601243019104, -0.10115816444158554, -0.009216555394232273, -0.30795103311538696, -0.006965055596083403, 0.13721799850463867, 0.16950790584087372, -0.1543322652578354, 0.18333140015602112, 0.17753930389881134, -0.03521145135164261, -0.028138542547822, 0.43137216567993164, -0.19158703088760376, -0.13769593834877014, 0.2789464294910431, -0.17780780792236328, 0.01649080216884613, 0.36545443534851074, 0.08187410980463028, -0.15991686284542084, -0.3032497465610504, 0.02678748592734337, 0.44835925102233887, -0.2397863268852234, -0.015194827690720558, 0.053952112793922424, -0.3313845992088318, -0.024486973881721497, 0.3212287127971649, 0.014022999443113804, -0.15280194580554962, 0.02426639385521412, -0.3217566907405853, -0.35780030488967896, 0.35793405771255493, -0.16389347612857819, 0.11765755712985992, 0.03836630657315254, -0.040426675230264664, 0.047088973224163055, -0.06159789860248566, -0.4144233465194702, -0.08936818689107895, -0.2823743224143982, -0.11631590873003006, 0.03179604560136795, -0.14593970775604248, 0.27580589056015015, -0.1049535796046257, 0.20616336166858673, 0.06577149033546448, -0.5201628804206848, -0.3065197467803955, -0.2251283824443817, 0.08658946305513382, 0.0377347394824028, -0.03206906467676163, 0.10825510323047638, -0.15779514610767365, -0.3529733419418335, -0.1834273636341095, 0.38048255443573, 0.13173025846481323, -0.009635340422391891, 0.1459498256444931, 0.018926985561847687, -0.29205942153930664, -0.062221966683864594, 0.015750888735055923, 0.3618345856666565, 0.16613468527793884, -0.24936895072460175, -0.1526089757680893, -0.2893615961074829, 0.05846426635980606, 0.17709419131278992, 0.31285038590431213, 0.2024737000465393, -0.08682006597518921, 0.24929404258728027, -0.3110406994819641, 0.07871663570404053, 0.24642282724380493, 0.4171747863292694, 0.1301141381263733, -0.20641006529331207, 0.1258244514465332, 0.12753146886825562, 0.2737805247306824, -0.31657904386520386, -0.10175113379955292, 0.4006587266921997, -0.20143501460552216, 0.13569657504558563, 0.18687641620635986, 0.17594695091247559, 0.08043932914733887, 0.20907944440841675, 0.1746579110622406, 0.5866339802742004, -0.13232947885990143, -0.000909364374820143, -0.04136867821216583, -0.2876622974872589, 0.19701607525348663, 0.4617127776145935, 0.35681694746017456, 0.2876889407634735, 0.6656832695007324, -0.19646984338760376, 0.3735591769218445, -0.1488843560218811, 0.008812000043690205, 0.14074616134166718, -0.37669655680656433, 0.20677492022514343, -0.05451613664627075, 0.15727455914020538, -0.04731706529855728, -0.07500186562538147, 0.33881863951683044, -0.393768310546875, -0.2731878161430359, -0.2021578699350357, 0.14969240128993988, -0.25355762243270874, 0.13716842234134674, 0.13975271582603455, 0.027297213673591614, -0.10641741007566452, -0.12746906280517578, 0.10346487164497375, -0.13530482351779938, 0.22879493236541748, -0.14402739703655243, -0.0365169495344162, -0.2736489474773407, -0.006776927970349789, 0.13754379749298096, 0.054457686841487885, -0.08413108438253403, 0.1239565908908844, -0.049753617495298386, -0.19736333191394806, -0.09848719835281372, 0.42642778158187866, 0.4894966781139374, 0.022961290553212166, 0.058942582458257675, -0.0060233501717448235, -0.12646055221557617, -0.08103816956281662, 0.004304482601583004, -0.038803428411483765, 0.12143941968679428, 0.20349302887916565, 0.25206777453422546, 0.21399664878845215, -0.21029682457447052, -0.20680086314678192, -0.11043871939182281, 0.14967601001262665, -0.151966392993927, 0.12040899693965912, -0.2655849754810333, -0.05472763627767563, -0.12347456067800522, -0.14460094273090363, -0.39552798867225647, -0.0020488116424530745, 0.22645017504692078, -0.1545681357383728, 0.1588759571313858, -0.368813157081604, 0.12490253895521164, -0.12162822484970093, 0.4434172809123993, 0.27927640080451965, -0.04862724244594574, 0.1364201158285141, -0.052495893090963364, -0.4589959383010864, 0.15876953303813934, 0.014894469641149044, -0.2020353227853775, 0.08697894215583801, 0.01734071783721447, 0.12016580253839493, -0.07841581106185913, 0.3208487629890442, -0.058355625718832016, 0.22582249343395233, -0.27876797318458557, -0.21163906157016754, -0.08113857358694077, -0.29501622915267944, -0.07258401811122894, 0.05726424977183342, -0.21080775558948517, 0.1821863204240799, 0.028499210253357887, 0.0968649759888649, -0.21464699506759644, 0.034117281436920166, 0.04610435664653778, -0.6555631756782532, 0.3715861737728119, 0.017018646001815796, 0.32119521498680115, -0.14575250446796417, -0.12270388752222061, -0.08496831357479095, -0.3955245316028595, -0.1650729477405548, 0.1614527851343155, -0.0812600702047348, 0.29810798168182373, 0.0852813720703125, -0.3054753243923187, -0.22399547696113586, 0.40673190355300903, 0.16005027294158936, 0.18029552698135376, -0.163005530834198, 0.49085545539855957, -0.08874134719371796, 0.05177715793251991, 0.25217440724372864, 0.07217605412006378, -0.009043863043189049, 0.08602243661880493, -0.23374928534030914, -0.3747982978820801, 0.4682329595088959, -0.12081483751535416, -0.3869240880012512, -0.17464043200016022, 0.23201774060726166, 0.12342610955238342, -0.47118380665779114, -0.6277890801429749, 0.21299569308757782, -0.01946653425693512, -0.024297302588820457, -0.26047730445861816, 0.42985984683036804, -0.15170344710350037, 0.04686403274536133, 0.03911007195711136, 0.31645721197128296, -0.00759784784168005, -0.12141316384077072, 0.3703796863555908, 0.06051236391067505 ]
https://github.com/huggingface/datasets/issues/3099
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
@tjruwase, please note that versions of `datsets` and `huggingface_hub` must be compatible one with each other: - In `datasets` version `1.11.0`, the requirement on `huggingface_hub` was: `huggingface_hub<0.1.0` https://github.com/huggingface/datasets/blob/2cc00f372a96133e701275eec4d6b26d15257289/setup.py#L90 - Therefore, your installed `huggingface_hub` version `0.0.8` was compatible - In `datasets` version `1.12.0`, the requirement on `huggingface_hub` was: `huggingface_hub>=0.0.14,<0.1.0` https://github.com/huggingface/datasets/blob/6c766f9115d686182d76b1b937cb27e099c45d68/setup.py#L104 - Therefore, your installed `huggingface_hub` version `0.0.8` was no longer compatible - Currently, in `datasets` version `1.15.1`, the requirement on `huggingface_hub` is: `huggingface_hub>=0.1.0,<1.0.0` https://github.com/huggingface/datasets/blob/018100679d21cf27136f0eccb1c50e3a9c968ce2/setup.py#L102 @JTWang2000, thanks for your answer. I close this issue then.
## Describe the bug When using `pip install datasets` or use `conda install -c huggingface -c conda-forge datasets` cannot install datasets ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("sst", "default") ``` ## Actual results --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-fbe7981e6e21> in <module> 1 import torch 2 import transformers ----> 3 from datasets import load_dataset 4 5 dataset = load_dataset("sst", "default") ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module> 35 from .arrow_reader import ArrowReader, ReadInstruction 36 from .arrow_writer import ArrowWriter ---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder 38 from .combine import interleave_datasets 39 from .dataset_dict import DatasetDict, IterableDatasetDict ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module> 42 ) 43 from .arrow_writer import ArrowWriter, BeamWriter ---> 44 from .data_files import DataFilesDict, _sanitize_patterns 45 from .dataset_dict import DatasetDict, IterableDatasetDict 46 from .fingerprint import Hasher ~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module> 118 119 def _exec_patterns_in_dataset_repository( --> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo, 121 patterns: List[str], 122 allowed_extensions: Optional[list] = None, AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.13.3 - Platform: macOS-11.3.1-arm64-arm-64bit - Python version: 3.8.10 - PyArrow version: 5.0.0
83
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
[ -0.39160454273223877, -0.15211550891399384, -0.13808207213878632, 0.23526084423065186, 0.1553620547056198, 0.1055447980761528, 0.057578276842832565, 0.593558669090271, 0.26969006657600403, 0.2378150224685669, -0.1463099867105484, 0.1336035132408142, 0.09289821237325668, 0.3756861090660095, 0.03229367733001709, -0.11700761318206787, 0.04446304589509964, 0.11278808116912842, -0.22064711153507233, -0.12625189125537872, -0.035933442413806915, 0.24784478545188904, -0.013489258475601673, 0.11124961078166962, -0.2622172236442566, -0.21366071701049805, 0.14049023389816284, 0.28903302550315857, -0.21626631915569305, -0.2256653904914856, 0.23542273044586182, 0.06873798370361328, -0.018082894384860992, 0.19831568002700806, -0.0001033231383189559, 0.12033848464488983, 0.16916176676750183, 0.04270971938967705, -0.21480420231819153, 0.12013640254735947, -0.23188024759292603, 0.10478279739618301, -0.014285736717283726, -0.0314025804400444, -0.15870603919029236, -0.08111569285392761, -0.11095482856035233, -0.04194967821240425, 0.24063590168952942, 0.25917983055114746, 0.3073020875453949, 0.40740275382995605, 0.1330677717924118, -0.33816763758659363, 0.0049292040057480335, 0.2057764232158661, -0.1827889084815979, -0.020062025636434555, -0.00171397824306041, -0.2618049383163452, 0.0018288594437763095, 0.34723982214927673, -0.026418033987283707, 0.2612534761428833, 0.3973754346370697, -0.03725365176796913, -0.31631919741630554, -0.1981053650379181, 0.32680097222328186, 0.10558323562145233, 0.27875590324401855, -0.36697882413864136, -0.27163708209991455, -0.04490415006875992, -0.09676714986562729, -0.082265205681324, 0.08779986202716827, -0.017327986657619476, 0.009584547951817513, 0.12122990936040878, 0.1672275811433792, -0.22961406409740448, -0.016357548534870148, -0.025090422481298447, -0.026859212666749954, 0.09637746959924698, -0.11388389021158218, 0.041535716503858566, 0.04985387623310089, -0.12163367867469788, -0.03504597023129463, 0.026356881484389305, -0.2354021817445755, -0.0462004728615284, -0.18830260634422302, -0.01484599057585001, 0.27860531210899353, 0.2761763632297516, 0.3980928957462311, 0.08726068586111069, -0.2345971167087555, 0.16060346364974976, -0.21318380534648895, 0.14582231640815735, 0.13547147810459137, 0.03307022899389267, 0.03907966613769531, 0.09560627490282059, 0.375748872756958, 0.3536839187145233, 0.11194463819265366, 0.008308292366564274, 0.1076294481754303, -0.08142238110303879, -0.09810082614421844, -0.17635412514209747, 0.3912636339664459, -0.13406263291835785, -0.3515785038471222, 0.12952010333538055, 0.08234304189682007, -0.06721432507038116, 0.07556234300136566, 0.4758170545101166, -0.000012146949302405119, -0.014759981073439121, 0.015249560587108135, 0.21500252187252045, -0.230364128947258, -0.1201581135392189, -0.35068798065185547, 0.3433763086795807, 0.12272538989782333, 0.09643654525279999, 0.08133377134799957, -0.16378441452980042, 0.23584386706352234, -0.10761237144470215, 0.3179655075073242, 0.054059166461229324, 0.09680459648370743, -0.04305953159928322, -0.08412924408912659, 0.39598527550697327, 0.17821356654167175, 0.11498165130615234, 0.28753671050071716, -0.04641842097043991, -0.17098459601402283, -0.1868501603603363, -0.25816330313682556, -0.287198543548584, -0.22048236429691315, 0.2820087671279907, 0.05092984810471535, -0.13185299932956696, -0.15812434256076813, -0.03286977484822273, -0.07814133912324905, -0.022133126854896545, 0.06265762448310852, 0.07334117591381073, -0.020430898293852806, -0.005375375971198082, 0.20599251985549927, 0.3893537223339081, 0.052929386496543884, -0.05464353784918785, 0.3443620204925537, -0.22651280462741852, -0.23245784640312195, 0.25837525725364685, -0.07393073290586472, 0.24172089993953705, -0.12961822748184204, 0.2026204764842987, 0.242051362991333, -0.7032074332237244, -0.5026519894599915, -0.10461845993995667, 0.2141377031803131, -0.19808541238307953, -0.002777454908937216, -0.12720508873462677, -0.08351873606443405, 0.10569383949041367, 0.10424889624118805, 0.16242071986198425, 0.1232903003692627, 0.13128350675106049, -0.11729191988706589, -0.2767678201198578, -0.11622169613838196, 0.25428250432014465, 0.24703408777713776, 0.1023550033569336, 0.1004415974020958, -0.05081009864807129, 0.20974425971508026, -0.08405890315771103, 0.24326352775096893, 0.29042792320251465, 0.2596389055252075, 0.08175871521234512, 0.028229989111423492, -0.33608174324035645, -0.1427181512117386, 0.04890964552760124, 0.024296363815665245, 0.3186476528644562, -0.318509966135025, -0.27284902334213257, -0.32258179783821106, 0.09846457839012146, -0.2656037211418152, -0.20210038125514984, 0.2757145166397095, -0.00021408231987152249, -0.03659571334719658, 0.058299705386161804, -0.37613528966903687, 0.5112549662590027, -0.009505145251750946, 0.18242588639259338, -0.3905116021633148, 0.44111353158950806, -0.2614386975765228, -0.10315286368131638, 0.17042389512062073, 0.19648608565330505, 0.11089442670345306, -0.07881638407707214, -0.10149644315242767, 0.12248041480779648, -0.11166150867938995, 0.056428998708724976, 0.21325545012950897, 0.14963853359222412, 0.12400355935096741, -0.24452032148838043, 0.08747986704111099, -0.2977723181247711, 0.09098301827907562, 0.06786873191595078, 0.07397201657295227, -0.045038145035505295, 0.018347030505537987, 0.10002380609512329, 0.10113748162984848, -0.016192857176065445, 0.19604147970676422, 0.06557676196098328, 0.0956924706697464, -0.2991964817047119, 0.08988507837057114, -0.15101931989192963, 0.07373163849115372, -0.17714378237724304, -0.019752901047468185, 0.13513538241386414, 0.55845707654953, 0.10402293503284454, 0.25257858633995056, -0.04376530274748802, -0.030814995989203453, 0.03416844457387924, 0.32104602456092834, -0.04938511922955513, 0.20287200808525085, 0.10724591463804245, -0.1603681743144989, 0.32914164662361145, -0.022344820201396942, 0.10544803738594055, 0.007198716979473829, -0.038438186049461365, 0.08700128644704819, 0.05476103723049164, -0.05902629718184471, -0.030824610963463783, -0.5330869555473328, -0.3781009614467621, -0.11766856163740158, 0.2412334531545639, -0.33194050192832947, -0.035585545003414154, -0.3240318298339844, -0.1417253315448761, 0.1995282769203186, -0.3823082447052002, -0.34420013427734375, -0.3109014928340912, -0.031033199280500412, 0.2675541043281555, 0.01789912022650242, 0.21863359212875366, -0.09557938575744629, 0.14294938743114471, 0.139568030834198, 0.028280116617679596, -0.3179899752140045, -0.04825180768966675, 0.02631564624607563, 0.0947059616446495, 0.02466835081577301, 0.2688777446746826, 0.38125720620155334, -0.2967834174633026, 0.1758246272802353, -0.3504902422428131, -0.2470305860042572, 0.2500491142272949, -0.14289507269859314, 0.08104216307401657, 0.3316229581832886, 0.2882024645805359, 0.025248747318983078, -0.03835267573595047, 0.4173083007335663, -0.23590055108070374, -0.14987985789775848, -0.0830046609044075, -0.12414282560348511, -0.297264963388443, -0.029133636504411697, -0.05329671502113342, -0.1984693557024002, -0.47444015741348267, 0.054902542382478714, 0.10891104489564896, 0.05171743780374527, 0.46206575632095337, -0.012244600802659988, 0.17967315018177032, -0.06919117271900177, 0.09578938037157059, -0.3809860348701477, -0.2650175094604492, 0.05907543748617172, -0.3163229823112488, -0.2556483745574951, 0.07575763016939163, 0.028680985793471336, 0.2957622706890106, -0.19603627920150757, -0.38749995827674866, -0.6907895803451538, -0.051771800965070724, 0.3160461187362671, -0.218714639544487, 0.26277461647987366, 0.2621433436870575, 0.05272940546274185, -0.09779772162437439, -0.22100627422332764, -0.28911980986595154, 0.1142129972577095, 0.16044244170188904, -0.16368788480758667, -0.09309476613998413, 0.22702938318252563, -0.1408635675907135, 0.18211838603019714, 0.2940789461135864, 0.23893333971500397, 0.6686433553695679, -0.20304277539253235, 0.48854658007621765, -0.2984120547771454, -0.347598135471344, -0.08357192575931549, 0.2312951534986496, 0.0895947739481926, 0.059312570840120316, -0.009896419942378998, 0.30994468927383423, -0.0051599773578345776, -0.2713174819946289, -0.11705708503723145, -0.1949884444475174, -0.2481316775083542, 0.21150332689285278, -0.0637175515294075, 0.18878185749053955, 0.1035892441868782, -0.22493620216846466, 0.06373792886734009, 0.509543776512146, 0.35687944293022156, -0.28642579913139343, 0.0756073147058487, -0.2943659722805023, -0.27938205003738403, -0.5817884206771851, 0.21477235853672028, -0.08266913145780563, 0.1663247048854828, -0.30604618787765503, 0.057754237204790115, -0.038368936628103256, -0.11878318339586258, 0.5260900855064392, -0.22749774158000946, 0.0013434005668386817, 0.019711149856448174, -0.15615932643413544, -0.07473409920930862, 0.013439955189824104, 0.034582722932100296, 0.2120773047208786, -0.33352595567703247, 0.2382885068655014, -0.1281595230102539, -0.3382023870944977, 0.4237881600856781, -0.15690891444683075, 0.056003741919994354, 0.09962522983551025, -0.29323288798332214, -0.5668522715568542, -0.45563557744026184, -0.2376651167869568, 0.1261175125837326, 0.10825682431459427, 0.41079410910606384, -0.00021112502145115286, -0.05426206439733505, -0.05095970630645752, 0.05258306488394737, 0.1432609111070633, 0.14546018838882446, 0.23067858815193176, 0.0010072336299344897, 0.05269473046064377, 0.2379559576511383, 0.2899809777736664, 0.6680663228034973, -0.16434089839458466, -0.3440217971801758, 0.03984840586781502, 0.06005061790347099, 0.034691210836172104, 0.22177660465240479, -0.06433756649494171, 0.25775253772735596, 0.0058193448930978775, 0.32947155833244324, -0.24273525178432465, 0.031630635261535645, 0.2670682668685913, 0.128189817070961, -0.15173618495464325, -0.17356349527835846, 0.4961378574371338, -0.14485257863998413, 0.11691959947347641, 0.3491838276386261, 0.8243528008460999, -0.11365702748298645, 0.10056935995817184, -0.11672435700893402, 0.5823099613189697, 0.23804181814193726, 0.12811674177646637, 0.3509892225265503, -0.07036047428846359, 0.2940555810928345, -0.26568159461021423, 0.03411010652780533, -0.3832048773765564, -0.3680582642555237, -0.06402656435966492, -0.004078106954693794, 0.23115555942058563, -0.36305758357048035, -0.013375364243984222, 0.11843894422054291, 0.06001549959182739, 0.23247583210468292, -0.33481836318969727, 0.08000244200229645, -0.28929176926612854, -0.3699805438518524, -0.493208110332489, 0.32081538438796997, -0.09324413537979126, 0.37909969687461853, -0.2439214289188385, 0.0035032019950449467, -0.12662862241268158, -0.08895670622587204, -0.0647483766078949, -0.01364397443830967, -0.049472227692604065, 0.2925676703453064, 0.21782687306404114, 0.05802266299724579, -0.05851411819458008, -0.26009657979011536, 0.38780784606933594, -0.11946552991867065, -0.30499133467674255, 0.1338282972574234, -0.3263323903083801, -0.04632748290896416, -0.22593334317207336, 0.09964443743228912, 0.4914301037788391, -0.17609210312366486, -0.3633381426334381, -0.022819973528385162, -0.04086826369166374, -0.0911734402179718, 0.10351601243019104, -0.10115816444158554, -0.009216555394232273, -0.30795103311538696, -0.006965055596083403, 0.13721799850463867, 0.16950790584087372, -0.1543322652578354, 0.18333140015602112, 0.17753930389881134, -0.03521145135164261, -0.028138542547822, 0.43137216567993164, -0.19158703088760376, -0.13769593834877014, 0.2789464294910431, -0.17780780792236328, 0.01649080216884613, 0.36545443534851074, 0.08187410980463028, -0.15991686284542084, -0.3032497465610504, 0.02678748592734337, 0.44835925102233887, -0.2397863268852234, -0.015194827690720558, 0.053952112793922424, -0.3313845992088318, -0.024486973881721497, 0.3212287127971649, 0.014022999443113804, -0.15280194580554962, 0.02426639385521412, -0.3217566907405853, -0.35780030488967896, 0.35793405771255493, -0.16389347612857819, 0.11765755712985992, 0.03836630657315254, -0.040426675230264664, 0.047088973224163055, -0.06159789860248566, -0.4144233465194702, -0.08936818689107895, -0.2823743224143982, -0.11631590873003006, 0.03179604560136795, -0.14593970775604248, 0.27580589056015015, -0.1049535796046257, 0.20616336166858673, 0.06577149033546448, -0.5201628804206848, -0.3065197467803955, -0.2251283824443817, 0.08658946305513382, 0.0377347394824028, -0.03206906467676163, 0.10825510323047638, -0.15779514610767365, -0.3529733419418335, -0.1834273636341095, 0.38048255443573, 0.13173025846481323, -0.009635340422391891, 0.1459498256444931, 0.018926985561847687, -0.29205942153930664, -0.062221966683864594, 0.015750888735055923, 0.3618345856666565, 0.16613468527793884, -0.24936895072460175, -0.1526089757680893, -0.2893615961074829, 0.05846426635980606, 0.17709419131278992, 0.31285038590431213, 0.2024737000465393, -0.08682006597518921, 0.24929404258728027, -0.3110406994819641, 0.07871663570404053, 0.24642282724380493, 0.4171747863292694, 0.1301141381263733, -0.20641006529331207, 0.1258244514465332, 0.12753146886825562, 0.2737805247306824, -0.31657904386520386, -0.10175113379955292, 0.4006587266921997, -0.20143501460552216, 0.13569657504558563, 0.18687641620635986, 0.17594695091247559, 0.08043932914733887, 0.20907944440841675, 0.1746579110622406, 0.5866339802742004, -0.13232947885990143, -0.000909364374820143, -0.04136867821216583, -0.2876622974872589, 0.19701607525348663, 0.4617127776145935, 0.35681694746017456, 0.2876889407634735, 0.6656832695007324, -0.19646984338760376, 0.3735591769218445, -0.1488843560218811, 0.008812000043690205, 0.14074616134166718, -0.37669655680656433, 0.20677492022514343, -0.05451613664627075, 0.15727455914020538, -0.04731706529855728, -0.07500186562538147, 0.33881863951683044, -0.393768310546875, -0.2731878161430359, -0.2021578699350357, 0.14969240128993988, -0.25355762243270874, 0.13716842234134674, 0.13975271582603455, 0.027297213673591614, -0.10641741007566452, -0.12746906280517578, 0.10346487164497375, -0.13530482351779938, 0.22879493236541748, -0.14402739703655243, -0.0365169495344162, -0.2736489474773407, -0.006776927970349789, 0.13754379749298096, 0.054457686841487885, -0.08413108438253403, 0.1239565908908844, -0.049753617495298386, -0.19736333191394806, -0.09848719835281372, 0.42642778158187866, 0.4894966781139374, 0.022961290553212166, 0.058942582458257675, -0.0060233501717448235, -0.12646055221557617, -0.08103816956281662, 0.004304482601583004, -0.038803428411483765, 0.12143941968679428, 0.20349302887916565, 0.25206777453422546, 0.21399664878845215, -0.21029682457447052, -0.20680086314678192, -0.11043871939182281, 0.14967601001262665, -0.151966392993927, 0.12040899693965912, -0.2655849754810333, -0.05472763627767563, -0.12347456067800522, -0.14460094273090363, -0.39552798867225647, -0.0020488116424530745, 0.22645017504692078, -0.1545681357383728, 0.1588759571313858, -0.368813157081604, 0.12490253895521164, -0.12162822484970093, 0.4434172809123993, 0.27927640080451965, -0.04862724244594574, 0.1364201158285141, -0.052495893090963364, -0.4589959383010864, 0.15876953303813934, 0.014894469641149044, -0.2020353227853775, 0.08697894215583801, 0.01734071783721447, 0.12016580253839493, -0.07841581106185913, 0.3208487629890442, -0.058355625718832016, 0.22582249343395233, -0.27876797318458557, -0.21163906157016754, -0.08113857358694077, -0.29501622915267944, -0.07258401811122894, 0.05726424977183342, -0.21080775558948517, 0.1821863204240799, 0.028499210253357887, 0.0968649759888649, -0.21464699506759644, 0.034117281436920166, 0.04610435664653778, -0.6555631756782532, 0.3715861737728119, 0.017018646001815796, 0.32119521498680115, -0.14575250446796417, -0.12270388752222061, -0.08496831357479095, -0.3955245316028595, -0.1650729477405548, 0.1614527851343155, -0.0812600702047348, 0.29810798168182373, 0.0852813720703125, -0.3054753243923187, -0.22399547696113586, 0.40673190355300903, 0.16005027294158936, 0.18029552698135376, -0.163005530834198, 0.49085545539855957, -0.08874134719371796, 0.05177715793251991, 0.25217440724372864, 0.07217605412006378, -0.009043863043189049, 0.08602243661880493, -0.23374928534030914, -0.3747982978820801, 0.4682329595088959, -0.12081483751535416, -0.3869240880012512, -0.17464043200016022, 0.23201774060726166, 0.12342610955238342, -0.47118380665779114, -0.6277890801429749, 0.21299569308757782, -0.01946653425693512, -0.024297302588820457, -0.26047730445861816, 0.42985984683036804, -0.15170344710350037, 0.04686403274536133, 0.03911007195711136, 0.31645721197128296, -0.00759784784168005, -0.12141316384077072, 0.3703796863555908, 0.06051236391067505 ]
https://github.com/huggingface/datasets/issues/2301
Unable to setup dev env on Windows
Hi @gchhablani, There are some 3rd-party dependencies that require to build code in C. In this case, it is the library `python-Levenshtein`. On Windows, in order to be able to build C code, you need to install at least `Microsoft C++ Build Tools` version 14. You can find more info here: https://visualstudio.microsoft.com/visual-cpp-build-tools/
Hi I tried installing the `".[dev]"` version on Windows 10 after cloning. Here is the error I'm facing: ```bat (env) C:\testing\datasets>pip install -e ".[dev]" Obtaining file:///C:/testing/datasets Requirement already satisfied: numpy>=1.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.5) Collecting pyarrow>=0.17.1 Using cached pyarrow-4.0.0-cp37-cp37m-win_amd64.whl (13.3 MB) Requirement already satisfied: dill in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.3.1.1) Collecting pandas Using cached pandas-1.2.4-cp37-cp37m-win_amd64.whl (9.1 MB) Requirement already satisfied: requests>=2.19.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.25.1) Requirement already satisfied: tqdm<4.50.0,>=4.27 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.49.0) Requirement already satisfied: xxhash in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.0.2) Collecting multiprocess Using cached multiprocess-0.70.11.1-py37-none-any.whl (108 kB) Requirement already satisfied: fsspec in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2021.4.0) Collecting huggingface_hub<0.1.0 Using cached huggingface_hub-0.0.8-py3-none-any.whl (34 kB) Requirement already satisfied: importlib_metadata in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.0.1) Requirement already satisfied: absl-py in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.12.0) Requirement already satisfied: pytest in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (6.2.3) Collecting pytest-xdist Using cached pytest_xdist-2.2.1-py3-none-any.whl (37 kB) Collecting apache-beam>=2.24.0 Using cached apache_beam-2.29.0-cp37-cp37m-win_amd64.whl (3.7 MB) Collecting elasticsearch Using cached elasticsearch-7.12.1-py2.py3-none-any.whl (339 kB) Requirement already satisfied: boto3==1.16.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.16.43) Requirement already satisfied: botocore==1.19.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.43) Collecting moto[s3]==1.3.16 Using cached moto-1.3.16-py2.py3-none-any.whl (879 kB) Collecting rarfile>=4.0 Using cached rarfile-4.0-py3-none-any.whl (28 kB) Collecting tensorflow>=2.3 Using cached tensorflow-2.4.1-cp37-cp37m-win_amd64.whl (370.7 MB) Requirement already satisfied: torch in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.8.1) Requirement already satisfied: transformers in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.5.1) Collecting bs4 Using cached bs4-0.0.1-py3-none-any.whl Collecting conllu Using cached conllu-4.4-py2.py3-none-any.whl (15 kB) Collecting langdetect Using cached langdetect-1.0.8-py3-none-any.whl Collecting lxml Using cached lxml-4.6.3-cp37-cp37m-win_amd64.whl (3.5 MB) Collecting mwparserfromhell Using cached mwparserfromhell-0.6-cp37-cp37m-win_amd64.whl (101 kB) Collecting nltk Using cached nltk-3.6.2-py3-none-any.whl (1.5 MB) Collecting openpyxl Using cached openpyxl-3.0.7-py2.py3-none-any.whl (243 kB) Collecting py7zr Using cached py7zr-0.15.2-py3-none-any.whl (66 kB) Collecting tldextract Using cached tldextract-3.1.0-py2.py3-none-any.whl (87 kB) Collecting zstandard Using cached zstandard-0.15.2-cp37-cp37m-win_amd64.whl (582 kB) Collecting bert_score>=0.3.6 Using cached bert_score-0.3.9-py3-none-any.whl (59 kB) Collecting rouge_score Using cached rouge_score-0.0.4-py2.py3-none-any.whl (22 kB) Collecting sacrebleu Using cached sacrebleu-1.5.1-py3-none-any.whl (54 kB) Requirement already satisfied: scipy in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3) Collecting seqeval Using cached seqeval-1.2.2-py3-none-any.whl Collecting sklearn Using cached sklearn-0.0-py2.py3-none-any.whl Collecting jiwer Using cached jiwer-2.2.0-py3-none-any.whl (13 kB) Requirement already satisfied: toml>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.10.2) Requirement already satisfied: requests_file>=1.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.5.1) Requirement already satisfied: texttable>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3) Requirement already satisfied: s3fs>=0.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.4.2) Requirement already satisfied: Werkzeug>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.0.1) Collecting black Using cached black-21.4b2-py3-none-any.whl (130 kB) Collecting isort Using cached isort-5.8.0-py3-none-any.whl (103 kB) Collecting flake8==3.7.9 Using cached flake8-3.7.9-py2.py3-none-any.whl (69 kB) Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.10.0) Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.3.7) Requirement already satisfied: urllib3<1.27,>=1.25.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (1.26.4) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (2.8.1) Collecting entrypoints<0.4.0,>=0.3.0 Using cached entrypoints-0.3-py2.py3-none-any.whl (11 kB) Collecting pyflakes<2.2.0,>=2.1.0 Using cached pyflakes-2.1.1-py2.py3-none-any.whl (59 kB) Collecting pycodestyle<2.6.0,>=2.5.0 Using cached pycodestyle-2.5.0-py2.py3-none-any.whl (51 kB) Collecting mccabe<0.7.0,>=0.6.0 Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB) Requirement already satisfied: jsondiff>=1.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.3.0) Requirement already satisfied: pytz in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2021.1) Requirement already satisfied: mock in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.0.3) Requirement already satisfied: MarkupSafe<2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.1.1) Requirement already satisfied: python-jose[cryptography]<4.0.0,>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0) Requirement already satisfied: aws-xray-sdk!=0.96,>=0.93 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.8.0) Requirement already satisfied: cryptography>=2.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.7) Requirement already satisfied: more-itertools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (8.7.0) Requirement already satisfied: PyYAML>=5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.4.1) Requirement already satisfied: boto>=2.36.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.49.0) Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.10) Requirement already satisfied: sshpubkeys>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.3.1) Requirement already satisfied: responses>=0.9.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.13.3) Requirement already satisfied: xmltodict in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.12.0) Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (52.0.0.post20210125) Requirement already satisfied: Jinja2>=2.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.11.3) Requirement already satisfied: zipp in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.1) Requirement already satisfied: six>1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.15.0) Requirement already satisfied: ecdsa<0.15 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.14.1) Requirement already satisfied: docker>=2.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.0.0) Requirement already satisfied: cfn-lint>=0.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.49.0) Requirement already satisfied: grpcio<2,>=1.29.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (1.32.0) Collecting hdfs<3.0.0,>=2.1.0 Using cached hdfs-2.6.0-py3-none-any.whl (33 kB) Collecting pyarrow>=0.17.1 Using cached pyarrow-3.0.0-cp37-cp37m-win_amd64.whl (12.6 MB) Collecting fastavro<2,>=0.21.4 Using cached fastavro-1.4.0-cp37-cp37m-win_amd64.whl (394 kB) Requirement already satisfied: httplib2<0.18.0,>=0.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.17.4) Collecting pymongo<4.0.0,>=3.8.0 Using cached pymongo-3.11.3-cp37-cp37m-win_amd64.whl (382 kB) Collecting crcmod<2.0,>=1.7 Using cached crcmod-1.7-py3-none-any.whl Collecting avro-python3!=1.9.2,<1.10.0,>=1.8.1 Using cached avro_python3-1.9.2.1-py3-none-any.whl Requirement already satisfied: typing-extensions<3.8.0,>=3.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.7.4.3) Requirement already satisfied: future<1.0.0,>=0.18.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.18.2) Collecting oauth2client<5,>=2.0.1 Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB) Collecting pydot<2,>=1.2.0 Using cached pydot-1.4.2-py2.py3-none-any.whl (21 kB) Requirement already satisfied: protobuf<4,>=3.12.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.15.8) Requirement already satisfied: wrapt in c:\programdata\anaconda3\envs\env\lib\site-packages (from aws-xray-sdk!=0.96,>=0.93->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.12.1) Collecting matplotlib Using cached matplotlib-3.4.1-cp37-cp37m-win_amd64.whl (7.1 MB) Requirement already satisfied: junit-xml~=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.9) Requirement already satisfied: jsonpatch in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.32) Requirement already satisfied: jsonschema~=3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0) Requirement already satisfied: networkx~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.5.1) Requirement already satisfied: aws-sam-translator>=1.35.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.35.0) Requirement already satisfied: cffi>=1.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.14.5) Requirement already satisfied: pycparser in c:\programdata\anaconda3\envs\env\lib\site-packages (from cffi>=1.12->cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.20) Requirement already satisfied: pywin32==227 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (227) Requirement already satisfied: websocket-client>=0.32.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.58.0) Requirement already satisfied: docopt in c:\programdata\anaconda3\envs\env\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.6.2) Requirement already satisfied: filelock in c:\programdata\anaconda3\envs\env\lib\site-packages (from huggingface_hub<0.1.0->datasets==1.5.0.dev0) (3.0.12) Requirement already satisfied: pyrsistent>=0.14.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.17.3) Requirement already satisfied: attrs>=17.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (20.3.0) Requirement already satisfied: decorator<5,>=4.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from networkx~=2.4->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.4.2) Requirement already satisfied: rsa>=3.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (4.7.2) Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.2.8) Requirement already satisfied: pyasn1>=0.1.7 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.4.8) Requirement already satisfied: pyparsing>=2.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pydot<2,>=1.2.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (2.4.7) Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (2020.12.5) Requirement already satisfied: chardet<5,>=3.0.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (4.0.0) Collecting keras-preprocessing~=1.1.2 Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB) Requirement already satisfied: termcolor~=1.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (1.1.0) Requirement already satisfied: tensorboard~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.5.0) Requirement already satisfied: wheel~=0.35 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (0.36.2) Collecting opt-einsum~=3.3.0 Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB) Collecting gast==0.3.3 Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB) Collecting google-pasta~=0.2 Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB) Requirement already satisfied: tensorflow-estimator<2.5.0,>=2.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.4.0) Collecting astunparse~=1.6.3 Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB) Collecting flatbuffers~=1.12.0 Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB) Collecting h5py~=2.10.0 Using cached h5py-2.10.0-cp37-cp37m-win_amd64.whl (2.5 MB) Requirement already satisfied: markdown>=2.6.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.3.4) Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.8.0) Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.4.4) Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.6.0) Requirement already satisfied: google-auth<2,>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.30.0) Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (4.2.2) Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.3.0) Requirement already satisfied: oauthlib>=3.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.1.0) Requirement already satisfied: regex!=2019.12.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (2021.4.4) Requirement already satisfied: tokenizers<0.11,>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.10.2) Requirement already satisfied: sacremoses in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.0.45) Requirement already satisfied: packaging in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (20.9) Collecting pathspec<1,>=0.8.1 Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB) Requirement already satisfied: click>=7.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (7.1.2) Collecting appdirs Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) Collecting mypy-extensions>=0.4.3 Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB) Requirement already satisfied: typed-ast>=1.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (1.4.3) Collecting beautifulsoup4 Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB) Requirement already satisfied: soupsieve>1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from beautifulsoup4->bs4->datasets==1.5.0.dev0) (2.2.1) Collecting python-Levenshtein Using cached python-Levenshtein-0.12.2.tar.gz (50 kB) Requirement already satisfied: jsonpointer>=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonpatch->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.1) Requirement already satisfied: pillow>=6.2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (8.2.0) Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (0.10.0) Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (1.3.1) Collecting multiprocess Using cached multiprocess-0.70.11-py3-none-any.whl (98 kB) Using cached multiprocess-0.70.10.zip (2.4 MB) Using cached multiprocess-0.70.9-py3-none-any.whl Requirement already satisfied: joblib in c:\programdata\anaconda3\envs\env\lib\site-packages (from nltk->datasets==1.5.0.dev0) (1.0.1) Collecting et-xmlfile Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB) Requirement already satisfied: pyzstd<0.15.0,>=0.14.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from py7zr->datasets==1.5.0.dev0) (0.14.4) Collecting pyppmd<0.13.0,>=0.12.1 Using cached pyppmd-0.12.1-cp37-cp37m-win_amd64.whl (32 kB) Collecting pycryptodome>=3.6.6 Using cached pycryptodome-3.10.1-cp35-abi3-win_amd64.whl (1.6 MB) Collecting bcj-cffi<0.6.0,>=0.5.1 Using cached bcj_cffi-0.5.1-cp37-cp37m-win_amd64.whl (21 kB) Collecting multivolumefile<0.3.0,>=0.2.0 Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB) Requirement already satisfied: iniconfig in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.1.1) Requirement already satisfied: py>=1.8.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.10.0) Requirement already satisfied: pluggy<1.0.0a1,>=0.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.13.1) Requirement already satisfied: atomicwrites>=1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.4.0) Requirement already satisfied: colorama in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.4.4) Collecting pytest-forked Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB) Collecting execnet>=1.1 Using cached execnet-1.8.0-py2.py3-none-any.whl (39 kB) Requirement already satisfied: apipkg>=1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from execnet>=1.1->pytest-xdist->datasets==1.5.0.dev0) (1.5) Collecting portalocker==2.0.0 Using cached portalocker-2.0.0-py2.py3-none-any.whl (11 kB) Requirement already satisfied: scikit-learn>=0.21.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from seqeval->datasets==1.5.0.dev0) (0.24.2) Requirement already satisfied: threadpoolctl>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->datasets==1.5.0.dev0) (2.1.0) Building wheels for collected packages: python-Levenshtein Building wheel for python-Levenshtein (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\VKC~1\AppData\Local\Temp\pip-wheel-8jh7fm18' cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\ Complete output (27 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\Levenshtein copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein running egg_info writing python_Levenshtein.egg-info\PKG-INFO writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt writing entry points to python_Levenshtein.egg-info\entry_points.txt writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt writing requirements to python_Levenshtein.egg-info\requires.txt writing top-level names to python_Levenshtein.egg-info\top_level.txt reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*pyc' found anywhere in distribution warning: no previously-included files matching '*so' found anywhere in distribution warning: no previously-included files matching '.project' found anywhere in distribution warning: no previously-included files matching '.pydevproject' found anywhere in distribution writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt' copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein running build_ext building 'Levenshtein._levenshtein' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ---------------------------------------- ERROR: Failed building wheel for python-Levenshtein Running setup.py clean for python-Levenshtein Failed to build python-Levenshtein Installing collected packages: python-Levenshtein, pytest-forked, pyppmd, pymongo, pyflakes, pydot, pycryptodome, pycodestyle, pyarrow, portalocker, pathspec, pandas, opt-einsum, oauth2client, nltk, mypy-extensions, multivolumefile, multiprocess, moto, mccabe, matplotlib, keras-preprocessing, huggingface-hub, hdfs, h5py, google-pasta, gast, flatbuffers, fastavro, execnet, et-xmlfile, entrypoints, crcmod, beautifulsoup4, bcj-cffi, avro-python3, astunparse, appdirs, zstandard, tldextract, tensorflow, sklearn, seqeval, sacrebleu, rouge-score, rarfile, pytest-xdist, py7zr, openpyxl, mwparserfromhell, lxml, langdetect, jiwer, isort, flake8, elasticsearch, datasets, conllu, bs4, black, bert-score, apache-beam Running setup.py install for python-Levenshtein ... error ERROR: Command errored out with exit status 1: command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein' cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\ Complete output (27 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\Levenshtein copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein running egg_info writing python_Levenshtein.egg-info\PKG-INFO writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt writing entry points to python_Levenshtein.egg-info\entry_points.txt writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt writing requirements to python_Levenshtein.egg-info\requires.txt writing top-level names to python_Levenshtein.egg-info\top_level.txt reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*pyc' found anywhere in distribution warning: no previously-included files matching '*so' found anywhere in distribution warning: no previously-included files matching '.project' found anywhere in distribution warning: no previously-included files matching '.pydevproject' found anywhere in distribution writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt' copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein running build_ext building 'Levenshtein._levenshtein' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein' Check the logs for full command output. ``` Here are conda and python versions: ```bat (env) C:\testing\datasets>conda --version conda 4.9.2 (env) C:\testing\datasets>python --version Python 3.7.10 ``` Please help me out. Thanks.
52
Unable to setup dev env on Windows
[ -0.44555068016052246, -0.26005545258522034, -0.20374491810798645, -0.012947756797075272, 0.21719732880592346, 0.019027136266231537, 0.2464793473482132, -0.2734226882457733, 0.07837764173746109, 0.4198335111141205, 0.3149386942386627, -0.04857081547379494, 0.016585592180490494, 0.24565961956977844, -0.05249505490064621, 0.3038270175457001, 0.0038106541614979506, 0.2412857562303543, -0.28215864300727844, -0.1430383324623108, 0.04614667966961861, -0.19564437866210938, -0.18938393890857697, 0.09816812723875046, 0.06762394309043884, -0.12974223494529724, -0.0038418464828282595, 0.28219127655029297, -0.2116965800523758, 0.10994098335504532, 0.30047258734703064, -0.1342935860157013, 0.21832318603992462, -0.021970845758914948, -0.000103253529232461, 0.36252152919769287, 0.2433302402496338, -0.13251619040966034, -0.13110581040382385, 0.32793664932250977, -0.1428665667772293, -0.10511195659637451, -0.1010112315416336, -0.12139949947595596, -0.1178072839975357, -0.3817519247531891, 0.19389605522155762, -0.2992558181285858, 0.05619146674871445, 0.1232069656252861, 0.3281157910823822, 0.09973432123661041, 0.2308480590581894, -0.12137608230113983, -0.1402762085199356, 0.1997194141149521, -0.09394046664237976, -0.09152275323867798, -0.08805010467767715, -0.19029413163661957, 0.13534657657146454, -0.16191747784614563, 0.37038010358810425, 0.04758303612470627, 0.18432776629924774, 0.10783089697360992, 0.7627079486846924, -0.17203520238399506, 0.2328578680753708, -0.413344144821167, 0.15285809338092804, 0.043336257338523865, 0.2449628859758377, 0.44311290979385376, 0.24226516485214233, -0.2650105953216553, 0.3992910385131836, 0.1733325868844986, -0.30897650122642517, 0.030387897044420242, -0.2190464586019516, -0.27971306443214417, -0.4005058705806732, 0.013726837933063507, 0.04688239470124245, 0.21520893275737762, 0.12768854200839996, 0.0730549618601799, -0.19748032093048096, 0.27658432722091675, 0.241182342171669, 0.09836604446172714, -0.2203633189201355, -0.1498551219701767, 0.1773279458284378, 0.1706354320049286, -0.012932606972754002, 0.137702077627182, -0.20075738430023193, -0.06429998576641083, -0.6094822883605957, -0.00142524647526443, 0.3593429625034332, -0.053877778351306915, -0.3193749487400055, 0.09629473090171814, 0.2791210114955902, -0.08900939673185349, 0.10776210576295853, -0.10666831582784653, 0.16687323153018951, 0.1552165001630783, -0.4691687524318695, -0.4813612103462219, -0.33807066082954407, 0.2971418499946594, 0.025071213021874428, -0.10884131491184235, -0.17246094346046448, 0.08687316626310349, -0.1450200080871582, 0.2681055963039398, 0.3337254822254181, 0.2857584059238434, 0.06640331447124481, -0.3951657712459564, 0.03499741852283478, 0.1825944185256958, -0.2331930696964264, 0.24491572380065918, -0.0809360072016716, -0.10029850900173187, -0.5080475807189941, -0.39387047290802, 0.1589006930589676, 0.1346255987882614, 0.2867395579814911, 0.26446661353111267, -0.056962285190820694, 0.019703401252627373, -0.08453629165887833, 0.3543708026409149, 0.1694224774837494, 0.09679049998521805, 0.10490097105503082, 0.14574016630649567, -0.025539882481098175, -0.2671605944633484, 0.19101978838443756, 0.024760698899626732, 0.10187149792909622, -0.34109631180763245, -0.23658254742622375, 0.2830621898174286, 0.15641359984874725, -0.02759527415037155, 0.517876148223877, -0.07156797498464584, 0.008684719912707806, 0.0948386937379837, -0.08224420994520187, -0.15058721601963043, 0.01206336822360754, 0.01617165468633175, 0.3699720501899719, -0.008065195754170418, 0.05500739812850952, 0.09858869761228561, 0.09171797335147858, -0.29007548093795776, 0.18776696920394897, -0.020613551139831543, 0.010559539310634136, 0.10081401467323303, -0.34679925441741943, -0.2741609513759613, -0.012990589253604412, -0.3242715299129486, -0.1582922488451004, 0.1789672076702118, -0.13892905414104462, -0.6909991502761841, 0.24894770979881287, -0.2217189073562622, 0.19391323626041412, -0.06641179323196411, -0.03640967607498169, 0.31055477261543274, 0.04068689048290253, -0.05097374692559242, -0.10206311196088791, -0.04582936316728592, -0.018598491325974464, -0.015965374186635017, -0.0002962665748782456, -0.06168972700834274, 0.018792493268847466, -0.043827123939991, 0.01290909107774496, -0.06899798661470413, 0.15594695508480072, 0.21553069353103638, 0.21770396828651428, -0.2169540822505951, -0.13927195966243744, 0.38646599650382996, -0.12272433191537857, -0.07385928928852081, -0.2617452144622803, 0.09400462359189987, 0.038945261389017105, 0.18616953492164612, 0.08965111523866653, 0.20824696123600006, -0.3660598695278168, -0.2570282816886902, 0.27321669459342957, 0.3308202624320984, 0.0486050546169281, -0.03210193291306496, 0.2312297523021698, -0.3029477596282959, -0.18737700581550598, 0.09485363215208054, 0.3275538384914398, -0.003118133172392845, -0.5336567163467407, 0.034321222454309464, -0.0695396214723587, 0.06820505857467651, 0.061113275587558746, -0.04602449759840965, -0.02119181863963604, -0.007450117729604244, -0.3010212779045105, -0.08860421180725098, 0.20214423537254333, -0.16267427802085876, 0.06890648603439331, -0.4830644428730011, 0.1417761892080307, 0.02136683277785778, 0.048482745885849, 0.06508765369653702, -0.005064992234110832, -0.0488303080201149, -0.3165218234062195, 0.14003023505210876, -0.2094564437866211, 0.17798122763633728, 0.04858112335205078, 0.008291986770927906, 0.10186099261045456, -0.3314644992351532, 0.35277989506721497, 0.2680417597293854, -0.11496870219707489, -0.33656740188598633, 0.1510753631591797, -0.027675608173012733, -0.15766911208629608, 0.14974230527877808, -0.018990328535437584, -0.1275300681591034, 0.10934420675039291, 0.027505358681082726, 0.20213374495506287, -0.06535280495882034, 0.3066202998161316, 0.17844398319721222, 0.04528598487377167, 0.17423254251480103, -0.4350411891937256, -0.10556365549564362, 0.4541981518268585, -0.18319931626319885, -0.1716993749141693, 0.28274738788604736, -0.21223372220993042, -0.32437217235565186, -0.17930354177951813, -0.0727432370185852, 0.2646678686141968, 0.2099037915468216, -0.2219102829694748, -0.03454410657286644, -0.40620359778404236, -0.034528959542512894, -0.23076188564300537, -0.24424463510513306, -0.10432427376508713, 0.143271341919899, 0.1997242420911789, -0.2526639997959137, 0.13872577250003815, 0.3907550573348999, 0.29713472723960876, -0.16886307299137115, -0.0591992512345314, 0.07836617529392242, 0.11088060587644577, -0.014362802729010582, -0.2690938413143158, 0.18033050000667572, 0.21710237860679626, 0.12482181191444397, 0.4682250916957855, -0.014835751615464687, 0.043124958872795105, -0.23627372086048126, -0.025423478335142136, 0.03721735253930092, 0.16874149441719055, 0.37340614199638367, 0.08992953598499298, 0.15530794858932495, 0.05864638835191727, -0.31440338492393494, 0.27496829628944397, -0.01602763868868351, -0.17866478860378265, -0.06319595873355865, -0.03773164749145508, -0.5085380673408508, -0.2675093412399292, -0.3696339726448059, 0.11349271982908249, -0.13004423677921295, -0.28827136754989624, -0.016722731292247772, -0.10788989067077637, 0.248186394572258, -0.07517779618501663, -0.06994906812906265, 0.3003157079219818, 0.04622583091259003, -0.09895848482847214, 0.3174505829811096, 0.07490532100200653, -0.39796367287635803, -0.33136114478111267, 0.2669397294521332, -0.07544861733913422, 0.07454206794500351, 0.2041541337966919, -0.15121646225452423, 0.031074630096554756, 0.0673203244805336, -0.044768717139959335, -0.14917266368865967, 0.19880612194538116, 0.35236185789108276, 0.17618153989315033, -0.06730010360479355, 0.02909206412732601, -0.4257742464542389, 0.3335137367248535, 0.00722993491217494, 0.2871807813644409, 0.1023620143532753, 0.48264968395233154, -0.25510913133621216, 0.38929063081741333, 0.17477558553218842, -0.006792103871703148, 0.09331412613391876, -0.24956455826759338, 0.32351556420326233, 0.07299371808767319, -0.16285905241966248, 0.5337547063827515, 0.4479958713054657, -0.2684737741947174, 0.24008196592330933, -0.06362005323171616, -0.06000693887472153, -0.004066547844558954, 0.28080591559410095, 0.11559543013572693, -0.10193873196840286, -0.18843841552734375, -0.10640231519937515, 0.17551474273204803, -0.14471738040447235, 0.4189783036708832, 0.14978256821632385, 0.03634586185216904, 0.052051059901714325, 0.5380359292030334, -0.2907116711139679, 0.10547369718551636, -0.39722052216529846, -0.3480733036994934, -0.024197591468691826, 0.037721432745456696, -0.18260328471660614, 0.4749952256679535, -0.5538661479949951, 0.1389663815498352, 0.3379635512828827, -0.1494111716747284, 0.2644437849521637, -0.2738770544528961, 0.08458438515663147, -0.12008827179670334, 0.042853668332099915, -0.00705863768234849, -0.29199928045272827, 0.14608459174633026, 0.25252091884613037, -0.3215189576148987, -0.36708828806877136, -0.11212185770273209, 0.27088481187820435, 0.3137485980987549, -0.16810083389282227, -0.1262189894914627, 0.022355742752552032, -0.18480899930000305, -0.41306862235069275, -0.08175312727689743, 0.17459605634212494, -0.2120130956172943, 0.014634726569056511, 0.23034901916980743, 0.26576530933380127, -0.1438606083393097, 0.12506860494613647, -0.1194278672337532, -0.0026538725942373276, -0.0484837144613266, -0.0646013468503952, 0.0067502702586352825, 0.012542004697024822, 0.4969225823879242, -0.08247999846935272, -0.10465800017118454, -0.02609434723854065, 0.16797620058059692, 0.30111363530158997, -0.2695169150829315, 0.31519433856010437, 0.27327263355255127, 0.0619480162858963, -0.32487615942955017, 0.005434045102447271, -0.16861478984355927, -0.17606475949287415, 0.027705291286110878, 0.3101004958152771, -0.0969381034374237, -0.28254687786102295, -0.01059081219136715, -0.19316443800926208, -0.3150724768638611, 0.08522626757621765, 0.22522833943367004, 0.25457677245140076, -0.24535875022411346, -0.14362473785877228, 0.16622179746627808, 0.7361688017845154, 0.028253911063075066, -0.11784858256578445, 0.10737279802560806, -0.5541512370109558, -0.08858095109462738, -0.22434549033641815, 0.17383156716823578, -0.2019454687833786, 0.12707364559173584, 0.1369379758834839, -0.13748490810394287, 0.1315293163061142, -0.04354152828454971, -0.2589704990386963, 0.12586061656475067, 0.38863298296928406, 0.06495359539985657, 0.01469652634114027, -0.14204737544059753, 0.15586476027965546, -0.13953953981399536, 0.025651095435023308, 0.19669868052005768, 0.22601823508739471, 0.3276078402996063, -0.2653673589229584, 0.054021432995796204, 0.06879331171512604, -0.09299198538064957, -0.5185651779174805, -0.02770206332206726, -0.030025387182831764, 0.05111418291926384, -0.21766647696495056, -0.4441962242126465, 0.09191876649856567, 0.22166481614112854, 0.33148908615112305, 0.3093552589416504, -0.08432945609092712, 0.0946129560470581, -0.13348837196826935, -0.2153012454509735, -0.07521509379148483, -0.1964767873287201, -0.10104867070913315, -0.22562222182750702, -0.2643386423587799, -0.021701982244849205, -0.11510539054870605, 0.19805371761322021, -0.3230251967906952, 0.12338436394929886, 0.1381765455007553, 0.12101103365421295, 0.21348372101783752, -0.078776516020298, 0.13940130174160004, -0.05791991576552391, 0.24896211922168732, -0.24441315233707428, -0.009206313639879227, 0.06548402458429337, -0.021137205883860588, -0.23911386728286743, -0.0931563451886177, 0.05996575206518173, -0.2660512626171112, 0.04491540789604187, 0.307966947555542, -0.024627096951007843, -0.08147602528333664, -0.33850565552711487, 0.0412612184882164, -0.21978838741779327, -0.14469145238399506, -0.45214006304740906, 0.3569362759590149, -0.2840777039527893, 0.1943601667881012, -0.30566704273223877, -0.04234810173511505, 0.04547533765435219, -0.04019729420542717, 0.046035557985305786, -0.10947642475366592, -0.13500164449214935, -0.3687823712825775, 0.22083742916584015, 0.04379628598690033, 0.026718338951468468, 0.25807884335517883, -0.18159110844135284, -0.358793169260025, -0.01436150074005127, 0.07420612871646881, 0.1156567856669426, -0.057743873447179794, -0.29355141520500183, 0.015347840264439583, 0.06109736114740372, 0.3606290817260742, -0.4165041744709015, -0.13566575944423676, -0.2508239448070526, 0.014660977758467197, 0.045597728341817856, -0.023334821686148643, -0.15475209057331085, 0.1884118765592575, -0.2905207574367523, -0.37043794989585876, 0.17092888057231903, 0.01405995711684227, 0.026358220726251602, -0.10136044770479202, 0.1471204161643982, -0.09105835855007172, 0.21457207202911377, -0.18209491670131683, 0.10187094658613205, -0.012868018820881844, 0.6055813431739807, -0.19092194736003876, 0.07139723002910614, -0.09839633107185364, -0.180019348859787, -0.3355998992919922, 0.1845654547214508, 0.0959465429186821, 0.05650779604911804, -0.0872497484087944, 0.03155716136097908, 0.2118099480867386, -0.1817752718925476, 0.15161144733428955, 0.17801599204540253, 0.0031105836387723684, 0.13831306993961334, 0.31823262572288513, 0.3265724778175354, 0.06310250610113144, 0.23834896087646484, 0.10921360552310944, -0.19905586540699005, -0.019221140071749687, -0.03521768003702164, 0.0222932081669569, -0.38753461837768555, 0.08326193690299988, -0.010112425312399864, -0.006508307997137308, -0.20595084130764008, -0.23862838745117188, 0.2556903660297394, -0.12050624936819077, -0.008674741722643375, -0.13624519109725952, -0.07378146052360535, 0.22415798902511597, 0.5576715469360352, 0.11157725751399994, -0.11864692717790604, 0.5334003567695618, 0.34025272727012634, -0.011843162588775158, -0.06854802370071411, -0.12182512134313583, -0.2074090540409088, 0.2588556110858917, -0.027008341625332832, 0.11007129400968552, 0.21386437118053436, -0.3875473737716675, 0.07528813183307648, -0.7018475532531738, 0.19696199893951416, -0.32647278904914856, -0.16757814586162567, -0.08994253724813461, 0.014248015359044075, -0.019459273666143417, 0.1206086128950119, 0.0661827102303505, -0.0009985113283619285, -0.3572406470775604, 0.14071331918239594, -0.17722763121128082, 0.041164617985486984, 0.5940449237823486, 0.24998217821121216, -0.14251375198364258, -0.002203850308433175, 0.40911662578582764, 0.003214773256331682, 0.01198248378932476, 0.05002037435770035, 0.15643322467803955, 0.4431990683078766, 0.16238579154014587, -0.26790082454681396, -0.1238434836268425, 0.2723657786846161, 0.036704376339912415, -0.3551408052444458, 0.37944674491882324, 0.1103299930691719, 0.2625221014022827, 0.03059365600347519, 0.2932354807853699, -0.16774219274520874, -0.1728009283542633, 0.09517982602119446, -0.32211458683013916, 0.48342660069465637, -0.25650545954704285, 0.21482141315937042, 0.22787408530712128, -0.03658971190452576, -0.10559972375631332, -0.2546803951263428, -0.3517025411128998, 0.14711511135101318, 0.06643667072057724, 0.10282012820243835, -0.1271163672208786, 0.12193480134010315, -0.29219239950180054, 0.4150456190109253, 0.2924853563308716, -0.01988621987402439, -0.12807336449623108, -0.13051483035087585, -0.19608677923679352, 0.05351051315665245, 0.2164180427789688, -0.42301127314567566, -0.262350469827652, -0.01871209219098091, 0.17092719674110413, -0.07000630348920822, 0.01785009726881981, -0.019232815131545067, 0.4143499433994293, 0.5814101099967957, -0.062011606991291046, 0.26760730147361755, 0.3827631175518036, -0.08515290170907974, -0.021451761946082115, -0.3109572231769562, 0.23023073375225067, 0.22134767472743988, 0.19738398492336273, 0.014709682203829288, 0.31155744194984436, 0.02436554804444313, -0.11812000721693039, 0.3395339846611023, 0.07491852343082428, 0.5797245502471924, -0.0019841070752590895, -0.0815989077091217, -0.28519123792648315, 0.029253385961055756, 0.016173429787158966, 0.2732347548007965, 0.18999558687210083, -0.34886354207992554, -0.11538415402173996, -0.08639571815729141, -0.20361898839473724, 0.06814469397068024, 0.22002719342708588, 0.6653318405151367, -0.16440851986408234, 0.28317224979400635, -0.07374655455350876, 0.03118596412241459, 0.17815567553043365, -0.06270865350961685, 0.21781757473945618, -0.10997120290994644, -0.22781255841255188, -0.07580149918794632, -0.36389538645744324, 0.4387475550174713, 0.05126003548502922, -0.020044762641191483, 0.1189512312412262, -0.07612178474664688, 0.4753779172897339, -0.1048952266573906, 0.08031878620386124, 0.06208782643079758, -0.2748781442642212, -0.22101281583309174, 0.08863577991724014, 0.10912828892469406, -0.022828415036201477, -0.11763346195220947, 0.19698458909988403, -0.1957661658525467, -0.11237091571092606, -0.008894046768546104, -0.04344528540968895 ]
https://github.com/huggingface/datasets/issues/2300
Add VoxPopuli
I'm happy to take this on:) One question: The original unlabelled data is stored unsegmented (see e.g. https://github.com/facebookresearch/voxpopuli/blob/main/voxpopuli/get_unlabelled_data.py#L30), but segmenting the audio in the dataset would require a dependency on something like soundfile or torchaudio. An alternative could be to provide the segments start and end times as a Sequence and then it's up to the user to perform the segmentation on-the-fly if they wish?
## Adding a Dataset - **Name:** Voxpopuli - **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings - **Paper:** https://arxiv.org/abs/2101.00390 - **Data:** https://github.com/facebookresearch/voxpopuli - **Motivation:** biggest unlabeled speech dataset **Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
65
Add VoxPopuli
[ -0.1819518655538559, -0.2375958412885666, -0.31158193945884705, -0.06509724259376526, 0.04954107850790024, -0.011109384708106518, 0.23000623285770416, 0.09599479287862778, 0.22096389532089233, 0.490418940782547, -0.08353601396083832, 0.05477495491504669, 0.18447864055633545, 0.2177649885416031, 0.3566127419471741, -0.45406579971313477, 0.19335989654064178, 0.46647700667381287, 0.23325349390506744, -0.20821353793144226, -0.3283851146697998, -0.25428280234336853, -0.03955475613474846, -0.3285154700279236, -0.11105086654424667, -0.005413620732724667, -0.24512450397014618, 0.07394542545080185, -0.15143169462680817, -0.20154498517513275, -0.29733145236968994, 0.04880351200699806, -0.08009470254182816, 0.2917507588863373, -0.00010184002894675359, -0.14021138846874237, -0.028005849570035934, -0.01629360020160675, 0.005694354884326458, 0.3110494017601013, 0.025665687397122383, -0.039122894406318665, -0.5187557339668274, -0.11212705820798874, -0.16202925145626068, -0.056039802730083466, -0.17957238852977753, -0.5021844506263733, -0.30034199357032776, -0.12356782704591751, 0.27958980202674866, 0.24718111753463745, 0.05577402561903, -0.2720041573047638, 0.6075727939605713, 0.03049328923225403, -0.07748916000127792, -0.08157676458358765, 0.347646564245224, -0.04439420998096466, 0.4826411306858063, 0.05945490300655365, -0.13494446873664856, -0.18115921318531036, -0.17526236176490784, 0.006503924261778593, 0.03624691069126129, -0.19724005460739136, -0.23549886047840118, 0.32350319623947144, 0.4501718580722809, -0.10492992401123047, -0.12187027186155319, 0.2705380320549011, 0.153024822473526, 0.03579520061612129, -0.12132658809423447, 0.022941822186112404, 0.13605116307735443, -0.14943817257881165, 0.5161411762237549, -0.4350757300853729, -0.16349542140960693, 0.25554341077804565, 0.2764434516429901, 0.24209004640579224, 0.10775889456272125, 0.03472909703850746, 0.3050275444984436, -0.11340559273958206, -0.3196468949317932, -0.008545278571546078, 0.05724421143531799, 0.3088919222354889, 0.22775813937187195, -0.2471197247505188, -0.042615920305252075, -0.547523021697998, 0.07221603393554688, -0.26364320516586304, 0.49816203117370605, -0.1581231653690338, -0.051691021770238876, 0.17614227533340454, 0.23744544386863708, -0.2000780701637268, -0.1238548755645752, 0.349830687046051, 0.0297252107411623, -0.0881008431315422, 0.20204806327819824, 0.03332362323999405, -0.2391316443681717, -0.12681837379932404, -0.2634328305721283, 0.20155970752239227, -0.04099958389997482, -0.031941141933202744, -0.01184187363833189, 0.07210656255483627, -0.5250628590583801, -0.18653719127178192, -0.058170825242996216, -0.006058569066226482, 0.10748712718486786, 0.2937500476837158, -0.39696693420410156, 0.143206387758255, -0.0063044666312634945, -0.09950017929077148, -0.35529738664627075, 0.396553635597229, -0.1980774849653244, 0.30603671073913574, 0.25667861104011536, -0.2641909420490265, -0.016161072999238968, 0.22038458287715912, 0.13154451549053192, -0.09994055330753326, -0.04389793798327446, -0.31457215547561646, 0.05889247730374336, -0.07038009911775589, 0.004244642797857523, -0.15323686599731445, -0.0775148794054985, 0.20841984450817108, -0.06569172441959381, 0.11849861592054367, 0.19717375934123993, -0.11129473894834518, -0.4668174982070923, 0.3373303711414337, 0.05076216906309128, -0.18323203921318054, 0.020516840741038322, 0.2176326960325241, 0.3408341407775879, -0.3305533528327942, 0.0798606351017952, 0.21529550850391388, 0.18560756742954254, -0.09952913969755173, 0.10288264602422714, 0.28438958525657654, -0.5826234817504883, 0.01196169015020132, 0.022415662184357643, -0.1736823171377182, 0.32306450605392456, 0.04994422569870949, 0.023684384301304817, 0.14091892540454865, 0.027802275493741035, 0.31905367970466614, -0.09772355109453201, -0.20432671904563904, -0.319791704416275, -0.24182455241680145, 0.00029202213045209646, -0.20970508456230164, 0.2524379789829254, 0.2697855234146118, 0.42015504837036133, -0.027578776702284813, 0.3139675259590149, 0.15968158841133118, -0.07124948501586914, 0.05517449975013733, -0.14248599112033844, -0.09503147751092911, 0.07691443711519241, 0.2842109501361847, -0.045197248458862305, 0.25660285353660583, 0.050175562500953674, 0.11738625168800354, 0.0843985304236412, -0.10792172700166702, -0.05134887620806694, 0.02528800442814827, 0.6600819826126099, -0.06031171977519989, -0.030952639877796173, -0.30255353450775146, -0.09662225097417831, -0.2210099697113037, -0.24413833022117615, 0.26926130056381226, 0.608955442905426, -0.1662200391292572, -0.294882595539093, -0.36504170298576355, 0.24523423612117767, 0.16936048865318298, 0.27235913276672363, 0.07891634106636047, 0.019412275403738022, -0.3143306374549866, -0.33438923954963684, -0.4762074649333954, 0.19227392971515656, -0.07420484721660614, 0.07905241847038269, 0.462352454662323, -0.19360142946243286, -0.18362899124622345, -0.05066034570336342, 0.20135962963104248, 0.013338975608348846, -0.028353895992040634, 0.1929129809141159, 0.08637635409832001, -0.037945836782455444, 0.28970664739608765, 0.24115149676799774, -0.05664902180433273, 0.18747961521148682, -0.19063988327980042, 0.17107601463794708, 0.3237041234970093, 0.16018833220005035, -0.009924521669745445, 0.251984179019928, -0.07492150366306305, 0.2103000283241272, 0.022258734330534935, -0.20351038873195648, -0.24361126124858856, -0.18391968309879303, 0.23851867020130157, 0.14022889733314514, -0.44393447041511536, 0.012823076918721199, 0.23686644434928894, 0.244776651263237, -0.005140017718076706, -0.02606203407049179, 0.2236342877149582, 0.07194151729345322, -0.14078019559383392, 0.1263183355331421, -0.24736565351486206, -0.03547826036810875, 0.08572754263877869, -0.0016908779507502913, -0.3997882902622223, 0.19550547003746033, 0.2551010549068451, 0.040085047483444214, 0.09089484065771103, 0.13613516092300415, -0.24467888474464417, -0.0059784953482449055, 0.0616421215236187, -0.013619632460176945, 0.17295417189598083, -0.11025585234165192, 0.01823160983622074, -0.20649927854537964, -0.18733736872673035, 0.07004751265048981, 0.2390197515487671, -0.0017418788047507405, -0.35909536480903625, 0.2070685476064682, -0.36656653881073, 0.2690661549568176, -0.5198673009872437, -0.01729394868016243, 0.05733100324869156, 0.10625538975000381, 0.1303260773420334, -0.19586500525474548, 0.21295379102230072, 0.16542090475559235, 0.6476357579231262, 0.03177623450756073, -0.02268345281481743, -0.23662638664245605, -0.03379043936729431, 0.16678932309150696, 0.31807419657707214, -0.28947898745536804, -0.18833762407302856, 0.12050040066242218, -0.0033439781982451677, 0.23280856013298035, -0.10563948005437851, -0.0936380997300148, 0.11755608022212982, 0.08265421539545059, -0.15994682908058167, 0.07782339304685593, 0.3085646629333496, 0.10871076583862305, -0.23090435564517975, 0.04219375178217888, -0.009158340282738209, -0.03877606615424156, -0.2509157061576843, -0.028331521898508072, -0.12972263991832733, -0.14261206984519958, -0.44658026099205017, -0.19180431962013245, -0.336181640625, -0.015694526955485344, 0.21041107177734375, 0.19913625717163086, 0.024518167600035667, 0.20828154683113098, 0.13053476810455322, 0.12847323715686798, -0.05859672650694847, -0.23906204104423523, -0.21529267728328705, 0.20591282844543457, -0.19938604533672333, 0.051625628024339676, -0.22372223436832428, -0.22971422970294952, -0.22589357197284698, 0.06777793169021606, -0.03971865773200989, 0.12198744714260101, -0.065851129591465, -0.5302587747573853, -0.05803193524479866, 0.1466401368379593, 0.27473753690719604, -0.05199206992983818, -0.2863732576370239, -0.08171772956848145, -0.07404585927724838, 0.04929810017347336, 0.7433543801307678, 0.12082023173570633, -0.2542947828769684, -0.20602616667747498, -0.08162815123796463, 0.6478475332260132, 0.3131953775882721, -0.015193409286439419, 0.5475507974624634, -0.06231604143977165, 0.19493632018566132, 0.16974659264087677, -0.308030366897583, 0.4233710467815399, 0.24207979440689087, 0.1541864573955536, 0.10953380912542343, -0.022564711049199104, -0.2028113156557083, -0.0012013374362140894, -0.060911864042282104, -0.05066487938165665, 0.046240296214818954, -0.02994738332927227, 0.14845120906829834, 0.26645004749298096, 0.048477932810783386, -0.25357407331466675, -0.2575724124908447, -0.013796843588352203, 0.06432455033063889, -0.2574397921562195, 0.3350553512573242, -0.06092219054698944, 0.11263590306043625, -0.02710050716996193, -0.2534969747066498, 0.2781725823879242, 0.22902783751487732, -0.12705865502357483, -0.2103787511587143, -0.22113226354122162, -0.09873246401548386, 0.126984104514122, 0.5344958305358887, -0.11356541514396667, -0.18074741959571838, 0.09532127529382706, 0.459698885679245, 0.06827625632286072, -0.010524584911763668, -0.4272250235080719, -0.06071379408240318, -0.034624554216861725, 0.6299230456352234, -0.2369965761899948, 0.5418711304664612, 0.5530751943588257, 0.23442354798316956, 0.023862620815634727, -0.09381414949893951, -0.3513614237308502, -0.09434715658426285, -0.19750113785266876, 0.48843473196029663, -0.13288064301013947, 0.3253692090511322, 0.08785149455070496, -0.3213065266609192, 0.32451605796813965, -0.11869344115257263, 0.2594914138317108, 0.13926640152931213, 0.1154494509100914, 0.33077138662338257, 0.036946531385183334, 0.007993957959115505, -0.5504487752914429, 0.39130231738090515, 0.16060668230056763, 0.04024466127157211, 0.09575510025024414, 0.10902372002601624, -0.20028899610042572, 0.535122811794281, 0.18656736612319946, 0.3514052927494049, 0.2061031311750412, -0.08200126886367798, -0.04563741385936737, 0.11227782070636749, 0.11512887477874756, 0.12326610088348389, -0.1504206359386444, -0.07679354399442673, -0.429184228181839, 0.10149729996919632, 0.26761043071746826, -0.00695659639313817, 0.1482001692056656, 0.14480432868003845, 0.08477465063333511, -0.09046454727649689, 0.1360577791929245, 1.1683005094528198, -0.0521097369492054, -0.04030727967619896, -0.033879756927490234, 0.21941065788269043, -0.05115685984492302, -0.22405338287353516, 0.09544684737920761, -0.3054826855659485, -0.2753232717514038, 0.07666755467653275, -0.13606086373329163, 0.35941144824028015, 0.14321239292621613, -0.3858324885368347, -0.07527277618646622, -0.2795237898826599, 0.43538275361061096, 0.04788533225655556, -0.14652851223945618, -0.07627066224813461, -0.3884373605251312, 0.09204142540693283, 0.22348487377166748, -0.2611621916294098, 0.12819677591323853, -0.10809911042451859, 0.05254640057682991, -0.03754426911473274, -0.17541441321372986, -0.040020715445280075, 0.356734037399292, -0.09610273689031601, -0.3349892497062683, 0.024401402100920677, -0.0957954153418541, -0.27699631452560425, -0.18494027853012085, 0.21362236142158508, 0.24169306457042694, 0.320208340883255, -0.0711171105504036, 0.5201737284660339, -0.2596355378627777, -0.015223289839923382, 0.07880675047636032, -0.12583759427070618, -0.20985710620880127, -0.607283890247345, 0.4456438422203064, 0.1771528124809265, -0.27342599630355835, -0.7234869599342346, 0.010295025072991848, 0.4078974425792694, -0.3397635519504547, 0.08570270240306854, 0.29540640115737915, 0.0074291108176112175, -0.2452230304479599, 0.27241215109825134, 0.035341665148735046, -0.2081926167011261, 0.05585087463259697, 0.058849528431892395, 0.01571006141602993, -0.13867975771427155, 0.0636286586523056, 0.10773306339979172, -0.11455012857913971, 0.024197053164243698, 0.025520185008645058, -0.2849406898021698, -0.3712516129016876, 0.034810870885849, -0.225614532828331, 0.20058667659759521, -0.07856812328100204, 0.05440863221883774, -0.28499525785446167, 0.03398355096578598, 0.1968880146741867, 0.019775301218032837, 0.2522072494029999, -0.05591987073421478, -0.2013751119375229, -0.3732462525367737, 0.1977570801973343, 0.20685577392578125, 0.36548835039138794, 0.3245771825313568, -0.12648145854473114, -0.1962134838104248, 0.12063010036945343, -0.4900353252887726, -0.34682416915893555, -0.07223781198263168, 0.25830668210983276, -0.1345808058977127, -0.28474634885787964, -0.163394495844841, -0.1544945240020752, 0.36220014095306396, 0.005627695936709642, -0.06970438361167908, -0.35792529582977295, -0.08224157243967056, 0.04421332851052284, 0.20302242040634155, 0.019476594403386116, -0.012719702906906605, -0.07665064185857773, -0.059312526136636734, -0.016050223261117935, 0.11240048706531525, -0.09094877541065216, 0.08469808846712112, 0.1124807670712471, 0.09017110615968704, 0.012387069873511791, 0.10312552005052567, 0.15837135910987854, 0.062426548451185226, 0.010134238749742508, 0.04930036887526512, 0.12980645895004272, 0.08440253138542175, -0.04899381101131439, 0.15189538896083832, 0.12924136221408844, 0.7804708480834961, 0.3037436306476593, -0.04075983539223671, -0.06344633549451828, 0.04631997272372246, -0.14525756239891052, 0.13945983350276947, 0.08022895455360413, -0.16770291328430176, 0.19793403148651123, -0.007879945449531078, 0.38286468386650085, -0.31041112542152405, -0.10900119692087173, 0.34505322575569153, -0.057056497782468796, 0.2058972716331482, 0.3405373990535736, -0.050476185977458954, -0.20464318990707397, 0.34900254011154175, -0.0840788185596466, 0.1666892170906067, 0.0525566004216671, 0.34290406107902527, 0.29114896059036255, -0.12959648668766022, -0.19630324840545654, -0.048731185495853424, 0.39858365058898926, 0.03606659919023514, 0.25426772236824036, 0.09524718672037125, -0.02037380076944828, 0.14867763221263885, 0.04635270684957504, 0.25174185633659363, 0.15370258688926697, 0.16275908052921295, 0.46665140986442566, 0.059415608644485474, 0.2035883367061615, 0.4411673843860626, 0.16969309747219086, -0.30318787693977356, 0.017070522531867027, -0.1620434820652008, -0.012866433709859848, -0.05398664250969887, 0.07530087232589722, -0.2638368606567383, -0.1016872376203537, -0.05143609642982483, -0.24251656234264374, 0.31120121479034424, -0.15726631879806519, -0.10343559086322784, -0.23747816681861877, -0.11191706359386444, 0.0768168717622757, 0.002547381678596139, 0.1703595668077469, 0.16890469193458557, 0.04564959555864334, 0.060332465916872025, -0.013058988377451897, 0.04333016648888588, -0.2246452271938324, 0.2151128351688385, -0.16737516224384308, 0.04628492519259453, -0.057365551590919495, 0.12151668220758438, -0.2163127213716507, -0.19186389446258545, 0.12655046582221985, -0.13216519355773926, 0.27346035838127136, -0.09196779131889343, -0.029388390481472015, 0.23164917528629303, -0.3387869894504547, -0.2545182704925537, 0.11495990306138992, 0.3459119200706482, 0.0869000181555748, -0.06706603616476059, -0.2536521255970001, -0.2406878024339676, -0.11623913794755936, -0.1433323472738266, -0.4288773536682129, -0.3731338381767273, 0.05991308018565178, -0.14358742535114288, -0.05895616114139557, 0.0313301756978035, 0.15673866868019104, 0.06813818216323853, 0.06509006023406982, 0.07194624096155167, -0.17992164194583893, -0.11599825322628021, 0.05717634782195091, -0.06452109664678574, 0.1421351134777069, 0.022733604535460472, -0.2799449563026428, -0.2392979860305786, 0.043627750128507614, 0.3347424268722534, 0.26298972964286804, 0.17782197892665863, 0.16989770531654358, -0.052872370928525925, -0.0053992196917533875, -0.26328861713409424, 0.20409448444843292, -0.29651039838790894, -0.058159880340099335, 0.22395098209381104, -0.1358778178691864, -0.10609064996242523, -0.027009667828679085, 0.2633099853992462, -0.20945224165916443, -0.3908436596393585, -0.014977354556322098, -0.16504532098770142, 0.24432827532291412, -0.40767574310302734, 0.21146732568740845, -0.33820581436157227, 0.1171242967247963, 0.15471519529819489, -0.07745907455682755, -0.0688801035284996, -0.026309536769986153, 0.13750818371772766, -0.017929689958691597, -0.16067907214164734, -0.018795451149344444, -0.035423122346401215, 0.0748491957783699, 0.059265390038490295, -0.07005346566438675, 0.008488951250910759, 0.2960948944091797, 0.05608014389872551, -0.049492646008729935, -0.20054598152637482, -0.25482434034347534, -0.04285476356744766, -0.19404901564121246, 0.039069581776857376, -0.18570055067539215, 0.3934556543827057, 0.3183985650539398, -0.21334639191627502, -0.22563494741916656, 0.15497206151485443, 0.04954097047448158, 0.10904814302921295, -0.10000906139612198, -0.08441825211048126, 0.11283769458532333, -0.18258090317249298, -0.24004656076431274, 0.2677847743034363, -0.2563060522079468, -0.12100764364004135, -0.06857318431138992, -0.009547267109155655, -0.014174153096973896, 0.021866342052817345, -0.10728884488344193, -0.23667384684085846 ]
https://github.com/huggingface/datasets/issues/2300
Add VoxPopuli
Hey @jfainberg, This sounds great! I think adding a dependency would not be a big problem, however automatically segmenting the data probably means that it would take a very long time to do: ```python dataset = load_dataset("voxpopuli", "french") ``` => so as a start I think your option 2 is the way to go!
## Adding a Dataset - **Name:** Voxpopuli - **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings - **Paper:** https://arxiv.org/abs/2101.00390 - **Data:** https://github.com/facebookresearch/voxpopuli - **Motivation:** biggest unlabeled speech dataset **Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
54
Add VoxPopuli
[ -0.1819518655538559, -0.2375958412885666, -0.31158193945884705, -0.06509724259376526, 0.04954107850790024, -0.011109384708106518, 0.23000623285770416, 0.09599479287862778, 0.22096389532089233, 0.490418940782547, -0.08353601396083832, 0.05477495491504669, 0.18447864055633545, 0.2177649885416031, 0.3566127419471741, -0.45406579971313477, 0.19335989654064178, 0.46647700667381287, 0.23325349390506744, -0.20821353793144226, -0.3283851146697998, -0.25428280234336853, -0.03955475613474846, -0.3285154700279236, -0.11105086654424667, -0.005413620732724667, -0.24512450397014618, 0.07394542545080185, -0.15143169462680817, -0.20154498517513275, -0.29733145236968994, 0.04880351200699806, -0.08009470254182816, 0.2917507588863373, -0.00010184002894675359, -0.14021138846874237, -0.028005849570035934, -0.01629360020160675, 0.005694354884326458, 0.3110494017601013, 0.025665687397122383, -0.039122894406318665, -0.5187557339668274, -0.11212705820798874, -0.16202925145626068, -0.056039802730083466, -0.17957238852977753, -0.5021844506263733, -0.30034199357032776, -0.12356782704591751, 0.27958980202674866, 0.24718111753463745, 0.05577402561903, -0.2720041573047638, 0.6075727939605713, 0.03049328923225403, -0.07748916000127792, -0.08157676458358765, 0.347646564245224, -0.04439420998096466, 0.4826411306858063, 0.05945490300655365, -0.13494446873664856, -0.18115921318531036, -0.17526236176490784, 0.006503924261778593, 0.03624691069126129, -0.19724005460739136, -0.23549886047840118, 0.32350319623947144, 0.4501718580722809, -0.10492992401123047, -0.12187027186155319, 0.2705380320549011, 0.153024822473526, 0.03579520061612129, -0.12132658809423447, 0.022941822186112404, 0.13605116307735443, -0.14943817257881165, 0.5161411762237549, -0.4350757300853729, -0.16349542140960693, 0.25554341077804565, 0.2764434516429901, 0.24209004640579224, 0.10775889456272125, 0.03472909703850746, 0.3050275444984436, -0.11340559273958206, -0.3196468949317932, -0.008545278571546078, 0.05724421143531799, 0.3088919222354889, 0.22775813937187195, -0.2471197247505188, -0.042615920305252075, -0.547523021697998, 0.07221603393554688, -0.26364320516586304, 0.49816203117370605, -0.1581231653690338, -0.051691021770238876, 0.17614227533340454, 0.23744544386863708, -0.2000780701637268, -0.1238548755645752, 0.349830687046051, 0.0297252107411623, -0.0881008431315422, 0.20204806327819824, 0.03332362323999405, -0.2391316443681717, -0.12681837379932404, -0.2634328305721283, 0.20155970752239227, -0.04099958389997482, -0.031941141933202744, -0.01184187363833189, 0.07210656255483627, -0.5250628590583801, -0.18653719127178192, -0.058170825242996216, -0.006058569066226482, 0.10748712718486786, 0.2937500476837158, -0.39696693420410156, 0.143206387758255, -0.0063044666312634945, -0.09950017929077148, -0.35529738664627075, 0.396553635597229, -0.1980774849653244, 0.30603671073913574, 0.25667861104011536, -0.2641909420490265, -0.016161072999238968, 0.22038458287715912, 0.13154451549053192, -0.09994055330753326, -0.04389793798327446, -0.31457215547561646, 0.05889247730374336, -0.07038009911775589, 0.004244642797857523, -0.15323686599731445, -0.0775148794054985, 0.20841984450817108, -0.06569172441959381, 0.11849861592054367, 0.19717375934123993, -0.11129473894834518, -0.4668174982070923, 0.3373303711414337, 0.05076216906309128, -0.18323203921318054, 0.020516840741038322, 0.2176326960325241, 0.3408341407775879, -0.3305533528327942, 0.0798606351017952, 0.21529550850391388, 0.18560756742954254, -0.09952913969755173, 0.10288264602422714, 0.28438958525657654, -0.5826234817504883, 0.01196169015020132, 0.022415662184357643, -0.1736823171377182, 0.32306450605392456, 0.04994422569870949, 0.023684384301304817, 0.14091892540454865, 0.027802275493741035, 0.31905367970466614, -0.09772355109453201, -0.20432671904563904, -0.319791704416275, -0.24182455241680145, 0.00029202213045209646, -0.20970508456230164, 0.2524379789829254, 0.2697855234146118, 0.42015504837036133, -0.027578776702284813, 0.3139675259590149, 0.15968158841133118, -0.07124948501586914, 0.05517449975013733, -0.14248599112033844, -0.09503147751092911, 0.07691443711519241, 0.2842109501361847, -0.045197248458862305, 0.25660285353660583, 0.050175562500953674, 0.11738625168800354, 0.0843985304236412, -0.10792172700166702, -0.05134887620806694, 0.02528800442814827, 0.6600819826126099, -0.06031171977519989, -0.030952639877796173, -0.30255353450775146, -0.09662225097417831, -0.2210099697113037, -0.24413833022117615, 0.26926130056381226, 0.608955442905426, -0.1662200391292572, -0.294882595539093, -0.36504170298576355, 0.24523423612117767, 0.16936048865318298, 0.27235913276672363, 0.07891634106636047, 0.019412275403738022, -0.3143306374549866, -0.33438923954963684, -0.4762074649333954, 0.19227392971515656, -0.07420484721660614, 0.07905241847038269, 0.462352454662323, -0.19360142946243286, -0.18362899124622345, -0.05066034570336342, 0.20135962963104248, 0.013338975608348846, -0.028353895992040634, 0.1929129809141159, 0.08637635409832001, -0.037945836782455444, 0.28970664739608765, 0.24115149676799774, -0.05664902180433273, 0.18747961521148682, -0.19063988327980042, 0.17107601463794708, 0.3237041234970093, 0.16018833220005035, -0.009924521669745445, 0.251984179019928, -0.07492150366306305, 0.2103000283241272, 0.022258734330534935, -0.20351038873195648, -0.24361126124858856, -0.18391968309879303, 0.23851867020130157, 0.14022889733314514, -0.44393447041511536, 0.012823076918721199, 0.23686644434928894, 0.244776651263237, -0.005140017718076706, -0.02606203407049179, 0.2236342877149582, 0.07194151729345322, -0.14078019559383392, 0.1263183355331421, -0.24736565351486206, -0.03547826036810875, 0.08572754263877869, -0.0016908779507502913, -0.3997882902622223, 0.19550547003746033, 0.2551010549068451, 0.040085047483444214, 0.09089484065771103, 0.13613516092300415, -0.24467888474464417, -0.0059784953482449055, 0.0616421215236187, -0.013619632460176945, 0.17295417189598083, -0.11025585234165192, 0.01823160983622074, -0.20649927854537964, -0.18733736872673035, 0.07004751265048981, 0.2390197515487671, -0.0017418788047507405, -0.35909536480903625, 0.2070685476064682, -0.36656653881073, 0.2690661549568176, -0.5198673009872437, -0.01729394868016243, 0.05733100324869156, 0.10625538975000381, 0.1303260773420334, -0.19586500525474548, 0.21295379102230072, 0.16542090475559235, 0.6476357579231262, 0.03177623450756073, -0.02268345281481743, -0.23662638664245605, -0.03379043936729431, 0.16678932309150696, 0.31807419657707214, -0.28947898745536804, -0.18833762407302856, 0.12050040066242218, -0.0033439781982451677, 0.23280856013298035, -0.10563948005437851, -0.0936380997300148, 0.11755608022212982, 0.08265421539545059, -0.15994682908058167, 0.07782339304685593, 0.3085646629333496, 0.10871076583862305, -0.23090435564517975, 0.04219375178217888, -0.009158340282738209, -0.03877606615424156, -0.2509157061576843, -0.028331521898508072, -0.12972263991832733, -0.14261206984519958, -0.44658026099205017, -0.19180431962013245, -0.336181640625, -0.015694526955485344, 0.21041107177734375, 0.19913625717163086, 0.024518167600035667, 0.20828154683113098, 0.13053476810455322, 0.12847323715686798, -0.05859672650694847, -0.23906204104423523, -0.21529267728328705, 0.20591282844543457, -0.19938604533672333, 0.051625628024339676, -0.22372223436832428, -0.22971422970294952, -0.22589357197284698, 0.06777793169021606, -0.03971865773200989, 0.12198744714260101, -0.065851129591465, -0.5302587747573853, -0.05803193524479866, 0.1466401368379593, 0.27473753690719604, -0.05199206992983818, -0.2863732576370239, -0.08171772956848145, -0.07404585927724838, 0.04929810017347336, 0.7433543801307678, 0.12082023173570633, -0.2542947828769684, -0.20602616667747498, -0.08162815123796463, 0.6478475332260132, 0.3131953775882721, -0.015193409286439419, 0.5475507974624634, -0.06231604143977165, 0.19493632018566132, 0.16974659264087677, -0.308030366897583, 0.4233710467815399, 0.24207979440689087, 0.1541864573955536, 0.10953380912542343, -0.022564711049199104, -0.2028113156557083, -0.0012013374362140894, -0.060911864042282104, -0.05066487938165665, 0.046240296214818954, -0.02994738332927227, 0.14845120906829834, 0.26645004749298096, 0.048477932810783386, -0.25357407331466675, -0.2575724124908447, -0.013796843588352203, 0.06432455033063889, -0.2574397921562195, 0.3350553512573242, -0.06092219054698944, 0.11263590306043625, -0.02710050716996193, -0.2534969747066498, 0.2781725823879242, 0.22902783751487732, -0.12705865502357483, -0.2103787511587143, -0.22113226354122162, -0.09873246401548386, 0.126984104514122, 0.5344958305358887, -0.11356541514396667, -0.18074741959571838, 0.09532127529382706, 0.459698885679245, 0.06827625632286072, -0.010524584911763668, -0.4272250235080719, -0.06071379408240318, -0.034624554216861725, 0.6299230456352234, -0.2369965761899948, 0.5418711304664612, 0.5530751943588257, 0.23442354798316956, 0.023862620815634727, -0.09381414949893951, -0.3513614237308502, -0.09434715658426285, -0.19750113785266876, 0.48843473196029663, -0.13288064301013947, 0.3253692090511322, 0.08785149455070496, -0.3213065266609192, 0.32451605796813965, -0.11869344115257263, 0.2594914138317108, 0.13926640152931213, 0.1154494509100914, 0.33077138662338257, 0.036946531385183334, 0.007993957959115505, -0.5504487752914429, 0.39130231738090515, 0.16060668230056763, 0.04024466127157211, 0.09575510025024414, 0.10902372002601624, -0.20028899610042572, 0.535122811794281, 0.18656736612319946, 0.3514052927494049, 0.2061031311750412, -0.08200126886367798, -0.04563741385936737, 0.11227782070636749, 0.11512887477874756, 0.12326610088348389, -0.1504206359386444, -0.07679354399442673, -0.429184228181839, 0.10149729996919632, 0.26761043071746826, -0.00695659639313817, 0.1482001692056656, 0.14480432868003845, 0.08477465063333511, -0.09046454727649689, 0.1360577791929245, 1.1683005094528198, -0.0521097369492054, -0.04030727967619896, -0.033879756927490234, 0.21941065788269043, -0.05115685984492302, -0.22405338287353516, 0.09544684737920761, -0.3054826855659485, -0.2753232717514038, 0.07666755467653275, -0.13606086373329163, 0.35941144824028015, 0.14321239292621613, -0.3858324885368347, -0.07527277618646622, -0.2795237898826599, 0.43538275361061096, 0.04788533225655556, -0.14652851223945618, -0.07627066224813461, -0.3884373605251312, 0.09204142540693283, 0.22348487377166748, -0.2611621916294098, 0.12819677591323853, -0.10809911042451859, 0.05254640057682991, -0.03754426911473274, -0.17541441321372986, -0.040020715445280075, 0.356734037399292, -0.09610273689031601, -0.3349892497062683, 0.024401402100920677, -0.0957954153418541, -0.27699631452560425, -0.18494027853012085, 0.21362236142158508, 0.24169306457042694, 0.320208340883255, -0.0711171105504036, 0.5201737284660339, -0.2596355378627777, -0.015223289839923382, 0.07880675047636032, -0.12583759427070618, -0.20985710620880127, -0.607283890247345, 0.4456438422203064, 0.1771528124809265, -0.27342599630355835, -0.7234869599342346, 0.010295025072991848, 0.4078974425792694, -0.3397635519504547, 0.08570270240306854, 0.29540640115737915, 0.0074291108176112175, -0.2452230304479599, 0.27241215109825134, 0.035341665148735046, -0.2081926167011261, 0.05585087463259697, 0.058849528431892395, 0.01571006141602993, -0.13867975771427155, 0.0636286586523056, 0.10773306339979172, -0.11455012857913971, 0.024197053164243698, 0.025520185008645058, -0.2849406898021698, -0.3712516129016876, 0.034810870885849, -0.225614532828331, 0.20058667659759521, -0.07856812328100204, 0.05440863221883774, -0.28499525785446167, 0.03398355096578598, 0.1968880146741867, 0.019775301218032837, 0.2522072494029999, -0.05591987073421478, -0.2013751119375229, -0.3732462525367737, 0.1977570801973343, 0.20685577392578125, 0.36548835039138794, 0.3245771825313568, -0.12648145854473114, -0.1962134838104248, 0.12063010036945343, -0.4900353252887726, -0.34682416915893555, -0.07223781198263168, 0.25830668210983276, -0.1345808058977127, -0.28474634885787964, -0.163394495844841, -0.1544945240020752, 0.36220014095306396, 0.005627695936709642, -0.06970438361167908, -0.35792529582977295, -0.08224157243967056, 0.04421332851052284, 0.20302242040634155, 0.019476594403386116, -0.012719702906906605, -0.07665064185857773, -0.059312526136636734, -0.016050223261117935, 0.11240048706531525, -0.09094877541065216, 0.08469808846712112, 0.1124807670712471, 0.09017110615968704, 0.012387069873511791, 0.10312552005052567, 0.15837135910987854, 0.062426548451185226, 0.010134238749742508, 0.04930036887526512, 0.12980645895004272, 0.08440253138542175, -0.04899381101131439, 0.15189538896083832, 0.12924136221408844, 0.7804708480834961, 0.3037436306476593, -0.04075983539223671, -0.06344633549451828, 0.04631997272372246, -0.14525756239891052, 0.13945983350276947, 0.08022895455360413, -0.16770291328430176, 0.19793403148651123, -0.007879945449531078, 0.38286468386650085, -0.31041112542152405, -0.10900119692087173, 0.34505322575569153, -0.057056497782468796, 0.2058972716331482, 0.3405373990535736, -0.050476185977458954, -0.20464318990707397, 0.34900254011154175, -0.0840788185596466, 0.1666892170906067, 0.0525566004216671, 0.34290406107902527, 0.29114896059036255, -0.12959648668766022, -0.19630324840545654, -0.048731185495853424, 0.39858365058898926, 0.03606659919023514, 0.25426772236824036, 0.09524718672037125, -0.02037380076944828, 0.14867763221263885, 0.04635270684957504, 0.25174185633659363, 0.15370258688926697, 0.16275908052921295, 0.46665140986442566, 0.059415608644485474, 0.2035883367061615, 0.4411673843860626, 0.16969309747219086, -0.30318787693977356, 0.017070522531867027, -0.1620434820652008, -0.012866433709859848, -0.05398664250969887, 0.07530087232589722, -0.2638368606567383, -0.1016872376203537, -0.05143609642982483, -0.24251656234264374, 0.31120121479034424, -0.15726631879806519, -0.10343559086322784, -0.23747816681861877, -0.11191706359386444, 0.0768168717622757, 0.002547381678596139, 0.1703595668077469, 0.16890469193458557, 0.04564959555864334, 0.060332465916872025, -0.013058988377451897, 0.04333016648888588, -0.2246452271938324, 0.2151128351688385, -0.16737516224384308, 0.04628492519259453, -0.057365551590919495, 0.12151668220758438, -0.2163127213716507, -0.19186389446258545, 0.12655046582221985, -0.13216519355773926, 0.27346035838127136, -0.09196779131889343, -0.029388390481472015, 0.23164917528629303, -0.3387869894504547, -0.2545182704925537, 0.11495990306138992, 0.3459119200706482, 0.0869000181555748, -0.06706603616476059, -0.2536521255970001, -0.2406878024339676, -0.11623913794755936, -0.1433323472738266, -0.4288773536682129, -0.3731338381767273, 0.05991308018565178, -0.14358742535114288, -0.05895616114139557, 0.0313301756978035, 0.15673866868019104, 0.06813818216323853, 0.06509006023406982, 0.07194624096155167, -0.17992164194583893, -0.11599825322628021, 0.05717634782195091, -0.06452109664678574, 0.1421351134777069, 0.022733604535460472, -0.2799449563026428, -0.2392979860305786, 0.043627750128507614, 0.3347424268722534, 0.26298972964286804, 0.17782197892665863, 0.16989770531654358, -0.052872370928525925, -0.0053992196917533875, -0.26328861713409424, 0.20409448444843292, -0.29651039838790894, -0.058159880340099335, 0.22395098209381104, -0.1358778178691864, -0.10609064996242523, -0.027009667828679085, 0.2633099853992462, -0.20945224165916443, -0.3908436596393585, -0.014977354556322098, -0.16504532098770142, 0.24432827532291412, -0.40767574310302734, 0.21146732568740845, -0.33820581436157227, 0.1171242967247963, 0.15471519529819489, -0.07745907455682755, -0.0688801035284996, -0.026309536769986153, 0.13750818371772766, -0.017929689958691597, -0.16067907214164734, -0.018795451149344444, -0.035423122346401215, 0.0748491957783699, 0.059265390038490295, -0.07005346566438675, 0.008488951250910759, 0.2960948944091797, 0.05608014389872551, -0.049492646008729935, -0.20054598152637482, -0.25482434034347534, -0.04285476356744766, -0.19404901564121246, 0.039069581776857376, -0.18570055067539215, 0.3934556543827057, 0.3183985650539398, -0.21334639191627502, -0.22563494741916656, 0.15497206151485443, 0.04954097047448158, 0.10904814302921295, -0.10000906139612198, -0.08441825211048126, 0.11283769458532333, -0.18258090317249298, -0.24004656076431274, 0.2677847743034363, -0.2563060522079468, -0.12100764364004135, -0.06857318431138992, -0.009547267109155655, -0.014174153096973896, 0.021866342052817345, -0.10728884488344193, -0.23667384684085846 ]
https://github.com/huggingface/datasets/issues/2294
Slow #0 when using map to tokenize.
Hi ! Have you tried other values for `preprocessing_num_workers` ? Is it always process 0 that is slower ? There are no difference between process 0 and the others except that it processes the first shard of the dataset.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
39
Slow #0 when using map to tokenize.
[ -0.39829638600349426, -0.27673956751823425, -0.15675170719623566, 0.07229925692081451, 0.17956656217575073, -0.28420189023017883, 0.16671018302440643, 0.3611929714679718, 0.025170614942908287, 0.16583839058876038, 0.20580852031707764, 0.29538068175315857, -0.1361733227968216, -0.16850964725017548, -0.37868496775627136, 0.22511759400367737, -0.03382176160812378, 0.17083634436130524, 0.21138617396354675, -0.22907458245754242, -0.04515673220157623, -0.00602883892133832, -0.3484461307525635, 0.06282239407300949, -0.21385258436203003, -0.1342504918575287, 0.1271468549966812, -0.16584518551826477, -0.3025500178337097, -0.2543891370296478, -0.4697091579437256, 0.07233404368162155, -0.4138879179954529, 0.2556907534599304, -0.00010499355266802013, -0.12011846899986267, 0.3102036118507385, 0.28526803851127625, 0.0005716030136682093, 0.20793457329273224, 0.060159094631671906, -0.390820175409317, -0.3634931445121765, -0.19830535352230072, -0.03936650604009628, -0.09756369888782501, 0.24851125478744507, -0.046048395335674286, 0.10652744024991989, -0.10315033793449402, 0.2618982195854187, 0.30083170533180237, -0.4656849503517151, 0.059881001710891724, 0.2981656491756439, 0.013415126129984856, 0.08029065281152725, -0.11011618375778198, 0.22198791801929474, -0.10555831342935562, -0.22181436419487, 0.2136281579732895, -0.3166869580745697, -0.2337806075811386, 0.11443077027797699, 0.018212372437119484, 0.4258610010147095, 0.0794156938791275, 0.3140653967857361, 0.11187495291233063, -0.1552758514881134, 0.3101065158843994, 0.005101024638861418, -0.004126636777073145, -0.2907882034778595, -0.04303474351763725, 0.043921228498220444, -0.28860703110694885, 0.05893441289663315, -0.010617568157613277, -0.421475887298584, 0.16842302680015564, 0.1822507679462433, 0.26227426528930664, -0.3085264265537262, 0.602881669998169, 0.1222163587808609, 0.04857174679636955, 0.00874533224850893, -0.2704603672027588, -0.5456068515777588, -0.21471738815307617, -0.18440303206443787, 0.40843358635902405, 0.1834169626235962, -0.12523730099201202, 0.3315824866294861, -0.19725126028060913, -0.0005596126429736614, -0.3630112409591675, -0.01969251036643982, 0.5183887481689453, 0.21059279143810272, 0.0588720329105854, -0.027786605060100555, 0.17972971498966217, 0.11696334183216095, 0.21220314502716064, 0.26756441593170166, -0.3332318663597107, -0.18727326393127441, 0.03448043391108513, -0.17123791575431824, 0.026701338589191437, -0.14952875673770905, 0.04272747039794922, -0.3373527228832245, 0.15778079628944397, 0.0491197369992733, 0.014931882731616497, -0.4212355315685272, 0.16186103224754333, 0.36394861340522766, 0.13014447689056396, 0.006807033903896809, 0.07121966034173965, -0.06734626740217209, -0.24248163402080536, -0.37337246537208557, 0.19363555312156677, -0.2146950513124466, -0.1641327440738678, -0.23317377269268036, -0.15297412872314453, -0.26642030477523804, 0.2922305464744568, -0.04369337111711502, -0.04448666796088219, -0.037964824587106705, 0.1837424784898758, 0.2834874391555786, -0.05411121994256973, 0.19841206073760986, -0.1687372624874115, -0.40343233942985535, 0.34568852186203003, 0.07378799468278885, -0.1342294067144394, -0.2118442952632904, 0.020861990749835968, -0.2975701093673706, -0.28656744956970215, 0.1565927267074585, 0.2592812776565552, 0.05966690555214882, 0.24359627068042755, 0.003787386231124401, 0.3028462827205658, 0.0053032939322292805, -0.24185626208782196, -0.29426684975624084, 0.18102006614208221, -0.33698639273643494, -0.13161808252334595, -0.02371908724308014, 0.33100026845932007, -0.0046841297298669815, -0.12545156478881836, 0.30623510479927063, 0.2819155156612396, 0.42399799823760986, 0.40154963731765747, -0.1592348963022232, 0.08684392273426056, -0.27956247329711914, 0.6966093182563782, 0.3077012598514557, -0.1938055157661438, -0.24608437716960907, 0.3929535746574402, -0.5247856974601746, -0.3344947397708893, 0.06061455234885216, -0.06127369403839111, 0.42399173974990845, -0.04904771223664284, 0.40771761536598206, -0.0016666976734995842, 0.10897847265005112, 0.28597205877304077, -0.45155149698257446, 0.12354344874620438, 0.13589565455913544, -0.20143693685531616, -0.24990670382976532, -0.1751573532819748, 0.026828136295080185, 0.08598355948925018, -0.11050432920455933, -0.14029152691364288, 0.22422710061073303, -0.038651030510663986, 0.1650511920452118, -0.284093976020813, 0.04916330426931381, 0.2732013165950775, 0.14553767442703247, 0.023220431059598923, 0.008430087007582188, 0.03559134528040886, 0.0755346268415451, 0.005792906042188406, 0.01191380899399519, -0.009859083220362663, 0.08800723403692245, 0.2884158194065094, 0.2354496568441391, -0.16444526612758636, 0.04598560184240341, 0.25551846623420715, 0.025611860677599907, -0.33233174681663513, 0.1064518541097641, -0.06486143916845322, 0.34232616424560547, -0.15139809250831604, 0.0532987043261528, -0.13253682851791382, -0.13047604262828827, 0.10478072613477707, 0.2144264131784439, -0.07777734100818634, 0.0986580029129982, 0.1632661521434784, 0.07588273286819458, 0.10223942250013351, -0.005041605327278376, 0.38416460156440735, 0.26619863510131836, 0.18167372047901154, 0.3063023090362549, 0.10837116092443466, 0.09183931350708008, -0.3695235252380371, 0.248731791973114, 0.5189573764801025, 0.3680513799190521, 0.20086368918418884, -0.07730124890804291, -0.10658697783946991, 0.008970443159341812, 0.07674296945333481, -0.07187718152999878, -0.22410175204277039, 0.2031461000442505, 0.3369913101196289, 0.1794961392879486, 0.24279719591140747, 0.28985899686813354, 0.13106794655323029, 0.4551888108253479, -0.2119283676147461, 0.04737672582268715, 0.036881931126117706, -0.000856844475492835, -0.051537830382585526, 0.02274022251367569, -0.3426545560359955, -0.12905660271644592, 0.16007503867149353, 0.24398376047611237, -0.15082649886608124, 0.013494379818439484, -0.15911364555358887, 0.273328959941864, -0.12666885554790497, -0.05938202515244484, 0.06036929786205292, 0.15032780170440674, -0.09744139760732651, -0.22483262419700623, -0.1811569780111313, 0.29531925916671753, 0.258501797914505, -0.0372118316590786, -0.11215516924858093, -0.0691300630569458, 0.01801382750272751, 0.3234797716140747, -0.031629856675863266, 0.0762919932603836, -0.4369991719722748, 0.2418030947446823, 0.06501226872205734, -0.1284656822681427, 0.2517984211444855, 0.025369860231876373, -0.044137533754110336, 0.19513314962387085, 0.11226187646389008, -0.1223558858036995, -0.18390041589736938, -0.32573503255844116, 0.06486251950263977, 0.2165684551000595, -0.12958770990371704, 0.20496810972690582, -0.1257142573595047, -0.16143593192100525, 0.12096434086561203, -0.6373521089553833, 0.05205199122428894, -0.07293730974197388, -0.36700424551963806, 0.2204413115978241, 0.18537560105323792, -0.5274080634117126, 0.17991623282432556, 0.3637044429779053, -0.29010361433029175, -0.4685290455818176, 0.09170608967542648, -0.2197381854057312, -0.22514258325099945, -0.19431957602500916, 0.20419859886169434, 0.4475615322589874, -0.14017552137374878, 0.07604647427797318, -0.2947045862674713, 0.23181207478046417, 0.07234301418066025, -0.0663544088602066, 0.33291640877723694, -0.2421988844871521, -0.28738367557525635, -0.0886533185839653, -0.04738059639930725, 0.44308367371559143, 0.07907042652368546, -0.09361077845096588, -0.05374599248170853, -0.19453224539756775, -0.09055223315954208, 0.1366429328918457, 0.18689389526844025, 0.034931182861328125, -0.19097454845905304, 0.18847894668579102, 0.04065198451280594, -0.1710743010044098, 0.3147936463356018, 0.07874008268117905, -0.3514241874217987, 0.046222783625125885, -0.27558788657188416, 0.06613311916589737, 0.05827738344669342, -0.19548015296459198, 0.07379009574651718, 0.3258398473262787, 0.34613853693008423, 0.6151672601699829, -0.14222495257854462, 0.03696047514677048, -0.10558722913265228, -0.08923319727182388, -0.13818316161632538, 0.04887549206614494, 0.03120546229183674, 0.0986214280128479, 0.45433440804481506, -0.09128525108098984, 0.40406185388565063, -0.03585108369588852, -0.5766013860702515, 0.12817098200321198, -0.12338577955961227, -0.058083996176719666, -0.1357419490814209, 0.09506358951330185, -0.24078145623207092, -0.07107439637184143, -0.06564397364854813, 0.278617799282074, -0.4039295017719269, -0.1571335792541504, 0.20741227269172668, -0.30347326397895813, 0.004997240845113993, -0.39110419154167175, -0.5688672065734863, 0.2691826820373535, -0.5139123797416687, 0.4909950792789459, 0.19012030959129333, 0.16001051664352417, 0.11555694788694382, -0.28834420442581177, 0.2076674848794937, -0.16080133616924286, 0.7847932577133179, -0.024712782353162766, 0.0881991758942604, 0.06709706038236618, -0.17617781460285187, -0.2226552963256836, 0.09296692907810211, -0.0646568313241005, 0.3195875287055969, 0.5575419068336487, 0.6967495679855347, -0.42408066987991333, -0.19427920877933502, -0.20978114008903503, -0.2517467737197876, 0.25303393602371216, 0.01724100112915039, -0.04699874669313431, 0.06934783607721329, 0.020563004538416862, 0.12825728952884674, 0.01688322424888611, 0.09503991156816483, 0.30514100193977356, -0.4435870945453644, 0.010746504180133343, -0.09154896438121796, -0.001931142178364098, -0.013529282063245773, 0.22500237822532654, -0.07833173871040344, -0.0048497398383915424, 0.1429758220911026, 0.11112957447767258, -0.11328360438346863, -0.22038331627845764, 0.3239734470844269, 0.07899118959903717, 0.0328039824962616, 0.20276091992855072, 0.14802342653274536, 0.3328092694282532, 0.2457713931798935, 0.1525711566209793, -0.10345516353845596, 0.36162111163139343, -0.18730036914348602, 0.10934291034936905, 0.30883529782295227, 0.08540221303701401, -0.38700389862060547, 0.33887699246406555, -0.1079762876033783, 0.050077442079782486, -0.11401490122079849, 0.20457501709461212, -0.2807523310184479, -0.17799070477485657, 0.4216747581958771, 0.23787403106689453, 0.9285314679145813, -0.33643242716789246, 0.05999410152435303, -0.06823993474245071, 0.03982501104474068, 0.06916146725416183, -0.2557384669780731, 0.11311472952365875, -0.33191969990730286, 0.10913512110710144, 0.13941355049610138, -0.02958984300494194, 0.03687693923711777, 0.3531339466571808, -0.06629776209592819, -0.1678936928510666, -0.06112765148282051, 0.6849361062049866, -0.25959542393684387, 0.06886616349220276, 0.22724120318889618, -0.2581678032875061, 0.032807398587465286, 0.18320666253566742, 0.1507478505373001, -0.04879486560821533, 0.10846929997205734, -0.021627292037010193, -0.23087194561958313, -0.33491456508636475, 0.04446566104888916, -0.18123191595077515, -0.2587055265903473, 0.03796590864658356, 0.14072810113430023, 0.1834966242313385, -0.34021538496017456, -0.10040639340877533, -0.18117694556713104, 0.5732859969139099, -0.04166223853826523, 0.07201195508241653, 0.20781457424163818, 0.08520790934562683, 0.1401391327381134, -0.31049707531929016, -0.35915935039520264, -0.028936998918652534, 0.1272338330745697, -0.13103927671909332, -0.1846061497926712, -0.004005769267678261, -0.37529313564300537, 0.17352637648582458, 0.3524017035961151, 0.07764128595590591, -0.02796594612300396, -0.03254802152514458, -0.13050757348537445, -0.05690724030137062, 0.20346903800964355, -0.1155056357383728, -0.05951663479208946, 0.04329643398523331, 0.25540027022361755, -0.2432091236114502, 0.05800241976976395, 0.45783230662345886, -0.047944821417331696, -0.04624772071838379, 0.4848812520503998, -0.2812660038471222, -0.36405473947525024, -0.24274542927742004, 0.3529662787914276, 0.17320382595062256, 0.03570921719074249, 0.07680607587099075, 0.09385136514902115, -0.30558454990386963, 0.23679488897323608, 0.31846684217453003, -0.17624694108963013, 0.15141232311725616, -0.20351684093475342, 0.061366792768239975, -0.4640691578388214, 0.07127605378627777, -0.06621898710727692, -0.11937917023897171, -0.09115396440029144, 0.03197960555553436, -0.34051376581192017, 0.06845087558031082, -0.3991546630859375, 0.06554993242025375, -0.1681622862815857, 0.1636841595172882, -0.21047134697437286, -0.13575027883052826, 0.08158707618713379, 0.10807139426469803, 0.32421961426734924, 0.18798023462295532, -0.1877538561820984, -0.3244849145412445, 0.06730570644140244, 0.13132187724113464, 0.06423600018024445, -0.2685280442237854, 0.25997281074523926, 0.04350180923938751, -0.2348211705684662, -0.31133538484573364, -0.011705547571182251, 0.35232383012771606, -0.14804424345493317, -0.32756197452545166, 0.3703552484512329, 0.05521303042769432, 0.13564585149288177, -0.005868155974894762, -0.008139025419950485, 0.15682969987392426, -0.20234040915966034, -0.0221573356539011, 0.1734188199043274, -0.16942594945430756, 0.3476220369338989, 0.13160525262355804, 0.1967850774526596, -0.025046950206160545, 0.29516133666038513, -0.056019119918346405, -0.1341526210308075, 0.46732670068740845, -0.13968466222286224, -0.08147614449262619, 0.08154559135437012, -0.5007075071334839, 0.2899496257305145, 0.27286648750305176, 0.05897596478462219, -0.28853729367256165, 0.2847958505153656, -0.1061692163348198, 0.20726153254508972, 0.1272059977054596, 0.042239945381879807, 0.03741031140089035, -0.1157262846827507, 0.03274434804916382, -0.1051267683506012, -0.31761863827705383, -0.15477338433265686, 0.0646892562508583, 0.06355945020914078, -0.14698228240013123, 0.29038938879966736, -0.08298712223768234, 0.09295552968978882, 0.18270067870616913, 0.32439929246902466, 0.2963699996471405, 0.21350447833538055, 0.6759409308433533, -0.4974272549152374, -0.195365771651268, 0.016092633828520775, 0.5532184839248657, 0.01169760711491108, 0.211719810962677, 0.15118254721164703, 0.06948281079530716, 0.04340440407395363, -0.10611826181411743, -0.0071861580945551395, 0.17602260410785675, -0.49377021193504333, -0.23781119287014008, -0.24213933944702148, -0.13801108300685883, -0.1883798986673355, 0.033893611282110214, -0.028634699061512947, 0.37949350476264954, 0.08839774131774902, -0.07734477519989014, 0.3100503087043762, 0.08030103147029877, -0.16810114681720734, -0.24537590146064758, 0.3580330014228821, -0.22641034424304962, 0.286741703748703, -0.5794817805290222, 0.2896808981895447, 0.1874123215675354, 0.1053430587053299, 0.26660820841789246, 0.3331657946109772, -0.2945898473262787, -0.02160326950252056, -0.1209082156419754, -0.19651389122009277, -0.16481652855873108, 0.3980391025543213, 0.11952244490385056, -0.15271341800689697, 0.10042021423578262, 0.05228959396481514, -0.42467233538627625, -0.3983991742134094, 0.056172579526901245, -0.35380682349205017, 0.6179584860801697, -0.051473308354616165, -0.08755242079496384, -0.06995395570993423, -0.18159514665603638, -0.04170550778508186, -0.10915648192167282, -0.2237141877412796, -0.13893668353557587, -0.18180297315120697, 0.17809852957725525, -0.006741441320627928, 0.13233108818531036, -0.012937274761497974, 0.15499763190746307, 0.1709180325269699, -0.11249368637800217, -0.5199297070503235, -0.19793927669525146, -0.1832541972398758, 0.3191237151622772, -0.2135244607925415, 0.16744443774223328, -0.2893699109554291, 0.13862670958042145, 0.1789918690919876, 0.017333852127194405, 0.08538768440485, -0.054572105407714844, -0.0957583487033844, -0.05223521217703819, -0.05878380313515663, 0.5011264085769653, -0.1163657158613205, -0.30478131771087646, -0.04672188684344292, -0.3979416489601135, 0.40676724910736084, -0.08691935986280441, 0.27818843722343445, -0.15612952411174774, 0.23907478153705597, -0.3628089129924774, 0.12587149441242218, 0.14315196871757507, 0.10940847545862198, -0.040635377168655396, -0.08680728822946548, 0.07036858797073364, 0.0639350637793541, 0.24782872200012207, -0.06212269887328148, 0.19984059035778046, 0.15441711246967316, -0.08775009214878082, -0.002335013123229146, -0.037428464740514755, 0.04974334314465523, -0.08047236502170563, 0.11490646749734879, 0.22085165977478027, -0.07697005569934845, 0.34819233417510986, -0.1471051722764969, 0.024101650342345238, -0.31681084632873535, 0.13387301564216614, 0.26369792222976685, -0.04857664927840233, -0.12548382580280304, -0.20808625221252441, 0.20749765634536743, -0.4742338955402374, -0.14816544950008392, 0.018754715099930763, 0.0964224562048912, 0.22933782637119293, 0.07519245147705078, 0.03931177407503128, -0.18328702449798584, 0.34415924549102783, -0.14427681267261505, -0.23943620920181274, 0.10230997204780579, -0.00388337136246264, -0.21481819450855255, -0.18905377388000488, 0.11414168775081635, -0.012887314893305302, -0.073494553565979, -0.034320931881666183, 0.08016590029001236 ]
https://github.com/huggingface/datasets/issues/2294
Slow #0 when using map to tokenize.
Hi, I have found the reason of it. Before using the map function to tokenize the data, I concatenate the wikipedia and bookcorpus first, like this: ```if args.dataset_name1 is not None: dataset1 = load_dataset(args.dataset_name1, args.dataset_config_name1, split="train") dataset1 = dataset1.remove_columns('title') if args.dataset_name2 is not None: dataset2 = load_dataset(args.dataset_name2, args.dataset_config_name2,split="train") assert dataset1.features.type == dataset2.features.type, str(dataset1.features.type)+';'+str(dataset2.features.type) datasets12 = concatenate_datasets([dataset1, dataset2], split='train') ``` When I just use one datasets, e.g. wikipedia, the problem seems no longer exist: ![image](https://user-images.githubusercontent.com/31714566/116967059-13d24380-ace4-11eb-8d14-b7b9c9a275cc.png) Bookcorpus has more row numbers than Wikipedia, however, it takes much more time to process each batch of wiki than that of bookcorpus. When we first concatenate two datasets and then use _map_ to process the concatenated datasets, e.g. `num_proc=5`, process 0 has to process all of the wikipedia data, causing the problem that #0 takes a longer time to finish the job. The problem is caused by the different characteristic of different datasets. One solution might be using _map_ first to process two datasets seperately, then concatenate the tokenized and processed datasets before input to the `Dataloader`.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
172
Slow #0 when using map to tokenize.
[ -0.39829638600349426, -0.27673956751823425, -0.15675170719623566, 0.07229925692081451, 0.17956656217575073, -0.28420189023017883, 0.16671018302440643, 0.3611929714679718, 0.025170614942908287, 0.16583839058876038, 0.20580852031707764, 0.29538068175315857, -0.1361733227968216, -0.16850964725017548, -0.37868496775627136, 0.22511759400367737, -0.03382176160812378, 0.17083634436130524, 0.21138617396354675, -0.22907458245754242, -0.04515673220157623, -0.00602883892133832, -0.3484461307525635, 0.06282239407300949, -0.21385258436203003, -0.1342504918575287, 0.1271468549966812, -0.16584518551826477, -0.3025500178337097, -0.2543891370296478, -0.4697091579437256, 0.07233404368162155, -0.4138879179954529, 0.2556907534599304, -0.00010499355266802013, -0.12011846899986267, 0.3102036118507385, 0.28526803851127625, 0.0005716030136682093, 0.20793457329273224, 0.060159094631671906, -0.390820175409317, -0.3634931445121765, -0.19830535352230072, -0.03936650604009628, -0.09756369888782501, 0.24851125478744507, -0.046048395335674286, 0.10652744024991989, -0.10315033793449402, 0.2618982195854187, 0.30083170533180237, -0.4656849503517151, 0.059881001710891724, 0.2981656491756439, 0.013415126129984856, 0.08029065281152725, -0.11011618375778198, 0.22198791801929474, -0.10555831342935562, -0.22181436419487, 0.2136281579732895, -0.3166869580745697, -0.2337806075811386, 0.11443077027797699, 0.018212372437119484, 0.4258610010147095, 0.0794156938791275, 0.3140653967857361, 0.11187495291233063, -0.1552758514881134, 0.3101065158843994, 0.005101024638861418, -0.004126636777073145, -0.2907882034778595, -0.04303474351763725, 0.043921228498220444, -0.28860703110694885, 0.05893441289663315, -0.010617568157613277, -0.421475887298584, 0.16842302680015564, 0.1822507679462433, 0.26227426528930664, -0.3085264265537262, 0.602881669998169, 0.1222163587808609, 0.04857174679636955, 0.00874533224850893, -0.2704603672027588, -0.5456068515777588, -0.21471738815307617, -0.18440303206443787, 0.40843358635902405, 0.1834169626235962, -0.12523730099201202, 0.3315824866294861, -0.19725126028060913, -0.0005596126429736614, -0.3630112409591675, -0.01969251036643982, 0.5183887481689453, 0.21059279143810272, 0.0588720329105854, -0.027786605060100555, 0.17972971498966217, 0.11696334183216095, 0.21220314502716064, 0.26756441593170166, -0.3332318663597107, -0.18727326393127441, 0.03448043391108513, -0.17123791575431824, 0.026701338589191437, -0.14952875673770905, 0.04272747039794922, -0.3373527228832245, 0.15778079628944397, 0.0491197369992733, 0.014931882731616497, -0.4212355315685272, 0.16186103224754333, 0.36394861340522766, 0.13014447689056396, 0.006807033903896809, 0.07121966034173965, -0.06734626740217209, -0.24248163402080536, -0.37337246537208557, 0.19363555312156677, -0.2146950513124466, -0.1641327440738678, -0.23317377269268036, -0.15297412872314453, -0.26642030477523804, 0.2922305464744568, -0.04369337111711502, -0.04448666796088219, -0.037964824587106705, 0.1837424784898758, 0.2834874391555786, -0.05411121994256973, 0.19841206073760986, -0.1687372624874115, -0.40343233942985535, 0.34568852186203003, 0.07378799468278885, -0.1342294067144394, -0.2118442952632904, 0.020861990749835968, -0.2975701093673706, -0.28656744956970215, 0.1565927267074585, 0.2592812776565552, 0.05966690555214882, 0.24359627068042755, 0.003787386231124401, 0.3028462827205658, 0.0053032939322292805, -0.24185626208782196, -0.29426684975624084, 0.18102006614208221, -0.33698639273643494, -0.13161808252334595, -0.02371908724308014, 0.33100026845932007, -0.0046841297298669815, -0.12545156478881836, 0.30623510479927063, 0.2819155156612396, 0.42399799823760986, 0.40154963731765747, -0.1592348963022232, 0.08684392273426056, -0.27956247329711914, 0.6966093182563782, 0.3077012598514557, -0.1938055157661438, -0.24608437716960907, 0.3929535746574402, -0.5247856974601746, -0.3344947397708893, 0.06061455234885216, -0.06127369403839111, 0.42399173974990845, -0.04904771223664284, 0.40771761536598206, -0.0016666976734995842, 0.10897847265005112, 0.28597205877304077, -0.45155149698257446, 0.12354344874620438, 0.13589565455913544, -0.20143693685531616, -0.24990670382976532, -0.1751573532819748, 0.026828136295080185, 0.08598355948925018, -0.11050432920455933, -0.14029152691364288, 0.22422710061073303, -0.038651030510663986, 0.1650511920452118, -0.284093976020813, 0.04916330426931381, 0.2732013165950775, 0.14553767442703247, 0.023220431059598923, 0.008430087007582188, 0.03559134528040886, 0.0755346268415451, 0.005792906042188406, 0.01191380899399519, -0.009859083220362663, 0.08800723403692245, 0.2884158194065094, 0.2354496568441391, -0.16444526612758636, 0.04598560184240341, 0.25551846623420715, 0.025611860677599907, -0.33233174681663513, 0.1064518541097641, -0.06486143916845322, 0.34232616424560547, -0.15139809250831604, 0.0532987043261528, -0.13253682851791382, -0.13047604262828827, 0.10478072613477707, 0.2144264131784439, -0.07777734100818634, 0.0986580029129982, 0.1632661521434784, 0.07588273286819458, 0.10223942250013351, -0.005041605327278376, 0.38416460156440735, 0.26619863510131836, 0.18167372047901154, 0.3063023090362549, 0.10837116092443466, 0.09183931350708008, -0.3695235252380371, 0.248731791973114, 0.5189573764801025, 0.3680513799190521, 0.20086368918418884, -0.07730124890804291, -0.10658697783946991, 0.008970443159341812, 0.07674296945333481, -0.07187718152999878, -0.22410175204277039, 0.2031461000442505, 0.3369913101196289, 0.1794961392879486, 0.24279719591140747, 0.28985899686813354, 0.13106794655323029, 0.4551888108253479, -0.2119283676147461, 0.04737672582268715, 0.036881931126117706, -0.000856844475492835, -0.051537830382585526, 0.02274022251367569, -0.3426545560359955, -0.12905660271644592, 0.16007503867149353, 0.24398376047611237, -0.15082649886608124, 0.013494379818439484, -0.15911364555358887, 0.273328959941864, -0.12666885554790497, -0.05938202515244484, 0.06036929786205292, 0.15032780170440674, -0.09744139760732651, -0.22483262419700623, -0.1811569780111313, 0.29531925916671753, 0.258501797914505, -0.0372118316590786, -0.11215516924858093, -0.0691300630569458, 0.01801382750272751, 0.3234797716140747, -0.031629856675863266, 0.0762919932603836, -0.4369991719722748, 0.2418030947446823, 0.06501226872205734, -0.1284656822681427, 0.2517984211444855, 0.025369860231876373, -0.044137533754110336, 0.19513314962387085, 0.11226187646389008, -0.1223558858036995, -0.18390041589736938, -0.32573503255844116, 0.06486251950263977, 0.2165684551000595, -0.12958770990371704, 0.20496810972690582, -0.1257142573595047, -0.16143593192100525, 0.12096434086561203, -0.6373521089553833, 0.05205199122428894, -0.07293730974197388, -0.36700424551963806, 0.2204413115978241, 0.18537560105323792, -0.5274080634117126, 0.17991623282432556, 0.3637044429779053, -0.29010361433029175, -0.4685290455818176, 0.09170608967542648, -0.2197381854057312, -0.22514258325099945, -0.19431957602500916, 0.20419859886169434, 0.4475615322589874, -0.14017552137374878, 0.07604647427797318, -0.2947045862674713, 0.23181207478046417, 0.07234301418066025, -0.0663544088602066, 0.33291640877723694, -0.2421988844871521, -0.28738367557525635, -0.0886533185839653, -0.04738059639930725, 0.44308367371559143, 0.07907042652368546, -0.09361077845096588, -0.05374599248170853, -0.19453224539756775, -0.09055223315954208, 0.1366429328918457, 0.18689389526844025, 0.034931182861328125, -0.19097454845905304, 0.18847894668579102, 0.04065198451280594, -0.1710743010044098, 0.3147936463356018, 0.07874008268117905, -0.3514241874217987, 0.046222783625125885, -0.27558788657188416, 0.06613311916589737, 0.05827738344669342, -0.19548015296459198, 0.07379009574651718, 0.3258398473262787, 0.34613853693008423, 0.6151672601699829, -0.14222495257854462, 0.03696047514677048, -0.10558722913265228, -0.08923319727182388, -0.13818316161632538, 0.04887549206614494, 0.03120546229183674, 0.0986214280128479, 0.45433440804481506, -0.09128525108098984, 0.40406185388565063, -0.03585108369588852, -0.5766013860702515, 0.12817098200321198, -0.12338577955961227, -0.058083996176719666, -0.1357419490814209, 0.09506358951330185, -0.24078145623207092, -0.07107439637184143, -0.06564397364854813, 0.278617799282074, -0.4039295017719269, -0.1571335792541504, 0.20741227269172668, -0.30347326397895813, 0.004997240845113993, -0.39110419154167175, -0.5688672065734863, 0.2691826820373535, -0.5139123797416687, 0.4909950792789459, 0.19012030959129333, 0.16001051664352417, 0.11555694788694382, -0.28834420442581177, 0.2076674848794937, -0.16080133616924286, 0.7847932577133179, -0.024712782353162766, 0.0881991758942604, 0.06709706038236618, -0.17617781460285187, -0.2226552963256836, 0.09296692907810211, -0.0646568313241005, 0.3195875287055969, 0.5575419068336487, 0.6967495679855347, -0.42408066987991333, -0.19427920877933502, -0.20978114008903503, -0.2517467737197876, 0.25303393602371216, 0.01724100112915039, -0.04699874669313431, 0.06934783607721329, 0.020563004538416862, 0.12825728952884674, 0.01688322424888611, 0.09503991156816483, 0.30514100193977356, -0.4435870945453644, 0.010746504180133343, -0.09154896438121796, -0.001931142178364098, -0.013529282063245773, 0.22500237822532654, -0.07833173871040344, -0.0048497398383915424, 0.1429758220911026, 0.11112957447767258, -0.11328360438346863, -0.22038331627845764, 0.3239734470844269, 0.07899118959903717, 0.0328039824962616, 0.20276091992855072, 0.14802342653274536, 0.3328092694282532, 0.2457713931798935, 0.1525711566209793, -0.10345516353845596, 0.36162111163139343, -0.18730036914348602, 0.10934291034936905, 0.30883529782295227, 0.08540221303701401, -0.38700389862060547, 0.33887699246406555, -0.1079762876033783, 0.050077442079782486, -0.11401490122079849, 0.20457501709461212, -0.2807523310184479, -0.17799070477485657, 0.4216747581958771, 0.23787403106689453, 0.9285314679145813, -0.33643242716789246, 0.05999410152435303, -0.06823993474245071, 0.03982501104474068, 0.06916146725416183, -0.2557384669780731, 0.11311472952365875, -0.33191969990730286, 0.10913512110710144, 0.13941355049610138, -0.02958984300494194, 0.03687693923711777, 0.3531339466571808, -0.06629776209592819, -0.1678936928510666, -0.06112765148282051, 0.6849361062049866, -0.25959542393684387, 0.06886616349220276, 0.22724120318889618, -0.2581678032875061, 0.032807398587465286, 0.18320666253566742, 0.1507478505373001, -0.04879486560821533, 0.10846929997205734, -0.021627292037010193, -0.23087194561958313, -0.33491456508636475, 0.04446566104888916, -0.18123191595077515, -0.2587055265903473, 0.03796590864658356, 0.14072810113430023, 0.1834966242313385, -0.34021538496017456, -0.10040639340877533, -0.18117694556713104, 0.5732859969139099, -0.04166223853826523, 0.07201195508241653, 0.20781457424163818, 0.08520790934562683, 0.1401391327381134, -0.31049707531929016, -0.35915935039520264, -0.028936998918652534, 0.1272338330745697, -0.13103927671909332, -0.1846061497926712, -0.004005769267678261, -0.37529313564300537, 0.17352637648582458, 0.3524017035961151, 0.07764128595590591, -0.02796594612300396, -0.03254802152514458, -0.13050757348537445, -0.05690724030137062, 0.20346903800964355, -0.1155056357383728, -0.05951663479208946, 0.04329643398523331, 0.25540027022361755, -0.2432091236114502, 0.05800241976976395, 0.45783230662345886, -0.047944821417331696, -0.04624772071838379, 0.4848812520503998, -0.2812660038471222, -0.36405473947525024, -0.24274542927742004, 0.3529662787914276, 0.17320382595062256, 0.03570921719074249, 0.07680607587099075, 0.09385136514902115, -0.30558454990386963, 0.23679488897323608, 0.31846684217453003, -0.17624694108963013, 0.15141232311725616, -0.20351684093475342, 0.061366792768239975, -0.4640691578388214, 0.07127605378627777, -0.06621898710727692, -0.11937917023897171, -0.09115396440029144, 0.03197960555553436, -0.34051376581192017, 0.06845087558031082, -0.3991546630859375, 0.06554993242025375, -0.1681622862815857, 0.1636841595172882, -0.21047134697437286, -0.13575027883052826, 0.08158707618713379, 0.10807139426469803, 0.32421961426734924, 0.18798023462295532, -0.1877538561820984, -0.3244849145412445, 0.06730570644140244, 0.13132187724113464, 0.06423600018024445, -0.2685280442237854, 0.25997281074523926, 0.04350180923938751, -0.2348211705684662, -0.31133538484573364, -0.011705547571182251, 0.35232383012771606, -0.14804424345493317, -0.32756197452545166, 0.3703552484512329, 0.05521303042769432, 0.13564585149288177, -0.005868155974894762, -0.008139025419950485, 0.15682969987392426, -0.20234040915966034, -0.0221573356539011, 0.1734188199043274, -0.16942594945430756, 0.3476220369338989, 0.13160525262355804, 0.1967850774526596, -0.025046950206160545, 0.29516133666038513, -0.056019119918346405, -0.1341526210308075, 0.46732670068740845, -0.13968466222286224, -0.08147614449262619, 0.08154559135437012, -0.5007075071334839, 0.2899496257305145, 0.27286648750305176, 0.05897596478462219, -0.28853729367256165, 0.2847958505153656, -0.1061692163348198, 0.20726153254508972, 0.1272059977054596, 0.042239945381879807, 0.03741031140089035, -0.1157262846827507, 0.03274434804916382, -0.1051267683506012, -0.31761863827705383, -0.15477338433265686, 0.0646892562508583, 0.06355945020914078, -0.14698228240013123, 0.29038938879966736, -0.08298712223768234, 0.09295552968978882, 0.18270067870616913, 0.32439929246902466, 0.2963699996471405, 0.21350447833538055, 0.6759409308433533, -0.4974272549152374, -0.195365771651268, 0.016092633828520775, 0.5532184839248657, 0.01169760711491108, 0.211719810962677, 0.15118254721164703, 0.06948281079530716, 0.04340440407395363, -0.10611826181411743, -0.0071861580945551395, 0.17602260410785675, -0.49377021193504333, -0.23781119287014008, -0.24213933944702148, -0.13801108300685883, -0.1883798986673355, 0.033893611282110214, -0.028634699061512947, 0.37949350476264954, 0.08839774131774902, -0.07734477519989014, 0.3100503087043762, 0.08030103147029877, -0.16810114681720734, -0.24537590146064758, 0.3580330014228821, -0.22641034424304962, 0.286741703748703, -0.5794817805290222, 0.2896808981895447, 0.1874123215675354, 0.1053430587053299, 0.26660820841789246, 0.3331657946109772, -0.2945898473262787, -0.02160326950252056, -0.1209082156419754, -0.19651389122009277, -0.16481652855873108, 0.3980391025543213, 0.11952244490385056, -0.15271341800689697, 0.10042021423578262, 0.05228959396481514, -0.42467233538627625, -0.3983991742134094, 0.056172579526901245, -0.35380682349205017, 0.6179584860801697, -0.051473308354616165, -0.08755242079496384, -0.06995395570993423, -0.18159514665603638, -0.04170550778508186, -0.10915648192167282, -0.2237141877412796, -0.13893668353557587, -0.18180297315120697, 0.17809852957725525, -0.006741441320627928, 0.13233108818531036, -0.012937274761497974, 0.15499763190746307, 0.1709180325269699, -0.11249368637800217, -0.5199297070503235, -0.19793927669525146, -0.1832541972398758, 0.3191237151622772, -0.2135244607925415, 0.16744443774223328, -0.2893699109554291, 0.13862670958042145, 0.1789918690919876, 0.017333852127194405, 0.08538768440485, -0.054572105407714844, -0.0957583487033844, -0.05223521217703819, -0.05878380313515663, 0.5011264085769653, -0.1163657158613205, -0.30478131771087646, -0.04672188684344292, -0.3979416489601135, 0.40676724910736084, -0.08691935986280441, 0.27818843722343445, -0.15612952411174774, 0.23907478153705597, -0.3628089129924774, 0.12587149441242218, 0.14315196871757507, 0.10940847545862198, -0.040635377168655396, -0.08680728822946548, 0.07036858797073364, 0.0639350637793541, 0.24782872200012207, -0.06212269887328148, 0.19984059035778046, 0.15441711246967316, -0.08775009214878082, -0.002335013123229146, -0.037428464740514755, 0.04974334314465523, -0.08047236502170563, 0.11490646749734879, 0.22085165977478027, -0.07697005569934845, 0.34819233417510986, -0.1471051722764969, 0.024101650342345238, -0.31681084632873535, 0.13387301564216614, 0.26369792222976685, -0.04857664927840233, -0.12548382580280304, -0.20808625221252441, 0.20749765634536743, -0.4742338955402374, -0.14816544950008392, 0.018754715099930763, 0.0964224562048912, 0.22933782637119293, 0.07519245147705078, 0.03931177407503128, -0.18328702449798584, 0.34415924549102783, -0.14427681267261505, -0.23943620920181274, 0.10230997204780579, -0.00388337136246264, -0.21481819450855255, -0.18905377388000488, 0.11414168775081635, -0.012887314893305302, -0.073494553565979, -0.034320931881666183, 0.08016590029001236 ]
https://github.com/huggingface/datasets/issues/2294
Slow #0 when using map to tokenize.
That makes sense ! You can indeed use `map` on both datasets separately and then concatenate. Another option is to concatenate, then shuffle, and then `map`.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
26
Slow #0 when using map to tokenize.
[ -0.39829638600349426, -0.27673956751823425, -0.15675170719623566, 0.07229925692081451, 0.17956656217575073, -0.28420189023017883, 0.16671018302440643, 0.3611929714679718, 0.025170614942908287, 0.16583839058876038, 0.20580852031707764, 0.29538068175315857, -0.1361733227968216, -0.16850964725017548, -0.37868496775627136, 0.22511759400367737, -0.03382176160812378, 0.17083634436130524, 0.21138617396354675, -0.22907458245754242, -0.04515673220157623, -0.00602883892133832, -0.3484461307525635, 0.06282239407300949, -0.21385258436203003, -0.1342504918575287, 0.1271468549966812, -0.16584518551826477, -0.3025500178337097, -0.2543891370296478, -0.4697091579437256, 0.07233404368162155, -0.4138879179954529, 0.2556907534599304, -0.00010499355266802013, -0.12011846899986267, 0.3102036118507385, 0.28526803851127625, 0.0005716030136682093, 0.20793457329273224, 0.060159094631671906, -0.390820175409317, -0.3634931445121765, -0.19830535352230072, -0.03936650604009628, -0.09756369888782501, 0.24851125478744507, -0.046048395335674286, 0.10652744024991989, -0.10315033793449402, 0.2618982195854187, 0.30083170533180237, -0.4656849503517151, 0.059881001710891724, 0.2981656491756439, 0.013415126129984856, 0.08029065281152725, -0.11011618375778198, 0.22198791801929474, -0.10555831342935562, -0.22181436419487, 0.2136281579732895, -0.3166869580745697, -0.2337806075811386, 0.11443077027797699, 0.018212372437119484, 0.4258610010147095, 0.0794156938791275, 0.3140653967857361, 0.11187495291233063, -0.1552758514881134, 0.3101065158843994, 0.005101024638861418, -0.004126636777073145, -0.2907882034778595, -0.04303474351763725, 0.043921228498220444, -0.28860703110694885, 0.05893441289663315, -0.010617568157613277, -0.421475887298584, 0.16842302680015564, 0.1822507679462433, 0.26227426528930664, -0.3085264265537262, 0.602881669998169, 0.1222163587808609, 0.04857174679636955, 0.00874533224850893, -0.2704603672027588, -0.5456068515777588, -0.21471738815307617, -0.18440303206443787, 0.40843358635902405, 0.1834169626235962, -0.12523730099201202, 0.3315824866294861, -0.19725126028060913, -0.0005596126429736614, -0.3630112409591675, -0.01969251036643982, 0.5183887481689453, 0.21059279143810272, 0.0588720329105854, -0.027786605060100555, 0.17972971498966217, 0.11696334183216095, 0.21220314502716064, 0.26756441593170166, -0.3332318663597107, -0.18727326393127441, 0.03448043391108513, -0.17123791575431824, 0.026701338589191437, -0.14952875673770905, 0.04272747039794922, -0.3373527228832245, 0.15778079628944397, 0.0491197369992733, 0.014931882731616497, -0.4212355315685272, 0.16186103224754333, 0.36394861340522766, 0.13014447689056396, 0.006807033903896809, 0.07121966034173965, -0.06734626740217209, -0.24248163402080536, -0.37337246537208557, 0.19363555312156677, -0.2146950513124466, -0.1641327440738678, -0.23317377269268036, -0.15297412872314453, -0.26642030477523804, 0.2922305464744568, -0.04369337111711502, -0.04448666796088219, -0.037964824587106705, 0.1837424784898758, 0.2834874391555786, -0.05411121994256973, 0.19841206073760986, -0.1687372624874115, -0.40343233942985535, 0.34568852186203003, 0.07378799468278885, -0.1342294067144394, -0.2118442952632904, 0.020861990749835968, -0.2975701093673706, -0.28656744956970215, 0.1565927267074585, 0.2592812776565552, 0.05966690555214882, 0.24359627068042755, 0.003787386231124401, 0.3028462827205658, 0.0053032939322292805, -0.24185626208782196, -0.29426684975624084, 0.18102006614208221, -0.33698639273643494, -0.13161808252334595, -0.02371908724308014, 0.33100026845932007, -0.0046841297298669815, -0.12545156478881836, 0.30623510479927063, 0.2819155156612396, 0.42399799823760986, 0.40154963731765747, -0.1592348963022232, 0.08684392273426056, -0.27956247329711914, 0.6966093182563782, 0.3077012598514557, -0.1938055157661438, -0.24608437716960907, 0.3929535746574402, -0.5247856974601746, -0.3344947397708893, 0.06061455234885216, -0.06127369403839111, 0.42399173974990845, -0.04904771223664284, 0.40771761536598206, -0.0016666976734995842, 0.10897847265005112, 0.28597205877304077, -0.45155149698257446, 0.12354344874620438, 0.13589565455913544, -0.20143693685531616, -0.24990670382976532, -0.1751573532819748, 0.026828136295080185, 0.08598355948925018, -0.11050432920455933, -0.14029152691364288, 0.22422710061073303, -0.038651030510663986, 0.1650511920452118, -0.284093976020813, 0.04916330426931381, 0.2732013165950775, 0.14553767442703247, 0.023220431059598923, 0.008430087007582188, 0.03559134528040886, 0.0755346268415451, 0.005792906042188406, 0.01191380899399519, -0.009859083220362663, 0.08800723403692245, 0.2884158194065094, 0.2354496568441391, -0.16444526612758636, 0.04598560184240341, 0.25551846623420715, 0.025611860677599907, -0.33233174681663513, 0.1064518541097641, -0.06486143916845322, 0.34232616424560547, -0.15139809250831604, 0.0532987043261528, -0.13253682851791382, -0.13047604262828827, 0.10478072613477707, 0.2144264131784439, -0.07777734100818634, 0.0986580029129982, 0.1632661521434784, 0.07588273286819458, 0.10223942250013351, -0.005041605327278376, 0.38416460156440735, 0.26619863510131836, 0.18167372047901154, 0.3063023090362549, 0.10837116092443466, 0.09183931350708008, -0.3695235252380371, 0.248731791973114, 0.5189573764801025, 0.3680513799190521, 0.20086368918418884, -0.07730124890804291, -0.10658697783946991, 0.008970443159341812, 0.07674296945333481, -0.07187718152999878, -0.22410175204277039, 0.2031461000442505, 0.3369913101196289, 0.1794961392879486, 0.24279719591140747, 0.28985899686813354, 0.13106794655323029, 0.4551888108253479, -0.2119283676147461, 0.04737672582268715, 0.036881931126117706, -0.000856844475492835, -0.051537830382585526, 0.02274022251367569, -0.3426545560359955, -0.12905660271644592, 0.16007503867149353, 0.24398376047611237, -0.15082649886608124, 0.013494379818439484, -0.15911364555358887, 0.273328959941864, -0.12666885554790497, -0.05938202515244484, 0.06036929786205292, 0.15032780170440674, -0.09744139760732651, -0.22483262419700623, -0.1811569780111313, 0.29531925916671753, 0.258501797914505, -0.0372118316590786, -0.11215516924858093, -0.0691300630569458, 0.01801382750272751, 0.3234797716140747, -0.031629856675863266, 0.0762919932603836, -0.4369991719722748, 0.2418030947446823, 0.06501226872205734, -0.1284656822681427, 0.2517984211444855, 0.025369860231876373, -0.044137533754110336, 0.19513314962387085, 0.11226187646389008, -0.1223558858036995, -0.18390041589736938, -0.32573503255844116, 0.06486251950263977, 0.2165684551000595, -0.12958770990371704, 0.20496810972690582, -0.1257142573595047, -0.16143593192100525, 0.12096434086561203, -0.6373521089553833, 0.05205199122428894, -0.07293730974197388, -0.36700424551963806, 0.2204413115978241, 0.18537560105323792, -0.5274080634117126, 0.17991623282432556, 0.3637044429779053, -0.29010361433029175, -0.4685290455818176, 0.09170608967542648, -0.2197381854057312, -0.22514258325099945, -0.19431957602500916, 0.20419859886169434, 0.4475615322589874, -0.14017552137374878, 0.07604647427797318, -0.2947045862674713, 0.23181207478046417, 0.07234301418066025, -0.0663544088602066, 0.33291640877723694, -0.2421988844871521, -0.28738367557525635, -0.0886533185839653, -0.04738059639930725, 0.44308367371559143, 0.07907042652368546, -0.09361077845096588, -0.05374599248170853, -0.19453224539756775, -0.09055223315954208, 0.1366429328918457, 0.18689389526844025, 0.034931182861328125, -0.19097454845905304, 0.18847894668579102, 0.04065198451280594, -0.1710743010044098, 0.3147936463356018, 0.07874008268117905, -0.3514241874217987, 0.046222783625125885, -0.27558788657188416, 0.06613311916589737, 0.05827738344669342, -0.19548015296459198, 0.07379009574651718, 0.3258398473262787, 0.34613853693008423, 0.6151672601699829, -0.14222495257854462, 0.03696047514677048, -0.10558722913265228, -0.08923319727182388, -0.13818316161632538, 0.04887549206614494, 0.03120546229183674, 0.0986214280128479, 0.45433440804481506, -0.09128525108098984, 0.40406185388565063, -0.03585108369588852, -0.5766013860702515, 0.12817098200321198, -0.12338577955961227, -0.058083996176719666, -0.1357419490814209, 0.09506358951330185, -0.24078145623207092, -0.07107439637184143, -0.06564397364854813, 0.278617799282074, -0.4039295017719269, -0.1571335792541504, 0.20741227269172668, -0.30347326397895813, 0.004997240845113993, -0.39110419154167175, -0.5688672065734863, 0.2691826820373535, -0.5139123797416687, 0.4909950792789459, 0.19012030959129333, 0.16001051664352417, 0.11555694788694382, -0.28834420442581177, 0.2076674848794937, -0.16080133616924286, 0.7847932577133179, -0.024712782353162766, 0.0881991758942604, 0.06709706038236618, -0.17617781460285187, -0.2226552963256836, 0.09296692907810211, -0.0646568313241005, 0.3195875287055969, 0.5575419068336487, 0.6967495679855347, -0.42408066987991333, -0.19427920877933502, -0.20978114008903503, -0.2517467737197876, 0.25303393602371216, 0.01724100112915039, -0.04699874669313431, 0.06934783607721329, 0.020563004538416862, 0.12825728952884674, 0.01688322424888611, 0.09503991156816483, 0.30514100193977356, -0.4435870945453644, 0.010746504180133343, -0.09154896438121796, -0.001931142178364098, -0.013529282063245773, 0.22500237822532654, -0.07833173871040344, -0.0048497398383915424, 0.1429758220911026, 0.11112957447767258, -0.11328360438346863, -0.22038331627845764, 0.3239734470844269, 0.07899118959903717, 0.0328039824962616, 0.20276091992855072, 0.14802342653274536, 0.3328092694282532, 0.2457713931798935, 0.1525711566209793, -0.10345516353845596, 0.36162111163139343, -0.18730036914348602, 0.10934291034936905, 0.30883529782295227, 0.08540221303701401, -0.38700389862060547, 0.33887699246406555, -0.1079762876033783, 0.050077442079782486, -0.11401490122079849, 0.20457501709461212, -0.2807523310184479, -0.17799070477485657, 0.4216747581958771, 0.23787403106689453, 0.9285314679145813, -0.33643242716789246, 0.05999410152435303, -0.06823993474245071, 0.03982501104474068, 0.06916146725416183, -0.2557384669780731, 0.11311472952365875, -0.33191969990730286, 0.10913512110710144, 0.13941355049610138, -0.02958984300494194, 0.03687693923711777, 0.3531339466571808, -0.06629776209592819, -0.1678936928510666, -0.06112765148282051, 0.6849361062049866, -0.25959542393684387, 0.06886616349220276, 0.22724120318889618, -0.2581678032875061, 0.032807398587465286, 0.18320666253566742, 0.1507478505373001, -0.04879486560821533, 0.10846929997205734, -0.021627292037010193, -0.23087194561958313, -0.33491456508636475, 0.04446566104888916, -0.18123191595077515, -0.2587055265903473, 0.03796590864658356, 0.14072810113430023, 0.1834966242313385, -0.34021538496017456, -0.10040639340877533, -0.18117694556713104, 0.5732859969139099, -0.04166223853826523, 0.07201195508241653, 0.20781457424163818, 0.08520790934562683, 0.1401391327381134, -0.31049707531929016, -0.35915935039520264, -0.028936998918652534, 0.1272338330745697, -0.13103927671909332, -0.1846061497926712, -0.004005769267678261, -0.37529313564300537, 0.17352637648582458, 0.3524017035961151, 0.07764128595590591, -0.02796594612300396, -0.03254802152514458, -0.13050757348537445, -0.05690724030137062, 0.20346903800964355, -0.1155056357383728, -0.05951663479208946, 0.04329643398523331, 0.25540027022361755, -0.2432091236114502, 0.05800241976976395, 0.45783230662345886, -0.047944821417331696, -0.04624772071838379, 0.4848812520503998, -0.2812660038471222, -0.36405473947525024, -0.24274542927742004, 0.3529662787914276, 0.17320382595062256, 0.03570921719074249, 0.07680607587099075, 0.09385136514902115, -0.30558454990386963, 0.23679488897323608, 0.31846684217453003, -0.17624694108963013, 0.15141232311725616, -0.20351684093475342, 0.061366792768239975, -0.4640691578388214, 0.07127605378627777, -0.06621898710727692, -0.11937917023897171, -0.09115396440029144, 0.03197960555553436, -0.34051376581192017, 0.06845087558031082, -0.3991546630859375, 0.06554993242025375, -0.1681622862815857, 0.1636841595172882, -0.21047134697437286, -0.13575027883052826, 0.08158707618713379, 0.10807139426469803, 0.32421961426734924, 0.18798023462295532, -0.1877538561820984, -0.3244849145412445, 0.06730570644140244, 0.13132187724113464, 0.06423600018024445, -0.2685280442237854, 0.25997281074523926, 0.04350180923938751, -0.2348211705684662, -0.31133538484573364, -0.011705547571182251, 0.35232383012771606, -0.14804424345493317, -0.32756197452545166, 0.3703552484512329, 0.05521303042769432, 0.13564585149288177, -0.005868155974894762, -0.008139025419950485, 0.15682969987392426, -0.20234040915966034, -0.0221573356539011, 0.1734188199043274, -0.16942594945430756, 0.3476220369338989, 0.13160525262355804, 0.1967850774526596, -0.025046950206160545, 0.29516133666038513, -0.056019119918346405, -0.1341526210308075, 0.46732670068740845, -0.13968466222286224, -0.08147614449262619, 0.08154559135437012, -0.5007075071334839, 0.2899496257305145, 0.27286648750305176, 0.05897596478462219, -0.28853729367256165, 0.2847958505153656, -0.1061692163348198, 0.20726153254508972, 0.1272059977054596, 0.042239945381879807, 0.03741031140089035, -0.1157262846827507, 0.03274434804916382, -0.1051267683506012, -0.31761863827705383, -0.15477338433265686, 0.0646892562508583, 0.06355945020914078, -0.14698228240013123, 0.29038938879966736, -0.08298712223768234, 0.09295552968978882, 0.18270067870616913, 0.32439929246902466, 0.2963699996471405, 0.21350447833538055, 0.6759409308433533, -0.4974272549152374, -0.195365771651268, 0.016092633828520775, 0.5532184839248657, 0.01169760711491108, 0.211719810962677, 0.15118254721164703, 0.06948281079530716, 0.04340440407395363, -0.10611826181411743, -0.0071861580945551395, 0.17602260410785675, -0.49377021193504333, -0.23781119287014008, -0.24213933944702148, -0.13801108300685883, -0.1883798986673355, 0.033893611282110214, -0.028634699061512947, 0.37949350476264954, 0.08839774131774902, -0.07734477519989014, 0.3100503087043762, 0.08030103147029877, -0.16810114681720734, -0.24537590146064758, 0.3580330014228821, -0.22641034424304962, 0.286741703748703, -0.5794817805290222, 0.2896808981895447, 0.1874123215675354, 0.1053430587053299, 0.26660820841789246, 0.3331657946109772, -0.2945898473262787, -0.02160326950252056, -0.1209082156419754, -0.19651389122009277, -0.16481652855873108, 0.3980391025543213, 0.11952244490385056, -0.15271341800689697, 0.10042021423578262, 0.05228959396481514, -0.42467233538627625, -0.3983991742134094, 0.056172579526901245, -0.35380682349205017, 0.6179584860801697, -0.051473308354616165, -0.08755242079496384, -0.06995395570993423, -0.18159514665603638, -0.04170550778508186, -0.10915648192167282, -0.2237141877412796, -0.13893668353557587, -0.18180297315120697, 0.17809852957725525, -0.006741441320627928, 0.13233108818531036, -0.012937274761497974, 0.15499763190746307, 0.1709180325269699, -0.11249368637800217, -0.5199297070503235, -0.19793927669525146, -0.1832541972398758, 0.3191237151622772, -0.2135244607925415, 0.16744443774223328, -0.2893699109554291, 0.13862670958042145, 0.1789918690919876, 0.017333852127194405, 0.08538768440485, -0.054572105407714844, -0.0957583487033844, -0.05223521217703819, -0.05878380313515663, 0.5011264085769653, -0.1163657158613205, -0.30478131771087646, -0.04672188684344292, -0.3979416489601135, 0.40676724910736084, -0.08691935986280441, 0.27818843722343445, -0.15612952411174774, 0.23907478153705597, -0.3628089129924774, 0.12587149441242218, 0.14315196871757507, 0.10940847545862198, -0.040635377168655396, -0.08680728822946548, 0.07036858797073364, 0.0639350637793541, 0.24782872200012207, -0.06212269887328148, 0.19984059035778046, 0.15441711246967316, -0.08775009214878082, -0.002335013123229146, -0.037428464740514755, 0.04974334314465523, -0.08047236502170563, 0.11490646749734879, 0.22085165977478027, -0.07697005569934845, 0.34819233417510986, -0.1471051722764969, 0.024101650342345238, -0.31681084632873535, 0.13387301564216614, 0.26369792222976685, -0.04857664927840233, -0.12548382580280304, -0.20808625221252441, 0.20749765634536743, -0.4742338955402374, -0.14816544950008392, 0.018754715099930763, 0.0964224562048912, 0.22933782637119293, 0.07519245147705078, 0.03931177407503128, -0.18328702449798584, 0.34415924549102783, -0.14427681267261505, -0.23943620920181274, 0.10230997204780579, -0.00388337136246264, -0.21481819450855255, -0.18905377388000488, 0.11414168775081635, -0.012887314893305302, -0.073494553565979, -0.034320931881666183, 0.08016590029001236 ]
https://github.com/huggingface/datasets/issues/2288
Load_dataset for local CSV files
Hi, this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data): ```python import ast # load the dataset and copy the features def process(ex): return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])} dataset = dataset.map(process, features=new_features) ```
The method load_dataset fails to correctly load a dataset from csv. Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings. row example: ```tokens | labels ['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ] ``` The method, loads each list as a string: (i.g "['I' , 'am', 'John']"). To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type ``` new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None)) new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags))) dataset = dataset.cast(new_features) ``` but I got the following error ``` ArrowNotImplementedError: Unsupported cast from string to list using function cast_list ``` Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well. How can this be solved ?
72
Load_dataset for local CSV files
[ -0.7206380367279053, 0.07758057862520218, -0.20235584676265717, 0.07469610869884491, 0.0720682218670845, 0.04675949364900589, 0.6375183463096619, 0.2776237726211548, 0.5893317461013794, 0.10637272894382477, 0.073078453540802, 0.08658353239297867, -0.03324124962091446, 0.44712021946907043, 0.13647019863128662, 0.3373502194881439, 0.08674008399248123, 0.5425669550895691, -0.38275688886642456, -0.24748536944389343, -0.19573180377483368, -0.050809700042009354, -0.0739080011844635, -0.05177092179656029, -0.00555759109556675, 0.18445022404193878, 0.041838716715574265, 0.44028735160827637, -0.022465163841843605, -0.24075518548488617, 0.3200278580188751, 0.22937829792499542, 0.2976803481578827, 0.1880684643983841, -0.00010677260434022173, 0.14464665949344635, -0.09167111665010452, -0.161991685628891, -0.2452620416879654, -0.16359873116016388, -0.4005591571331024, -0.34878048300743103, 0.11341233551502228, -0.261808842420578, 0.0023123929277062416, -0.14760734140872955, -0.06457485258579254, -0.5843526721000671, 0.27610257267951965, 0.41069623827934265, 0.22210142016410828, -0.013965125195682049, -0.4543072581291199, -0.11691084504127502, 0.16889651119709015, 0.2563035786151886, 0.07980307191610336, 0.3294239938259125, 0.12227482348680496, -0.25970959663391113, -0.1742943972349167, 0.011026930995285511, -0.17916622757911682, 0.03607846423983574, 0.2806265652179718, 0.07998736947774887, -0.1840745359659195, 0.2038465440273285, 0.16471868753433228, -0.022384371608495712, 0.6967229843139648, -0.17954349517822266, -0.15556226670742035, -0.018726250156760216, -0.1673157513141632, -0.30628839135169983, 0.11605260521173477, 0.13028641045093536, -0.0964139774441719, 0.2820274531841278, -0.13812030851840973, -0.14829199016094208, -0.27324044704437256, -0.042860183864831924, 0.030521485954523087, -0.12770850956439972, -0.08677716553211212, 0.018552938476204872, 0.10704521834850311, 0.13306285440921783, 0.30342817306518555, -0.14370140433311462, 0.151413232088089, 0.13860440254211426, -0.14761558175086975, -0.02797830104827881, 0.17405331134796143, -0.04574425518512726, 0.0598517581820488, -0.09220914542675018, 0.3130982220172882, 0.16962555050849915, 0.0612771138548851, 0.19399265944957733, 0.34644919633865356, -0.08832473307847977, 0.37442323565483093, -0.0709303468465805, 0.3495577871799469, -0.33569982647895813, -0.20122653245925903, 0.055885300040245056, -0.20145465433597565, -0.3614058792591095, -0.04900514334440231, 0.20917092263698578, -0.16554385423660278, -0.25433284044265747, -0.08596557378768921, 0.24583588540554047, 0.33395928144454956, -0.22749926149845123, -0.16116555035114288, 0.28548189997673035, 0.11440397799015045, 0.1897645890712738, -0.15400385856628418, 0.01724030077457428, -0.023791754618287086, -0.16818994283676147, -0.24191366136074066, -0.06266774982213974, -0.02855655364692211, 0.01826053485274315, 0.3397228717803955, -0.24594241380691528, 0.19146475195884705, -0.15404494106769562, -0.030442431569099426, 0.03250208497047424, 0.08894797414541245, -0.05685802549123764, 0.0612875260412693, 0.33273616433143616, -0.005752150900661945, -0.09026376157999039, 0.24826563894748688, -0.22967523336410522, -0.26240280270576477, 0.1698247343301773, -0.17285197973251343, -0.42023664712905884, -0.03219550475478172, 0.24245519936084747, -0.06364531069993973, -0.03768276050686836, -0.13934224843978882, 0.07264555990695953, -0.06046287715435028, -0.11025995761156082, -0.2431343048810959, -0.02648071199655533, -0.3046592175960541, -0.1962316334247589, 0.01663871854543686, 0.6715443134307861, -0.8467828035354614, 0.14338894188404083, 0.06029445305466652, -0.22602508962154388, -0.09181363880634308, 0.13527832925319672, -0.34294742345809937, 0.23416787385940552, -0.20694684982299805, 0.2007141411304474, 0.39024442434310913, -0.28819653391838074, -0.04794992879033089, 0.6014126539230347, -0.11798273772001266, -0.5016017556190491, 0.21527186036109924, -0.040624987334012985, 0.1443101018667221, 0.11889973282814026, 0.15030354261398315, 0.36589738726615906, -0.04303388297557831, 0.21220232546329498, -0.034183744341135025, -0.18411020934581757, 0.1183076798915863, 0.24272584915161133, -0.04637954756617546, 0.2233988344669342, 0.4891297519207001, -0.517856240272522, 0.16661246120929718, -0.33859628438949585, 0.06366635113954544, 0.18392698466777802, 0.050244253128767014, 0.10979975759983063, -0.02736012265086174, 0.054575901478528976, -0.42803123593330383, 0.020015012472867966, 0.2528984546661377, -0.07908042520284653, -0.01897546462714672, -0.247313991189003, -0.4286113679409027, 0.13846080005168915, -0.0023164863232523203, 0.10032813251018524, 0.1422780305147171, 0.24941523373126984, 0.0031496738083660603, 0.006736695300787687, -0.3033483028411865, 0.09766103327274323, -0.29209771752357483, -0.07226770371198654, -0.17917178571224213, 0.09215205162763596, 0.08036137372255325, 0.12894298136234283, 0.13654650747776031, 0.03687167912721634, 0.019035568460822105, -0.18829114735126495, -0.05679594725370407, 0.3071309030056, 0.10182476043701172, 0.14468471705913544, 0.28423815965652466, 0.10613744705915451, 0.07043986022472382, 0.0161710437387228, 0.2807323932647705, -0.3099134564399719, 0.2054486721754074, 0.015996843576431274, -0.5075781345367432, 0.5456465482711792, -0.2165171504020691, 0.00032325362553820014, 0.12273451685905457, -0.27090349793434143, 0.49052613973617554, -0.020134348422288895, 0.05141209065914154, -0.2008594423532486, -0.037689581513404846, 0.31206509470939636, 0.35184940695762634, 0.34372347593307495, -0.2236642986536026, 0.03618556633591652, 0.2212575078010559, -0.12156764417886734, -0.018087951466441154, 0.0014684328343719244, -0.11421025544404984, -0.044804636389017105, 0.33870840072631836, 0.19225797057151794, 0.445345401763916, 0.22916726768016815, -0.09504848718643188, 0.034747663885354996, 0.14590664207935333, -0.2646602988243103, 0.14178521931171417, -0.408235102891922, -0.016552478075027466, 0.3909437656402588, -0.07615774869918823, -0.14461326599121094, -0.5623932480812073, -0.012147310189902782, 0.010688422247767448, 0.14115549623966217, -0.2380719780921936, 0.012092898599803448, -0.23031367361545563, -0.014867479912936687, -0.2970801591873169, 0.30763813853263855, 0.15042075514793396, 0.012370651587843895, -0.2234944850206375, 0.028284462168812752, -0.16911007463932037, -0.10222785174846649, -0.1677768975496292, 0.4410824775695801, 0.18965773284435272, -0.43134790658950806, 0.18895867466926575, -0.3461592197418213, -0.1858910173177719, 0.1588590145111084, 0.16712285578250885, 0.19357438385486603, 0.10802315175533295, -0.11300178617238998, 0.039942845702171326, 0.01648194156587124, 0.08492306619882584, 0.13134214282035828, 0.14441615343093872, 0.029255274683237076, 0.024794893339276314, 0.3755800724029541, -0.04307159408926964, -0.2132650464773178, 0.14500871300697327, 0.02213108353316784, -0.05932139232754707, -0.012946651317179203, 0.1632956564426422, -0.1376008540391922, -0.20594657957553864, -0.6476870179176331, -0.5118923783302307, -0.22114792466163635, 0.2244711071252823, 0.11007975041866302, 0.17957760393619537, 0.07579228281974792, 0.3521881103515625, -0.11204176396131516, 0.05046333372592926, 0.04796602949500084, -0.19023828208446503, -0.325654536485672, 0.27142298221588135, -0.2680351436138153, -0.4133816659450531, -0.05270076543092728, -0.1710059642791748, 0.05073151737451553, 0.23252402245998383, -0.4261445701122284, 0.14762406051158905, 0.07811289280653, 0.2545424997806549, 0.057977043092250824, 0.1358191817998886, 0.14654968678951263, 0.11735976487398148, -0.158270001411438, -0.06115840747952461, -0.06597632169723511, 0.1147749274969101, 0.04374825954437256, -0.410575807094574, 0.1502501368522644, 0.1444750428199768, -0.39470627903938293, 0.5872945785522461, -0.20768924057483673, -0.1326926350593567, 0.2609783113002777, -0.2572733461856842, 0.3953095078468323, -0.04546024650335312, -0.16692356765270233, 0.12117412686347961, 0.0018949764780700207, -0.40238580107688904, 0.2722441852092743, 0.04371030628681183, -0.17888616025447845, -0.38672277331352234, 0.028932543471455574, -0.3702298402786255, -0.14381666481494904, 0.21221591532230377, 0.24006317555904388, 0.1785770207643509, 0.1794569194316864, 0.004730632528662682, -0.14575259387493134, 0.047521740198135376, -0.051978934556245804, 0.16887080669403076, -0.03747193515300751, -0.07967773079872131, -0.23578248918056488, 0.043877843767404556, -0.2629806101322174, 0.11595901846885681, 0.07074369490146637, 0.2973763644695282, -0.07460998743772507, -0.25674429535865784, -0.06183317303657532, 0.11692170798778534, 0.5353399515151978, -0.20854319632053375, 0.13919243216514587, -0.008263248018920422, -0.10128984600305557, 0.06071787327528, 0.12695543467998505, 0.10167031735181808, 0.11741959303617477, -0.22818656265735626, 0.44411924481391907, 0.2040560394525528, -0.046464212238788605, 0.08037400245666504, 0.2987673580646515, -0.2153286337852478, -0.33330485224723816, -0.07468387484550476, 0.054531559348106384, -0.23733451962471008, -0.0200396329164505, -0.2376488447189331, 0.08759821206331253, -0.14846271276474, -0.06329092383384705, -0.07061820477247238, 0.04035526514053345, 0.22306185960769653, 0.17330077290534973, -0.014440263621509075, 0.15272824466228485, 0.016408231109380722, -0.0065956758335232735, 0.27427947521209717, 0.24028076231479645, 0.5946782827377319, -0.3171912133693695, -0.3736882507801056, 0.14934954047203064, -0.3577862083911896, 0.4711419939994812, 0.15074852108955383, -0.1976037472486496, -0.1065610945224762, 0.1762399524450302, -0.22293902933597565, -0.32044732570648193, 0.28865015506744385, -0.1824108362197876, 0.027461566030979156, 0.15253247320652008, -0.5895099639892578, 0.26890483498573303, -0.1232142373919487, -0.07672202587127686, 0.03596636280417442, -0.31541380286216736, -0.09592188894748688, 0.2501087486743927, -0.02003704197704792, 0.4259650409221649, -0.3033022880554199, 0.24556832015514374, 0.09853990375995636, 0.1297418177127838, 0.24458199739456177, -0.35731375217437744, -0.11680383235216141, -0.3414990305900574, -0.20403814315795898, -0.08273515850305557, -0.07774657756090164, 0.27663514018058777, 0.49696651101112366, 0.17615185678005219, 0.11850234866142273, 0.2777842581272125, 0.3189986050128937, -0.18787802755832672, 0.19487643241882324, 0.15319083631038666, -0.19811804592609406, -0.21469782292842865, 0.13264819979667664, 0.1409105658531189, 0.026892313733696938, -0.11287610232830048, 0.03746526688337326, 0.03169425576925278, -0.11088500916957855, 0.1901031732559204, 0.015213321894407272, -0.04638350382447243, 0.1338690221309662, -0.1898120939731598, -0.5069568157196045, -0.1579093635082245, 0.279526948928833, 0.011873138137161732, 0.07536078244447708, -0.09829042851924896, -0.1573927402496338, -0.13630720973014832, 0.13933172821998596, -0.26580360531806946, 0.06045347452163696, 0.035845331847667694, 0.05704088136553764, -0.1586793214082718, 0.032707493752241135, -0.17254677414894104, -0.16903214156627655, 0.4542377293109894, 0.2501741349697113, 0.08236740529537201, -0.40895649790763855, -0.2870452404022217, 0.028738996013998985, 0.14993025362491608, -0.03162093460559845, 0.16580772399902344, 0.09598224610090256, 0.2250615805387497, -0.027163872495293617, 0.0499919056892395, -0.3185654878616333, -0.20860734581947327, 0.5237479209899902, 0.003678457345813513, -0.2736581265926361, 0.0913139283657074, 0.08067412674427032, -0.18267713487148285, -0.3481295704841614, 0.2104371190071106, 0.12904426455497742, -0.09211278706789017, -0.02706814371049404, 0.14130690693855286, -0.0210422333329916, 0.022950967773795128, 0.1734364926815033, 0.12484150379896164, -0.01997801475226879, 0.10678126662969589, -0.48298749327659607, -0.4823637008666992, -0.11476608365774155, 0.16420769691467285, 0.1985141932964325, 0.5446218252182007, -0.22891782224178314, -0.05892861261963844, -0.05813957750797272, -0.3649340867996216, -0.12669268250465393, 0.11741127073764801, 0.06128508597612381, 0.29837989807128906, 0.27271243929862976, 0.0403563492000103, -0.17585739493370056, 0.22235016524791718, -0.07001595199108124, -0.1871686428785324, -0.33027878403663635, 0.04320402815937996, 0.13478276133537292, -0.07950810343027115, -0.011345738545060158, -0.12463130801916122, -0.36571577191352844, -0.1140999048948288, -0.14185035228729248, 0.1489233672618866, 0.04567261040210724, -0.18238262832164764, 0.24316073954105377, -0.16698773205280304, 0.0316980704665184, -0.25684458017349243, 0.19763389229774475, 0.0006672564195469022, 0.30993086099624634, -0.14306201040744781, 0.08487328886985779, -0.1460527628660202, -0.09501435607671738, 0.13612934947013855, 0.062481630593538284, 0.1853027045726776, 0.032013073563575745, 0.1933625042438507, -0.2427910715341568, -0.06666238605976105, 0.24076469242572784, 0.4548895061016083, 0.340542733669281, -0.16269798576831818, 0.22644570469856262, 0.3401689827442169, 0.2465091347694397, -0.30176615715026855, -0.033908311277627945, 0.2716716527938843, -0.09043462574481964, 0.14554384350776672, 0.2380298525094986, 0.3705626130104065, -0.29709112644195557, 0.14501485228538513, -0.10808620601892471, 0.3103344142436981, 0.1014290377497673, -0.13217228651046753, 0.5039641857147217, -0.01655738614499569, 0.09958478063344955, -0.06596215069293976, 0.5515472292900085, 0.2185402810573578, 0.692354142665863, 0.0026700575836002827, -0.12172641605138779, -0.03861650452017784, 0.16623251140117645, -0.5537813305854797, -0.8599880337715149, 0.6583674550056458, 0.28171515464782715, -0.17020724713802338, -0.045340608805418015, 0.17628218233585358, 0.38856130838394165, -0.09744910895824432, 0.05598360300064087, -0.10877864062786102, 0.036346692591905594, -0.18376317620277405, -0.039002880454063416, -0.14292635023593903, -0.15286637842655182, -0.12292852252721786, 0.23322367668151855, -0.12295413762331009, 0.06338660418987274, 0.15000608563423157, -0.1175927221775055, 0.17010769248008728, -0.1831529289484024, 0.31673720479011536, -0.054859161376953125, -0.2575521469116211, -0.07731597870588303, 0.1249571219086647, 0.08017414063215256, 0.2152753323316574, 0.27848708629608154, -0.09541121870279312, 0.02899494580924511, 0.2942553758621216, 0.2001500129699707, -0.026328792795538902, -0.04877094179391861, -0.04945662245154381, -0.4505336284637451, 0.038374803960323334, -0.1896122545003891, 0.4105354845523834, 0.4534040093421936, 0.24351587891578674, -0.14905796945095062, 0.3776870369911194, 0.17145466804504395, -0.14174199104309082, -0.0818406343460083, -0.42248547077178955, 0.35820910334587097, -0.12100263684988022, -0.08108284324407578, -0.04678669944405556, -0.11899501085281372, -0.20935966074466705, 0.48030221462249756, 0.14698007702827454, 0.404483824968338, -0.007593362592160702, 0.13884229958057404, -0.05672883614897728, 0.4842817187309265, 0.06750984489917755, 0.30592721700668335, -0.16686151921749115, -0.15946847200393677, -0.7493556141853333, 0.052207425236701965, 0.10693112015724182, 0.13336963951587677, -0.1415545642375946, 0.07088328897953033, 0.562808632850647, 0.24683451652526855, -0.3366006910800934, 0.08518466353416443, 0.15750443935394287, 0.016716528683900833, -0.010160889476537704, -0.2633011043071747, -0.33404815196990967, 0.0846356675028801, -0.06707397103309631, -0.38693130016326904, 0.2084077149629593, -0.06917767971754074, 0.13480517268180847, -0.24816589057445526, -0.041039593517780304, -0.04511306807398796, -0.09066887944936752, 0.43586093187332153, -0.23418748378753662, 0.47305893898010254, -0.3106435537338257, 0.3491772711277008, 0.10169386118650436, -0.025618867948651314, -0.06382428854703903, 0.2785736620426178, 0.009290474466979504, -0.0916210412979126, -0.47999075055122375, 0.15069901943206787, -0.08169755339622498, 0.058493856340646744, 0.17147265374660492, 0.026584260165691376, 0.002765131648629904, -0.009970755316317081, -0.19777566194534302, -0.16160446405410767, 0.14413529634475708, -0.013360505923628807, -0.04517585039138794, -0.048698119819164276, 0.09809032082557678, -0.020697936415672302, 0.21488235890865326, -0.22258256375789642, -0.03798963874578476, -0.13627299666404724, 0.10411892831325531, 0.018131589516997337, 0.1729050725698471, -0.1793014407157898, 0.3728773891925812, 0.34948673844337463, -0.22150026261806488, -0.07018337398767471, 0.1670304536819458, -0.287320613861084, 0.1099519431591034, -0.12049252539873123, 0.17037013173103333, 0.0970582365989685, -0.22492177784442902, -0.3837462067604065, -0.4195723235607147 ]
https://github.com/huggingface/datasets/issues/2288
Load_dataset for local CSV files
Hi, Thanks for the reply. I have already used ```ast.literal_eval``` to evaluate the string into list, but I was getting another error: ``` ArrowInvalid: Could not convert X with type str: tried to convert to int ``` Why this happens ? Should labels be mapped to their ids and use int instead of str ?
The method load_dataset fails to correctly load a dataset from csv. Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings. row example: ```tokens | labels ['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ] ``` The method, loads each list as a string: (i.g "['I' , 'am', 'John']"). To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type ``` new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None)) new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags))) dataset = dataset.cast(new_features) ``` but I got the following error ``` ArrowNotImplementedError: Unsupported cast from string to list using function cast_list ``` Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well. How can this be solved ?
55
Load_dataset for local CSV files
[ -0.7206380367279053, 0.07758057862520218, -0.20235584676265717, 0.07469610869884491, 0.0720682218670845, 0.04675949364900589, 0.6375183463096619, 0.2776237726211548, 0.5893317461013794, 0.10637272894382477, 0.073078453540802, 0.08658353239297867, -0.03324124962091446, 0.44712021946907043, 0.13647019863128662, 0.3373502194881439, 0.08674008399248123, 0.5425669550895691, -0.38275688886642456, -0.24748536944389343, -0.19573180377483368, -0.050809700042009354, -0.0739080011844635, -0.05177092179656029, -0.00555759109556675, 0.18445022404193878, 0.041838716715574265, 0.44028735160827637, -0.022465163841843605, -0.24075518548488617, 0.3200278580188751, 0.22937829792499542, 0.2976803481578827, 0.1880684643983841, -0.00010677260434022173, 0.14464665949344635, -0.09167111665010452, -0.161991685628891, -0.2452620416879654, -0.16359873116016388, -0.4005591571331024, -0.34878048300743103, 0.11341233551502228, -0.261808842420578, 0.0023123929277062416, -0.14760734140872955, -0.06457485258579254, -0.5843526721000671, 0.27610257267951965, 0.41069623827934265, 0.22210142016410828, -0.013965125195682049, -0.4543072581291199, -0.11691084504127502, 0.16889651119709015, 0.2563035786151886, 0.07980307191610336, 0.3294239938259125, 0.12227482348680496, -0.25970959663391113, -0.1742943972349167, 0.011026930995285511, -0.17916622757911682, 0.03607846423983574, 0.2806265652179718, 0.07998736947774887, -0.1840745359659195, 0.2038465440273285, 0.16471868753433228, -0.022384371608495712, 0.6967229843139648, -0.17954349517822266, -0.15556226670742035, -0.018726250156760216, -0.1673157513141632, -0.30628839135169983, 0.11605260521173477, 0.13028641045093536, -0.0964139774441719, 0.2820274531841278, -0.13812030851840973, -0.14829199016094208, -0.27324044704437256, -0.042860183864831924, 0.030521485954523087, -0.12770850956439972, -0.08677716553211212, 0.018552938476204872, 0.10704521834850311, 0.13306285440921783, 0.30342817306518555, -0.14370140433311462, 0.151413232088089, 0.13860440254211426, -0.14761558175086975, -0.02797830104827881, 0.17405331134796143, -0.04574425518512726, 0.0598517581820488, -0.09220914542675018, 0.3130982220172882, 0.16962555050849915, 0.0612771138548851, 0.19399265944957733, 0.34644919633865356, -0.08832473307847977, 0.37442323565483093, -0.0709303468465805, 0.3495577871799469, -0.33569982647895813, -0.20122653245925903, 0.055885300040245056, -0.20145465433597565, -0.3614058792591095, -0.04900514334440231, 0.20917092263698578, -0.16554385423660278, -0.25433284044265747, -0.08596557378768921, 0.24583588540554047, 0.33395928144454956, -0.22749926149845123, -0.16116555035114288, 0.28548189997673035, 0.11440397799015045, 0.1897645890712738, -0.15400385856628418, 0.01724030077457428, -0.023791754618287086, -0.16818994283676147, -0.24191366136074066, -0.06266774982213974, -0.02855655364692211, 0.01826053485274315, 0.3397228717803955, -0.24594241380691528, 0.19146475195884705, -0.15404494106769562, -0.030442431569099426, 0.03250208497047424, 0.08894797414541245, -0.05685802549123764, 0.0612875260412693, 0.33273616433143616, -0.005752150900661945, -0.09026376157999039, 0.24826563894748688, -0.22967523336410522, -0.26240280270576477, 0.1698247343301773, -0.17285197973251343, -0.42023664712905884, -0.03219550475478172, 0.24245519936084747, -0.06364531069993973, -0.03768276050686836, -0.13934224843978882, 0.07264555990695953, -0.06046287715435028, -0.11025995761156082, -0.2431343048810959, -0.02648071199655533, -0.3046592175960541, -0.1962316334247589, 0.01663871854543686, 0.6715443134307861, -0.8467828035354614, 0.14338894188404083, 0.06029445305466652, -0.22602508962154388, -0.09181363880634308, 0.13527832925319672, -0.34294742345809937, 0.23416787385940552, -0.20694684982299805, 0.2007141411304474, 0.39024442434310913, -0.28819653391838074, -0.04794992879033089, 0.6014126539230347, -0.11798273772001266, -0.5016017556190491, 0.21527186036109924, -0.040624987334012985, 0.1443101018667221, 0.11889973282814026, 0.15030354261398315, 0.36589738726615906, -0.04303388297557831, 0.21220232546329498, -0.034183744341135025, -0.18411020934581757, 0.1183076798915863, 0.24272584915161133, -0.04637954756617546, 0.2233988344669342, 0.4891297519207001, -0.517856240272522, 0.16661246120929718, -0.33859628438949585, 0.06366635113954544, 0.18392698466777802, 0.050244253128767014, 0.10979975759983063, -0.02736012265086174, 0.054575901478528976, -0.42803123593330383, 0.020015012472867966, 0.2528984546661377, -0.07908042520284653, -0.01897546462714672, -0.247313991189003, -0.4286113679409027, 0.13846080005168915, -0.0023164863232523203, 0.10032813251018524, 0.1422780305147171, 0.24941523373126984, 0.0031496738083660603, 0.006736695300787687, -0.3033483028411865, 0.09766103327274323, -0.29209771752357483, -0.07226770371198654, -0.17917178571224213, 0.09215205162763596, 0.08036137372255325, 0.12894298136234283, 0.13654650747776031, 0.03687167912721634, 0.019035568460822105, -0.18829114735126495, -0.05679594725370407, 0.3071309030056, 0.10182476043701172, 0.14468471705913544, 0.28423815965652466, 0.10613744705915451, 0.07043986022472382, 0.0161710437387228, 0.2807323932647705, -0.3099134564399719, 0.2054486721754074, 0.015996843576431274, -0.5075781345367432, 0.5456465482711792, -0.2165171504020691, 0.00032325362553820014, 0.12273451685905457, -0.27090349793434143, 0.49052613973617554, -0.020134348422288895, 0.05141209065914154, -0.2008594423532486, -0.037689581513404846, 0.31206509470939636, 0.35184940695762634, 0.34372347593307495, -0.2236642986536026, 0.03618556633591652, 0.2212575078010559, -0.12156764417886734, -0.018087951466441154, 0.0014684328343719244, -0.11421025544404984, -0.044804636389017105, 0.33870840072631836, 0.19225797057151794, 0.445345401763916, 0.22916726768016815, -0.09504848718643188, 0.034747663885354996, 0.14590664207935333, -0.2646602988243103, 0.14178521931171417, -0.408235102891922, -0.016552478075027466, 0.3909437656402588, -0.07615774869918823, -0.14461326599121094, -0.5623932480812073, -0.012147310189902782, 0.010688422247767448, 0.14115549623966217, -0.2380719780921936, 0.012092898599803448, -0.23031367361545563, -0.014867479912936687, -0.2970801591873169, 0.30763813853263855, 0.15042075514793396, 0.012370651587843895, -0.2234944850206375, 0.028284462168812752, -0.16911007463932037, -0.10222785174846649, -0.1677768975496292, 0.4410824775695801, 0.18965773284435272, -0.43134790658950806, 0.18895867466926575, -0.3461592197418213, -0.1858910173177719, 0.1588590145111084, 0.16712285578250885, 0.19357438385486603, 0.10802315175533295, -0.11300178617238998, 0.039942845702171326, 0.01648194156587124, 0.08492306619882584, 0.13134214282035828, 0.14441615343093872, 0.029255274683237076, 0.024794893339276314, 0.3755800724029541, -0.04307159408926964, -0.2132650464773178, 0.14500871300697327, 0.02213108353316784, -0.05932139232754707, -0.012946651317179203, 0.1632956564426422, -0.1376008540391922, -0.20594657957553864, -0.6476870179176331, -0.5118923783302307, -0.22114792466163635, 0.2244711071252823, 0.11007975041866302, 0.17957760393619537, 0.07579228281974792, 0.3521881103515625, -0.11204176396131516, 0.05046333372592926, 0.04796602949500084, -0.19023828208446503, -0.325654536485672, 0.27142298221588135, -0.2680351436138153, -0.4133816659450531, -0.05270076543092728, -0.1710059642791748, 0.05073151737451553, 0.23252402245998383, -0.4261445701122284, 0.14762406051158905, 0.07811289280653, 0.2545424997806549, 0.057977043092250824, 0.1358191817998886, 0.14654968678951263, 0.11735976487398148, -0.158270001411438, -0.06115840747952461, -0.06597632169723511, 0.1147749274969101, 0.04374825954437256, -0.410575807094574, 0.1502501368522644, 0.1444750428199768, -0.39470627903938293, 0.5872945785522461, -0.20768924057483673, -0.1326926350593567, 0.2609783113002777, -0.2572733461856842, 0.3953095078468323, -0.04546024650335312, -0.16692356765270233, 0.12117412686347961, 0.0018949764780700207, -0.40238580107688904, 0.2722441852092743, 0.04371030628681183, -0.17888616025447845, -0.38672277331352234, 0.028932543471455574, -0.3702298402786255, -0.14381666481494904, 0.21221591532230377, 0.24006317555904388, 0.1785770207643509, 0.1794569194316864, 0.004730632528662682, -0.14575259387493134, 0.047521740198135376, -0.051978934556245804, 0.16887080669403076, -0.03747193515300751, -0.07967773079872131, -0.23578248918056488, 0.043877843767404556, -0.2629806101322174, 0.11595901846885681, 0.07074369490146637, 0.2973763644695282, -0.07460998743772507, -0.25674429535865784, -0.06183317303657532, 0.11692170798778534, 0.5353399515151978, -0.20854319632053375, 0.13919243216514587, -0.008263248018920422, -0.10128984600305557, 0.06071787327528, 0.12695543467998505, 0.10167031735181808, 0.11741959303617477, -0.22818656265735626, 0.44411924481391907, 0.2040560394525528, -0.046464212238788605, 0.08037400245666504, 0.2987673580646515, -0.2153286337852478, -0.33330485224723816, -0.07468387484550476, 0.054531559348106384, -0.23733451962471008, -0.0200396329164505, -0.2376488447189331, 0.08759821206331253, -0.14846271276474, -0.06329092383384705, -0.07061820477247238, 0.04035526514053345, 0.22306185960769653, 0.17330077290534973, -0.014440263621509075, 0.15272824466228485, 0.016408231109380722, -0.0065956758335232735, 0.27427947521209717, 0.24028076231479645, 0.5946782827377319, -0.3171912133693695, -0.3736882507801056, 0.14934954047203064, -0.3577862083911896, 0.4711419939994812, 0.15074852108955383, -0.1976037472486496, -0.1065610945224762, 0.1762399524450302, -0.22293902933597565, -0.32044732570648193, 0.28865015506744385, -0.1824108362197876, 0.027461566030979156, 0.15253247320652008, -0.5895099639892578, 0.26890483498573303, -0.1232142373919487, -0.07672202587127686, 0.03596636280417442, -0.31541380286216736, -0.09592188894748688, 0.2501087486743927, -0.02003704197704792, 0.4259650409221649, -0.3033022880554199, 0.24556832015514374, 0.09853990375995636, 0.1297418177127838, 0.24458199739456177, -0.35731375217437744, -0.11680383235216141, -0.3414990305900574, -0.20403814315795898, -0.08273515850305557, -0.07774657756090164, 0.27663514018058777, 0.49696651101112366, 0.17615185678005219, 0.11850234866142273, 0.2777842581272125, 0.3189986050128937, -0.18787802755832672, 0.19487643241882324, 0.15319083631038666, -0.19811804592609406, -0.21469782292842865, 0.13264819979667664, 0.1409105658531189, 0.026892313733696938, -0.11287610232830048, 0.03746526688337326, 0.03169425576925278, -0.11088500916957855, 0.1901031732559204, 0.015213321894407272, -0.04638350382447243, 0.1338690221309662, -0.1898120939731598, -0.5069568157196045, -0.1579093635082245, 0.279526948928833, 0.011873138137161732, 0.07536078244447708, -0.09829042851924896, -0.1573927402496338, -0.13630720973014832, 0.13933172821998596, -0.26580360531806946, 0.06045347452163696, 0.035845331847667694, 0.05704088136553764, -0.1586793214082718, 0.032707493752241135, -0.17254677414894104, -0.16903214156627655, 0.4542377293109894, 0.2501741349697113, 0.08236740529537201, -0.40895649790763855, -0.2870452404022217, 0.028738996013998985, 0.14993025362491608, -0.03162093460559845, 0.16580772399902344, 0.09598224610090256, 0.2250615805387497, -0.027163872495293617, 0.0499919056892395, -0.3185654878616333, -0.20860734581947327, 0.5237479209899902, 0.003678457345813513, -0.2736581265926361, 0.0913139283657074, 0.08067412674427032, -0.18267713487148285, -0.3481295704841614, 0.2104371190071106, 0.12904426455497742, -0.09211278706789017, -0.02706814371049404, 0.14130690693855286, -0.0210422333329916, 0.022950967773795128, 0.1734364926815033, 0.12484150379896164, -0.01997801475226879, 0.10678126662969589, -0.48298749327659607, -0.4823637008666992, -0.11476608365774155, 0.16420769691467285, 0.1985141932964325, 0.5446218252182007, -0.22891782224178314, -0.05892861261963844, -0.05813957750797272, -0.3649340867996216, -0.12669268250465393, 0.11741127073764801, 0.06128508597612381, 0.29837989807128906, 0.27271243929862976, 0.0403563492000103, -0.17585739493370056, 0.22235016524791718, -0.07001595199108124, -0.1871686428785324, -0.33027878403663635, 0.04320402815937996, 0.13478276133537292, -0.07950810343027115, -0.011345738545060158, -0.12463130801916122, -0.36571577191352844, -0.1140999048948288, -0.14185035228729248, 0.1489233672618866, 0.04567261040210724, -0.18238262832164764, 0.24316073954105377, -0.16698773205280304, 0.0316980704665184, -0.25684458017349243, 0.19763389229774475, 0.0006672564195469022, 0.30993086099624634, -0.14306201040744781, 0.08487328886985779, -0.1460527628660202, -0.09501435607671738, 0.13612934947013855, 0.062481630593538284, 0.1853027045726776, 0.032013073563575745, 0.1933625042438507, -0.2427910715341568, -0.06666238605976105, 0.24076469242572784, 0.4548895061016083, 0.340542733669281, -0.16269798576831818, 0.22644570469856262, 0.3401689827442169, 0.2465091347694397, -0.30176615715026855, -0.033908311277627945, 0.2716716527938843, -0.09043462574481964, 0.14554384350776672, 0.2380298525094986, 0.3705626130104065, -0.29709112644195557, 0.14501485228538513, -0.10808620601892471, 0.3103344142436981, 0.1014290377497673, -0.13217228651046753, 0.5039641857147217, -0.01655738614499569, 0.09958478063344955, -0.06596215069293976, 0.5515472292900085, 0.2185402810573578, 0.692354142665863, 0.0026700575836002827, -0.12172641605138779, -0.03861650452017784, 0.16623251140117645, -0.5537813305854797, -0.8599880337715149, 0.6583674550056458, 0.28171515464782715, -0.17020724713802338, -0.045340608805418015, 0.17628218233585358, 0.38856130838394165, -0.09744910895824432, 0.05598360300064087, -0.10877864062786102, 0.036346692591905594, -0.18376317620277405, -0.039002880454063416, -0.14292635023593903, -0.15286637842655182, -0.12292852252721786, 0.23322367668151855, -0.12295413762331009, 0.06338660418987274, 0.15000608563423157, -0.1175927221775055, 0.17010769248008728, -0.1831529289484024, 0.31673720479011536, -0.054859161376953125, -0.2575521469116211, -0.07731597870588303, 0.1249571219086647, 0.08017414063215256, 0.2152753323316574, 0.27848708629608154, -0.09541121870279312, 0.02899494580924511, 0.2942553758621216, 0.2001500129699707, -0.026328792795538902, -0.04877094179391861, -0.04945662245154381, -0.4505336284637451, 0.038374803960323334, -0.1896122545003891, 0.4105354845523834, 0.4534040093421936, 0.24351587891578674, -0.14905796945095062, 0.3776870369911194, 0.17145466804504395, -0.14174199104309082, -0.0818406343460083, -0.42248547077178955, 0.35820910334587097, -0.12100263684988022, -0.08108284324407578, -0.04678669944405556, -0.11899501085281372, -0.20935966074466705, 0.48030221462249756, 0.14698007702827454, 0.404483824968338, -0.007593362592160702, 0.13884229958057404, -0.05672883614897728, 0.4842817187309265, 0.06750984489917755, 0.30592721700668335, -0.16686151921749115, -0.15946847200393677, -0.7493556141853333, 0.052207425236701965, 0.10693112015724182, 0.13336963951587677, -0.1415545642375946, 0.07088328897953033, 0.562808632850647, 0.24683451652526855, -0.3366006910800934, 0.08518466353416443, 0.15750443935394287, 0.016716528683900833, -0.010160889476537704, -0.2633011043071747, -0.33404815196990967, 0.0846356675028801, -0.06707397103309631, -0.38693130016326904, 0.2084077149629593, -0.06917767971754074, 0.13480517268180847, -0.24816589057445526, -0.041039593517780304, -0.04511306807398796, -0.09066887944936752, 0.43586093187332153, -0.23418748378753662, 0.47305893898010254, -0.3106435537338257, 0.3491772711277008, 0.10169386118650436, -0.025618867948651314, -0.06382428854703903, 0.2785736620426178, 0.009290474466979504, -0.0916210412979126, -0.47999075055122375, 0.15069901943206787, -0.08169755339622498, 0.058493856340646744, 0.17147265374660492, 0.026584260165691376, 0.002765131648629904, -0.009970755316317081, -0.19777566194534302, -0.16160446405410767, 0.14413529634475708, -0.013360505923628807, -0.04517585039138794, -0.048698119819164276, 0.09809032082557678, -0.020697936415672302, 0.21488235890865326, -0.22258256375789642, -0.03798963874578476, -0.13627299666404724, 0.10411892831325531, 0.018131589516997337, 0.1729050725698471, -0.1793014407157898, 0.3728773891925812, 0.34948673844337463, -0.22150026261806488, -0.07018337398767471, 0.1670304536819458, -0.287320613861084, 0.1099519431591034, -0.12049252539873123, 0.17037013173103333, 0.0970582365989685, -0.22492177784442902, -0.3837462067604065, -0.4195723235607147 ]
https://github.com/huggingface/datasets/issues/2285
Help understanding how to build a dataset for language modeling as with the old TextDataset
I received an answer for this question on the HuggingFace Datasets forum by @lhoestq Hi ! If you want to tokenize line by line, you can use this: ``` max_seq_length = 512 num_proc = 4 def tokenize_function(examples): # Remove empty lines examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()] return tokenizer( examples["text"], truncation=True, max_length=max_seq_length, ) tokenized_dataset = dataset.map( tokenize_function, batched=True, num_proc=num_proc, remove_columns=["text"], ) ``` Though the TextDataset was doing a different processing by concatenating all the texts and building blocks of size 512. If you need this behavior, then you must apply an additional map function after the tokenization: ``` # Main data processing function that will concatenate all texts from # our dataset and generate chunks of max_seq_length. def group_texts(examples): # Concatenate all texts. concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()} total_length = len(concatenated_examples[list(examples.keys())[0]]) # We drop the small remainder, we could add padding if the model supported it instead of this drop, # you can customize this part to your needs. total_length = (total_length // max_seq_length) * max_seq_length # Split by chunks of max_len. result = { k: [t[i : i + max_seq_length] for i in range(0, total_length, max_seq_length)] for k, t in concatenated_examples.items() } return result # Note that with `batched=True`, this map processes 1,000 texts together, # so group_texts throws away a remainder for each of those groups of 1,000 texts. # You can adjust that batch_size here but a higher value might be slower to preprocess. tokenized_dataset = tokenized_dataset.map( group_texts, batched=True, num_proc=num_proc, ) ``` This code comes from the processing of the run_mlm.py example script of transformers
Hello, I am trying to load a custom dataset that I will then use for language modeling. The dataset consists of a text file that has a whole document in each line, meaning that each line overpasses the normal 512 tokens limit of most tokenizers. I would like to understand what is the process to build a text dataset that tokenizes each line, having previously split the documents in the dataset into lines of a "tokenizable" size, as the old TextDataset class would do, where you only had to do the following, and a tokenized dataset without text loss would be available to pass to a DataCollator: ``` model_checkpoint = 'distilbert-base-uncased' from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained(model_checkpoint) from transformers import TextDataset dataset = TextDataset( tokenizer=tokenizer, file_path="path/to/text_file.txt", block_size=512, ) ``` For now, what I have is the following, which, of course, throws an error because each line is longer than the maximum block size in the tokenizer: ``` import datasets dataset = datasets.load_dataset('path/to/text_file.txt') model_checkpoint = 'distilbert-base-uncased' tokenizer = AutoTokenizer.from_pretrained(model_checkpoint) def tokenize_function(examples): return tokenizer(examples["text"]) tokenized_datasets = dataset.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"]) tokenized_datasets ``` So what would be the "standard" way of creating a dataset in the way it was done before? Thank you very much for the help :))
270
Help understanding how to build a dataset for language modeling as with the old TextDataset
[ -0.07851111143827438, 0.05620633810758591, -0.2642166018486023, 0.15605047345161438, 0.016390256583690643, -0.23124244809150696, 0.28153765201568604, 0.1520923525094986, -0.1010923683643341, -0.0996159091591835, -0.09406354278326035, -0.21062175929546356, -0.0464814156293869, 0.20099420845508575, 0.03778396174311638, -0.11099489778280258, 0.045670829713344574, 0.19538339972496033, -0.30427291989326477, -0.22725151479244232, 0.3159254789352417, 0.0872255265712738, 0.01744486391544342, -0.06918004900217056, -0.10023599117994308, -0.19630447030067444, -0.22332121431827545, -0.03566715493798256, -0.3796170651912689, -0.11895307153463364, -0.05746498331427574, 0.26583075523376465, 0.1338205337524414, 0.2542476952075958, -0.00010236242087557912, -0.12376957386732101, -0.18792735040187836, -0.27406230568885803, -0.2669966518878937, -0.024444367736577988, 0.15746387839317322, -0.19420522451400757, -0.02347642369568348, -0.2003510296344757, -0.11495176702737808, -0.05434160679578781, 0.15368175506591797, -0.5194830894470215, 0.31048741936683655, 0.5564249753952026, 0.25341159105300903, -0.11198978871107101, -0.06741692870855331, 0.07251794636249542, -0.1576753854751587, 0.2085161954164505, -0.11890885978937149, 0.18736717104911804, 0.6668074727058411, 0.03228888660669327, -0.20071759819984436, 0.13457252085208893, 0.02044629491865635, -0.26975613832473755, -0.10725487768650055, 0.1558496206998825, -0.05358334630727768, -0.383952796459198, 0.2244635373353958, 0.2262844443321228, 0.7222656011581421, -0.24284611642360687, -0.1531812846660614, -0.19168508052825928, -0.33017444610595703, 0.170463427901268, -0.11282845586538315, -0.10958369821310043, -0.15445606410503387, 0.2162194699048996, 0.1892177313566208, -0.39136770367622375, -0.24968352913856506, -0.051456205546855927, 0.024849414825439453, 0.38758039474487305, -0.13484156131744385, -0.10275888442993164, -0.05171722173690796, -0.04904137924313545, 0.21358171105384827, -0.10643009841442108, 0.3014715015888214, 0.32065749168395996, 0.0345679447054863, -0.18658991158008575, 0.20787133276462555, -0.007179147098213434, 0.2195817530155182, -0.20061667263507843, -0.1747101992368698, 0.09941817820072174, -0.19961586594581604, -0.1976960152387619, 0.0953059121966362, 0.030208386480808258, 0.48551470041275024, -0.5355663299560547, -0.0308885108679533, -0.37284567952156067, -0.0999249741435051, -0.04585614800453186, -0.2920352816581726, 0.02480088546872139, -0.1907818615436554, 0.07960790395736694, 0.08058606833219528, -0.11957795172929764, 0.1267063021659851, -0.011637928895652294, -0.09078610688447952, -0.18973398208618164, -0.015044576488435268, 0.06144258379936218, -0.08220664411783218, -0.016361871734261513, -0.17573434114456177, 0.12049756199121475, -0.2793640196323395, -0.46822217106819153, -0.14865808188915253, 0.008085081353783607, -0.18548260629177094, -0.252481609582901, 0.19222484529018402, 0.00025280742556788027, 0.25094157457351685, 0.11968560516834259, -0.2735044062137604, 0.13055485486984253, -0.01075066439807415, -0.2696448266506195, 0.1337769478559494, -0.3568685054779053, 0.0679469108581543, 0.17842605710029602, 0.059228040277957916, -0.4061228334903717, -0.305167555809021, -0.04580302909016609, 0.007315968628972769, -0.1127149760723114, -0.13894952833652496, 0.24655239284038544, -0.0793827697634697, -0.3216361105442047, 0.10873471200466156, 0.8795969486236572, 0.2509494423866272, -0.14308547973632812, -0.16373462975025177, 0.06967875361442566, -0.10829906165599823, -0.09604752063751221, 0.010179891251027584, 0.5189961791038513, -0.9168193936347961, 0.2394048571586609, -0.1680767983198166, -0.23896603286266327, 0.0060078720562160015, 0.06572932004928589, -0.10449586063623428, 0.43047383427619934, 0.11973197013139725, 0.23551248013973236, 0.4257248044013977, -0.0017824332462623715, -0.07024510949850082, 0.06667619198560715, 0.04803627356886864, 0.048770323395729065, 0.07782698422670364, -0.04051239416003227, 0.2094431221485138, -0.283388614654541, -0.15356436371803284, -0.044895023107528687, -0.22874440252780914, -0.13461321592330933, 0.09501682221889496, 0.10889173299074173, 0.22005048394203186, -0.06115876883268356, -0.0025272625498473644, -0.04922191798686981, 0.16487805545330048, 0.25493544340133667, 0.2662249505519867, -0.278218150138855, 0.21154601871967316, -0.02322712540626526, 0.2213769257068634, 0.12483534216880798, -0.03725937381386757, -0.29206714034080505, -0.18492652475833893, -0.065904401242733, 0.13855543732643127, 0.49982020258903503, 0.01721622794866562, 0.0878930613398552, -0.29244184494018555, -0.26650553941726685, 0.15191154181957245, 0.015548471361398697, 0.3298378586769104, 0.05777664855122566, -0.12729285657405853, 0.05353280529379845, -0.25672590732574463, 0.2512192726135254, -0.2449934482574463, -0.12480195611715317, -0.23746514320373535, -0.05115630850195885, -0.12134619057178497, -0.13540327548980713, 0.12546314299106598, 0.34039366245269775, -0.15327860414981842, -0.11122635006904602, 0.11314452439546585, -0.0192816574126482, 0.11703775823116302, -0.0986146405339241, 0.08910168707370758, 0.3083639144897461, 0.17334653437137604, -0.015836358070373535, 0.42366987466812134, -0.15018394589424133, 0.25456497073173523, -0.11068669706583023, -0.022348038852214813, 0.13121004402637482, 0.25340887904167175, -0.03123827651143074, 0.18181951344013214, -0.09137281775474548, 0.3819437325000763, -0.07314566522836685, 0.25445935130119324, -0.19278830289840698, 0.16005387902259827, 0.09337747097015381, 0.17876604199409485, 0.11386852711439133, -0.1525217592716217, 0.5293788313865662, 0.537826657295227, 0.011452782899141312, 0.2191140204668045, 0.09716777503490448, -0.003807143308222294, -0.38135024905204773, -0.03242071717977524, -0.02429850399494171, 0.2320062518119812, 0.1454807072877884, 0.3750121593475342, 0.08065281063318253, -0.19853763282299042, -0.23820693790912628, 0.22318772971630096, -0.24406848847866058, 0.042123012244701385, 0.08783101290464401, -0.10141582041978836, 0.05076015740633011, -0.37042543292045593, -0.3721720576286316, -0.2455199509859085, 0.1268894225358963, 0.006339240353554487, 0.2528742849826813, -0.10974115133285522, -0.22354543209075928, -0.24359582364559174, 0.09769336879253387, -0.21889260411262512, -0.10858168452978134, 0.24891407787799835, -0.28428924083709717, -0.03486806899309158, -0.04755652695894241, 0.36773473024368286, 0.4095628559589386, 0.003342071548104286, 0.2087232917547226, 0.10471434146165848, -0.6457676291465759, -0.40553486347198486, 0.25854840874671936, 0.020584579557180405, 0.31474587321281433, 0.23947592079639435, -0.2666218876838684, 0.07502330094575882, 0.0801357552409172, -0.4809269309043884, 0.24569755792617798, -0.2347693294286728, 0.3543929159641266, -0.034708406776189804, 0.15563581883907318, 0.16848072409629822, -0.010246912017464638, -0.2447327822446823, -0.06992126256227493, -0.36069974303245544, -0.1409366875886917, -0.18477502465248108, -0.3095216155052185, 0.023434167727828026, -0.6445307731628418, -0.4140629768371582, -0.10771308094263077, 0.11306943744421005, 0.1578194797039032, 0.259907066822052, -0.03456998988986015, 0.11605319380760193, 0.3837387263774872, 0.07322413474321365, 0.5505057573318481, -0.253359854221344, 0.15498866140842438, 0.020258959382772446, -0.11703087389469147, -0.38128164410591125, -0.08847062289714813, 0.015145130455493927, 0.2942942678928375, 0.0574822798371315, -0.042882002890110016, 0.007393029984086752, 0.03251940757036209, -0.11521035432815552, 0.3194345533847809, 0.35526517033576965, 0.4412422180175781, 0.13842113316059113, -0.02896290272474289, -0.2229897528886795, 0.045035846531391144, 0.2334538847208023, -0.13550563156604767, 0.05124689266085625, -0.06837370991706848, 0.40126538276672363, -0.03396718576550484, 0.3497524857521057, 0.15024343132972717, -0.2995338439941406, 0.045835744589567184, 0.1108631044626236, 0.11371441185474396, -0.18785254657268524, -0.08966854959726334, 0.09658448398113251, 0.011936298571527004, 0.16012147068977356, 0.341381698846817, 0.06695842742919922, -0.28697893023490906, -0.036621831357479095, 0.11956334859132767, -0.346867173910141, -0.18185783922672272, 0.3419753611087799, -0.40351369976997375, 0.18696510791778564, 0.18394045531749725, -0.19889576733112335, -0.13949961960315704, -0.011047501116991043, -0.0700322613120079, -0.03295930474996567, -0.09563770890235901, -0.11751178652048111, -0.33536896109580994, 0.20706814527511597, -0.431779682636261, 0.07325348258018494, 0.12309522926807404, 0.22084926068782806, -0.11249399185180664, 0.050980232656002045, -0.02557818777859211, 0.1270640641450882, 0.11228612810373306, -0.3007298707962036, -0.16007566452026367, -0.09420173615217209, 0.058771222829818726, -0.08291636407375336, 0.4489240050315857, -0.5039359331130981, 0.27096399664878845, 0.2693232297897339, 0.26113951206207275, -0.4328366219997406, -0.22487099468708038, -0.13698738813400269, 0.42665764689445496, -0.07986792922019958, 0.19263282418251038, 0.2398495227098465, -0.25157469511032104, -0.11319009959697723, -0.142554372549057, 0.057205911725759506, 0.056560318917036057, 0.2141401469707489, 0.24534696340560913, -0.0022138457279652357, 0.1252247542142868, 0.29897111654281616, 0.13378320634365082, -0.10079719126224518, -0.1758434921503067, -0.23293618857860565, 0.09182142466306686, 0.24376726150512695, -0.36294829845428467, 0.39776715636253357, -0.011114593595266342, -0.016050323843955994, 0.2112005203962326, -0.1286066472530365, 0.41158556938171387, 0.19807717204093933, 0.26577091217041016, 0.038464099168777466, 0.09517084807157516, -0.33536985516548157, -0.10106650739908218, 0.3124927282333374, -0.05682912841439247, 0.18730026483535767, -0.15380904078483582, -0.5071759819984436, 0.1528051197528839, -0.1343115270137787, -0.17633529007434845, 0.19586977362632751, 0.11194426566362381, -0.4876059889793396, 0.42911916971206665, 0.20753371715545654, 0.8118200302124023, 0.21847893297672272, 0.12384004890918732, 0.18722762167453766, -0.12145909667015076, 0.19996732473373413, -0.37271809577941895, -0.2384522408246994, -0.24295015633106232, 0.0919407308101654, -0.061048150062561035, 0.15774886310100555, -0.031337566673755646, 0.34333696961402893, -0.173704594373703, 0.09479035437107086, 0.4241522252559662, -0.03385448083281517, 0.33443814516067505, 0.263014018535614, -0.06712955236434937, -0.19644984602928162, -0.20630453526973724, 0.24329867959022522, 0.05308294668793678, -0.38338416814804077, -0.07217361032962799, -0.02351456694304943, -0.197409987449646, 0.0960044264793396, -0.22353942692279816, -0.22130396962165833, -0.2426438331604004, 0.05494540557265282, 0.041983891278505325, -0.12310528010129929, 0.38924676179885864, 0.2568884491920471, 0.5034412145614624, 0.1568620353937149, -0.19920296967029572, -0.1301976591348648, -0.0926588848233223, -0.025202801451086998, 0.2816181480884552, -0.14998957514762878, 0.4830043315887451, -0.1180502325296402, -0.1574132889509201, -0.07211057096719742, -0.006790839601308107, 0.09963788092136383, -0.3201042413711548, -0.16460321843624115, -0.31558650732040405, -0.20400680601596832, -0.1724427342414856, 0.48720502853393555, 0.011523246765136719, -0.06436008960008621, 0.19905945658683777, 0.28569239377975464, 0.024070102721452713, 0.1049167811870575, -0.08965571224689484, 0.05311361327767372, -0.1433638483285904, 0.08855324238538742, 0.2686181366443634, -0.08370155096054077, 0.11896155029535294, 0.28877729177474976, -0.2622857689857483, -0.2526251971721649, -0.08617136627435684, 0.06984072923660278, -0.40279343724250793, -0.017825404182076454, -0.27285850048065186, -0.5349510908126831, -0.0231478214263916, 0.1554596871137619, 0.15908822417259216, 0.05002673715353012, -0.16848599910736084, -0.1514047235250473, -0.2744029462337494, 0.17832328379154205, 0.0665992796421051, -0.005409482400864363, -0.052462685853242874, -0.01411514263600111, 0.09103447943925858, 0.2180575430393219, -0.4209567904472351, -0.07354047894477844, 0.31077253818511963, 0.3996671438217163, 0.10849746316671371, -0.2635417580604553, -0.08834914118051529, 0.02803497575223446, 0.10315141826868057, 0.045136697590351105, -0.24685083329677582, -0.3121635913848877, -0.22713609039783478, 0.09193167835474014, 0.007833597250282764, -0.060598358511924744, 0.13329117000102997, -0.13251882791519165, -0.1765960305929184, -0.14279389381408691, 0.05338696017861366, -0.08259758353233337, 0.008085682056844234, 0.2693745195865631, 0.16035249829292297, 0.0637233629822731, -0.006699318531900644, -0.21585100889205933, 0.046729713678359985, -0.03758736699819565, 0.3928760290145874, 0.045138757675886154, -0.12450262904167175, -0.1954079568386078, 0.12409056723117828, 0.5606793761253357, 0.13007813692092896, -0.007704706862568855, 0.1472959667444229, 0.24227750301361084, 0.17306941747665405, 0.12205346673727036, 0.27547332644462585, 0.2302989810705185, 0.0690748319029808, -0.13597674667835236, 0.28421273827552795, 0.24382339417934418, -0.14983247220516205, -0.0011825446272268891, 0.180874302983284, -0.07090117037296295, 0.29480287432670593, 0.3771045207977295, 0.12236656248569489, 0.020294591784477234, 0.18342581391334534, -0.1745559573173523, 0.21250084042549133, -0.13174565136432648, -0.11734706163406372, 0.12402241677045822, -0.11985957622528076, 0.0812516137957573, 0.35399097204208374, -0.0016404363559558988, 0.2418084442615509, 0.6314159035682678, -0.010758421383798122, 0.3641289174556732, 0.03845033794641495, 0.11282011866569519, 0.08533968776464462, 0.1712910532951355, 0.21051719784736633, 0.08597360551357269, 0.031040295958518982, 0.0027574212290346622, -0.009673913940787315, 0.03489218279719353, -0.05868042632937431, 0.013340177945792675, 0.12464383244514465, 0.06543723493814468, -0.14586515724658966, -0.3917923867702484, -0.178593248128891, -0.36051902174949646, -0.01816956326365471, -0.1520327627658844, -0.29536736011505127, -0.07888104766607285, -0.0012570287799462676, -0.18068468570709229, 0.09900157898664474, -0.3616659939289093, 0.2974753975868225, -0.25591230392456055, 0.008716490119695663, 0.09349390864372253, 0.47346097230911255, 0.08023777604103088, 0.002742753829807043, -0.2655375003814697, 0.29279524087905884, 0.0027476446703076363, 0.16327142715454102, -0.23077453672885895, 0.23094642162322998, -0.11624515801668167, -0.29477110505104065, -0.21231681108474731, 0.4558177590370178, 0.17581842839717865, 0.35974544286727905, 0.21975986659526825, 0.18139557540416718, -0.14421594142913818, 0.15858891606330872, 0.47223547101020813, -0.4874674677848816, 0.029815325513482094, -0.029516538605093956, 0.334384948015213, -0.11866138130426407, 0.030903642997145653, 0.0733608826994896, -0.3647017776966095, -0.17094004154205322, 0.4164310395717621, -0.2754707932472229, 0.2616269886493683, -0.1585765779018402, 0.1365644931793213, 0.15785394608974457, 0.47751325368881226, 0.37947240471839905, 0.25929802656173706, -0.018030859529972076, -0.18516667187213898, -0.4320574402809143, -0.17149005830287933, 0.10413069278001785, -0.03542476147413254, -0.26414352655410767, 0.26508525013923645, 0.5097617506980896, 0.37428075075149536, -0.20647798478603363, 0.059290993958711624, -0.1854381561279297, -0.3596292734146118, -0.29941245913505554, -0.1776638627052307, -0.0070187984965741634, 0.4026339054107666, -0.1680903285741806, -0.0464027039706707, -0.036703839898109436, -0.012557540088891983, 0.26868247985839844, -0.2566956877708435, -0.09606192260980606, 0.26129257678985596, 0.00580087723210454, -0.11963975429534912, 0.1435163915157318, 0.2740473449230194, -0.1798015832901001, 0.035803426057100296, -0.2581307291984558, 0.09841352701187134, -0.08775772899389267, 0.3284493088722229, 0.4217895269393921, 0.14525122940540314, -0.32415398955345154, 0.19712907075881958, 0.24141669273376465, 0.2199365347623825, 0.2278410643339157, 0.1732456088066101, -0.3012414574623108, 0.1628229171037674, -0.07597503066062927, -0.2736700177192688, 0.04398052394390106, 0.5197598338127136, -0.1646241694688797, 0.11404161155223846, -0.016789378598332405, -0.05410517752170563, -0.24549850821495056, -0.028262663632631302, -0.3798392415046692, 0.0377327986061573, -0.023504991084337234, 0.3650013506412506, -0.03200371190905571, -0.4993613064289093, 0.05314776673913002, 0.3353354334831238, -0.15867651998996735, -0.10897069424390793, 0.37843242287635803, 0.1445421576499939, -0.15946413576602936, -0.09468139708042145, 0.33122268319129944, 0.11010054498910904, -0.13464456796646118, -0.1744636744260788, -0.4228638708591461 ]
https://github.com/huggingface/datasets/issues/2279
Compatibility with Ubuntu 18 and GLIBC 2.27?
From the trace this seems like an error in the tokenizer library instead. Do you mind opening an issue at https://github.com/huggingface/tokenizers instead?
## Describe the bug For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04). I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC. ## Steps to reproduce the bug 1. clone the transformers repo 2. move to examples/pytorch/language-modeling 3. run example command: ```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm``` ## Expected results As described in the transformers repo. ## Actual results ```Traceback (most recent call last): File "run_clm.py", line 34, in <module> from transformers import ( File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__ return super().__getattr__(name) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module return importlib.import_module("." + module_name, self.__name__) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module> from . import ( File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module> from .tokenization_layoutlm import LayoutLMTokenizer File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module> from ..bert.tokenization_bert import BertTokenizer File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module> from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module> from .tokenization_utils_base import ( File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module> from tokenizers import AddedToken File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module> from .tokenizers import ( ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so) ``` ## Versions Paste the output of the following code: ``` - Datasets: 1.6.1 - Python: 3.7.10 (default, Feb 26 2021, 18:47:35) [GCC 7.3.0] - Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid ```
22
Compatibility with Ubuntu 18 and GLIBC 2.27?
[ -0.2532741129398346, -0.3600507080554962, -0.2346872091293335, 0.005755934398621321, -0.010757232084870338, -0.07844516634941101, -0.03404480218887329, 0.2562589645385742, 0.4418453276157379, 0.14315621554851532, 0.20585110783576965, 0.3392412066459656, -0.4000459313392639, 0.01207882259041071, -0.2898387610912323, -0.001674762344919145, 0.09478284418582916, 0.07592752575874329, -0.05550549551844597, -0.1026216447353363, -0.0719989612698555, 0.568743884563446, -0.3454864025115967, 0.03804370015859604, -0.028626684099435806, 0.015350651927292347, 0.08488817512989044, 0.33676642179489136, -0.1416275054216385, 0.13667167723178864, 0.13719037175178528, -0.016342483460903168, -0.12519457936286926, 0.35642170906066895, -0.00010245484008919448, -0.07930463552474976, 0.10207217186689377, -0.0019518417539075017, -0.15176841616630554, -0.14699751138687134, 0.4373697340488434, 0.08899716287851334, 0.10058470815420151, 0.13285379111766815, -0.13182371854782104, 0.084003746509552, 0.15354759991168976, -0.18108411133289337, 0.23260498046875, -0.05488888919353485, 0.33412596583366394, 0.27505844831466675, 0.220716655254364, -0.1086997389793396, 0.26258978247642517, -0.22578009963035583, -0.15458586812019348, 0.4381004571914673, 0.5627167224884033, 0.2976831793785095, 0.2335558533668518, -0.06361652910709381, -0.19886767864227295, -0.20757314562797546, 0.17630651593208313, -0.33839088678359985, 0.17246834933757782, -0.2876026928424835, -0.0593174509704113, -0.021923890337347984, -0.10022146254777908, -0.2003377377986908, 0.0858309268951416, -0.19392423331737518, -0.1749793142080307, 0.07164986431598663, 0.01927957497537136, -0.23722577095031738, -0.048697203397750854, 0.010585671290755272, -0.012969642877578735, -0.4635324776172638, -0.0377894788980484, -0.3201741874217987, 0.1356646567583084, 1.10689115524292, 0.05344272032380104, -0.09374059736728668, 0.05195204168558121, 0.13626497983932495, 0.01768958568572998, -0.0645148754119873, -0.18588018417358398, 0.133981391787529, 0.26006460189819336, -0.11082157492637634, -0.0006387713365256786, -0.045279450714588165, -0.07278066873550415, -0.3379531502723694, -0.15701985359191895, 0.27562183141708374, -0.08686591684818268, 0.1934562772512436, -0.38318511843681335, 0.07015517354011536, -0.20318487286567688, 0.30482208728790283, 0.20672602951526642, -0.012502283789217472, 0.26574036478996277, 0.010822117328643799, -0.24788030982017517, -0.298525333404541, -0.3833330571651459, 0.25008392333984375, -0.2333955466747284, -0.15949580073356628, 0.05376926064491272, -0.042882367968559265, 0.04649475961923599, 0.19351232051849365, -0.013924670405685902, 0.011190499179065228, 0.2172977179288864, 0.16598811745643616, 0.001307062222622335, 0.020728841423988342, -0.1723458468914032, 0.20754440128803253, -0.12885205447673798, -0.0154260927811265, 0.0173505712300539, -0.3071867525577545, 0.006049577612429857, 0.16942165791988373, 0.20832031965255737, 0.06164267659187317, 0.3381600081920624, 0.2931576073169708, -0.06005902215838432, -0.09421027451753616, 0.16499829292297363, 0.2331305742263794, -0.16870805621147156, -0.028038911521434784, 0.14903537929058075, -0.3908926546573639, -0.27443423867225647, 0.003123229369521141, -0.03934907913208008, -0.10759707540273666, 0.03147538751363754, 0.2608289420604706, 0.19891585409641266, 0.07454175502061844, 0.1629091203212738, -0.055697001516819, 0.025934116914868355, -0.3219268023967743, 0.22050844132900238, -0.35269665718078613, 0.058206502348184586, -0.02289816364645958, -0.2798766791820526, -0.3092077076435089, -0.2826157212257385, -0.1753605455160141, 0.7406890392303467, -0.03244908154010773, -0.12484069913625717, 0.04615674912929535, 0.03168352693319321, -0.502200722694397, 0.007737170904874802, -0.014794978313148022, 0.12449842691421509, -0.03744107112288475, -0.1557128131389618, 0.05017007142305374, 0.3227120339870453, -0.20240044593811035, 0.09496260434389114, 0.02750849537551403, 0.21606947481632233, -0.3362590968608856, -0.006143717560917139, 0.29390162229537964, 0.11866104602813721, -0.023359449580311775, -0.4732019901275635, -0.2573302090167999, -0.4780600965023041, -0.17272984981536865, 0.22908584773540497, -0.3000737130641937, -0.10654287040233612, -0.22577930986881256, 0.5712974667549133, -0.24828924238681793, -0.23834779858589172, -0.17927652597427368, 0.5621247887611389, -0.1284024864435196, -0.007722886279225349, 0.2627107799053192, -0.030881181359291077, 0.14574402570724487, -0.13869190216064453, 0.1336645483970642, -0.007415149360895157, 0.053389083594083786, 0.3325483798980713, 0.018399501219391823, 0.1822771430015564, -0.19359193742275238, 0.17908009886741638, 0.05314473807811737, 0.2683355510234833, -0.12098902463912964, -0.24425803124904633, 0.12157544493675232, -0.16115254163742065, -0.09703656286001205, -0.06353028118610382, 0.09340409934520721, -0.22636879980564117, -0.1945641040802002, 0.35081303119659424, -0.05432841181755066, -0.07996944338083267, -0.3531615734100342, 0.06128967925906181, 0.14142835140228271, -0.08465752750635147, 0.01401122473180294, -0.20043402910232544, 0.1653488725423813, 0.15980210900306702, 0.20964904129505157, 0.22629588842391968, -0.0125082703307271, 0.0034799310378730297, 0.09802421182394028, 0.4948720335960388, 0.32552051544189453, 0.0437493771314621, -0.16108782589435577, 0.5123142004013062, -0.16280746459960938, 0.12236031144857407, 0.005436975043267012, 0.12089760601520538, -0.18684272468090057, 0.06802879273891449, -0.02732476033270359, -0.2785288691520691, 0.0729791447520256, -0.2295113354921341, -0.04732004180550575, 0.3212985694408417, 0.16349577903747559, -0.04891584813594818, -0.0617598332464695, 0.24007926881313324, -0.0602647103369236, 0.24362824857234955, 0.14731839299201965, -0.00556208798661828, 0.24984578788280487, -0.1321071982383728, 0.11893609911203384, -0.1184234768152237, -0.2848869860172272, 0.1601012647151947, -0.25270238518714905, 0.41371428966522217, 0.16242076456546783, -0.11300744861364365, 0.32099786400794983, 0.142684668302536, -0.06529708206653595, -0.1919933259487152, 0.03351634368300438, -0.0962311178445816, 0.18897061049938202, 0.046240292489528656, -0.10970648378133774, 0.29847028851509094, 0.08484534919261932, -0.2368326038122177, -0.29171374440193176, 0.18200089037418365, 0.0380951352417469, 0.06583289057016373, 0.2321154624223709, -0.079412080347538, 0.17589521408081055, -0.3178088665008545, -0.1486189067363739, 0.0640302374958992, -0.03974887728691101, -0.28455331921577454, 0.2853151857852936, 0.2759961485862732, 0.03454126790165901, 0.06583235412836075, -0.10512539744377136, -0.31496989727020264, 0.33421629667282104, -0.2770375609397888, 0.3204706609249115, -0.19624345004558563, -0.1834164559841156, -0.026198426261544228, -0.26792600750923157, 0.04784875735640526, 0.03900837153196335, 0.05191342532634735, -0.8031864166259766, -0.02857745997607708, -0.17438113689422607, -0.13237260282039642, -0.5856029391288757, -0.3865249752998352, 0.2667601704597473, -0.27471378445625305, -0.09402753412723541, -0.2082144021987915, 0.28521713614463806, 0.1708105057477951, 0.36273157596588135, -0.08035212755203247, -0.22704321146011353, -0.08854378014802933, 0.003250799374654889, 0.13375608623027802, 0.10055053979158401, 0.0689682587981224, 0.04266943037509918, -0.22456462681293488, 0.11851651966571808, 0.12321791797876358, 0.24987883865833282, 0.01268741674721241, -0.21908113360404968, -0.3260544538497925, -0.1243385449051857, 0.11013767123222351, 0.3475070893764496, -0.25672951340675354, 0.30130523443222046, -0.04013604298233986, -0.18230469524860382, -0.15707704424858093, -0.24561628699302673, 0.06549358367919922, -0.10554905980825424, -0.15020045638084412, 0.18807274103164673, -0.15796352922916412, 0.022369299083948135, 0.2653477191925049, 0.09899105131626129, -0.1652153581380844, -0.045274827629327774, 0.23766790330410004, 0.3086187541484833, -0.23758414387702942, 0.19436421990394592, 0.016287196427583694, 0.2164279967546463, -0.41482073068618774, 0.0997224971652031, -0.048513252288103104, -0.3251514136791229, -0.24643701314926147, 0.24910970032215118, -0.22580735385417938, 0.0017828706186264753, 0.041486795991659164, 0.3376006782054901, 0.20330335199832916, 0.0855955109000206, 0.016806280240416527, 0.1537904590368271, -0.002623060019686818, 0.37097570300102234, 0.37419989705085754, 0.07122364640235901, -0.12836895883083344, 0.30861541628837585, 0.2894502580165863, -0.19220088422298431, 0.3459261357784271, -0.04727444797754288, -0.2300412803888321, -0.2123451828956604, -0.34874796867370605, -0.06607823818922043, -0.13343720138072968, -0.2441013753414154, 0.05280378460884094, -0.21850933134555817, 0.4211465120315552, 0.10703510046005249, 0.00693344185128808, -0.10198671370744705, -0.07342920452356339, 0.24302220344543457, 0.6758600473403931, 0.5432836413383484, -0.05498277395963669, -0.009362283162772655, -0.15742336213588715, -0.06789910793304443, -0.07461666315793991, -0.025724148377776146, -0.35751771926879883, 0.30861055850982666, -0.03479382023215294, -0.19527140259742737, -0.07248319685459137, -0.2521013617515564, 0.0011539855040609837, -0.07857485115528107, -0.04063135012984276, -0.45299434661865234, 0.06441260129213333, 0.16561968624591827, 0.1157456487417221, -0.24818120896816254, -0.08226005733013153, -0.3696918785572052, 0.001150829833932221, -0.09310434013605118, 0.21344871819019318, 0.09770317375659943, 0.5715022087097168, 0.17998377978801727, 0.004472476430237293, 0.2015303671360016, 0.34981057047843933, -0.19826965034008026, -0.1420636922121048, -0.3086487948894501, 0.2537016272544861, 0.2255491018295288, -0.4210561513900757, 0.008450026623904705, -0.026030026376247406, -0.3512308597564697, -0.24540291726589203, -0.15064841508865356, 0.02072109468281269, -0.1323951929807663, -0.03456096723675728, 0.02036011591553688, -0.154886856675148, 0.09999227523803711, 0.2355002760887146, 0.9865521788597107, -0.138552725315094, -0.1096169650554657, 0.1248132586479187, 0.10546176880598068, 0.2792196571826935, 0.32089000940322876, 0.28082069754600525, -0.4639449715614319, 0.07715685665607452, 0.010960676707327366, -0.03015069290995598, 0.277621328830719, -0.525932252407074, -0.2436196357011795, 0.2061157375574112, 0.29099202156066895, -0.12954577803611755, -0.16447657346725464, 0.0016397425206378102, -0.25512903928756714, 0.2933187484741211, -0.27244076132774353, 0.23897258937358856, 0.27153629064559937, -0.2574654519557953, -0.22104476392269135, -0.13456779718399048, -0.2259014993906021, -0.10495693981647491, -0.22963641583919525, 0.04038364812731743, -0.11308516561985016, 0.01941918022930622, 0.267167866230011, -0.50410395860672, -0.07992091774940491, -0.3868742287158966, 0.04681603983044624, 0.2689403295516968, 0.12489474564790726, 0.07363446056842804, -0.01160789467394352, -0.1795082688331604, 0.05912601202726364, 0.1367815136909485, -0.04670073837041855, -0.27277374267578125, 0.10306581854820251, -0.015441897325217724, 0.024678969755768776, -0.3839196562767029, 0.0846792683005333, -0.28968894481658936, 0.2429405003786087, 0.12084002047777176, -0.10706133395433426, 0.1148073598742485, -0.07094226032495499, -0.03348386660218239, 0.26736557483673096, -0.19453014433383942, 0.057599589228630066, -0.15899766981601715, 0.09802737832069397, -0.3216734528541565, -0.2324085533618927, -0.3399202525615692, -0.03020169399678707, 0.13309158384799957, 0.049532342702150345, 0.2683555483818054, -0.2182842195034027, -0.1532241851091385, -0.3926762044429779, -0.07292759418487549, -0.41784632205963135, -0.1123666986823082, -0.05294431746006012, -0.21173760294914246, 0.025620220229029655, 0.48510608077049255, 0.45397260785102844, 0.2836441993713379, -0.2160491794347763, -0.007732459809631109, -0.11968284845352173, 0.011087516322731972, -0.37181007862091064, 0.25649139285087585, -0.33525949716567993, -0.3528234362602234, -0.03128039464354515, -0.038461826741695404, -0.4361192584037781, -0.032619837671518326, 0.2046888917684555, -0.08650197088718414, -0.3726925551891327, -0.1920221447944641, -0.021644262596964836, -0.1820133626461029, 0.31981542706489563, 0.13285908102989197, -0.21885326504707336, -0.31201571226119995, 0.061290908604860306, 0.015794726088643074, 0.18752846121788025, -0.12967029213905334, -0.1547093540430069, 0.0038459389470517635, -0.19998635351657867, 0.02931142784655094, 0.19193045794963837, 0.335767924785614, 0.09246060997247696, -0.0713372677564621, 0.30562227964401245, 0.21980386972427368, 0.09259627014398575, 0.14735731482505798, -0.031184619292616844, 0.45837682485580444, 0.3157455623149872, 0.052342090755701065, 0.00758132291957736, 0.03393451124429703, 0.34578827023506165, 0.38096895813941956, -0.07566209137439728, 0.08521799743175507, 0.04236644133925438, 0.05036904290318489, 0.13562467694282532, 0.2444314807653427, 0.3785255551338196, 0.21427756547927856, 0.053175125271081924, -0.2271934300661087, 0.15625548362731934, 0.23488470911979675, 0.004336948972195387, -0.028055142611265182, -0.20218577980995178, 0.29048681259155273, -0.08338364213705063, 0.2238011211156845, 0.3872188329696655, -0.2596527934074402, 0.146463081240654, 0.2636251151561737, 0.02633051946759224, 0.5067722201347351, 0.00482770474627614, -0.02825230546295643, 0.24418708682060242, 0.168538436293602, 0.0365484245121479, 0.1855722814798355, 0.05349649116396904, -0.3544362187385559, -0.26777738332748413, 0.04045183211565018, -0.07692054659128189, 0.12555725872516632, 0.07426825165748596, -0.3128618896007538, 0.05626753717660904, -0.21410776674747467, 0.25570860505104065, 0.16994084417819977, 0.3915916681289673, 0.3159259557723999, 0.09333746135234833, -0.03507567197084427, -0.01847734861075878, 0.10909928381443024, -0.1433575600385666, -0.039791010320186615, 0.2711373269557953, -0.0930316299200058, -0.3271622955799103, 0.11409763991832733, -0.010774598456919193, 0.14503586292266846, -0.13482633233070374, 0.09698287397623062, -0.1305556446313858, 0.2597898542881012, 0.22609345614910126, -0.06858465075492859, 0.06800878047943115, 0.1422143280506134, 0.2956295311450958, -0.033963240683078766, 0.22442615032196045, -0.1003219410777092, 0.018718073144555092, 0.3969760239124298, 0.02809177339076996, -0.15857894718647003, -0.12412106990814209, -0.15548859536647797, 0.028386419638991356, -0.10613000392913818, 0.19699817895889282, 0.2520413398742676, 0.2682952582836151, -0.16558562219142914, 0.2448023110628128, -0.17455922067165375, 0.33221301436424255, -0.20337730646133423, 0.13826480507850647, 0.23190386593341827, 0.3815694749355316, 0.11041348427534103, 0.037121765315532684, 0.024089325219392776, 0.2983558177947998, -0.41264477372169495, -0.15645961463451385, 0.035123199224472046, -0.023589545860886574, 0.13221271336078644, 0.1386992484331131, 0.16516423225402832, 0.11002933233976364, 0.13756704330444336, 0.1812783032655716, 0.2327536791563034, 0.27816474437713623, -0.2726840078830719, -0.14692698419094086, 0.3531796336174011, 0.04256020486354828, 0.183644101023674, -0.28706204891204834, 0.01783747598528862, 0.4965198040008545, 0.07583483308553696, 0.2701107859611511, 0.26891636848449707, -0.044416528195142746, -0.3643372654914856, -0.10233542323112488, 0.3081006109714508, -0.11532602459192276, -0.5593947172164917, 0.0010373018449172378, -0.02709651179611683, -0.21037758886814117, -0.7020250558853149, 0.30066150426864624, -0.16418308019638062, -0.16610530018806458, -0.01918712630867958, 0.06811903417110443, 0.5079379677772522, 0.03371768072247505, 0.1096634566783905, -0.18978698551654816, -0.38740074634552, -0.0077367424964904785, 0.1810433715581894, 0.033533789217472076, 0.07835165411233902, -0.11162672191858292, 0.04894626885652542, -0.1589030921459198, 0.09290386736392975, -0.025165066123008728, 0.11818921566009521, -0.07428424060344696, 0.18348869681358337, -0.05699802562594414, -0.02497401461005211, -0.13319861888885498, -0.09973936527967453, 0.08774424344301224, 0.07771524786949158, 0.16390487551689148, -0.24105723202228546, -0.2680986821651459, 0.12601539492607117, 0.2602725028991699, 0.11162673681974411, 0.1417066603899002, -0.279805064201355, -0.013009708374738693, 0.185724675655365, 0.02475612610578537, -0.46047163009643555, -0.007463579531759024, 0.053469449281692505, -0.06309732794761658, 0.2100316733121872, 0.08000633120536804, 0.0962207168340683, -0.05986975505948067, -0.22731538116931915, 0.19299408793449402, -0.06907736510038376, -0.27371135354042053, -0.2706359624862671, -0.0692666694521904 ]
https://github.com/huggingface/datasets/issues/2279
Compatibility with Ubuntu 18 and GLIBC 2.27?
Hi @tginart, thanks for reporting. I think this issue is already open at `tokenizers` library: https://github.com/huggingface/tokenizers/issues/685
## Describe the bug For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04). I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC. ## Steps to reproduce the bug 1. clone the transformers repo 2. move to examples/pytorch/language-modeling 3. run example command: ```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm``` ## Expected results As described in the transformers repo. ## Actual results ```Traceback (most recent call last): File "run_clm.py", line 34, in <module> from transformers import ( File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__ return super().__getattr__(name) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module return importlib.import_module("." + module_name, self.__name__) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module> from . import ( File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module> from .tokenization_layoutlm import LayoutLMTokenizer File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module> from ..bert.tokenization_bert import BertTokenizer File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module> from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module> from .tokenization_utils_base import ( File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module> from tokenizers import AddedToken File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module> from .tokenizers import ( ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so) ``` ## Versions Paste the output of the following code: ``` - Datasets: 1.6.1 - Python: 3.7.10 (default, Feb 26 2021, 18:47:35) [GCC 7.3.0] - Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid ```
16
Compatibility with Ubuntu 18 and GLIBC 2.27?
[ -0.2532741129398346, -0.3600507080554962, -0.2346872091293335, 0.005755934398621321, -0.010757232084870338, -0.07844516634941101, -0.03404480218887329, 0.2562589645385742, 0.4418453276157379, 0.14315621554851532, 0.20585110783576965, 0.3392412066459656, -0.4000459313392639, 0.01207882259041071, -0.2898387610912323, -0.001674762344919145, 0.09478284418582916, 0.07592752575874329, -0.05550549551844597, -0.1026216447353363, -0.0719989612698555, 0.568743884563446, -0.3454864025115967, 0.03804370015859604, -0.028626684099435806, 0.015350651927292347, 0.08488817512989044, 0.33676642179489136, -0.1416275054216385, 0.13667167723178864, 0.13719037175178528, -0.016342483460903168, -0.12519457936286926, 0.35642170906066895, -0.00010245484008919448, -0.07930463552474976, 0.10207217186689377, -0.0019518417539075017, -0.15176841616630554, -0.14699751138687134, 0.4373697340488434, 0.08899716287851334, 0.10058470815420151, 0.13285379111766815, -0.13182371854782104, 0.084003746509552, 0.15354759991168976, -0.18108411133289337, 0.23260498046875, -0.05488888919353485, 0.33412596583366394, 0.27505844831466675, 0.220716655254364, -0.1086997389793396, 0.26258978247642517, -0.22578009963035583, -0.15458586812019348, 0.4381004571914673, 0.5627167224884033, 0.2976831793785095, 0.2335558533668518, -0.06361652910709381, -0.19886767864227295, -0.20757314562797546, 0.17630651593208313, -0.33839088678359985, 0.17246834933757782, -0.2876026928424835, -0.0593174509704113, -0.021923890337347984, -0.10022146254777908, -0.2003377377986908, 0.0858309268951416, -0.19392423331737518, -0.1749793142080307, 0.07164986431598663, 0.01927957497537136, -0.23722577095031738, -0.048697203397750854, 0.010585671290755272, -0.012969642877578735, -0.4635324776172638, -0.0377894788980484, -0.3201741874217987, 0.1356646567583084, 1.10689115524292, 0.05344272032380104, -0.09374059736728668, 0.05195204168558121, 0.13626497983932495, 0.01768958568572998, -0.0645148754119873, -0.18588018417358398, 0.133981391787529, 0.26006460189819336, -0.11082157492637634, -0.0006387713365256786, -0.045279450714588165, -0.07278066873550415, -0.3379531502723694, -0.15701985359191895, 0.27562183141708374, -0.08686591684818268, 0.1934562772512436, -0.38318511843681335, 0.07015517354011536, -0.20318487286567688, 0.30482208728790283, 0.20672602951526642, -0.012502283789217472, 0.26574036478996277, 0.010822117328643799, -0.24788030982017517, -0.298525333404541, -0.3833330571651459, 0.25008392333984375, -0.2333955466747284, -0.15949580073356628, 0.05376926064491272, -0.042882367968559265, 0.04649475961923599, 0.19351232051849365, -0.013924670405685902, 0.011190499179065228, 0.2172977179288864, 0.16598811745643616, 0.001307062222622335, 0.020728841423988342, -0.1723458468914032, 0.20754440128803253, -0.12885205447673798, -0.0154260927811265, 0.0173505712300539, -0.3071867525577545, 0.006049577612429857, 0.16942165791988373, 0.20832031965255737, 0.06164267659187317, 0.3381600081920624, 0.2931576073169708, -0.06005902215838432, -0.09421027451753616, 0.16499829292297363, 0.2331305742263794, -0.16870805621147156, -0.028038911521434784, 0.14903537929058075, -0.3908926546573639, -0.27443423867225647, 0.003123229369521141, -0.03934907913208008, -0.10759707540273666, 0.03147538751363754, 0.2608289420604706, 0.19891585409641266, 0.07454175502061844, 0.1629091203212738, -0.055697001516819, 0.025934116914868355, -0.3219268023967743, 0.22050844132900238, -0.35269665718078613, 0.058206502348184586, -0.02289816364645958, -0.2798766791820526, -0.3092077076435089, -0.2826157212257385, -0.1753605455160141, 0.7406890392303467, -0.03244908154010773, -0.12484069913625717, 0.04615674912929535, 0.03168352693319321, -0.502200722694397, 0.007737170904874802, -0.014794978313148022, 0.12449842691421509, -0.03744107112288475, -0.1557128131389618, 0.05017007142305374, 0.3227120339870453, -0.20240044593811035, 0.09496260434389114, 0.02750849537551403, 0.21606947481632233, -0.3362590968608856, -0.006143717560917139, 0.29390162229537964, 0.11866104602813721, -0.023359449580311775, -0.4732019901275635, -0.2573302090167999, -0.4780600965023041, -0.17272984981536865, 0.22908584773540497, -0.3000737130641937, -0.10654287040233612, -0.22577930986881256, 0.5712974667549133, -0.24828924238681793, -0.23834779858589172, -0.17927652597427368, 0.5621247887611389, -0.1284024864435196, -0.007722886279225349, 0.2627107799053192, -0.030881181359291077, 0.14574402570724487, -0.13869190216064453, 0.1336645483970642, -0.007415149360895157, 0.053389083594083786, 0.3325483798980713, 0.018399501219391823, 0.1822771430015564, -0.19359193742275238, 0.17908009886741638, 0.05314473807811737, 0.2683355510234833, -0.12098902463912964, -0.24425803124904633, 0.12157544493675232, -0.16115254163742065, -0.09703656286001205, -0.06353028118610382, 0.09340409934520721, -0.22636879980564117, -0.1945641040802002, 0.35081303119659424, -0.05432841181755066, -0.07996944338083267, -0.3531615734100342, 0.06128967925906181, 0.14142835140228271, -0.08465752750635147, 0.01401122473180294, -0.20043402910232544, 0.1653488725423813, 0.15980210900306702, 0.20964904129505157, 0.22629588842391968, -0.0125082703307271, 0.0034799310378730297, 0.09802421182394028, 0.4948720335960388, 0.32552051544189453, 0.0437493771314621, -0.16108782589435577, 0.5123142004013062, -0.16280746459960938, 0.12236031144857407, 0.005436975043267012, 0.12089760601520538, -0.18684272468090057, 0.06802879273891449, -0.02732476033270359, -0.2785288691520691, 0.0729791447520256, -0.2295113354921341, -0.04732004180550575, 0.3212985694408417, 0.16349577903747559, -0.04891584813594818, -0.0617598332464695, 0.24007926881313324, -0.0602647103369236, 0.24362824857234955, 0.14731839299201965, -0.00556208798661828, 0.24984578788280487, -0.1321071982383728, 0.11893609911203384, -0.1184234768152237, -0.2848869860172272, 0.1601012647151947, -0.25270238518714905, 0.41371428966522217, 0.16242076456546783, -0.11300744861364365, 0.32099786400794983, 0.142684668302536, -0.06529708206653595, -0.1919933259487152, 0.03351634368300438, -0.0962311178445816, 0.18897061049938202, 0.046240292489528656, -0.10970648378133774, 0.29847028851509094, 0.08484534919261932, -0.2368326038122177, -0.29171374440193176, 0.18200089037418365, 0.0380951352417469, 0.06583289057016373, 0.2321154624223709, -0.079412080347538, 0.17589521408081055, -0.3178088665008545, -0.1486189067363739, 0.0640302374958992, -0.03974887728691101, -0.28455331921577454, 0.2853151857852936, 0.2759961485862732, 0.03454126790165901, 0.06583235412836075, -0.10512539744377136, -0.31496989727020264, 0.33421629667282104, -0.2770375609397888, 0.3204706609249115, -0.19624345004558563, -0.1834164559841156, -0.026198426261544228, -0.26792600750923157, 0.04784875735640526, 0.03900837153196335, 0.05191342532634735, -0.8031864166259766, -0.02857745997607708, -0.17438113689422607, -0.13237260282039642, -0.5856029391288757, -0.3865249752998352, 0.2667601704597473, -0.27471378445625305, -0.09402753412723541, -0.2082144021987915, 0.28521713614463806, 0.1708105057477951, 0.36273157596588135, -0.08035212755203247, -0.22704321146011353, -0.08854378014802933, 0.003250799374654889, 0.13375608623027802, 0.10055053979158401, 0.0689682587981224, 0.04266943037509918, -0.22456462681293488, 0.11851651966571808, 0.12321791797876358, 0.24987883865833282, 0.01268741674721241, -0.21908113360404968, -0.3260544538497925, -0.1243385449051857, 0.11013767123222351, 0.3475070893764496, -0.25672951340675354, 0.30130523443222046, -0.04013604298233986, -0.18230469524860382, -0.15707704424858093, -0.24561628699302673, 0.06549358367919922, -0.10554905980825424, -0.15020045638084412, 0.18807274103164673, -0.15796352922916412, 0.022369299083948135, 0.2653477191925049, 0.09899105131626129, -0.1652153581380844, -0.045274827629327774, 0.23766790330410004, 0.3086187541484833, -0.23758414387702942, 0.19436421990394592, 0.016287196427583694, 0.2164279967546463, -0.41482073068618774, 0.0997224971652031, -0.048513252288103104, -0.3251514136791229, -0.24643701314926147, 0.24910970032215118, -0.22580735385417938, 0.0017828706186264753, 0.041486795991659164, 0.3376006782054901, 0.20330335199832916, 0.0855955109000206, 0.016806280240416527, 0.1537904590368271, -0.002623060019686818, 0.37097570300102234, 0.37419989705085754, 0.07122364640235901, -0.12836895883083344, 0.30861541628837585, 0.2894502580165863, -0.19220088422298431, 0.3459261357784271, -0.04727444797754288, -0.2300412803888321, -0.2123451828956604, -0.34874796867370605, -0.06607823818922043, -0.13343720138072968, -0.2441013753414154, 0.05280378460884094, -0.21850933134555817, 0.4211465120315552, 0.10703510046005249, 0.00693344185128808, -0.10198671370744705, -0.07342920452356339, 0.24302220344543457, 0.6758600473403931, 0.5432836413383484, -0.05498277395963669, -0.009362283162772655, -0.15742336213588715, -0.06789910793304443, -0.07461666315793991, -0.025724148377776146, -0.35751771926879883, 0.30861055850982666, -0.03479382023215294, -0.19527140259742737, -0.07248319685459137, -0.2521013617515564, 0.0011539855040609837, -0.07857485115528107, -0.04063135012984276, -0.45299434661865234, 0.06441260129213333, 0.16561968624591827, 0.1157456487417221, -0.24818120896816254, -0.08226005733013153, -0.3696918785572052, 0.001150829833932221, -0.09310434013605118, 0.21344871819019318, 0.09770317375659943, 0.5715022087097168, 0.17998377978801727, 0.004472476430237293, 0.2015303671360016, 0.34981057047843933, -0.19826965034008026, -0.1420636922121048, -0.3086487948894501, 0.2537016272544861, 0.2255491018295288, -0.4210561513900757, 0.008450026623904705, -0.026030026376247406, -0.3512308597564697, -0.24540291726589203, -0.15064841508865356, 0.02072109468281269, -0.1323951929807663, -0.03456096723675728, 0.02036011591553688, -0.154886856675148, 0.09999227523803711, 0.2355002760887146, 0.9865521788597107, -0.138552725315094, -0.1096169650554657, 0.1248132586479187, 0.10546176880598068, 0.2792196571826935, 0.32089000940322876, 0.28082069754600525, -0.4639449715614319, 0.07715685665607452, 0.010960676707327366, -0.03015069290995598, 0.277621328830719, -0.525932252407074, -0.2436196357011795, 0.2061157375574112, 0.29099202156066895, -0.12954577803611755, -0.16447657346725464, 0.0016397425206378102, -0.25512903928756714, 0.2933187484741211, -0.27244076132774353, 0.23897258937358856, 0.27153629064559937, -0.2574654519557953, -0.22104476392269135, -0.13456779718399048, -0.2259014993906021, -0.10495693981647491, -0.22963641583919525, 0.04038364812731743, -0.11308516561985016, 0.01941918022930622, 0.267167866230011, -0.50410395860672, -0.07992091774940491, -0.3868742287158966, 0.04681603983044624, 0.2689403295516968, 0.12489474564790726, 0.07363446056842804, -0.01160789467394352, -0.1795082688331604, 0.05912601202726364, 0.1367815136909485, -0.04670073837041855, -0.27277374267578125, 0.10306581854820251, -0.015441897325217724, 0.024678969755768776, -0.3839196562767029, 0.0846792683005333, -0.28968894481658936, 0.2429405003786087, 0.12084002047777176, -0.10706133395433426, 0.1148073598742485, -0.07094226032495499, -0.03348386660218239, 0.26736557483673096, -0.19453014433383942, 0.057599589228630066, -0.15899766981601715, 0.09802737832069397, -0.3216734528541565, -0.2324085533618927, -0.3399202525615692, -0.03020169399678707, 0.13309158384799957, 0.049532342702150345, 0.2683555483818054, -0.2182842195034027, -0.1532241851091385, -0.3926762044429779, -0.07292759418487549, -0.41784632205963135, -0.1123666986823082, -0.05294431746006012, -0.21173760294914246, 0.025620220229029655, 0.48510608077049255, 0.45397260785102844, 0.2836441993713379, -0.2160491794347763, -0.007732459809631109, -0.11968284845352173, 0.011087516322731972, -0.37181007862091064, 0.25649139285087585, -0.33525949716567993, -0.3528234362602234, -0.03128039464354515, -0.038461826741695404, -0.4361192584037781, -0.032619837671518326, 0.2046888917684555, -0.08650197088718414, -0.3726925551891327, -0.1920221447944641, -0.021644262596964836, -0.1820133626461029, 0.31981542706489563, 0.13285908102989197, -0.21885326504707336, -0.31201571226119995, 0.061290908604860306, 0.015794726088643074, 0.18752846121788025, -0.12967029213905334, -0.1547093540430069, 0.0038459389470517635, -0.19998635351657867, 0.02931142784655094, 0.19193045794963837, 0.335767924785614, 0.09246060997247696, -0.0713372677564621, 0.30562227964401245, 0.21980386972427368, 0.09259627014398575, 0.14735731482505798, -0.031184619292616844, 0.45837682485580444, 0.3157455623149872, 0.052342090755701065, 0.00758132291957736, 0.03393451124429703, 0.34578827023506165, 0.38096895813941956, -0.07566209137439728, 0.08521799743175507, 0.04236644133925438, 0.05036904290318489, 0.13562467694282532, 0.2444314807653427, 0.3785255551338196, 0.21427756547927856, 0.053175125271081924, -0.2271934300661087, 0.15625548362731934, 0.23488470911979675, 0.004336948972195387, -0.028055142611265182, -0.20218577980995178, 0.29048681259155273, -0.08338364213705063, 0.2238011211156845, 0.3872188329696655, -0.2596527934074402, 0.146463081240654, 0.2636251151561737, 0.02633051946759224, 0.5067722201347351, 0.00482770474627614, -0.02825230546295643, 0.24418708682060242, 0.168538436293602, 0.0365484245121479, 0.1855722814798355, 0.05349649116396904, -0.3544362187385559, -0.26777738332748413, 0.04045183211565018, -0.07692054659128189, 0.12555725872516632, 0.07426825165748596, -0.3128618896007538, 0.05626753717660904, -0.21410776674747467, 0.25570860505104065, 0.16994084417819977, 0.3915916681289673, 0.3159259557723999, 0.09333746135234833, -0.03507567197084427, -0.01847734861075878, 0.10909928381443024, -0.1433575600385666, -0.039791010320186615, 0.2711373269557953, -0.0930316299200058, -0.3271622955799103, 0.11409763991832733, -0.010774598456919193, 0.14503586292266846, -0.13482633233070374, 0.09698287397623062, -0.1305556446313858, 0.2597898542881012, 0.22609345614910126, -0.06858465075492859, 0.06800878047943115, 0.1422143280506134, 0.2956295311450958, -0.033963240683078766, 0.22442615032196045, -0.1003219410777092, 0.018718073144555092, 0.3969760239124298, 0.02809177339076996, -0.15857894718647003, -0.12412106990814209, -0.15548859536647797, 0.028386419638991356, -0.10613000392913818, 0.19699817895889282, 0.2520413398742676, 0.2682952582836151, -0.16558562219142914, 0.2448023110628128, -0.17455922067165375, 0.33221301436424255, -0.20337730646133423, 0.13826480507850647, 0.23190386593341827, 0.3815694749355316, 0.11041348427534103, 0.037121765315532684, 0.024089325219392776, 0.2983558177947998, -0.41264477372169495, -0.15645961463451385, 0.035123199224472046, -0.023589545860886574, 0.13221271336078644, 0.1386992484331131, 0.16516423225402832, 0.11002933233976364, 0.13756704330444336, 0.1812783032655716, 0.2327536791563034, 0.27816474437713623, -0.2726840078830719, -0.14692698419094086, 0.3531796336174011, 0.04256020486354828, 0.183644101023674, -0.28706204891204834, 0.01783747598528862, 0.4965198040008545, 0.07583483308553696, 0.2701107859611511, 0.26891636848449707, -0.044416528195142746, -0.3643372654914856, -0.10233542323112488, 0.3081006109714508, -0.11532602459192276, -0.5593947172164917, 0.0010373018449172378, -0.02709651179611683, -0.21037758886814117, -0.7020250558853149, 0.30066150426864624, -0.16418308019638062, -0.16610530018806458, -0.01918712630867958, 0.06811903417110443, 0.5079379677772522, 0.03371768072247505, 0.1096634566783905, -0.18978698551654816, -0.38740074634552, -0.0077367424964904785, 0.1810433715581894, 0.033533789217472076, 0.07835165411233902, -0.11162672191858292, 0.04894626885652542, -0.1589030921459198, 0.09290386736392975, -0.025165066123008728, 0.11818921566009521, -0.07428424060344696, 0.18348869681358337, -0.05699802562594414, -0.02497401461005211, -0.13319861888885498, -0.09973936527967453, 0.08774424344301224, 0.07771524786949158, 0.16390487551689148, -0.24105723202228546, -0.2680986821651459, 0.12601539492607117, 0.2602725028991699, 0.11162673681974411, 0.1417066603899002, -0.279805064201355, -0.013009708374738693, 0.185724675655365, 0.02475612610578537, -0.46047163009643555, -0.007463579531759024, 0.053469449281692505, -0.06309732794761658, 0.2100316733121872, 0.08000633120536804, 0.0962207168340683, -0.05986975505948067, -0.22731538116931915, 0.19299408793449402, -0.06907736510038376, -0.27371135354042053, -0.2706359624862671, -0.0692666694521904 ]
https://github.com/huggingface/datasets/issues/2278
Loss result inGptNeoForCasual
Hi ! I think you might have to ask on the `transformers` repo on or the forum at https://discuss.huggingface.co/ Closing since it's not related to this library
Is there any way you give the " loss" and "logits" results in the gpt neo api?
27
Loss result inGptNeoForCasual
[ -0.5470285415649414, -0.8669052720069885, -0.2520526647567749, 0.4240696430206299, 0.034096747636795044, -0.2551446557044983, -0.28646430373191833, 0.1491749882698059, -0.2412017583847046, 0.25465527176856995, 0.08912564814090729, 0.07596947252750397, -0.00643638102337718, 0.084896020591259, -0.16788962483406067, 0.39025211334228516, 0.04957037419080734, 0.030873244628310204, -0.03366357833147049, -0.5565094947814941, -0.21122373640537262, 0.3794468343257904, -0.37141352891921997, 0.34133005142211914, -0.15592001378536224, 0.046800386160612106, 0.23348458111286163, 0.09417799860239029, -0.17373482882976532, -0.1118316799402237, 0.1299985945224762, -0.25033846497535706, -0.09491647779941559, 0.16874654591083527, -0.00011268919479334727, -0.20015524327754974, -0.015372385270893574, -0.15905193984508514, -0.1712338626384735, 0.284913033246994, -0.019061371684074402, 0.2618866264820099, -0.10986065119504929, -0.3420671820640564, -0.14557544887065887, 0.21893410384655, -0.14904451370239258, -0.34737318754196167, 0.06552591919898987, -0.06438172608613968, 0.21898141503334045, -0.4318702816963196, -0.25504299998283386, 0.10171375423669815, -0.038483843207359314, -0.09237566590309143, -0.09981904923915863, 0.03468398004770279, 0.032034747302532196, -0.24923479557037354, 0.5586133599281311, 0.0843367800116539, 0.19156888127326965, -0.09390868991613388, 0.05158049985766411, -0.10559479892253876, 0.35493847727775574, 0.1693572998046875, 0.0541900210082531, 0.11781106144189835, 0.3694084584712982, 0.030388135462999344, 0.03403268754482269, 0.1619635373353958, 0.35886138677597046, -0.3666200339794159, 0.24538038671016693, 0.3662947118282318, -0.03726119175553322, 0.01768355630338192, 0.007871984504163265, 0.0718732550740242, -0.3798171877861023, 0.04856850206851959, -0.11999768763780594, -0.06643971800804138, 0.018981028348207474, -0.24299395084381104, 0.07975964993238449, 0.13938695192337036, -0.25934094190597534, 0.24244138598442078, -0.11254891008138657, -0.12272351235151291, 0.10266498476266861, -0.24371421337127686, 0.032792989164590836, 0.4423649311065674, -0.2158682644367218, -0.6957268714904785, 0.23493562638759613, -0.023487649857997894, -0.25650814175605774, 0.08622901886701584, -0.20183727145195007, -0.12952348589897156, 0.32671231031417847, 0.3867287337779999, -0.21456916630268097, 0.29679548740386963, -0.1909818947315216, -0.156609907746315, 0.33974534273147583, 0.27335646748542786, -0.07197919487953186, 0.15838949382305145, -0.178104966878891, -0.6084219217300415, -0.518081545829773, -0.0503486692905426, -0.12556403875350952, 0.23637187480926514, -0.1349639743566513, -0.14422865211963654, -0.123281329870224, 0.024197842925786972, 0.2921292781829834, 0.10479921847581863, -0.07380403578281403, 0.11543243378400803, -0.1258888989686966, 0.008596928790211678, -0.5155609250068665, -0.05178559944033623, -0.033836860209703445, 0.37808918952941895, 0.07967980206012726, -0.2613948881626129, -0.2079734206199646, -0.09347058087587357, 0.02168162539601326, -0.16091372072696686, 0.2893885672092438, -0.09615396708250046, -0.27728354930877686, -0.4130895137786865, -0.19162604212760925, -0.13341809809207916, 0.14084991812705994, -0.12836329638957977, 0.3090214133262634, -0.08171340078115463, -0.030577272176742554, 0.28157666325569153, 0.3748234808444977, 0.1552952378988266, 0.43180766701698303, 0.18363212049007416, -0.11579259485006332, -0.05978083238005638, 0.31335097551345825, -0.06068105250597, -0.5970000624656677, 0.014692390337586403, -0.07485488802194595, 0.14112651348114014, -0.3651651442050934, -0.3109043836593628, 0.43847596645355225, -0.3031783103942871, 0.25885042548179626, 0.34637773036956787, -0.26725590229034424, 0.19959643483161926, -0.15680833160877228, -0.15518641471862793, 0.2053675651550293, -0.13801828026771545, -0.29507994651794434, -0.2982295751571655, -0.3202955722808838, -0.289456307888031, 0.06591524183750153, -0.2161252200603485, 0.029738551005721092, -0.0025114535819739103, 0.21009723842144012, -0.1286793351173401, -0.07583100348711014, -0.2835457921028137, -0.350652813911438, 0.1450633555650711, 0.09661518782377243, -0.22792622447013855, 0.2043120414018631, 0.15297824144363403, 0.3074854612350464, 0.007053284905850887, 0.18188200891017914, -0.13843213021755219, -0.002274156082421541, 0.09716159850358963, 0.7084750533103943, -0.12844665348529816, -0.011824112385511398, -0.08886022865772247, 0.3048943877220154, -0.07087423652410507, -0.4517234265804291, 0.20942936837673187, 0.24202750623226166, -0.16969922184944153, 0.14526474475860596, -0.03124626725912094, 0.2263217568397522, 0.16444291174411774, 0.2373495250940323, 0.1100696250796318, -0.29922762513160706, 0.051457419991493225, -0.0431477352976799, 0.6067363023757935, -0.19007544219493866, 0.054713014513254166, -0.03791750967502594, 0.0457095205783844, 0.0008440219680778682, -0.3383321762084961, -0.163732647895813, 0.06498558819293976, 0.2625108063220978, 0.2950914800167084, -0.16580082476139069, 0.04779810085892677, -0.49162936210632324, 0.29455021023750305, 0.5483652353286743, 0.38906940817832947, 0.06307602673768997, -0.45793643593788147, 0.047798581421375275, -0.3012430965900421, 0.03727219998836517, -0.08744805306196213, 0.14590057730674744, 0.10057242959737778, 0.43184688687324524, -0.015679487958550453, -0.052848707884550095, -0.13375118374824524, -0.21873223781585693, -0.09929131716489792, 0.013002991676330566, -0.15484881401062012, 0.13652878999710083, -0.10111302137374878, -0.15918433666229248, -0.18251319229602814, -0.43413493037223816, -0.038756802678108215, -0.27266359329223633, -0.18809643387794495, 0.03190002590417862, 0.2368696928024292, 0.2779965400695801, 0.21469658613204956, 0.3867393732070923, -0.08063720911741257, 0.5931575298309326, 0.10904593020677567, 0.32533061504364014, 0.12678608298301697, -0.19631195068359375, -0.19447940587997437, 0.27923229336738586, 0.1747930645942688, -0.018016086891293526, 0.1102868989109993, -0.07035541534423828, 0.1687626838684082, -0.25725916028022766, -0.14407242834568024, -0.21370086073875427, -0.21581602096557617, -0.0511561818420887, -0.22775298357009888, -0.1697581559419632, -0.29856422543525696, -0.2655893862247467, 0.15839163959026337, 0.2871391177177429, -0.22359293699264526, 0.11639795452356339, 0.025669675320386887, -0.08153419941663742, -0.14258088171482086, -0.2721329629421234, 0.5241429805755615, -0.2086848020553589, 0.6508855223655701, -0.40735912322998047, -0.07723212987184525, -0.07436367124319077, 0.13772575557231903, -0.42331498861312866, -0.02184073068201542, 0.25650569796562195, -0.2697620987892151, -0.27045977115631104, 0.09399830549955368, 0.03349849581718445, 0.25620174407958984, 0.3675314486026764, -0.32243865728378296, 0.1807660460472107, -0.1881728619337082, -0.4402211010456085, -0.050048038363456726, 0.3502708971500397, -0.11181727051734924, -0.12288941442966461, -0.022116120904684067, -0.2546771168708801, -0.08731221407651901, -0.05618714541196823, -0.02228211797773838, -0.15056194365024567, -0.09912653267383575, 0.21436694264411926, 0.01435988862067461, -0.08773719519376755, 0.24943141639232635, -0.16480132937431335, 0.011654345318675041, -0.1744747906923294, 0.28659430146217346, -0.08359622955322266, 0.006742164958268404, -0.3275679051876068, 0.04096055030822754, 0.14298611879348755, -0.08494848757982254, 0.36994048953056335, 0.12706108391284943, 0.3064342737197876, -0.2881792187690735, 0.07323453575372696, 0.27411380410194397, -0.02853883057832718, -0.3593478202819824, -0.0574912466108799, 0.2776365578174591, 0.04634615406394005, -0.3005947768688202, -0.05936548486351967, -0.01430340576916933, 0.0765356793999672, -0.10149504244327545, 0.34480157494544983, -0.3699870705604553, 0.37662553787231445, 0.36540427803993225, 0.39446699619293213, 0.14930099248886108, 0.006093947216868401, 0.3463650941848755, 0.12850897014141083, -0.07877745479345322, 0.05983638018369675, -0.10617288202047348, 0.29451891779899597, 0.21149149537086487, -0.265375018119812, 0.010198022238910198, -0.05119392275810242, -0.35401639342308044, -0.13051412999629974, -0.21154721081256866, -0.5343447327613831, 0.03304421529173851, -0.1910572350025177, -0.06436887383460999, 0.11550182104110718, -0.011724253185093403, -0.305637001991272, 0.19225041568279266, 0.12856848537921906, 0.39715245366096497, 0.23978905379772186, 0.04989343509078026, -0.18530620634555817, 0.03260364010930061, 0.04575435444712639, -0.10090027004480362, 0.13399413228034973, -0.421786904335022, 0.12920497357845306, -0.27383390069007874, 0.07051540911197662, 0.04974900558590889, 0.14643748104572296, 0.24809131026268005, 0.13557647168636322, -0.011806616559624672, 0.03725985810160637, -0.3899606764316559, 0.06824317574501038, 0.06188527122139931, -0.26642656326293945, -0.08511646836996078, 0.6473712921142578, 0.3397871255874634, -0.08190333098173141, 0.14136765897274017, 0.24013273417949677, 0.02160172536969185, 0.05310254544019699, -0.1119028776884079, -0.02801348827779293, -0.12122020125389099, 0.006735556293278933, 0.3211996555328369, -0.010598309338092804, 0.013474058359861374, 0.23534086346626282, -0.34476616978645325, -0.04406469315290451, -0.30544114112854004, -0.009679224342107773, -0.24032726883888245, 0.06878220289945602, -0.18677732348442078, -0.059738580137491226, -0.1467469483613968, 0.44700416922569275, -0.2614454925060272, 0.04299367964267731, 0.3956702947616577, 0.21874238550662994, -0.11948423832654953, -0.1045219674706459, 0.3417671322822571, 0.38361090421676636, 0.06009373068809509, -0.20160555839538574, -0.3505767285823822, 0.17856942117214203, 0.11626531928777695, 0.12779948115348816, -0.010598297230899334, 0.09737531840801239, 0.23495125770568848, 0.47702884674072266, -0.038173820823431015, 0.15697282552719116, -0.37968912720680237, 0.3480818569660187, -0.18028652667999268, -0.3890778124332428, -0.14312954246997833, 0.39395076036453247, 1.2896106243133545, 0.33730843663215637, 0.17483052611351013, 0.050549838691949844, 0.02808505855500698, -0.45532849431037903, 0.17511072754859924, -0.01458019483834505, -0.029110636562108994, -0.12028941512107849, -0.05123823881149292, -0.017346415668725967, 0.22201381623744965, 0.002679878380149603, -0.03847593814134598, 0.17356421053409576, 0.2303488701581955, -0.08633151650428772, 0.07576380670070648, -0.12908391654491425, 0.1727939397096634, -0.1752631962299347, 0.1428455114364624, 0.11302600055932999, 0.30752885341644287, 0.1334286481142044, -0.19055256247520447, 0.026668701320886612, -0.019727077335119247, -0.020283712074160576, -0.14554008841514587, 0.09006334841251373, -0.5907014608383179, 0.030731169506907463, -0.15800027549266815, -0.33067646622657776, -0.006260927766561508, 0.277084618806839, 0.4872077703475952, 0.17851151525974274, 0.057730238884687424, 0.10415328294038773, 0.09695377945899963, -0.03490758687257767, 0.039530739188194275, -0.1886417418718338, 0.3424763083457947, -0.3879067599773407, -0.2628747224807739, 0.16694705188274384, 0.21883998811244965, 0.31121382117271423, 0.1593123823404312, 0.005704804789274931, 0.04424507915973663, -0.12369907647371292, -0.3142077922821045, 0.0601305216550827, -0.1097215861082077, -0.1610632687807083, 0.17122788727283478, 0.254279226064682, -0.27565792202949524, 0.22984597086906433, 0.2231730967760086, -0.379180908203125, -0.2886776626110077, 0.29939669370651245, 0.32887768745422363, -0.14530734717845917, 0.09647822380065918, -0.4519268274307251, -0.09943925589323044, -0.26923084259033203, -0.271901398897171, 0.04567999765276909, -0.07891533523797989, -0.28927192091941833, 0.23535196483135223, -0.1201833114027977, 0.19696369767189026, 0.22381313145160675, 0.2637762725353241, 0.2188916802406311, -0.4320354163646698, -0.0237942636013031, -0.21824385225772858, 0.3081943392753601, 0.16782131791114807, 0.4201536774635315, 0.09831229597330093, 0.2250577062368393, 0.1759319305419922, -0.030742930248379707, -0.3814545273780823, -0.14069125056266785, 0.09796898812055588, 0.16188427805900574, 0.14085935056209564, 0.05454879254102707, -0.3880143165588379, 0.03771819919347763, 0.2830883264541626, 0.6334063410758972, 0.2031477391719818, -0.2878694534301758, 0.1421874463558197, 0.12031486630439758, 0.31771036982536316, 0.006713614333420992, -0.2538939118385315, -0.061397675424814224, -0.0644354373216629, 0.31669461727142334, -0.2867397964000702, -0.20938989520072937, 0.2565743029117584, 0.26432567834854126, 0.286181777715683, 0.17236444354057312, 0.3321259617805481, 0.23331375420093536, 0.14420907199382782, 0.13232773542404175, -0.30636081099510193, 0.107358917593956, -0.02906259149312973, -0.328671395778656, -0.303205281496048, 0.03914950042963028, -0.14562548696994781, 0.37207844853401184, 0.22425541281700134, -0.03225717321038246, -0.1346641182899475, 0.16873455047607422, -0.27934595942497253, -0.044136833399534225, -0.1571010798215866, -0.17539948225021362, -0.12575536966323853, 0.19776181876659393, -0.12623275816440582, 0.05078386142849922, 0.3178223967552185, -0.119477778673172, 0.061370376497507095, 0.1341114640235901, 0.3572031557559967, -0.12593229115009308, 0.020710255950689316, -0.1129058226943016, -0.41689828038215637, -0.10282003879547119, -0.035259585827589035, -0.7462971806526184, -0.006741381250321865, 0.12048067897558212, -0.27238884568214417, 0.11230812221765518, 0.15537241101264954, 0.43943047523498535, 0.39713042974472046, 0.059667423367500305, -0.34149137139320374, 0.25954383611679077, -0.21104402840137482, 0.12926426529884338, 0.24952834844589233, 0.3122839033603668, -0.26225942373275757, 0.5237793922424316, 0.31226345896720886, -0.21818821132183075, -0.23950886726379395, -0.3652213513851166, 0.0428202748298645, 0.23788154125213623, -0.36695876717567444, 0.08979455381631851, -0.47758641839027405, -0.18029730021953583, 0.19847619533538818, -0.24003757536411285, -0.015371141023933887, 0.5863736867904663, 0.09973984956741333, -0.16910195350646973, -0.08577661216259003, 0.4577188789844513, -0.2282906323671341, 0.5522046089172363, 0.3968319296836853, -0.25999319553375244, 0.055861666798591614, -0.06348162889480591, 0.21303528547286987, -0.28000423312187195, 0.5868805646896362, 0.1236906498670578, -0.06796781718730927, 0.09510112553834915, 0.07165901362895966, 0.2907356023788452, -0.27350282669067383, -0.07593841105699539, -0.11830875277519226, 0.329190731048584, 0.37058570981025696, 0.27407267689704895, 0.24130120873451233, -0.22267413139343262, -0.020128319039940834, 0.13992470502853394, 0.3435715436935425, -0.3088127076625824, -0.24035941064357758, 0.05978092551231384, -0.24407391250133514, -0.4067420959472656, 0.10397113859653473, -0.19479580223560333, 0.18984180688858032, -0.05997319146990776, -0.352337509393692, 0.05152511224150658, -0.11345386505126953, 0.07356493175029755, 0.08005666732788086, 0.2298462837934494, 0.28656551241874695, -0.017135148867964745, -0.16524465382099152, -0.37539172172546387, -0.13406632840633392, 0.2638884484767914, -0.04241390898823738, 0.11602523922920227, -0.00743548758327961, 0.10400130599737167, 0.3075791001319885, -0.07609664648771286, 0.4148081839084625, 0.4880374073982239, -0.21014611423015594, 0.11368975043296814, -0.10591154545545578, -0.1056097149848938, 0.23721039295196533, 0.0018010787898674607, 0.06572854518890381, 0.015607546083629131, 0.08658359199762344, 0.010464628227055073, 0.21698088943958282, 0.15271149575710297, 0.08853337913751602, -0.5297508835792542, 0.06493934988975525, 0.24132142961025238, -0.0022440755274146795, 0.18157659471035004, -0.45840105414390564, -0.03815174102783203, 0.5969738364219666, -0.1876787543296814, -0.051511988043785095, 0.04026169329881668, 0.12190062552690506, 0.1581021100282669, 0.0583488792181015, 0.2625346779823303, 0.3303334414958954, 0.07327555865049362, 0.25037112832069397, -0.03701883554458618, -0.044623516499996185, 0.025872772559523582, -0.1321915090084076, -0.19247889518737793, -0.03776193782687187, 0.4659308195114136, 0.16883131861686707, -0.15492066740989685, -0.22727598249912262, -0.5162560343742371, 0.38650697469711304, 0.2898724675178528, 0.09244389086961746, -0.12401704490184784, 0.22843147814273834, 0.3041195273399353, 0.1513577401638031, -0.4429311156272888, -0.18889597058296204, 0.31814634799957275, -0.1383470743894577, 0.09788423031568527, 0.08502782136201859, 0.1704830825328827, -0.1096627339720726, -0.14461080729961395, 0.768915593624115, 0.0487818643450737, -0.26134273409843445, 0.36560067534446716, -0.022085929289460182 ]
https://github.com/huggingface/datasets/issues/2276
concatenate_datasets loads all the data into memory
Therefore, when I try to concatenate larger datasets (5x 35GB data sets) I also get an out of memory error, since over 90GB of swap space was used at the time of the crash: ``` --------------------------------------------------------------------------- MemoryError Traceback (most recent call last) <ipython-input-6-9766d77530b9> in <module> 20 print(file_name) 21 cv_batch = load_from_disk(file_name) ---> 22 cv_sampled_train = concatenate_datasets([cv_sampled_train, cv_batch]) 23 24 print("Saving to disk!") C:\ProgramData\Anaconda3\lib\site-packages\datasets\arrow_dataset.py in concatenate_datasets(dsets, info, split, axis) 2891 2892 # Concatenate tables -> 2893 table = concat_tables([dset._data for dset in dsets if len(dset._data) > 0], axis=axis) 2894 table = update_metadata_with_features(table, None) 2895 C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in concat_tables(tables, axis) 837 if len(tables) == 1: 838 return tables[0] --> 839 return ConcatenationTable.from_tables(tables, axis=axis) 840 841 C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in from_tables(cls, tables, axis) 697 return result 698 --> 699 blocks = to_blocks(tables[0]) 700 for table in tables[1:]: 701 table_blocks = to_blocks(table) C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in to_blocks(table) 669 return [[InMemoryTable(table)]] 670 elif isinstance(table, ConcatenationTable): --> 671 return copy.deepcopy(table.blocks) 672 else: 673 return [[table]] C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy) 203 append = y.append 204 for a in x: --> 205 append(deepcopy(a, memo)) 206 return y 207 d[list] = _deepcopy_list C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy) 203 append = y.append 204 for a in x: --> 205 append(deepcopy(a, memo)) 206 return y 207 d[list] = _deepcopy_list C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 151 copier = getattr(x, "__deepcopy__", None) 152 if copier is not None: --> 153 y = copier(memo) 154 else: 155 reductor = dispatch_table.get(cls) C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in __deepcopy__(self, memo) 143 # by adding it to the memo, self.table won't be copied 144 memo[id(self.table)] = self.table --> 145 return _deepcopy(self, memo) 146 147 def __getstate__(self): C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in _deepcopy(x, memo) 62 memo[id(x)] = result 63 for k, v in x.__dict__.items(): ---> 64 setattr(result, k, copy.deepcopy(v, memo)) 65 return result 66 C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy) 203 append = y.append 204 for a in x: --> 205 append(deepcopy(a, memo)) 206 return y 207 d[list] = _deepcopy_list C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 170 y = x 171 else: --> 172 y = _reconstruct(x, memo, *rv) 173 174 # If is its own copy, don't memoize. C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy) 262 if deep and args: 263 args = (deepcopy(arg, memo) for arg in args) --> 264 y = func(*args) 265 if deep: 266 memo[id(x)] = y C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0) 261 deep = memo is not None 262 if deep and args: --> 263 args = (deepcopy(arg, memo) for arg in args) 264 y = func(*args) 265 if deep: C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy) 203 append = y.append 204 for a in x: --> 205 append(deepcopy(a, memo)) 206 return y 207 d[list] = _deepcopy_list C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 170 y = x 171 else: --> 172 y = _reconstruct(x, memo, *rv) 173 174 # If is its own copy, don't memoize. C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy) 262 if deep and args: 263 args = (deepcopy(arg, memo) for arg in args) --> 264 y = func(*args) 265 if deep: 266 memo[id(x)] = y C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0) 261 deep = memo is not None 262 if deep and args: --> 263 args = (deepcopy(arg, memo) for arg in args) 264 y = func(*args) 265 if deep: C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy) 208 209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy): --> 210 y = [deepcopy(a, memo) for a in x] 211 # We're not going to put the tuple in the memo, but it's still important we 212 # check for it, in case the tuple contains recursive mutable structures. C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0) 208 209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy): --> 210 y = [deepcopy(a, memo) for a in x] 211 # We're not going to put the tuple in the memo, but it's still important we 212 # check for it, in case the tuple contains recursive mutable structures. C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy) 203 append = y.append 204 for a in x: --> 205 append(deepcopy(a, memo)) 206 return y 207 d[list] = _deepcopy_list C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy) 208 209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy): --> 210 y = [deepcopy(a, memo) for a in x] 211 # We're not going to put the tuple in the memo, but it's still important we 212 # check for it, in case the tuple contains recursive mutable structures. C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0) 208 209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy): --> 210 y = [deepcopy(a, memo) for a in x] 211 # We're not going to put the tuple in the memo, but it's still important we 212 # check for it, in case the tuple contains recursive mutable structures. C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 144 copier = _deepcopy_dispatch.get(cls) 145 if copier is not None: --> 146 y = copier(x, memo) 147 else: 148 if issubclass(cls, type): C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy) 203 append = y.append 204 for a in x: --> 205 append(deepcopy(a, memo)) 206 return y 207 d[list] = _deepcopy_list C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil) 159 reductor = getattr(x, "__reduce_ex__", None) 160 if reductor is not None: --> 161 rv = reductor(4) 162 else: 163 reductor = getattr(x, "__reduce__", None) C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.__reduce_ex__() C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.to_pybytes() MemoryError: ```
## Describe the bug When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk. Interestingly, this happens when trying to save the new dataset to disk or concatenating it again. ![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png) ## Steps to reproduce the bug ```python from datasets import concatenate_datasets, load_from_disk test_sampled_pro = load_from_disk("test_sampled_pro") val_sampled_pro = load_from_disk("val_sampled_pro") big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro]) # Loaded to memory big_set.save_to_disk("big_set") # Loaded to memory big_set = concatenate_datasets([big_set, val_sampled_pro]) ``` ## Expected results The data should be loaded into memory in batches and then saved directly to disk. ## Actual results The entire data set is loaded into the memory and then saved to the hard disk. ## Versions Paste the output of the following code: ```python - Datasets: 1.6.1 - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] - Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10 ```
1,031
concatenate_datasets loads all the data into memory
[ -0.5915117263793945, 0.29105305671691895, -0.17058269679546356, 0.4391750693321228, 0.27094170451164246, 0.1117558628320694, 0.09983080625534058, 0.3183959126472473, -0.37266451120376587, 0.17210650444030762, -0.11731827259063721, 0.25782614946365356, 0.012229375541210175, 0.03386270999908447, -0.19890834391117096, 0.3286806344985962, 0.15103502571582794, 0.38735347986221313, -0.5189505815505981, -0.18512214720249176, -0.2710893154144287, 0.23455743491649628, -0.182821586728096, -0.27183088660240173, -0.5399620532989502, 0.1578328013420105, -0.07886847853660583, 0.41709205508232117, -0.2451419234275818, 0.027556315064430237, 0.02647802233695984, 0.3237512409687042, -0.048253800719976425, 0.15339866280555725, -0.0001064106181729585, -0.057569511234760284, -0.0007986741838976741, -0.13183549046516418, -0.3789903223514557, 0.2985270619392395, -0.4191235601902008, -0.17215083539485931, -0.0059836008585989475, 0.04433997720479965, 0.2934683561325073, -0.05553199723362923, -0.11296165734529495, -0.4966488182544708, 0.06729833781719208, 0.13096682727336884, 0.24457554519176483, 0.015540913678705692, -0.15767744183540344, -0.22508737444877625, 0.010915680788457394, 0.021887989714741707, 0.16794146597385406, -0.06015637516975403, -0.12926100194454193, -0.14324906468391418, -0.11037823557853699, 0.36264994740486145, -0.06215541064739227, -0.0467463880777359, -0.18318316340446472, 0.07109898328781128, -0.1396734118461609, -0.0888424664735794, 0.2836672067642212, -0.2031092643737793, 0.3017059862613678, -0.32867419719696045, 0.0549577958881855, -0.1646622121334076, -0.07031480967998505, -0.2128836065530777, 0.17079874873161316, 0.2016603648662567, -0.11999770253896713, 0.0968327596783638, -0.23434031009674072, -0.1430286318063736, -0.06075997278094292, -0.02655082382261753, -0.12513819336891174, 0.19068771600723267, -0.0990433618426323, 0.13651131093502045, 0.3767957389354706, -0.07717925310134888, 0.3031977415084839, -0.3131825625896454, -0.3104628026485443, -0.10385122150182724, -0.488355427980423, 0.021252645179629326, -0.004978209733963013, -0.34414738416671753, 0.4175095856189728, -0.014228792861104012, 0.0006106499349698424, 0.2662225067615509, 0.2932855784893036, -0.06983524560928345, 0.39401721954345703, -0.055720254778862, 0.051144808530807495, 0.36060458421707153, -0.08403877913951874, -0.40961745381355286, 0.05139565467834473, 0.006994089111685753, -0.12522777915000916, -0.06928728520870209, 0.049207787960767746, -0.2527399957180023, -0.03198767080903053, -0.08847907185554504, -0.2712666094303131, 0.10930219292640686, 0.002230208134278655, 0.14766015112400055, -0.1275416612625122, 0.34093278646469116, 0.15549784898757935, 0.3254498243331909, 0.08819703757762909, -0.034022144973278046, -0.04207256808876991, -0.011616420932114124, -0.39880990982055664, -0.09718620777130127, -0.11562485247850418, 0.15002726018428802, 0.1326778531074524, 0.027962801977992058, 0.07204887270927429, -0.06732095032930374, 0.1542581021785736, -0.02356754057109356, 0.08135346323251724, -0.1876947581768036, 0.282986044883728, 0.18182599544525146, 0.10441480576992035, 0.18253076076507568, 0.15119221806526184, -0.08160809427499771, -0.13944298028945923, 0.24080117046833038, -0.18162165582180023, -0.22178949415683746, -0.03094790130853653, 0.2910410463809967, 0.18929755687713623, 0.41581791639328003, 0.06781996786594391, 0.23765571415424347, 0.24422147870063782, 0.12289228290319443, -0.12953853607177734, -0.008512450382113457, -0.021835410967469215, -0.19975346326828003, 0.22283411026000977, 0.3858392834663391, -0.26843541860580444, 0.006245615426450968, 0.07231535017490387, -0.24290654063224792, 0.3223424255847931, 0.1427711695432663, -0.12194415926933289, 0.06559893488883972, -0.34469807147979736, 0.13210470974445343, 0.5861696600914001, -0.09753185510635376, -0.20926110446453094, 0.2508193254470825, -0.20333869755268097, -0.038909316062927246, 0.174346923828125, 0.19048990309238434, -0.08677797019481659, 0.26913514733314514, 0.6651305556297302, 0.2019362449645996, -0.0158433448523283, 0.049576275050640106, -0.01877131685614586, -0.12362919002771378, 0.04288550838828087, -0.05445309728384018, -0.21089133620262146, 0.20074059069156647, -0.02480279840528965, -0.19664424657821655, 0.41142088174819946, -0.1779603213071823, 0.05987934395670891, 0.3746330738067627, -0.02627931535243988, -0.13192178308963776, -0.1227799728512764, 0.095272496342659, -0.38843634724617004, -0.17326931655406952, 0.22514699399471283, -0.07291777431964874, -0.21706798672676086, -0.19408361613750458, -0.014641353860497475, 0.3183179497718811, -0.054900895804166794, 0.004367861431092024, 0.21093158423900604, 0.2171029895544052, 0.06632506847381592, -0.15133005380630493, -0.07917260378599167, 0.6967390775680542, -0.21891149878501892, -0.050090864300727844, -0.3569909334182739, -0.011744811199605465, -0.006974717602133751, -0.1824079304933548, 0.2133476585149765, 0.03253108635544777, -0.12214736640453339, 0.056083742529153824, 0.06975702196359634, 0.46416208148002625, -0.010960389859974384, -0.2996218502521515, 0.24074217677116394, -0.01515073049813509, -0.19851207733154297, 0.13029903173446655, 0.018524793907999992, -0.3754834234714508, 0.1563187539577484, -0.1648986041545868, 0.04743599146604538, 0.1763201504945755, 0.1503015011548996, 0.09785381704568863, 0.11253760755062103, -0.1844155192375183, 0.28900855779647827, 0.1637510359287262, 0.161246657371521, -0.4447765052318573, 0.0815398171544075, 0.3289816081523895, 0.20967534184455872, 0.5094818472862244, -0.4534738063812256, 0.1675228476524353, 0.44501709938049316, 0.09697136282920837, 0.011458988301455975, 0.016290217638015747, -0.42259690165519714, -0.1689276248216629, 0.06303942203521729, -0.07365428656339645, 0.5698522925376892, 0.33884793519973755, 0.21147914230823517, -0.05959215760231018, 0.025468161329627037, -0.19819752871990204, 0.309436172246933, 0.014865739271044731, 0.17050084471702576, 0.13434794545173645, 0.1216449961066246, -0.33742600679397583, -0.4846942722797394, 0.10673303157091141, 0.061980362981557846, 0.019495148211717606, -0.16545362770557404, 0.058538246899843216, -0.3056906759738922, -0.21769669651985168, -0.02911573089659214, 0.01639554277062416, -0.14567317068576813, -0.3010193705558777, -0.08991912752389908, 0.170530304312706, -0.05709080025553703, 0.09115911275148392, -0.07009395956993103, 0.30557748675346375, 0.4370332360267639, -0.029990535229444504, 0.04663011431694031, -0.05745948851108551, -0.30383965373039246, 0.16652266681194305, -0.0632212907075882, -0.08943825215101242, 0.10102812200784683, -0.12177881598472595, 0.2021288126707077, 0.026631202548742294, 0.003510714741423726, 0.13679960370063782, -0.0025374589022248983, -0.10916562378406525, 0.1915060430765152, 0.16212157905101776, -0.03825453296303749, -0.22944340109825134, 0.04508626088500023, 0.2700481116771698, -0.16822926700115204, 0.18439029157161713, 0.07865539938211441, -0.18941721320152283, -0.1807960420846939, -0.37640029191970825, 0.04872626066207886, -0.3076518177986145, 0.10799197107553482, 0.05709248408675194, 0.18454544246196747, 0.2531726062297821, 0.28329238295555115, -0.08710647374391556, -0.19621102511882782, 0.12732762098312378, -0.3534913957118988, -0.19070515036582947, 0.31535741686820984, 0.06723462790250778, -0.1947595626115799, -0.08638404309749603, -0.0013242600252851844, 0.10709495097398758, 0.4195345342159271, -0.4693979024887085, 0.020944220945239067, -0.11427146941423416, 0.0987367257475853, -0.3104085624217987, 0.07913172245025635, 0.15751874446868896, 0.42153796553611755, -0.25760436058044434, -0.154497429728508, -0.14491161704063416, 0.0838790088891983, -0.15826718509197235, 0.0634443461894989, -0.4202623963356018, 0.04399934783577919, 0.053580448031425476, 0.09282375127077103, 0.18750736117362976, -0.022204192355275154, 0.09768366813659668, -0.016958383843302727, 0.6646728515625, -0.1426241546869278, -0.2350647747516632, -0.09962066262960434, -0.009131419472396374, 0.049664657562971115, 0.18498826026916504, 0.059049565345048904, -0.035435840487480164, -0.04728033021092415, 0.3413552939891815, 0.027763115242123604, -0.17231296002864838, 0.2361924797296524, -0.019445359706878662, 0.03617824986577034, 0.20474566519260406, -0.04410230368375778, -0.22303134202957153, 0.1009693592786789, -0.21326541900634766, -0.24477389454841614, -0.18002676963806152, -0.1836671233177185, -0.4782004654407501, 0.07957690954208374, -0.3716854751110077, 0.2174769639968872, 0.023202866315841675, 0.433090478181839, 0.06805956363677979, -0.3260944187641144, -0.055466178804636, -0.08158303052186966, 0.8373053073883057, 0.07511520385742188, -0.45963025093078613, 0.23563721776008606, 0.20757123827934265, -0.13890250027179718, 0.2073615938425064, -0.18633343279361725, 0.37972787022590637, 0.09648698568344116, 0.21268123388290405, -0.26868706941604614, -0.23165170848369598, 0.20931236445903778, 0.3038516640663147, -0.16424556076526642, 0.015253283083438873, -0.31978482007980347, -0.11012157052755356, -0.25184279680252075, -0.19643357396125793, -0.21257582306861877, 0.2956399917602539, -0.050456319004297256, -0.2596341669559479, 0.004587906878441572, -0.23800337314605713, 0.1909957081079483, -0.10715760290622711, 0.3879352807998657, 0.051587946712970734, 0.21825478971004486, -0.19456757605075836, 0.15413807332515717, 0.5089055895805359, 0.5472732782363892, 0.05943727493286133, -0.2968842089176178, 0.12456067651510239, -0.07193713635206223, 0.6188117861747742, 0.2668168246746063, -0.19870802760124207, 0.1096113994717598, -0.20747417211532593, 0.06117376312613487, -0.3600081205368042, 0.5408351421356201, 0.1723288744688034, 0.041998591274023056, -0.48458802700042725, -0.3174848258495331, -0.02651108242571354, 0.23601289093494415, -0.01474829763174057, 0.4211840331554413, -0.5143498182296753, -0.33220669627189636, -0.11056634783744812, -0.1603686660528183, 0.7657994627952576, -0.022268421947956085, 0.43826842308044434, 0.11238247156143188, 0.004565318115055561, 0.24865414202213287, -0.21224011480808258, 0.25189208984375, -0.1327483206987381, -0.20975542068481445, 0.09509748965501785, -0.29477882385253906, 0.07614288479089737, 0.009575190022587776, -0.06667353957891464, 0.04023788496851921, -0.2708031237125397, 0.11772649735212326, -0.0936180129647255, 0.15664872527122498, -0.036979783326387405, -0.3027482330799103, 0.05342584103345871, 0.22474300861358643, 0.13259725272655487, -0.4349406063556671, -0.07457713782787323, 0.03873906657099724, -0.01577046513557434, -0.3343690037727356, 0.13410919904708862, 0.1582292914390564, -0.10870451480150223, 0.38538238406181335, -0.34416329860687256, -0.1326393485069275, -0.39095231890678406, -0.06490623205900192, 0.0009593019494786859, 0.2701258063316345, 0.13915082812309265, 0.008640642277896404, 0.03529184311628342, 0.11562864482402802, -0.005299913696944714, -0.09429731220006943, 0.11891543120145798, 0.230079784989357, 0.06117122620344162, 0.1179904118180275, 0.06619328260421753, -0.10983920097351074, -0.2814171612262726, 0.04369812831282616, 0.09354668855667114, -0.4925946295261383, 0.012249869294464588, 0.33210834860801697, 0.02918495051562786, 0.07153956592082977, 0.195120707154274, 0.2226148545742035, -0.16589941084384918, 0.20662489533424377, 0.004778721369802952, -0.3882630169391632, -0.2259964644908905, 0.36404067277908325, 0.34856685996055603, -0.07953913509845734, 0.26636815071105957, -0.07931837439537048, -0.14559891819953918, -0.31627076864242554, -0.03594131022691727, 0.2917941212654114, -0.02950289286673069, 0.22183988988399506, 0.11640553176403046, -0.19749490916728973, -0.14197136461734772, 0.2043953537940979, -0.19666831195354462, 0.07382115721702576, 0.09985660761594772, -0.07582753151655197, -0.5724433660507202, 0.1149173453450203, -0.1477152705192566, 0.23676812648773193, 0.29356682300567627, 0.08316545933485031, -0.34197133779525757, 0.3064444065093994, -0.41884559392929077, -0.2606561779975891, -0.24643580615520477, 0.20619139075279236, -0.10042695701122284, -0.044160712510347366, 0.21234941482543945, -0.007965724915266037, 0.25812989473342896, 0.10304177552461624, -0.1178724616765976, -0.3534281849861145, 0.31079912185668945, 0.06425252556800842, 0.08444405347108841, 0.032761428505182266, -0.21657021343708038, -0.2650664150714874, -0.18494746088981628, -0.32082581520080566, 0.13344706594944, -0.016613582149147987, -0.17702139914035797, -0.21493597328662872, -0.011724757961928844, -0.03736445680260658, 0.2626550495624542, -0.039070237427949905, 0.01410639937967062, 0.0801611840724945, -0.21498090028762817, 0.07900033891201019, -0.25576406717300415, -0.13628672063350677, 0.05975767970085144, 0.21628715097904205, 0.24517610669136047, -0.07442061603069305, 0.10312096029520035, -0.30856621265411377, -0.3791849911212921, -0.20401155948638916, 0.29417333006858826, 0.6025100946426392, -0.0766274631023407, -0.08550131320953369, 0.0016732889926061034, 0.211162269115448, -0.11668753623962402, -0.2896974980831146, -0.04983925074338913, -0.31912893056869507, -0.008033794350922108, 0.12935441732406616, 0.1383018046617508, -0.18885838985443115, 0.07112828642129898, 0.02227994054555893, 0.3098205029964447, 0.008775657042860985, 0.09098590165376663, 0.07178891450166702, 0.1463157832622528, 0.04931615665555, 0.21080058813095093, 0.5912573933601379, 0.03925975784659386, 0.39937880635261536, -0.00857709813863039, 0.32592201232910156, 0.22952066361904144, -0.18164560198783875, -0.34462636709213257, -0.46653541922569275, 0.14293593168258667, 0.4821491241455078, -0.15358254313468933, 0.2111257016658783, -0.08948826789855957, -0.07512230426073074, -0.0033041611313819885, -0.22682654857635498, 0.05214456841349602, -0.009173739701509476, -0.34277790784835815, -0.004492811392992735, 0.1920793205499649, 0.008478616364300251, -0.13934066891670227, 0.13574948906898499, 0.12526728212833405, -0.18211066722869873, 0.42734411358833313, -0.2138674408197403, 0.030959980562329292, -0.2011118084192276, 0.3046078085899353, 0.2964406907558441, -0.16138562560081482, -0.2990381121635437, 0.15333719551563263, 0.045394327491521835, 0.2708326280117035, 0.12108435481786728, 0.1155673936009407, 0.3902680277824402, 0.31801143288612366, 0.2691265642642975, 0.04920458793640137, 0.12358905375003815, -0.24909788370132446, -0.3302103281021118, 0.258311927318573, 0.05528867617249489, -0.10806677490472794, 0.15875691175460815, 0.2289189249277115, -0.18035918474197388, -0.09668518602848053, 0.3783748745918274, 0.04895520210266113, -0.13576623797416687, -0.12957409024238586, 0.08105097711086273, -0.23195481300354004, 0.07524282485246658, -0.0701422169804573, -0.43787893652915955, -0.14012578129768372, 0.6325850486755371, -0.03264091908931732, 0.2430495172739029, -0.14998756349086761, 0.16110439598560333, 0.16401442885398865, 0.5547503232955933, -0.049981873482465744, 0.27199456095695496, -0.16562743484973907, -0.39663198590278625, -0.1842113733291626, 0.1645098328590393, 0.09438688308000565, 0.2175903022289276, -0.15946424007415771, 0.2902321517467499, 0.29489973187446594, -0.047259774059057236, -0.18368029594421387, -0.03427091985940933, -0.012339219450950623, -0.2146051675081253, -0.33259910345077515, -0.11464706063270569, 0.09105169773101807, 0.061789631843566895, 0.06280495971441269, -0.19697409868240356, 0.31372761726379395, -0.024758370593190193, 0.2341061681509018, -0.10529646277427673, 0.07604628056287766, 0.07486782968044281, 0.24359340965747833, 0.1573057472705841, 0.1537487655878067, 0.25048592686653137, -0.2492009401321411, -0.0031487164087593555, -0.02054799161851406, -0.38341662287712097, 0.049983251839876175, -0.04558854177594185, 0.23275724053382874, -0.3094574511051178, -0.45362454652786255, 0.18107391893863678, 0.026418086141347885, -0.008378266356885433, 0.25823071599006653, 0.13135868310928345, 0.06930170953273773, 0.17801529169082642, 0.05285417661070824, 0.22812825441360474, -0.06311400234699249, 0.19231189787387848, 0.010961304418742657, 0.10930147022008896, 0.012114012613892555, -0.38135483860969543, 0.16951529681682587, 0.19177711009979248, -0.5578904151916504, -0.06294562667608261, 0.09658068418502808, 0.18831253051757812, 0.09640387445688248, -0.5469996929168701, 0.015275533311069012, 0.33444440364837646, -0.23138634860515594, -0.3863031566143036, 0.5063357949256897, -0.22625423967838287, -0.0928683951497078, -0.13889437913894653, 0.278754860162735, -0.045012760907411575, -0.42685845494270325, 0.16563236713409424, -0.25428059697151184 ]
https://github.com/huggingface/datasets/issues/2276
concatenate_datasets loads all the data into memory
Hi ! this looks like an important issue. Let me try to reproduce this. Cc @samsontmr this might be related to the memory issue you have in #2134
## Describe the bug When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk. Interestingly, this happens when trying to save the new dataset to disk or concatenating it again. ![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png) ## Steps to reproduce the bug ```python from datasets import concatenate_datasets, load_from_disk test_sampled_pro = load_from_disk("test_sampled_pro") val_sampled_pro = load_from_disk("val_sampled_pro") big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro]) # Loaded to memory big_set.save_to_disk("big_set") # Loaded to memory big_set = concatenate_datasets([big_set, val_sampled_pro]) ``` ## Expected results The data should be loaded into memory in batches and then saved directly to disk. ## Actual results The entire data set is loaded into the memory and then saved to the hard disk. ## Versions Paste the output of the following code: ```python - Datasets: 1.6.1 - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] - Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10 ```
28
concatenate_datasets loads all the data into memory
[ -0.5915117263793945, 0.29105305671691895, -0.17058269679546356, 0.4391750693321228, 0.27094170451164246, 0.1117558628320694, 0.09983080625534058, 0.3183959126472473, -0.37266451120376587, 0.17210650444030762, -0.11731827259063721, 0.25782614946365356, 0.012229375541210175, 0.03386270999908447, -0.19890834391117096, 0.3286806344985962, 0.15103502571582794, 0.38735347986221313, -0.5189505815505981, -0.18512214720249176, -0.2710893154144287, 0.23455743491649628, -0.182821586728096, -0.27183088660240173, -0.5399620532989502, 0.1578328013420105, -0.07886847853660583, 0.41709205508232117, -0.2451419234275818, 0.027556315064430237, 0.02647802233695984, 0.3237512409687042, -0.048253800719976425, 0.15339866280555725, -0.0001064106181729585, -0.057569511234760284, -0.0007986741838976741, -0.13183549046516418, -0.3789903223514557, 0.2985270619392395, -0.4191235601902008, -0.17215083539485931, -0.0059836008585989475, 0.04433997720479965, 0.2934683561325073, -0.05553199723362923, -0.11296165734529495, -0.4966488182544708, 0.06729833781719208, 0.13096682727336884, 0.24457554519176483, 0.015540913678705692, -0.15767744183540344, -0.22508737444877625, 0.010915680788457394, 0.021887989714741707, 0.16794146597385406, -0.06015637516975403, -0.12926100194454193, -0.14324906468391418, -0.11037823557853699, 0.36264994740486145, -0.06215541064739227, -0.0467463880777359, -0.18318316340446472, 0.07109898328781128, -0.1396734118461609, -0.0888424664735794, 0.2836672067642212, -0.2031092643737793, 0.3017059862613678, -0.32867419719696045, 0.0549577958881855, -0.1646622121334076, -0.07031480967998505, -0.2128836065530777, 0.17079874873161316, 0.2016603648662567, -0.11999770253896713, 0.0968327596783638, -0.23434031009674072, -0.1430286318063736, -0.06075997278094292, -0.02655082382261753, -0.12513819336891174, 0.19068771600723267, -0.0990433618426323, 0.13651131093502045, 0.3767957389354706, -0.07717925310134888, 0.3031977415084839, -0.3131825625896454, -0.3104628026485443, -0.10385122150182724, -0.488355427980423, 0.021252645179629326, -0.004978209733963013, -0.34414738416671753, 0.4175095856189728, -0.014228792861104012, 0.0006106499349698424, 0.2662225067615509, 0.2932855784893036, -0.06983524560928345, 0.39401721954345703, -0.055720254778862, 0.051144808530807495, 0.36060458421707153, -0.08403877913951874, -0.40961745381355286, 0.05139565467834473, 0.006994089111685753, -0.12522777915000916, -0.06928728520870209, 0.049207787960767746, -0.2527399957180023, -0.03198767080903053, -0.08847907185554504, -0.2712666094303131, 0.10930219292640686, 0.002230208134278655, 0.14766015112400055, -0.1275416612625122, 0.34093278646469116, 0.15549784898757935, 0.3254498243331909, 0.08819703757762909, -0.034022144973278046, -0.04207256808876991, -0.011616420932114124, -0.39880990982055664, -0.09718620777130127, -0.11562485247850418, 0.15002726018428802, 0.1326778531074524, 0.027962801977992058, 0.07204887270927429, -0.06732095032930374, 0.1542581021785736, -0.02356754057109356, 0.08135346323251724, -0.1876947581768036, 0.282986044883728, 0.18182599544525146, 0.10441480576992035, 0.18253076076507568, 0.15119221806526184, -0.08160809427499771, -0.13944298028945923, 0.24080117046833038, -0.18162165582180023, -0.22178949415683746, -0.03094790130853653, 0.2910410463809967, 0.18929755687713623, 0.41581791639328003, 0.06781996786594391, 0.23765571415424347, 0.24422147870063782, 0.12289228290319443, -0.12953853607177734, -0.008512450382113457, -0.021835410967469215, -0.19975346326828003, 0.22283411026000977, 0.3858392834663391, -0.26843541860580444, 0.006245615426450968, 0.07231535017490387, -0.24290654063224792, 0.3223424255847931, 0.1427711695432663, -0.12194415926933289, 0.06559893488883972, -0.34469807147979736, 0.13210470974445343, 0.5861696600914001, -0.09753185510635376, -0.20926110446453094, 0.2508193254470825, -0.20333869755268097, -0.038909316062927246, 0.174346923828125, 0.19048990309238434, -0.08677797019481659, 0.26913514733314514, 0.6651305556297302, 0.2019362449645996, -0.0158433448523283, 0.049576275050640106, -0.01877131685614586, -0.12362919002771378, 0.04288550838828087, -0.05445309728384018, -0.21089133620262146, 0.20074059069156647, -0.02480279840528965, -0.19664424657821655, 0.41142088174819946, -0.1779603213071823, 0.05987934395670891, 0.3746330738067627, -0.02627931535243988, -0.13192178308963776, -0.1227799728512764, 0.095272496342659, -0.38843634724617004, -0.17326931655406952, 0.22514699399471283, -0.07291777431964874, -0.21706798672676086, -0.19408361613750458, -0.014641353860497475, 0.3183179497718811, -0.054900895804166794, 0.004367861431092024, 0.21093158423900604, 0.2171029895544052, 0.06632506847381592, -0.15133005380630493, -0.07917260378599167, 0.6967390775680542, -0.21891149878501892, -0.050090864300727844, -0.3569909334182739, -0.011744811199605465, -0.006974717602133751, -0.1824079304933548, 0.2133476585149765, 0.03253108635544777, -0.12214736640453339, 0.056083742529153824, 0.06975702196359634, 0.46416208148002625, -0.010960389859974384, -0.2996218502521515, 0.24074217677116394, -0.01515073049813509, -0.19851207733154297, 0.13029903173446655, 0.018524793907999992, -0.3754834234714508, 0.1563187539577484, -0.1648986041545868, 0.04743599146604538, 0.1763201504945755, 0.1503015011548996, 0.09785381704568863, 0.11253760755062103, -0.1844155192375183, 0.28900855779647827, 0.1637510359287262, 0.161246657371521, -0.4447765052318573, 0.0815398171544075, 0.3289816081523895, 0.20967534184455872, 0.5094818472862244, -0.4534738063812256, 0.1675228476524353, 0.44501709938049316, 0.09697136282920837, 0.011458988301455975, 0.016290217638015747, -0.42259690165519714, -0.1689276248216629, 0.06303942203521729, -0.07365428656339645, 0.5698522925376892, 0.33884793519973755, 0.21147914230823517, -0.05959215760231018, 0.025468161329627037, -0.19819752871990204, 0.309436172246933, 0.014865739271044731, 0.17050084471702576, 0.13434794545173645, 0.1216449961066246, -0.33742600679397583, -0.4846942722797394, 0.10673303157091141, 0.061980362981557846, 0.019495148211717606, -0.16545362770557404, 0.058538246899843216, -0.3056906759738922, -0.21769669651985168, -0.02911573089659214, 0.01639554277062416, -0.14567317068576813, -0.3010193705558777, -0.08991912752389908, 0.170530304312706, -0.05709080025553703, 0.09115911275148392, -0.07009395956993103, 0.30557748675346375, 0.4370332360267639, -0.029990535229444504, 0.04663011431694031, -0.05745948851108551, -0.30383965373039246, 0.16652266681194305, -0.0632212907075882, -0.08943825215101242, 0.10102812200784683, -0.12177881598472595, 0.2021288126707077, 0.026631202548742294, 0.003510714741423726, 0.13679960370063782, -0.0025374589022248983, -0.10916562378406525, 0.1915060430765152, 0.16212157905101776, -0.03825453296303749, -0.22944340109825134, 0.04508626088500023, 0.2700481116771698, -0.16822926700115204, 0.18439029157161713, 0.07865539938211441, -0.18941721320152283, -0.1807960420846939, -0.37640029191970825, 0.04872626066207886, -0.3076518177986145, 0.10799197107553482, 0.05709248408675194, 0.18454544246196747, 0.2531726062297821, 0.28329238295555115, -0.08710647374391556, -0.19621102511882782, 0.12732762098312378, -0.3534913957118988, -0.19070515036582947, 0.31535741686820984, 0.06723462790250778, -0.1947595626115799, -0.08638404309749603, -0.0013242600252851844, 0.10709495097398758, 0.4195345342159271, -0.4693979024887085, 0.020944220945239067, -0.11427146941423416, 0.0987367257475853, -0.3104085624217987, 0.07913172245025635, 0.15751874446868896, 0.42153796553611755, -0.25760436058044434, -0.154497429728508, -0.14491161704063416, 0.0838790088891983, -0.15826718509197235, 0.0634443461894989, -0.4202623963356018, 0.04399934783577919, 0.053580448031425476, 0.09282375127077103, 0.18750736117362976, -0.022204192355275154, 0.09768366813659668, -0.016958383843302727, 0.6646728515625, -0.1426241546869278, -0.2350647747516632, -0.09962066262960434, -0.009131419472396374, 0.049664657562971115, 0.18498826026916504, 0.059049565345048904, -0.035435840487480164, -0.04728033021092415, 0.3413552939891815, 0.027763115242123604, -0.17231296002864838, 0.2361924797296524, -0.019445359706878662, 0.03617824986577034, 0.20474566519260406, -0.04410230368375778, -0.22303134202957153, 0.1009693592786789, -0.21326541900634766, -0.24477389454841614, -0.18002676963806152, -0.1836671233177185, -0.4782004654407501, 0.07957690954208374, -0.3716854751110077, 0.2174769639968872, 0.023202866315841675, 0.433090478181839, 0.06805956363677979, -0.3260944187641144, -0.055466178804636, -0.08158303052186966, 0.8373053073883057, 0.07511520385742188, -0.45963025093078613, 0.23563721776008606, 0.20757123827934265, -0.13890250027179718, 0.2073615938425064, -0.18633343279361725, 0.37972787022590637, 0.09648698568344116, 0.21268123388290405, -0.26868706941604614, -0.23165170848369598, 0.20931236445903778, 0.3038516640663147, -0.16424556076526642, 0.015253283083438873, -0.31978482007980347, -0.11012157052755356, -0.25184279680252075, -0.19643357396125793, -0.21257582306861877, 0.2956399917602539, -0.050456319004297256, -0.2596341669559479, 0.004587906878441572, -0.23800337314605713, 0.1909957081079483, -0.10715760290622711, 0.3879352807998657, 0.051587946712970734, 0.21825478971004486, -0.19456757605075836, 0.15413807332515717, 0.5089055895805359, 0.5472732782363892, 0.05943727493286133, -0.2968842089176178, 0.12456067651510239, -0.07193713635206223, 0.6188117861747742, 0.2668168246746063, -0.19870802760124207, 0.1096113994717598, -0.20747417211532593, 0.06117376312613487, -0.3600081205368042, 0.5408351421356201, 0.1723288744688034, 0.041998591274023056, -0.48458802700042725, -0.3174848258495331, -0.02651108242571354, 0.23601289093494415, -0.01474829763174057, 0.4211840331554413, -0.5143498182296753, -0.33220669627189636, -0.11056634783744812, -0.1603686660528183, 0.7657994627952576, -0.022268421947956085, 0.43826842308044434, 0.11238247156143188, 0.004565318115055561, 0.24865414202213287, -0.21224011480808258, 0.25189208984375, -0.1327483206987381, -0.20975542068481445, 0.09509748965501785, -0.29477882385253906, 0.07614288479089737, 0.009575190022587776, -0.06667353957891464, 0.04023788496851921, -0.2708031237125397, 0.11772649735212326, -0.0936180129647255, 0.15664872527122498, -0.036979783326387405, -0.3027482330799103, 0.05342584103345871, 0.22474300861358643, 0.13259725272655487, -0.4349406063556671, -0.07457713782787323, 0.03873906657099724, -0.01577046513557434, -0.3343690037727356, 0.13410919904708862, 0.1582292914390564, -0.10870451480150223, 0.38538238406181335, -0.34416329860687256, -0.1326393485069275, -0.39095231890678406, -0.06490623205900192, 0.0009593019494786859, 0.2701258063316345, 0.13915082812309265, 0.008640642277896404, 0.03529184311628342, 0.11562864482402802, -0.005299913696944714, -0.09429731220006943, 0.11891543120145798, 0.230079784989357, 0.06117122620344162, 0.1179904118180275, 0.06619328260421753, -0.10983920097351074, -0.2814171612262726, 0.04369812831282616, 0.09354668855667114, -0.4925946295261383, 0.012249869294464588, 0.33210834860801697, 0.02918495051562786, 0.07153956592082977, 0.195120707154274, 0.2226148545742035, -0.16589941084384918, 0.20662489533424377, 0.004778721369802952, -0.3882630169391632, -0.2259964644908905, 0.36404067277908325, 0.34856685996055603, -0.07953913509845734, 0.26636815071105957, -0.07931837439537048, -0.14559891819953918, -0.31627076864242554, -0.03594131022691727, 0.2917941212654114, -0.02950289286673069, 0.22183988988399506, 0.11640553176403046, -0.19749490916728973, -0.14197136461734772, 0.2043953537940979, -0.19666831195354462, 0.07382115721702576, 0.09985660761594772, -0.07582753151655197, -0.5724433660507202, 0.1149173453450203, -0.1477152705192566, 0.23676812648773193, 0.29356682300567627, 0.08316545933485031, -0.34197133779525757, 0.3064444065093994, -0.41884559392929077, -0.2606561779975891, -0.24643580615520477, 0.20619139075279236, -0.10042695701122284, -0.044160712510347366, 0.21234941482543945, -0.007965724915266037, 0.25812989473342896, 0.10304177552461624, -0.1178724616765976, -0.3534281849861145, 0.31079912185668945, 0.06425252556800842, 0.08444405347108841, 0.032761428505182266, -0.21657021343708038, -0.2650664150714874, -0.18494746088981628, -0.32082581520080566, 0.13344706594944, -0.016613582149147987, -0.17702139914035797, -0.21493597328662872, -0.011724757961928844, -0.03736445680260658, 0.2626550495624542, -0.039070237427949905, 0.01410639937967062, 0.0801611840724945, -0.21498090028762817, 0.07900033891201019, -0.25576406717300415, -0.13628672063350677, 0.05975767970085144, 0.21628715097904205, 0.24517610669136047, -0.07442061603069305, 0.10312096029520035, -0.30856621265411377, -0.3791849911212921, -0.20401155948638916, 0.29417333006858826, 0.6025100946426392, -0.0766274631023407, -0.08550131320953369, 0.0016732889926061034, 0.211162269115448, -0.11668753623962402, -0.2896974980831146, -0.04983925074338913, -0.31912893056869507, -0.008033794350922108, 0.12935441732406616, 0.1383018046617508, -0.18885838985443115, 0.07112828642129898, 0.02227994054555893, 0.3098205029964447, 0.008775657042860985, 0.09098590165376663, 0.07178891450166702, 0.1463157832622528, 0.04931615665555, 0.21080058813095093, 0.5912573933601379, 0.03925975784659386, 0.39937880635261536, -0.00857709813863039, 0.32592201232910156, 0.22952066361904144, -0.18164560198783875, -0.34462636709213257, -0.46653541922569275, 0.14293593168258667, 0.4821491241455078, -0.15358254313468933, 0.2111257016658783, -0.08948826789855957, -0.07512230426073074, -0.0033041611313819885, -0.22682654857635498, 0.05214456841349602, -0.009173739701509476, -0.34277790784835815, -0.004492811392992735, 0.1920793205499649, 0.008478616364300251, -0.13934066891670227, 0.13574948906898499, 0.12526728212833405, -0.18211066722869873, 0.42734411358833313, -0.2138674408197403, 0.030959980562329292, -0.2011118084192276, 0.3046078085899353, 0.2964406907558441, -0.16138562560081482, -0.2990381121635437, 0.15333719551563263, 0.045394327491521835, 0.2708326280117035, 0.12108435481786728, 0.1155673936009407, 0.3902680277824402, 0.31801143288612366, 0.2691265642642975, 0.04920458793640137, 0.12358905375003815, -0.24909788370132446, -0.3302103281021118, 0.258311927318573, 0.05528867617249489, -0.10806677490472794, 0.15875691175460815, 0.2289189249277115, -0.18035918474197388, -0.09668518602848053, 0.3783748745918274, 0.04895520210266113, -0.13576623797416687, -0.12957409024238586, 0.08105097711086273, -0.23195481300354004, 0.07524282485246658, -0.0701422169804573, -0.43787893652915955, -0.14012578129768372, 0.6325850486755371, -0.03264091908931732, 0.2430495172739029, -0.14998756349086761, 0.16110439598560333, 0.16401442885398865, 0.5547503232955933, -0.049981873482465744, 0.27199456095695496, -0.16562743484973907, -0.39663198590278625, -0.1842113733291626, 0.1645098328590393, 0.09438688308000565, 0.2175903022289276, -0.15946424007415771, 0.2902321517467499, 0.29489973187446594, -0.047259774059057236, -0.18368029594421387, -0.03427091985940933, -0.012339219450950623, -0.2146051675081253, -0.33259910345077515, -0.11464706063270569, 0.09105169773101807, 0.061789631843566895, 0.06280495971441269, -0.19697409868240356, 0.31372761726379395, -0.024758370593190193, 0.2341061681509018, -0.10529646277427673, 0.07604628056287766, 0.07486782968044281, 0.24359340965747833, 0.1573057472705841, 0.1537487655878067, 0.25048592686653137, -0.2492009401321411, -0.0031487164087593555, -0.02054799161851406, -0.38341662287712097, 0.049983251839876175, -0.04558854177594185, 0.23275724053382874, -0.3094574511051178, -0.45362454652786255, 0.18107391893863678, 0.026418086141347885, -0.008378266356885433, 0.25823071599006653, 0.13135868310928345, 0.06930170953273773, 0.17801529169082642, 0.05285417661070824, 0.22812825441360474, -0.06311400234699249, 0.19231189787387848, 0.010961304418742657, 0.10930147022008896, 0.012114012613892555, -0.38135483860969543, 0.16951529681682587, 0.19177711009979248, -0.5578904151916504, -0.06294562667608261, 0.09658068418502808, 0.18831253051757812, 0.09640387445688248, -0.5469996929168701, 0.015275533311069012, 0.33444440364837646, -0.23138634860515594, -0.3863031566143036, 0.5063357949256897, -0.22625423967838287, -0.0928683951497078, -0.13889437913894653, 0.278754860162735, -0.045012760907411575, -0.42685845494270325, 0.16563236713409424, -0.25428059697151184 ]
https://github.com/huggingface/datasets/issues/2276
concatenate_datasets loads all the data into memory
@lhoestq Just went to open a similar issue. It seems like deep copying (tested on master) the dataset object writes the table's record batches (`dset._data._batches`) into RAM. To find the bug, I modified the `_deepcopy` function in `table.py` as follows: ```python def _deepcopy(x, memo: dict): """deepcopy a regular class instance""" import psutil # pip install this package import time cls = x.__class__ result = cls.__new__(cls) memo[id(x)] = result for k, v in x.__dict__.items(): print("="* 50) print("Current memory:", psutil.virtual_memory().percent) print(f"Saving object {k} with value {v}") setattr(result, k, copy.deepcopy(v, memo)) time.sleep(5) print("Memory after copy:", psutil.virtual_memory().percent) return result ``` Test script: ```python import copy from datasets import load_dataset bk = load_dataset("bookcorpus", split="train") bk_copy = copy.deepcopy(bk) ```
## Describe the bug When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk. Interestingly, this happens when trying to save the new dataset to disk or concatenating it again. ![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png) ## Steps to reproduce the bug ```python from datasets import concatenate_datasets, load_from_disk test_sampled_pro = load_from_disk("test_sampled_pro") val_sampled_pro = load_from_disk("val_sampled_pro") big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro]) # Loaded to memory big_set.save_to_disk("big_set") # Loaded to memory big_set = concatenate_datasets([big_set, val_sampled_pro]) ``` ## Expected results The data should be loaded into memory in batches and then saved directly to disk. ## Actual results The entire data set is loaded into the memory and then saved to the hard disk. ## Versions Paste the output of the following code: ```python - Datasets: 1.6.1 - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] - Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10 ```
113
concatenate_datasets loads all the data into memory
[ -0.5915117263793945, 0.29105305671691895, -0.17058269679546356, 0.4391750693321228, 0.27094170451164246, 0.1117558628320694, 0.09983080625534058, 0.3183959126472473, -0.37266451120376587, 0.17210650444030762, -0.11731827259063721, 0.25782614946365356, 0.012229375541210175, 0.03386270999908447, -0.19890834391117096, 0.3286806344985962, 0.15103502571582794, 0.38735347986221313, -0.5189505815505981, -0.18512214720249176, -0.2710893154144287, 0.23455743491649628, -0.182821586728096, -0.27183088660240173, -0.5399620532989502, 0.1578328013420105, -0.07886847853660583, 0.41709205508232117, -0.2451419234275818, 0.027556315064430237, 0.02647802233695984, 0.3237512409687042, -0.048253800719976425, 0.15339866280555725, -0.0001064106181729585, -0.057569511234760284, -0.0007986741838976741, -0.13183549046516418, -0.3789903223514557, 0.2985270619392395, -0.4191235601902008, -0.17215083539485931, -0.0059836008585989475, 0.04433997720479965, 0.2934683561325073, -0.05553199723362923, -0.11296165734529495, -0.4966488182544708, 0.06729833781719208, 0.13096682727336884, 0.24457554519176483, 0.015540913678705692, -0.15767744183540344, -0.22508737444877625, 0.010915680788457394, 0.021887989714741707, 0.16794146597385406, -0.06015637516975403, -0.12926100194454193, -0.14324906468391418, -0.11037823557853699, 0.36264994740486145, -0.06215541064739227, -0.0467463880777359, -0.18318316340446472, 0.07109898328781128, -0.1396734118461609, -0.0888424664735794, 0.2836672067642212, -0.2031092643737793, 0.3017059862613678, -0.32867419719696045, 0.0549577958881855, -0.1646622121334076, -0.07031480967998505, -0.2128836065530777, 0.17079874873161316, 0.2016603648662567, -0.11999770253896713, 0.0968327596783638, -0.23434031009674072, -0.1430286318063736, -0.06075997278094292, -0.02655082382261753, -0.12513819336891174, 0.19068771600723267, -0.0990433618426323, 0.13651131093502045, 0.3767957389354706, -0.07717925310134888, 0.3031977415084839, -0.3131825625896454, -0.3104628026485443, -0.10385122150182724, -0.488355427980423, 0.021252645179629326, -0.004978209733963013, -0.34414738416671753, 0.4175095856189728, -0.014228792861104012, 0.0006106499349698424, 0.2662225067615509, 0.2932855784893036, -0.06983524560928345, 0.39401721954345703, -0.055720254778862, 0.051144808530807495, 0.36060458421707153, -0.08403877913951874, -0.40961745381355286, 0.05139565467834473, 0.006994089111685753, -0.12522777915000916, -0.06928728520870209, 0.049207787960767746, -0.2527399957180023, -0.03198767080903053, -0.08847907185554504, -0.2712666094303131, 0.10930219292640686, 0.002230208134278655, 0.14766015112400055, -0.1275416612625122, 0.34093278646469116, 0.15549784898757935, 0.3254498243331909, 0.08819703757762909, -0.034022144973278046, -0.04207256808876991, -0.011616420932114124, -0.39880990982055664, -0.09718620777130127, -0.11562485247850418, 0.15002726018428802, 0.1326778531074524, 0.027962801977992058, 0.07204887270927429, -0.06732095032930374, 0.1542581021785736, -0.02356754057109356, 0.08135346323251724, -0.1876947581768036, 0.282986044883728, 0.18182599544525146, 0.10441480576992035, 0.18253076076507568, 0.15119221806526184, -0.08160809427499771, -0.13944298028945923, 0.24080117046833038, -0.18162165582180023, -0.22178949415683746, -0.03094790130853653, 0.2910410463809967, 0.18929755687713623, 0.41581791639328003, 0.06781996786594391, 0.23765571415424347, 0.24422147870063782, 0.12289228290319443, -0.12953853607177734, -0.008512450382113457, -0.021835410967469215, -0.19975346326828003, 0.22283411026000977, 0.3858392834663391, -0.26843541860580444, 0.006245615426450968, 0.07231535017490387, -0.24290654063224792, 0.3223424255847931, 0.1427711695432663, -0.12194415926933289, 0.06559893488883972, -0.34469807147979736, 0.13210470974445343, 0.5861696600914001, -0.09753185510635376, -0.20926110446453094, 0.2508193254470825, -0.20333869755268097, -0.038909316062927246, 0.174346923828125, 0.19048990309238434, -0.08677797019481659, 0.26913514733314514, 0.6651305556297302, 0.2019362449645996, -0.0158433448523283, 0.049576275050640106, -0.01877131685614586, -0.12362919002771378, 0.04288550838828087, -0.05445309728384018, -0.21089133620262146, 0.20074059069156647, -0.02480279840528965, -0.19664424657821655, 0.41142088174819946, -0.1779603213071823, 0.05987934395670891, 0.3746330738067627, -0.02627931535243988, -0.13192178308963776, -0.1227799728512764, 0.095272496342659, -0.38843634724617004, -0.17326931655406952, 0.22514699399471283, -0.07291777431964874, -0.21706798672676086, -0.19408361613750458, -0.014641353860497475, 0.3183179497718811, -0.054900895804166794, 0.004367861431092024, 0.21093158423900604, 0.2171029895544052, 0.06632506847381592, -0.15133005380630493, -0.07917260378599167, 0.6967390775680542, -0.21891149878501892, -0.050090864300727844, -0.3569909334182739, -0.011744811199605465, -0.006974717602133751, -0.1824079304933548, 0.2133476585149765, 0.03253108635544777, -0.12214736640453339, 0.056083742529153824, 0.06975702196359634, 0.46416208148002625, -0.010960389859974384, -0.2996218502521515, 0.24074217677116394, -0.01515073049813509, -0.19851207733154297, 0.13029903173446655, 0.018524793907999992, -0.3754834234714508, 0.1563187539577484, -0.1648986041545868, 0.04743599146604538, 0.1763201504945755, 0.1503015011548996, 0.09785381704568863, 0.11253760755062103, -0.1844155192375183, 0.28900855779647827, 0.1637510359287262, 0.161246657371521, -0.4447765052318573, 0.0815398171544075, 0.3289816081523895, 0.20967534184455872, 0.5094818472862244, -0.4534738063812256, 0.1675228476524353, 0.44501709938049316, 0.09697136282920837, 0.011458988301455975, 0.016290217638015747, -0.42259690165519714, -0.1689276248216629, 0.06303942203521729, -0.07365428656339645, 0.5698522925376892, 0.33884793519973755, 0.21147914230823517, -0.05959215760231018, 0.025468161329627037, -0.19819752871990204, 0.309436172246933, 0.014865739271044731, 0.17050084471702576, 0.13434794545173645, 0.1216449961066246, -0.33742600679397583, -0.4846942722797394, 0.10673303157091141, 0.061980362981557846, 0.019495148211717606, -0.16545362770557404, 0.058538246899843216, -0.3056906759738922, -0.21769669651985168, -0.02911573089659214, 0.01639554277062416, -0.14567317068576813, -0.3010193705558777, -0.08991912752389908, 0.170530304312706, -0.05709080025553703, 0.09115911275148392, -0.07009395956993103, 0.30557748675346375, 0.4370332360267639, -0.029990535229444504, 0.04663011431694031, -0.05745948851108551, -0.30383965373039246, 0.16652266681194305, -0.0632212907075882, -0.08943825215101242, 0.10102812200784683, -0.12177881598472595, 0.2021288126707077, 0.026631202548742294, 0.003510714741423726, 0.13679960370063782, -0.0025374589022248983, -0.10916562378406525, 0.1915060430765152, 0.16212157905101776, -0.03825453296303749, -0.22944340109825134, 0.04508626088500023, 0.2700481116771698, -0.16822926700115204, 0.18439029157161713, 0.07865539938211441, -0.18941721320152283, -0.1807960420846939, -0.37640029191970825, 0.04872626066207886, -0.3076518177986145, 0.10799197107553482, 0.05709248408675194, 0.18454544246196747, 0.2531726062297821, 0.28329238295555115, -0.08710647374391556, -0.19621102511882782, 0.12732762098312378, -0.3534913957118988, -0.19070515036582947, 0.31535741686820984, 0.06723462790250778, -0.1947595626115799, -0.08638404309749603, -0.0013242600252851844, 0.10709495097398758, 0.4195345342159271, -0.4693979024887085, 0.020944220945239067, -0.11427146941423416, 0.0987367257475853, -0.3104085624217987, 0.07913172245025635, 0.15751874446868896, 0.42153796553611755, -0.25760436058044434, -0.154497429728508, -0.14491161704063416, 0.0838790088891983, -0.15826718509197235, 0.0634443461894989, -0.4202623963356018, 0.04399934783577919, 0.053580448031425476, 0.09282375127077103, 0.18750736117362976, -0.022204192355275154, 0.09768366813659668, -0.016958383843302727, 0.6646728515625, -0.1426241546869278, -0.2350647747516632, -0.09962066262960434, -0.009131419472396374, 0.049664657562971115, 0.18498826026916504, 0.059049565345048904, -0.035435840487480164, -0.04728033021092415, 0.3413552939891815, 0.027763115242123604, -0.17231296002864838, 0.2361924797296524, -0.019445359706878662, 0.03617824986577034, 0.20474566519260406, -0.04410230368375778, -0.22303134202957153, 0.1009693592786789, -0.21326541900634766, -0.24477389454841614, -0.18002676963806152, -0.1836671233177185, -0.4782004654407501, 0.07957690954208374, -0.3716854751110077, 0.2174769639968872, 0.023202866315841675, 0.433090478181839, 0.06805956363677979, -0.3260944187641144, -0.055466178804636, -0.08158303052186966, 0.8373053073883057, 0.07511520385742188, -0.45963025093078613, 0.23563721776008606, 0.20757123827934265, -0.13890250027179718, 0.2073615938425064, -0.18633343279361725, 0.37972787022590637, 0.09648698568344116, 0.21268123388290405, -0.26868706941604614, -0.23165170848369598, 0.20931236445903778, 0.3038516640663147, -0.16424556076526642, 0.015253283083438873, -0.31978482007980347, -0.11012157052755356, -0.25184279680252075, -0.19643357396125793, -0.21257582306861877, 0.2956399917602539, -0.050456319004297256, -0.2596341669559479, 0.004587906878441572, -0.23800337314605713, 0.1909957081079483, -0.10715760290622711, 0.3879352807998657, 0.051587946712970734, 0.21825478971004486, -0.19456757605075836, 0.15413807332515717, 0.5089055895805359, 0.5472732782363892, 0.05943727493286133, -0.2968842089176178, 0.12456067651510239, -0.07193713635206223, 0.6188117861747742, 0.2668168246746063, -0.19870802760124207, 0.1096113994717598, -0.20747417211532593, 0.06117376312613487, -0.3600081205368042, 0.5408351421356201, 0.1723288744688034, 0.041998591274023056, -0.48458802700042725, -0.3174848258495331, -0.02651108242571354, 0.23601289093494415, -0.01474829763174057, 0.4211840331554413, -0.5143498182296753, -0.33220669627189636, -0.11056634783744812, -0.1603686660528183, 0.7657994627952576, -0.022268421947956085, 0.43826842308044434, 0.11238247156143188, 0.004565318115055561, 0.24865414202213287, -0.21224011480808258, 0.25189208984375, -0.1327483206987381, -0.20975542068481445, 0.09509748965501785, -0.29477882385253906, 0.07614288479089737, 0.009575190022587776, -0.06667353957891464, 0.04023788496851921, -0.2708031237125397, 0.11772649735212326, -0.0936180129647255, 0.15664872527122498, -0.036979783326387405, -0.3027482330799103, 0.05342584103345871, 0.22474300861358643, 0.13259725272655487, -0.4349406063556671, -0.07457713782787323, 0.03873906657099724, -0.01577046513557434, -0.3343690037727356, 0.13410919904708862, 0.1582292914390564, -0.10870451480150223, 0.38538238406181335, -0.34416329860687256, -0.1326393485069275, -0.39095231890678406, -0.06490623205900192, 0.0009593019494786859, 0.2701258063316345, 0.13915082812309265, 0.008640642277896404, 0.03529184311628342, 0.11562864482402802, -0.005299913696944714, -0.09429731220006943, 0.11891543120145798, 0.230079784989357, 0.06117122620344162, 0.1179904118180275, 0.06619328260421753, -0.10983920097351074, -0.2814171612262726, 0.04369812831282616, 0.09354668855667114, -0.4925946295261383, 0.012249869294464588, 0.33210834860801697, 0.02918495051562786, 0.07153956592082977, 0.195120707154274, 0.2226148545742035, -0.16589941084384918, 0.20662489533424377, 0.004778721369802952, -0.3882630169391632, -0.2259964644908905, 0.36404067277908325, 0.34856685996055603, -0.07953913509845734, 0.26636815071105957, -0.07931837439537048, -0.14559891819953918, -0.31627076864242554, -0.03594131022691727, 0.2917941212654114, -0.02950289286673069, 0.22183988988399506, 0.11640553176403046, -0.19749490916728973, -0.14197136461734772, 0.2043953537940979, -0.19666831195354462, 0.07382115721702576, 0.09985660761594772, -0.07582753151655197, -0.5724433660507202, 0.1149173453450203, -0.1477152705192566, 0.23676812648773193, 0.29356682300567627, 0.08316545933485031, -0.34197133779525757, 0.3064444065093994, -0.41884559392929077, -0.2606561779975891, -0.24643580615520477, 0.20619139075279236, -0.10042695701122284, -0.044160712510347366, 0.21234941482543945, -0.007965724915266037, 0.25812989473342896, 0.10304177552461624, -0.1178724616765976, -0.3534281849861145, 0.31079912185668945, 0.06425252556800842, 0.08444405347108841, 0.032761428505182266, -0.21657021343708038, -0.2650664150714874, -0.18494746088981628, -0.32082581520080566, 0.13344706594944, -0.016613582149147987, -0.17702139914035797, -0.21493597328662872, -0.011724757961928844, -0.03736445680260658, 0.2626550495624542, -0.039070237427949905, 0.01410639937967062, 0.0801611840724945, -0.21498090028762817, 0.07900033891201019, -0.25576406717300415, -0.13628672063350677, 0.05975767970085144, 0.21628715097904205, 0.24517610669136047, -0.07442061603069305, 0.10312096029520035, -0.30856621265411377, -0.3791849911212921, -0.20401155948638916, 0.29417333006858826, 0.6025100946426392, -0.0766274631023407, -0.08550131320953369, 0.0016732889926061034, 0.211162269115448, -0.11668753623962402, -0.2896974980831146, -0.04983925074338913, -0.31912893056869507, -0.008033794350922108, 0.12935441732406616, 0.1383018046617508, -0.18885838985443115, 0.07112828642129898, 0.02227994054555893, 0.3098205029964447, 0.008775657042860985, 0.09098590165376663, 0.07178891450166702, 0.1463157832622528, 0.04931615665555, 0.21080058813095093, 0.5912573933601379, 0.03925975784659386, 0.39937880635261536, -0.00857709813863039, 0.32592201232910156, 0.22952066361904144, -0.18164560198783875, -0.34462636709213257, -0.46653541922569275, 0.14293593168258667, 0.4821491241455078, -0.15358254313468933, 0.2111257016658783, -0.08948826789855957, -0.07512230426073074, -0.0033041611313819885, -0.22682654857635498, 0.05214456841349602, -0.009173739701509476, -0.34277790784835815, -0.004492811392992735, 0.1920793205499649, 0.008478616364300251, -0.13934066891670227, 0.13574948906898499, 0.12526728212833405, -0.18211066722869873, 0.42734411358833313, -0.2138674408197403, 0.030959980562329292, -0.2011118084192276, 0.3046078085899353, 0.2964406907558441, -0.16138562560081482, -0.2990381121635437, 0.15333719551563263, 0.045394327491521835, 0.2708326280117035, 0.12108435481786728, 0.1155673936009407, 0.3902680277824402, 0.31801143288612366, 0.2691265642642975, 0.04920458793640137, 0.12358905375003815, -0.24909788370132446, -0.3302103281021118, 0.258311927318573, 0.05528867617249489, -0.10806677490472794, 0.15875691175460815, 0.2289189249277115, -0.18035918474197388, -0.09668518602848053, 0.3783748745918274, 0.04895520210266113, -0.13576623797416687, -0.12957409024238586, 0.08105097711086273, -0.23195481300354004, 0.07524282485246658, -0.0701422169804573, -0.43787893652915955, -0.14012578129768372, 0.6325850486755371, -0.03264091908931732, 0.2430495172739029, -0.14998756349086761, 0.16110439598560333, 0.16401442885398865, 0.5547503232955933, -0.049981873482465744, 0.27199456095695496, -0.16562743484973907, -0.39663198590278625, -0.1842113733291626, 0.1645098328590393, 0.09438688308000565, 0.2175903022289276, -0.15946424007415771, 0.2902321517467499, 0.29489973187446594, -0.047259774059057236, -0.18368029594421387, -0.03427091985940933, -0.012339219450950623, -0.2146051675081253, -0.33259910345077515, -0.11464706063270569, 0.09105169773101807, 0.061789631843566895, 0.06280495971441269, -0.19697409868240356, 0.31372761726379395, -0.024758370593190193, 0.2341061681509018, -0.10529646277427673, 0.07604628056287766, 0.07486782968044281, 0.24359340965747833, 0.1573057472705841, 0.1537487655878067, 0.25048592686653137, -0.2492009401321411, -0.0031487164087593555, -0.02054799161851406, -0.38341662287712097, 0.049983251839876175, -0.04558854177594185, 0.23275724053382874, -0.3094574511051178, -0.45362454652786255, 0.18107391893863678, 0.026418086141347885, -0.008378266356885433, 0.25823071599006653, 0.13135868310928345, 0.06930170953273773, 0.17801529169082642, 0.05285417661070824, 0.22812825441360474, -0.06311400234699249, 0.19231189787387848, 0.010961304418742657, 0.10930147022008896, 0.012114012613892555, -0.38135483860969543, 0.16951529681682587, 0.19177711009979248, -0.5578904151916504, -0.06294562667608261, 0.09658068418502808, 0.18831253051757812, 0.09640387445688248, -0.5469996929168701, 0.015275533311069012, 0.33444440364837646, -0.23138634860515594, -0.3863031566143036, 0.5063357949256897, -0.22625423967838287, -0.0928683951497078, -0.13889437913894653, 0.278754860162735, -0.045012760907411575, -0.42685845494270325, 0.16563236713409424, -0.25428059697151184 ]
https://github.com/huggingface/datasets/issues/2276
concatenate_datasets loads all the data into memory
Thanks for the insights @mariosasko ! I'm working on a fix. Since this is a big issue I'll make a patch release as soon as this is fixed
## Describe the bug When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk. Interestingly, this happens when trying to save the new dataset to disk or concatenating it again. ![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png) ## Steps to reproduce the bug ```python from datasets import concatenate_datasets, load_from_disk test_sampled_pro = load_from_disk("test_sampled_pro") val_sampled_pro = load_from_disk("val_sampled_pro") big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro]) # Loaded to memory big_set.save_to_disk("big_set") # Loaded to memory big_set = concatenate_datasets([big_set, val_sampled_pro]) ``` ## Expected results The data should be loaded into memory in batches and then saved directly to disk. ## Actual results The entire data set is loaded into the memory and then saved to the hard disk. ## Versions Paste the output of the following code: ```python - Datasets: 1.6.1 - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] - Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10 ```
28
concatenate_datasets loads all the data into memory
[ -0.5915117263793945, 0.29105305671691895, -0.17058269679546356, 0.4391750693321228, 0.27094170451164246, 0.1117558628320694, 0.09983080625534058, 0.3183959126472473, -0.37266451120376587, 0.17210650444030762, -0.11731827259063721, 0.25782614946365356, 0.012229375541210175, 0.03386270999908447, -0.19890834391117096, 0.3286806344985962, 0.15103502571582794, 0.38735347986221313, -0.5189505815505981, -0.18512214720249176, -0.2710893154144287, 0.23455743491649628, -0.182821586728096, -0.27183088660240173, -0.5399620532989502, 0.1578328013420105, -0.07886847853660583, 0.41709205508232117, -0.2451419234275818, 0.027556315064430237, 0.02647802233695984, 0.3237512409687042, -0.048253800719976425, 0.15339866280555725, -0.0001064106181729585, -0.057569511234760284, -0.0007986741838976741, -0.13183549046516418, -0.3789903223514557, 0.2985270619392395, -0.4191235601902008, -0.17215083539485931, -0.0059836008585989475, 0.04433997720479965, 0.2934683561325073, -0.05553199723362923, -0.11296165734529495, -0.4966488182544708, 0.06729833781719208, 0.13096682727336884, 0.24457554519176483, 0.015540913678705692, -0.15767744183540344, -0.22508737444877625, 0.010915680788457394, 0.021887989714741707, 0.16794146597385406, -0.06015637516975403, -0.12926100194454193, -0.14324906468391418, -0.11037823557853699, 0.36264994740486145, -0.06215541064739227, -0.0467463880777359, -0.18318316340446472, 0.07109898328781128, -0.1396734118461609, -0.0888424664735794, 0.2836672067642212, -0.2031092643737793, 0.3017059862613678, -0.32867419719696045, 0.0549577958881855, -0.1646622121334076, -0.07031480967998505, -0.2128836065530777, 0.17079874873161316, 0.2016603648662567, -0.11999770253896713, 0.0968327596783638, -0.23434031009674072, -0.1430286318063736, -0.06075997278094292, -0.02655082382261753, -0.12513819336891174, 0.19068771600723267, -0.0990433618426323, 0.13651131093502045, 0.3767957389354706, -0.07717925310134888, 0.3031977415084839, -0.3131825625896454, -0.3104628026485443, -0.10385122150182724, -0.488355427980423, 0.021252645179629326, -0.004978209733963013, -0.34414738416671753, 0.4175095856189728, -0.014228792861104012, 0.0006106499349698424, 0.2662225067615509, 0.2932855784893036, -0.06983524560928345, 0.39401721954345703, -0.055720254778862, 0.051144808530807495, 0.36060458421707153, -0.08403877913951874, -0.40961745381355286, 0.05139565467834473, 0.006994089111685753, -0.12522777915000916, -0.06928728520870209, 0.049207787960767746, -0.2527399957180023, -0.03198767080903053, -0.08847907185554504, -0.2712666094303131, 0.10930219292640686, 0.002230208134278655, 0.14766015112400055, -0.1275416612625122, 0.34093278646469116, 0.15549784898757935, 0.3254498243331909, 0.08819703757762909, -0.034022144973278046, -0.04207256808876991, -0.011616420932114124, -0.39880990982055664, -0.09718620777130127, -0.11562485247850418, 0.15002726018428802, 0.1326778531074524, 0.027962801977992058, 0.07204887270927429, -0.06732095032930374, 0.1542581021785736, -0.02356754057109356, 0.08135346323251724, -0.1876947581768036, 0.282986044883728, 0.18182599544525146, 0.10441480576992035, 0.18253076076507568, 0.15119221806526184, -0.08160809427499771, -0.13944298028945923, 0.24080117046833038, -0.18162165582180023, -0.22178949415683746, -0.03094790130853653, 0.2910410463809967, 0.18929755687713623, 0.41581791639328003, 0.06781996786594391, 0.23765571415424347, 0.24422147870063782, 0.12289228290319443, -0.12953853607177734, -0.008512450382113457, -0.021835410967469215, -0.19975346326828003, 0.22283411026000977, 0.3858392834663391, -0.26843541860580444, 0.006245615426450968, 0.07231535017490387, -0.24290654063224792, 0.3223424255847931, 0.1427711695432663, -0.12194415926933289, 0.06559893488883972, -0.34469807147979736, 0.13210470974445343, 0.5861696600914001, -0.09753185510635376, -0.20926110446453094, 0.2508193254470825, -0.20333869755268097, -0.038909316062927246, 0.174346923828125, 0.19048990309238434, -0.08677797019481659, 0.26913514733314514, 0.6651305556297302, 0.2019362449645996, -0.0158433448523283, 0.049576275050640106, -0.01877131685614586, -0.12362919002771378, 0.04288550838828087, -0.05445309728384018, -0.21089133620262146, 0.20074059069156647, -0.02480279840528965, -0.19664424657821655, 0.41142088174819946, -0.1779603213071823, 0.05987934395670891, 0.3746330738067627, -0.02627931535243988, -0.13192178308963776, -0.1227799728512764, 0.095272496342659, -0.38843634724617004, -0.17326931655406952, 0.22514699399471283, -0.07291777431964874, -0.21706798672676086, -0.19408361613750458, -0.014641353860497475, 0.3183179497718811, -0.054900895804166794, 0.004367861431092024, 0.21093158423900604, 0.2171029895544052, 0.06632506847381592, -0.15133005380630493, -0.07917260378599167, 0.6967390775680542, -0.21891149878501892, -0.050090864300727844, -0.3569909334182739, -0.011744811199605465, -0.006974717602133751, -0.1824079304933548, 0.2133476585149765, 0.03253108635544777, -0.12214736640453339, 0.056083742529153824, 0.06975702196359634, 0.46416208148002625, -0.010960389859974384, -0.2996218502521515, 0.24074217677116394, -0.01515073049813509, -0.19851207733154297, 0.13029903173446655, 0.018524793907999992, -0.3754834234714508, 0.1563187539577484, -0.1648986041545868, 0.04743599146604538, 0.1763201504945755, 0.1503015011548996, 0.09785381704568863, 0.11253760755062103, -0.1844155192375183, 0.28900855779647827, 0.1637510359287262, 0.161246657371521, -0.4447765052318573, 0.0815398171544075, 0.3289816081523895, 0.20967534184455872, 0.5094818472862244, -0.4534738063812256, 0.1675228476524353, 0.44501709938049316, 0.09697136282920837, 0.011458988301455975, 0.016290217638015747, -0.42259690165519714, -0.1689276248216629, 0.06303942203521729, -0.07365428656339645, 0.5698522925376892, 0.33884793519973755, 0.21147914230823517, -0.05959215760231018, 0.025468161329627037, -0.19819752871990204, 0.309436172246933, 0.014865739271044731, 0.17050084471702576, 0.13434794545173645, 0.1216449961066246, -0.33742600679397583, -0.4846942722797394, 0.10673303157091141, 0.061980362981557846, 0.019495148211717606, -0.16545362770557404, 0.058538246899843216, -0.3056906759738922, -0.21769669651985168, -0.02911573089659214, 0.01639554277062416, -0.14567317068576813, -0.3010193705558777, -0.08991912752389908, 0.170530304312706, -0.05709080025553703, 0.09115911275148392, -0.07009395956993103, 0.30557748675346375, 0.4370332360267639, -0.029990535229444504, 0.04663011431694031, -0.05745948851108551, -0.30383965373039246, 0.16652266681194305, -0.0632212907075882, -0.08943825215101242, 0.10102812200784683, -0.12177881598472595, 0.2021288126707077, 0.026631202548742294, 0.003510714741423726, 0.13679960370063782, -0.0025374589022248983, -0.10916562378406525, 0.1915060430765152, 0.16212157905101776, -0.03825453296303749, -0.22944340109825134, 0.04508626088500023, 0.2700481116771698, -0.16822926700115204, 0.18439029157161713, 0.07865539938211441, -0.18941721320152283, -0.1807960420846939, -0.37640029191970825, 0.04872626066207886, -0.3076518177986145, 0.10799197107553482, 0.05709248408675194, 0.18454544246196747, 0.2531726062297821, 0.28329238295555115, -0.08710647374391556, -0.19621102511882782, 0.12732762098312378, -0.3534913957118988, -0.19070515036582947, 0.31535741686820984, 0.06723462790250778, -0.1947595626115799, -0.08638404309749603, -0.0013242600252851844, 0.10709495097398758, 0.4195345342159271, -0.4693979024887085, 0.020944220945239067, -0.11427146941423416, 0.0987367257475853, -0.3104085624217987, 0.07913172245025635, 0.15751874446868896, 0.42153796553611755, -0.25760436058044434, -0.154497429728508, -0.14491161704063416, 0.0838790088891983, -0.15826718509197235, 0.0634443461894989, -0.4202623963356018, 0.04399934783577919, 0.053580448031425476, 0.09282375127077103, 0.18750736117362976, -0.022204192355275154, 0.09768366813659668, -0.016958383843302727, 0.6646728515625, -0.1426241546869278, -0.2350647747516632, -0.09962066262960434, -0.009131419472396374, 0.049664657562971115, 0.18498826026916504, 0.059049565345048904, -0.035435840487480164, -0.04728033021092415, 0.3413552939891815, 0.027763115242123604, -0.17231296002864838, 0.2361924797296524, -0.019445359706878662, 0.03617824986577034, 0.20474566519260406, -0.04410230368375778, -0.22303134202957153, 0.1009693592786789, -0.21326541900634766, -0.24477389454841614, -0.18002676963806152, -0.1836671233177185, -0.4782004654407501, 0.07957690954208374, -0.3716854751110077, 0.2174769639968872, 0.023202866315841675, 0.433090478181839, 0.06805956363677979, -0.3260944187641144, -0.055466178804636, -0.08158303052186966, 0.8373053073883057, 0.07511520385742188, -0.45963025093078613, 0.23563721776008606, 0.20757123827934265, -0.13890250027179718, 0.2073615938425064, -0.18633343279361725, 0.37972787022590637, 0.09648698568344116, 0.21268123388290405, -0.26868706941604614, -0.23165170848369598, 0.20931236445903778, 0.3038516640663147, -0.16424556076526642, 0.015253283083438873, -0.31978482007980347, -0.11012157052755356, -0.25184279680252075, -0.19643357396125793, -0.21257582306861877, 0.2956399917602539, -0.050456319004297256, -0.2596341669559479, 0.004587906878441572, -0.23800337314605713, 0.1909957081079483, -0.10715760290622711, 0.3879352807998657, 0.051587946712970734, 0.21825478971004486, -0.19456757605075836, 0.15413807332515717, 0.5089055895805359, 0.5472732782363892, 0.05943727493286133, -0.2968842089176178, 0.12456067651510239, -0.07193713635206223, 0.6188117861747742, 0.2668168246746063, -0.19870802760124207, 0.1096113994717598, -0.20747417211532593, 0.06117376312613487, -0.3600081205368042, 0.5408351421356201, 0.1723288744688034, 0.041998591274023056, -0.48458802700042725, -0.3174848258495331, -0.02651108242571354, 0.23601289093494415, -0.01474829763174057, 0.4211840331554413, -0.5143498182296753, -0.33220669627189636, -0.11056634783744812, -0.1603686660528183, 0.7657994627952576, -0.022268421947956085, 0.43826842308044434, 0.11238247156143188, 0.004565318115055561, 0.24865414202213287, -0.21224011480808258, 0.25189208984375, -0.1327483206987381, -0.20975542068481445, 0.09509748965501785, -0.29477882385253906, 0.07614288479089737, 0.009575190022587776, -0.06667353957891464, 0.04023788496851921, -0.2708031237125397, 0.11772649735212326, -0.0936180129647255, 0.15664872527122498, -0.036979783326387405, -0.3027482330799103, 0.05342584103345871, 0.22474300861358643, 0.13259725272655487, -0.4349406063556671, -0.07457713782787323, 0.03873906657099724, -0.01577046513557434, -0.3343690037727356, 0.13410919904708862, 0.1582292914390564, -0.10870451480150223, 0.38538238406181335, -0.34416329860687256, -0.1326393485069275, -0.39095231890678406, -0.06490623205900192, 0.0009593019494786859, 0.2701258063316345, 0.13915082812309265, 0.008640642277896404, 0.03529184311628342, 0.11562864482402802, -0.005299913696944714, -0.09429731220006943, 0.11891543120145798, 0.230079784989357, 0.06117122620344162, 0.1179904118180275, 0.06619328260421753, -0.10983920097351074, -0.2814171612262726, 0.04369812831282616, 0.09354668855667114, -0.4925946295261383, 0.012249869294464588, 0.33210834860801697, 0.02918495051562786, 0.07153956592082977, 0.195120707154274, 0.2226148545742035, -0.16589941084384918, 0.20662489533424377, 0.004778721369802952, -0.3882630169391632, -0.2259964644908905, 0.36404067277908325, 0.34856685996055603, -0.07953913509845734, 0.26636815071105957, -0.07931837439537048, -0.14559891819953918, -0.31627076864242554, -0.03594131022691727, 0.2917941212654114, -0.02950289286673069, 0.22183988988399506, 0.11640553176403046, -0.19749490916728973, -0.14197136461734772, 0.2043953537940979, -0.19666831195354462, 0.07382115721702576, 0.09985660761594772, -0.07582753151655197, -0.5724433660507202, 0.1149173453450203, -0.1477152705192566, 0.23676812648773193, 0.29356682300567627, 0.08316545933485031, -0.34197133779525757, 0.3064444065093994, -0.41884559392929077, -0.2606561779975891, -0.24643580615520477, 0.20619139075279236, -0.10042695701122284, -0.044160712510347366, 0.21234941482543945, -0.007965724915266037, 0.25812989473342896, 0.10304177552461624, -0.1178724616765976, -0.3534281849861145, 0.31079912185668945, 0.06425252556800842, 0.08444405347108841, 0.032761428505182266, -0.21657021343708038, -0.2650664150714874, -0.18494746088981628, -0.32082581520080566, 0.13344706594944, -0.016613582149147987, -0.17702139914035797, -0.21493597328662872, -0.011724757961928844, -0.03736445680260658, 0.2626550495624542, -0.039070237427949905, 0.01410639937967062, 0.0801611840724945, -0.21498090028762817, 0.07900033891201019, -0.25576406717300415, -0.13628672063350677, 0.05975767970085144, 0.21628715097904205, 0.24517610669136047, -0.07442061603069305, 0.10312096029520035, -0.30856621265411377, -0.3791849911212921, -0.20401155948638916, 0.29417333006858826, 0.6025100946426392, -0.0766274631023407, -0.08550131320953369, 0.0016732889926061034, 0.211162269115448, -0.11668753623962402, -0.2896974980831146, -0.04983925074338913, -0.31912893056869507, -0.008033794350922108, 0.12935441732406616, 0.1383018046617508, -0.18885838985443115, 0.07112828642129898, 0.02227994054555893, 0.3098205029964447, 0.008775657042860985, 0.09098590165376663, 0.07178891450166702, 0.1463157832622528, 0.04931615665555, 0.21080058813095093, 0.5912573933601379, 0.03925975784659386, 0.39937880635261536, -0.00857709813863039, 0.32592201232910156, 0.22952066361904144, -0.18164560198783875, -0.34462636709213257, -0.46653541922569275, 0.14293593168258667, 0.4821491241455078, -0.15358254313468933, 0.2111257016658783, -0.08948826789855957, -0.07512230426073074, -0.0033041611313819885, -0.22682654857635498, 0.05214456841349602, -0.009173739701509476, -0.34277790784835815, -0.004492811392992735, 0.1920793205499649, 0.008478616364300251, -0.13934066891670227, 0.13574948906898499, 0.12526728212833405, -0.18211066722869873, 0.42734411358833313, -0.2138674408197403, 0.030959980562329292, -0.2011118084192276, 0.3046078085899353, 0.2964406907558441, -0.16138562560081482, -0.2990381121635437, 0.15333719551563263, 0.045394327491521835, 0.2708326280117035, 0.12108435481786728, 0.1155673936009407, 0.3902680277824402, 0.31801143288612366, 0.2691265642642975, 0.04920458793640137, 0.12358905375003815, -0.24909788370132446, -0.3302103281021118, 0.258311927318573, 0.05528867617249489, -0.10806677490472794, 0.15875691175460815, 0.2289189249277115, -0.18035918474197388, -0.09668518602848053, 0.3783748745918274, 0.04895520210266113, -0.13576623797416687, -0.12957409024238586, 0.08105097711086273, -0.23195481300354004, 0.07524282485246658, -0.0701422169804573, -0.43787893652915955, -0.14012578129768372, 0.6325850486755371, -0.03264091908931732, 0.2430495172739029, -0.14998756349086761, 0.16110439598560333, 0.16401442885398865, 0.5547503232955933, -0.049981873482465744, 0.27199456095695496, -0.16562743484973907, -0.39663198590278625, -0.1842113733291626, 0.1645098328590393, 0.09438688308000565, 0.2175903022289276, -0.15946424007415771, 0.2902321517467499, 0.29489973187446594, -0.047259774059057236, -0.18368029594421387, -0.03427091985940933, -0.012339219450950623, -0.2146051675081253, -0.33259910345077515, -0.11464706063270569, 0.09105169773101807, 0.061789631843566895, 0.06280495971441269, -0.19697409868240356, 0.31372761726379395, -0.024758370593190193, 0.2341061681509018, -0.10529646277427673, 0.07604628056287766, 0.07486782968044281, 0.24359340965747833, 0.1573057472705841, 0.1537487655878067, 0.25048592686653137, -0.2492009401321411, -0.0031487164087593555, -0.02054799161851406, -0.38341662287712097, 0.049983251839876175, -0.04558854177594185, 0.23275724053382874, -0.3094574511051178, -0.45362454652786255, 0.18107391893863678, 0.026418086141347885, -0.008378266356885433, 0.25823071599006653, 0.13135868310928345, 0.06930170953273773, 0.17801529169082642, 0.05285417661070824, 0.22812825441360474, -0.06311400234699249, 0.19231189787387848, 0.010961304418742657, 0.10930147022008896, 0.012114012613892555, -0.38135483860969543, 0.16951529681682587, 0.19177711009979248, -0.5578904151916504, -0.06294562667608261, 0.09658068418502808, 0.18831253051757812, 0.09640387445688248, -0.5469996929168701, 0.015275533311069012, 0.33444440364837646, -0.23138634860515594, -0.3863031566143036, 0.5063357949256897, -0.22625423967838287, -0.0928683951497078, -0.13889437913894653, 0.278754860162735, -0.045012760907411575, -0.42685845494270325, 0.16563236713409424, -0.25428059697151184 ]
https://github.com/huggingface/datasets/issues/2276
concatenate_datasets loads all the data into memory
Hi @samsontmr @TaskManager91 the fix is on the master branch, feel free to install `datasets` from source and let us know if you still have issues
## Describe the bug When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk. Interestingly, this happens when trying to save the new dataset to disk or concatenating it again. ![image](https://user-images.githubusercontent.com/7063207/116420321-2b21b480-a83e-11eb-9006-8f6ca729fb6f.png) ## Steps to reproduce the bug ```python from datasets import concatenate_datasets, load_from_disk test_sampled_pro = load_from_disk("test_sampled_pro") val_sampled_pro = load_from_disk("val_sampled_pro") big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro]) # Loaded to memory big_set.save_to_disk("big_set") # Loaded to memory big_set = concatenate_datasets([big_set, val_sampled_pro]) ``` ## Expected results The data should be loaded into memory in batches and then saved directly to disk. ## Actual results The entire data set is loaded into the memory and then saved to the hard disk. ## Versions Paste the output of the following code: ```python - Datasets: 1.6.1 - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] - Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10 ```
26
concatenate_datasets loads all the data into memory
[ -0.5915117263793945, 0.29105305671691895, -0.17058269679546356, 0.4391750693321228, 0.27094170451164246, 0.1117558628320694, 0.09983080625534058, 0.3183959126472473, -0.37266451120376587, 0.17210650444030762, -0.11731827259063721, 0.25782614946365356, 0.012229375541210175, 0.03386270999908447, -0.19890834391117096, 0.3286806344985962, 0.15103502571582794, 0.38735347986221313, -0.5189505815505981, -0.18512214720249176, -0.2710893154144287, 0.23455743491649628, -0.182821586728096, -0.27183088660240173, -0.5399620532989502, 0.1578328013420105, -0.07886847853660583, 0.41709205508232117, -0.2451419234275818, 0.027556315064430237, 0.02647802233695984, 0.3237512409687042, -0.048253800719976425, 0.15339866280555725, -0.0001064106181729585, -0.057569511234760284, -0.0007986741838976741, -0.13183549046516418, -0.3789903223514557, 0.2985270619392395, -0.4191235601902008, -0.17215083539485931, -0.0059836008585989475, 0.04433997720479965, 0.2934683561325073, -0.05553199723362923, -0.11296165734529495, -0.4966488182544708, 0.06729833781719208, 0.13096682727336884, 0.24457554519176483, 0.015540913678705692, -0.15767744183540344, -0.22508737444877625, 0.010915680788457394, 0.021887989714741707, 0.16794146597385406, -0.06015637516975403, -0.12926100194454193, -0.14324906468391418, -0.11037823557853699, 0.36264994740486145, -0.06215541064739227, -0.0467463880777359, -0.18318316340446472, 0.07109898328781128, -0.1396734118461609, -0.0888424664735794, 0.2836672067642212, -0.2031092643737793, 0.3017059862613678, -0.32867419719696045, 0.0549577958881855, -0.1646622121334076, -0.07031480967998505, -0.2128836065530777, 0.17079874873161316, 0.2016603648662567, -0.11999770253896713, 0.0968327596783638, -0.23434031009674072, -0.1430286318063736, -0.06075997278094292, -0.02655082382261753, -0.12513819336891174, 0.19068771600723267, -0.0990433618426323, 0.13651131093502045, 0.3767957389354706, -0.07717925310134888, 0.3031977415084839, -0.3131825625896454, -0.3104628026485443, -0.10385122150182724, -0.488355427980423, 0.021252645179629326, -0.004978209733963013, -0.34414738416671753, 0.4175095856189728, -0.014228792861104012, 0.0006106499349698424, 0.2662225067615509, 0.2932855784893036, -0.06983524560928345, 0.39401721954345703, -0.055720254778862, 0.051144808530807495, 0.36060458421707153, -0.08403877913951874, -0.40961745381355286, 0.05139565467834473, 0.006994089111685753, -0.12522777915000916, -0.06928728520870209, 0.049207787960767746, -0.2527399957180023, -0.03198767080903053, -0.08847907185554504, -0.2712666094303131, 0.10930219292640686, 0.002230208134278655, 0.14766015112400055, -0.1275416612625122, 0.34093278646469116, 0.15549784898757935, 0.3254498243331909, 0.08819703757762909, -0.034022144973278046, -0.04207256808876991, -0.011616420932114124, -0.39880990982055664, -0.09718620777130127, -0.11562485247850418, 0.15002726018428802, 0.1326778531074524, 0.027962801977992058, 0.07204887270927429, -0.06732095032930374, 0.1542581021785736, -0.02356754057109356, 0.08135346323251724, -0.1876947581768036, 0.282986044883728, 0.18182599544525146, 0.10441480576992035, 0.18253076076507568, 0.15119221806526184, -0.08160809427499771, -0.13944298028945923, 0.24080117046833038, -0.18162165582180023, -0.22178949415683746, -0.03094790130853653, 0.2910410463809967, 0.18929755687713623, 0.41581791639328003, 0.06781996786594391, 0.23765571415424347, 0.24422147870063782, 0.12289228290319443, -0.12953853607177734, -0.008512450382113457, -0.021835410967469215, -0.19975346326828003, 0.22283411026000977, 0.3858392834663391, -0.26843541860580444, 0.006245615426450968, 0.07231535017490387, -0.24290654063224792, 0.3223424255847931, 0.1427711695432663, -0.12194415926933289, 0.06559893488883972, -0.34469807147979736, 0.13210470974445343, 0.5861696600914001, -0.09753185510635376, -0.20926110446453094, 0.2508193254470825, -0.20333869755268097, -0.038909316062927246, 0.174346923828125, 0.19048990309238434, -0.08677797019481659, 0.26913514733314514, 0.6651305556297302, 0.2019362449645996, -0.0158433448523283, 0.049576275050640106, -0.01877131685614586, -0.12362919002771378, 0.04288550838828087, -0.05445309728384018, -0.21089133620262146, 0.20074059069156647, -0.02480279840528965, -0.19664424657821655, 0.41142088174819946, -0.1779603213071823, 0.05987934395670891, 0.3746330738067627, -0.02627931535243988, -0.13192178308963776, -0.1227799728512764, 0.095272496342659, -0.38843634724617004, -0.17326931655406952, 0.22514699399471283, -0.07291777431964874, -0.21706798672676086, -0.19408361613750458, -0.014641353860497475, 0.3183179497718811, -0.054900895804166794, 0.004367861431092024, 0.21093158423900604, 0.2171029895544052, 0.06632506847381592, -0.15133005380630493, -0.07917260378599167, 0.6967390775680542, -0.21891149878501892, -0.050090864300727844, -0.3569909334182739, -0.011744811199605465, -0.006974717602133751, -0.1824079304933548, 0.2133476585149765, 0.03253108635544777, -0.12214736640453339, 0.056083742529153824, 0.06975702196359634, 0.46416208148002625, -0.010960389859974384, -0.2996218502521515, 0.24074217677116394, -0.01515073049813509, -0.19851207733154297, 0.13029903173446655, 0.018524793907999992, -0.3754834234714508, 0.1563187539577484, -0.1648986041545868, 0.04743599146604538, 0.1763201504945755, 0.1503015011548996, 0.09785381704568863, 0.11253760755062103, -0.1844155192375183, 0.28900855779647827, 0.1637510359287262, 0.161246657371521, -0.4447765052318573, 0.0815398171544075, 0.3289816081523895, 0.20967534184455872, 0.5094818472862244, -0.4534738063812256, 0.1675228476524353, 0.44501709938049316, 0.09697136282920837, 0.011458988301455975, 0.016290217638015747, -0.42259690165519714, -0.1689276248216629, 0.06303942203521729, -0.07365428656339645, 0.5698522925376892, 0.33884793519973755, 0.21147914230823517, -0.05959215760231018, 0.025468161329627037, -0.19819752871990204, 0.309436172246933, 0.014865739271044731, 0.17050084471702576, 0.13434794545173645, 0.1216449961066246, -0.33742600679397583, -0.4846942722797394, 0.10673303157091141, 0.061980362981557846, 0.019495148211717606, -0.16545362770557404, 0.058538246899843216, -0.3056906759738922, -0.21769669651985168, -0.02911573089659214, 0.01639554277062416, -0.14567317068576813, -0.3010193705558777, -0.08991912752389908, 0.170530304312706, -0.05709080025553703, 0.09115911275148392, -0.07009395956993103, 0.30557748675346375, 0.4370332360267639, -0.029990535229444504, 0.04663011431694031, -0.05745948851108551, -0.30383965373039246, 0.16652266681194305, -0.0632212907075882, -0.08943825215101242, 0.10102812200784683, -0.12177881598472595, 0.2021288126707077, 0.026631202548742294, 0.003510714741423726, 0.13679960370063782, -0.0025374589022248983, -0.10916562378406525, 0.1915060430765152, 0.16212157905101776, -0.03825453296303749, -0.22944340109825134, 0.04508626088500023, 0.2700481116771698, -0.16822926700115204, 0.18439029157161713, 0.07865539938211441, -0.18941721320152283, -0.1807960420846939, -0.37640029191970825, 0.04872626066207886, -0.3076518177986145, 0.10799197107553482, 0.05709248408675194, 0.18454544246196747, 0.2531726062297821, 0.28329238295555115, -0.08710647374391556, -0.19621102511882782, 0.12732762098312378, -0.3534913957118988, -0.19070515036582947, 0.31535741686820984, 0.06723462790250778, -0.1947595626115799, -0.08638404309749603, -0.0013242600252851844, 0.10709495097398758, 0.4195345342159271, -0.4693979024887085, 0.020944220945239067, -0.11427146941423416, 0.0987367257475853, -0.3104085624217987, 0.07913172245025635, 0.15751874446868896, 0.42153796553611755, -0.25760436058044434, -0.154497429728508, -0.14491161704063416, 0.0838790088891983, -0.15826718509197235, 0.0634443461894989, -0.4202623963356018, 0.04399934783577919, 0.053580448031425476, 0.09282375127077103, 0.18750736117362976, -0.022204192355275154, 0.09768366813659668, -0.016958383843302727, 0.6646728515625, -0.1426241546869278, -0.2350647747516632, -0.09962066262960434, -0.009131419472396374, 0.049664657562971115, 0.18498826026916504, 0.059049565345048904, -0.035435840487480164, -0.04728033021092415, 0.3413552939891815, 0.027763115242123604, -0.17231296002864838, 0.2361924797296524, -0.019445359706878662, 0.03617824986577034, 0.20474566519260406, -0.04410230368375778, -0.22303134202957153, 0.1009693592786789, -0.21326541900634766, -0.24477389454841614, -0.18002676963806152, -0.1836671233177185, -0.4782004654407501, 0.07957690954208374, -0.3716854751110077, 0.2174769639968872, 0.023202866315841675, 0.433090478181839, 0.06805956363677979, -0.3260944187641144, -0.055466178804636, -0.08158303052186966, 0.8373053073883057, 0.07511520385742188, -0.45963025093078613, 0.23563721776008606, 0.20757123827934265, -0.13890250027179718, 0.2073615938425064, -0.18633343279361725, 0.37972787022590637, 0.09648698568344116, 0.21268123388290405, -0.26868706941604614, -0.23165170848369598, 0.20931236445903778, 0.3038516640663147, -0.16424556076526642, 0.015253283083438873, -0.31978482007980347, -0.11012157052755356, -0.25184279680252075, -0.19643357396125793, -0.21257582306861877, 0.2956399917602539, -0.050456319004297256, -0.2596341669559479, 0.004587906878441572, -0.23800337314605713, 0.1909957081079483, -0.10715760290622711, 0.3879352807998657, 0.051587946712970734, 0.21825478971004486, -0.19456757605075836, 0.15413807332515717, 0.5089055895805359, 0.5472732782363892, 0.05943727493286133, -0.2968842089176178, 0.12456067651510239, -0.07193713635206223, 0.6188117861747742, 0.2668168246746063, -0.19870802760124207, 0.1096113994717598, -0.20747417211532593, 0.06117376312613487, -0.3600081205368042, 0.5408351421356201, 0.1723288744688034, 0.041998591274023056, -0.48458802700042725, -0.3174848258495331, -0.02651108242571354, 0.23601289093494415, -0.01474829763174057, 0.4211840331554413, -0.5143498182296753, -0.33220669627189636, -0.11056634783744812, -0.1603686660528183, 0.7657994627952576, -0.022268421947956085, 0.43826842308044434, 0.11238247156143188, 0.004565318115055561, 0.24865414202213287, -0.21224011480808258, 0.25189208984375, -0.1327483206987381, -0.20975542068481445, 0.09509748965501785, -0.29477882385253906, 0.07614288479089737, 0.009575190022587776, -0.06667353957891464, 0.04023788496851921, -0.2708031237125397, 0.11772649735212326, -0.0936180129647255, 0.15664872527122498, -0.036979783326387405, -0.3027482330799103, 0.05342584103345871, 0.22474300861358643, 0.13259725272655487, -0.4349406063556671, -0.07457713782787323, 0.03873906657099724, -0.01577046513557434, -0.3343690037727356, 0.13410919904708862, 0.1582292914390564, -0.10870451480150223, 0.38538238406181335, -0.34416329860687256, -0.1326393485069275, -0.39095231890678406, -0.06490623205900192, 0.0009593019494786859, 0.2701258063316345, 0.13915082812309265, 0.008640642277896404, 0.03529184311628342, 0.11562864482402802, -0.005299913696944714, -0.09429731220006943, 0.11891543120145798, 0.230079784989357, 0.06117122620344162, 0.1179904118180275, 0.06619328260421753, -0.10983920097351074, -0.2814171612262726, 0.04369812831282616, 0.09354668855667114, -0.4925946295261383, 0.012249869294464588, 0.33210834860801697, 0.02918495051562786, 0.07153956592082977, 0.195120707154274, 0.2226148545742035, -0.16589941084384918, 0.20662489533424377, 0.004778721369802952, -0.3882630169391632, -0.2259964644908905, 0.36404067277908325, 0.34856685996055603, -0.07953913509845734, 0.26636815071105957, -0.07931837439537048, -0.14559891819953918, -0.31627076864242554, -0.03594131022691727, 0.2917941212654114, -0.02950289286673069, 0.22183988988399506, 0.11640553176403046, -0.19749490916728973, -0.14197136461734772, 0.2043953537940979, -0.19666831195354462, 0.07382115721702576, 0.09985660761594772, -0.07582753151655197, -0.5724433660507202, 0.1149173453450203, -0.1477152705192566, 0.23676812648773193, 0.29356682300567627, 0.08316545933485031, -0.34197133779525757, 0.3064444065093994, -0.41884559392929077, -0.2606561779975891, -0.24643580615520477, 0.20619139075279236, -0.10042695701122284, -0.044160712510347366, 0.21234941482543945, -0.007965724915266037, 0.25812989473342896, 0.10304177552461624, -0.1178724616765976, -0.3534281849861145, 0.31079912185668945, 0.06425252556800842, 0.08444405347108841, 0.032761428505182266, -0.21657021343708038, -0.2650664150714874, -0.18494746088981628, -0.32082581520080566, 0.13344706594944, -0.016613582149147987, -0.17702139914035797, -0.21493597328662872, -0.011724757961928844, -0.03736445680260658, 0.2626550495624542, -0.039070237427949905, 0.01410639937967062, 0.0801611840724945, -0.21498090028762817, 0.07900033891201019, -0.25576406717300415, -0.13628672063350677, 0.05975767970085144, 0.21628715097904205, 0.24517610669136047, -0.07442061603069305, 0.10312096029520035, -0.30856621265411377, -0.3791849911212921, -0.20401155948638916, 0.29417333006858826, 0.6025100946426392, -0.0766274631023407, -0.08550131320953369, 0.0016732889926061034, 0.211162269115448, -0.11668753623962402, -0.2896974980831146, -0.04983925074338913, -0.31912893056869507, -0.008033794350922108, 0.12935441732406616, 0.1383018046617508, -0.18885838985443115, 0.07112828642129898, 0.02227994054555893, 0.3098205029964447, 0.008775657042860985, 0.09098590165376663, 0.07178891450166702, 0.1463157832622528, 0.04931615665555, 0.21080058813095093, 0.5912573933601379, 0.03925975784659386, 0.39937880635261536, -0.00857709813863039, 0.32592201232910156, 0.22952066361904144, -0.18164560198783875, -0.34462636709213257, -0.46653541922569275, 0.14293593168258667, 0.4821491241455078, -0.15358254313468933, 0.2111257016658783, -0.08948826789855957, -0.07512230426073074, -0.0033041611313819885, -0.22682654857635498, 0.05214456841349602, -0.009173739701509476, -0.34277790784835815, -0.004492811392992735, 0.1920793205499649, 0.008478616364300251, -0.13934066891670227, 0.13574948906898499, 0.12526728212833405, -0.18211066722869873, 0.42734411358833313, -0.2138674408197403, 0.030959980562329292, -0.2011118084192276, 0.3046078085899353, 0.2964406907558441, -0.16138562560081482, -0.2990381121635437, 0.15333719551563263, 0.045394327491521835, 0.2708326280117035, 0.12108435481786728, 0.1155673936009407, 0.3902680277824402, 0.31801143288612366, 0.2691265642642975, 0.04920458793640137, 0.12358905375003815, -0.24909788370132446, -0.3302103281021118, 0.258311927318573, 0.05528867617249489, -0.10806677490472794, 0.15875691175460815, 0.2289189249277115, -0.18035918474197388, -0.09668518602848053, 0.3783748745918274, 0.04895520210266113, -0.13576623797416687, -0.12957409024238586, 0.08105097711086273, -0.23195481300354004, 0.07524282485246658, -0.0701422169804573, -0.43787893652915955, -0.14012578129768372, 0.6325850486755371, -0.03264091908931732, 0.2430495172739029, -0.14998756349086761, 0.16110439598560333, 0.16401442885398865, 0.5547503232955933, -0.049981873482465744, 0.27199456095695496, -0.16562743484973907, -0.39663198590278625, -0.1842113733291626, 0.1645098328590393, 0.09438688308000565, 0.2175903022289276, -0.15946424007415771, 0.2902321517467499, 0.29489973187446594, -0.047259774059057236, -0.18368029594421387, -0.03427091985940933, -0.012339219450950623, -0.2146051675081253, -0.33259910345077515, -0.11464706063270569, 0.09105169773101807, 0.061789631843566895, 0.06280495971441269, -0.19697409868240356, 0.31372761726379395, -0.024758370593190193, 0.2341061681509018, -0.10529646277427673, 0.07604628056287766, 0.07486782968044281, 0.24359340965747833, 0.1573057472705841, 0.1537487655878067, 0.25048592686653137, -0.2492009401321411, -0.0031487164087593555, -0.02054799161851406, -0.38341662287712097, 0.049983251839876175, -0.04558854177594185, 0.23275724053382874, -0.3094574511051178, -0.45362454652786255, 0.18107391893863678, 0.026418086141347885, -0.008378266356885433, 0.25823071599006653, 0.13135868310928345, 0.06930170953273773, 0.17801529169082642, 0.05285417661070824, 0.22812825441360474, -0.06311400234699249, 0.19231189787387848, 0.010961304418742657, 0.10930147022008896, 0.012114012613892555, -0.38135483860969543, 0.16951529681682587, 0.19177711009979248, -0.5578904151916504, -0.06294562667608261, 0.09658068418502808, 0.18831253051757812, 0.09640387445688248, -0.5469996929168701, 0.015275533311069012, 0.33444440364837646, -0.23138634860515594, -0.3863031566143036, 0.5063357949256897, -0.22625423967838287, -0.0928683951497078, -0.13889437913894653, 0.278754860162735, -0.045012760907411575, -0.42685845494270325, 0.16563236713409424, -0.25428059697151184 ]
https://github.com/huggingface/datasets/issues/2275
SNLI dataset has labels of -1
Hi @puzzler10, Those examples where `gold_label` field was empty, -1 label was alloted to it. In order to remove it you can filter the samples from train/val/test splits. Here's how you can drop those rows from the dataset: `dataset = load_dataset("snli")` `dataset_test_filter = dataset['test'].filter(lambda example: example['label'] != -1)` I agree it should have been mentioned in the documentation. I'll raise a PR regarding the same. Thanks for pointing out!
There are a number of rows with a label of -1 in the SNLI dataset. The dataset descriptions [here](https://nlp.stanford.edu/projects/snli/) and [here](https://github.com/huggingface/datasets/tree/master/datasets/snli) don't list -1 as a label possibility, and neither does the dataset viewer. As examples, see index 107 or 124 of the test set. It isn't clear what these labels mean. I found a [line of code](https://github.com/huggingface/datasets/blob/80e59ef178d3bb2090d091bc32315c655eb0633d/datasets/snli/snli.py#L94) that seems to put them in but it seems still unclear why they are there. The current workaround is to just drop the rows from any model being trained. Perhaps the documentation should be updated.
69
SNLI dataset has labels of -1
[ -0.048880498856306076, -0.313373327255249, -0.17101801931858063, 0.29442644119262695, 0.26312923431396484, -0.1266964077949524, 0.3861536979675293, -0.010110130533576012, 0.12990255653858185, 0.31213968992233276, -0.39061132073402405, 0.2730712592601776, -0.2084573209285736, 0.379751592874527, -0.12222141772508621, 0.27201011776924133, 0.16670259833335876, 0.42454564571380615, 0.11636478453874588, -0.6269832253456116, -0.22278915345668793, 0.0785386860370636, -0.38582643866539, 0.07302729040384293, -0.22248464822769165, -0.007087575737386942, 0.05072062090039253, 0.009457970969378948, -0.1386745125055313, -0.5383231043815613, 0.00898311659693718, 0.08135948330163956, 0.18257030844688416, -0.008846488781273365, -0.00010906208626693115, -0.28726211190223694, -0.021189751103520393, -0.03578507900238037, -0.5094286203384399, 0.19237656891345978, -0.15010811388492584, 0.052616916596889496, -0.08243493735790253, -0.1318599283695221, -0.20920205116271973, -0.30398643016815186, 0.17597369849681854, -0.06145520508289337, -0.05052165687084198, 0.24312585592269897, 0.2614617645740509, 0.10796596109867096, -0.37945133447647095, 0.14355529844760895, 0.48316583037376404, -0.22656814754009247, 0.04692547023296356, -0.02008865214884281, 0.07132817059755325, 0.0710424929857254, 0.09653587639331818, 0.4750845432281494, 0.016785036772489548, -0.11519261449575424, 0.05806835740804672, -0.053679391741752625, 0.16960762441158295, -0.21761184930801392, 0.22049961984157562, 0.20835216343402863, 0.4005330502986908, -0.24596041440963745, -0.2774273753166199, 0.04582460597157478, 0.12348087131977081, -0.2917781472206116, 0.04807190224528313, 0.08768882602453232, 0.22946582734584808, 0.30909040570259094, 0.16094528138637543, 0.06186365336179733, -0.1241447776556015, 0.0897476002573967, -0.09721557796001434, 0.9587154984474182, -0.1149381622672081, 0.09100080281496048, 0.1249944195151329, 0.07033683359622955, -0.10477028042078018, 0.21449780464172363, -0.05166766420006752, 0.3311324417591095, -0.5364630222320557, 0.029153412207961082, 0.02289070375263691, -0.13224126398563385, -0.00743707362562418, 0.18242435157299042, -0.02357320860028267, -0.06987635046243668, -0.09677449613809586, -0.019106265157461166, 0.1203472912311554, 0.09486106038093567, 0.4179319143295288, 0.3334996700286865, 0.11877048015594482, -0.21295708417892456, 0.3499166667461395, -0.018767599016427994, -0.326579213142395, -0.3466712236404419, 0.18660667538642883, -0.07814498245716095, -0.1849215179681778, -0.16921977698802948, -0.34752726554870605, 0.17497995495796204, -0.07460736483335495, 0.18552392721176147, -0.04038624465465546, -0.013841815292835236, 0.1107807606458664, 0.169770285487175, -0.06069052591919899, 0.09379751980304718, 0.06193694844841957, -0.31967467069625854, -0.2838588356971741, 0.07784795761108398, -0.16379192471504211, -0.2742439806461334, 0.21302954852581024, -0.15040309727191925, 0.2914826571941376, -0.02413034997880459, -0.18141789734363556, -0.07137856632471085, 0.1127476692199707, 0.033222127705812454, 0.4247165024280548, 0.2651711702346802, -0.30737417936325073, 0.6267713904380798, -0.28160831332206726, -0.18280084431171417, 0.06790006905794144, -0.08590040355920792, -0.0606725849211216, -0.026570364832878113, -0.033603791147470474, 0.24174240231513977, -0.05661412328481674, 0.029616158455610275, 0.23088426887989044, -0.18379253149032593, -0.01636591926217079, -0.09831816703081131, 0.18308861553668976, -0.1252593845129013, 0.13107483088970184, 0.11523507535457611, 0.16246020793914795, 0.04877733439207077, -0.319772869348526, -0.04524968937039375, -0.16175593435764313, -0.39518409967422485, 0.3590739071369171, 0.34732484817504883, 0.20443642139434814, -0.265585720539093, -0.2437370866537094, 0.17060013115406036, 0.30114805698394775, -0.37119436264038086, -0.607938289642334, 0.2567174434661865, -0.3588505685329437, -0.6493212580680847, 0.1308652013540268, 0.4909895360469818, 0.06224564462900162, 0.1304473727941513, -0.0875934511423111, -0.1427738517522812, 0.19085554778575897, 0.013146498240530491, -0.5463057160377502, -0.1574602723121643, 0.3007054030895233, 0.2289164662361145, 0.1354241520166397, 0.2529853582382202, -0.055165354162454605, 0.05993819236755371, 0.2806375026702881, -0.04157622158527374, 0.3052448630332947, 0.356075257062912, 0.37682467699050903, -0.12484030425548553, 0.14706186950206757, -0.13258692622184753, -0.3219596743583679, -0.05905768275260925, -0.11253080517053604, 0.4365094006061554, 0.2565873861312866, -0.06879257410764694, -0.3229406476020813, -0.18127639591693878, -0.14340969920158386, -0.13170568645000458, 0.23341132700443268, 0.2584710121154785, -0.0644121766090393, 0.03625297173857689, -0.1289377361536026, -0.07960988581180573, -0.170415997505188, -0.04386025294661522, -0.2530539631843567, 0.07111767679452896, 0.05183373764157295, -0.07776961475610733, 0.025367053225636482, 0.10992152988910675, 0.23388755321502686, 0.11533334851264954, 0.08404430747032166, -0.002041591564193368, -0.29633426666259766, 0.013747835531830788, 0.27533847093582153, 0.2053905427455902, 0.014314666390419006, -0.508763313293457, 0.027484459802508354, 0.2993084192276001, 0.12074197083711624, 0.014161047525703907, -0.13544194400310516, 0.2727696895599365, -0.30225685238838196, -0.002311130054295063, -0.22939054667949677, 0.1806419938802719, 0.2930144965648651, -0.06903020292520523, -0.26788246631622314, -0.3095977008342743, 0.15734103322029114, -0.2222348004579544, 0.33027586340904236, 0.23269084095954895, -0.34451988339424133, -0.031093163415789604, 0.20302414894104004, -0.07223588973283768, 0.31044408679008484, -0.11407578736543655, -0.18324874341487885, 0.042642008513212204, 0.6197993755340576, 0.03970037400722504, -0.0554073229432106, 0.17013581097126007, -0.005350257735699415, 0.04197773337364197, -0.3337494432926178, -0.2577284276485443, -0.08010465651750565, 0.08303213864564896, -0.036048077046871185, 0.33008089661598206, 0.2875175178050995, -0.09712524712085724, -0.3287305533885956, -0.39034488797187805, -0.16162756085395813, 0.2291526198387146, -0.30298033356666565, -0.06847499310970306, -0.20669257640838623, -0.3007374405860901, -0.2481084018945694, 0.10651028156280518, -0.17675776779651642, -0.3014829754829407, 0.13774125277996063, -0.17940285801887512, 0.02380981668829918, 0.10443934053182602, 0.1646755188703537, 0.3397706151008606, -0.040034301578998566, 0.24951143562793732, -0.30689093470573425, -0.5081721544265747, -0.23473535478115082, 0.10631171613931656, -0.35527822375297546, 0.3074856400489807, 0.12412282824516296, -0.3212968111038208, -0.16171550750732422, -0.10690362006425858, -0.1391187608242035, 0.04796691611409187, 0.2259322553873062, -0.1242036446928978, 0.21187745034694672, 0.20347468554973602, -0.1115993782877922, 0.2474384903907776, 0.049216706305742264, 0.018166646361351013, 0.008901799097657204, 0.05739361420273781, -0.32849207520484924, -0.10337173938751221, -0.5147409439086914, -0.3455987572669983, -0.13816668093204498, -0.031215252354741096, 0.12207666039466858, 0.09294917434453964, 0.05866429582238197, 0.09644206613302231, 0.038529057055711746, -0.010820310562849045, 0.04876162111759186, 0.18764768540859222, -0.15799687802791595, -0.16693635284900665, 0.17463061213493347, 0.04736187309026718, -0.22850339114665985, 0.02600756473839283, -0.0030077549163252115, 0.05649157240986824, -0.014043704606592655, -0.2436348795890808, 0.056990284472703934, 0.14112713932991028, 0.07652159035205841, -0.01815870776772499, -0.09557981044054031, -0.10729624330997467, 0.12436966598033905, -0.0309621412307024, -0.33992311358451843, -0.02576596848666668, 0.1805889755487442, -0.4027014672756195, 0.21665379405021667, -0.24843499064445496, 0.1970434933900833, -0.0598425455391407, -0.07892512530088425, 0.2985643148422241, -0.15660274028778076, 0.009453630074858665, -0.2300451397895813, 0.11047513037919998, 0.13808974623680115, 0.1197485700249672, 0.4189397990703583, 0.5410473346710205, -0.177595853805542, 0.28943678736686707, -0.00419224426150322, 0.037527117878198624, -0.0549335777759552, 0.21800346672534943, -0.14941781759262085, -0.01611877977848053, -0.2956511080265045, 0.27135077118873596, -0.053359512239694595, 0.04312478005886078, -0.01643957756459713, -0.2471684366464615, -0.08430590480566025, -0.03428203985095024, 0.09528512507677078, -0.1551530510187149, 0.032475803047418594, -0.33327221870422363, 0.12924927473068237, -0.17497919499874115, -0.24515776336193085, 0.018552681431174278, 0.37458401918411255, -0.06066124886274338, 0.03753098472952843, 0.30972978472709656, 0.06068342179059982, 0.6229775547981262, -0.3473362922668457, 0.30574512481689453, 0.22361569106578827, 0.617053210735321, -0.37249669432640076, -0.10278543084859848, -0.4918659031391144, -0.2839524447917938, 0.4393572509288788, 0.2508089542388916, -0.08858837187290192, -0.18869763612747192, 0.3142528831958771, -0.05120505392551422, -0.09699350595474243, -0.08789216727018356, -0.26183339953422546, -0.3325408399105072, -0.0729731023311615, -0.10475596785545349, 0.031805191189050674, -0.0922522246837616, -0.10625077784061432, -0.052809759974479675, 0.04879720136523247, 0.029374100267887115, 0.12431439012289047, 0.2923968732357025, 0.28349533677101135, 0.05870360881090164, -0.0007359659648500383, 0.06759978830814362, 0.24214914441108704, 0.06639345735311508, 0.4347735345363617, -0.06669580936431885, -0.44231918454170227, 0.3243393898010254, -0.4500715434551239, 0.249643474817276, 0.12468583881855011, -0.0094029875472188, -0.07532037049531937, -0.19345158338546753, 0.17460204660892487, -0.1857718676328659, 0.14201132953166962, 0.17321956157684326, 0.11237909644842148, -0.21785858273506165, -0.14264141023159027, 0.6117733716964722, 0.10866019129753113, -0.310884952545166, -0.05741962417960167, -0.11735799908638, -0.23983179032802582, 0.33443185687065125, 0.33650532364845276, 0.9916324019432068, -0.11319979280233383, 0.0854494497179985, 0.41642215847969055, -0.3801233768463135, 0.5350180268287659, -0.1046055406332016, -0.11617248505353928, -0.41349831223487854, 0.07875780016183853, 0.05652229115366936, 0.13008682429790497, -0.1863223910331726, 0.5961043834686279, 0.04874996840953827, 0.24217212200164795, -0.23420450091362, -0.0953536406159401, -0.0023658950813114643, 0.1508900225162506, 0.35216498374938965, -0.06632093340158463, -0.40447303652763367, 0.16291481256484985, -0.019748477265238762, 0.27266669273376465, -0.1910349577665329, 0.0938711017370224, -0.10687687993049622, 0.2304842323064804, -0.046947285532951355, -0.08961997181177139, 0.4762638807296753, -0.07216635346412659, 0.017852459102869034, 0.07870210707187653, -0.2837502658367157, 0.26586654782295227, 0.8130183219909668, 0.15313443541526794, 0.014263388700783253, 0.13158459961414337, 0.17080536484718323, 0.2092379629611969, 0.03736923635005951, 0.31386762857437134, 0.17069320380687714, -0.07612167298793793, -0.22989338636398315, -0.04336155578494072, 0.08388876914978027, 0.2708839774131775, -0.2872375547885895, -0.011040013283491135, -0.3142133057117462, 0.0849718451499939, 0.3323969841003418, 0.12623146176338196, 0.06046248599886894, -0.14360548555850983, 0.2004380226135254, 0.13554415106773376, 0.012515024282038212, -0.08381538838148117, 0.12613524496555328, -0.29982778429985046, -0.26374661922454834, 0.4835609197616577, -0.015272554941475391, 0.27915647625923157, 0.09291807562112808, -0.009623955935239792, -0.1764083057641983, -0.39757242798805237, -0.029760465025901794, 0.20971225202083588, -0.559251070022583, 0.0764419287443161, 0.06770946830511093, -0.3096054494380951, -0.0769292414188385, 0.4018268883228302, 0.15550751984119415, 0.048007987439632416, -0.06342276930809021, -0.16852609813213348, -0.36919280886650085, -0.10895464569330215, -0.19255313277244568, 0.35481739044189453, 0.10640165209770203, 0.07287371158599854, -0.14295513927936554, -0.29817160964012146, -0.3834732472896576, -0.24412110447883606, -0.3523228168487549, 0.1898486167192459, 0.21292753517627716, 0.14738601446151733, -0.24507251381874084, 0.06462687253952026, 0.24205343425273895, -0.13244952261447906, 0.03569093346595764, -0.2276117354631424, -0.06604769080877304, 0.09555649757385254, 0.11173272877931595, -0.18010292947292328, -0.07112591713666916, 0.11247380822896957, -0.2712935507297516, 0.11348897963762283, 0.15178167819976807, 0.3213958144187927, 0.22004711627960205, 0.8584849834442139, -0.21759776771068573, -0.07721445709466934, -0.1449965089559555, 0.00018299181829206645, 0.1875717043876648, -0.14893104135990143, -0.05993039906024933, 0.22026100754737854, 0.09923238307237625, -0.006438795011490583, -0.16172575950622559, 0.020588824525475502, -0.3150431513786316, 0.05927832052111626, 0.0819513127207756, -0.4159773588180542, 0.37716808915138245, 0.3319399654865265, 0.18051795661449432, 0.1962999701499939, -0.20363342761993408, -0.30748534202575684, 0.2687561810016632, 0.3006781339645386, -0.17613309621810913, -0.15992209315299988, 0.2308843433856964, 0.08269363641738892, 0.15227673947811127, 0.0985979214310646, 0.026808280497789383, -0.2442115992307663, 0.13435299694538116, -0.07116150856018066, 0.07869251817464828, -0.4276489019393921, -0.18859095871448517, 0.13406908512115479, -0.03873130679130554, 0.09906494617462158, 0.25930431485176086, -0.148171067237854, -0.004816931672394276, 0.5627206563949585, -0.016750914976000786, 0.32797378301620483, -0.0255808737128973, 0.2643469572067261, -0.22756409645080566, -0.015076616778969765, -0.0443287268280983, 0.343980073928833, -0.5910305380821228, 0.1543741077184677, 0.10533163696527481, 0.152438685297966, 0.011790449731051922, -0.2096814215183258, 0.09618698060512543, 0.12253747880458832, -0.2577400207519531, -0.31046271324157715, -0.7173030376434326, 0.031065218150615692, -0.04793957620859146, 0.11839786171913147, -0.04054602235555649, 0.09844529628753662, 0.28825491666793823, 0.11776304990053177, 0.052511539310216904, -0.4323197603225708, -0.35380810499191284, 0.3472009301185608, 0.2645881772041321, -0.05805952101945877, 0.23517628014087677, 0.05388247221708298, 0.0881316289305687, 0.21552032232284546, -0.0851207748055458, 0.15458747744560242, 0.07390349358320236, 0.43283602595329285, -0.1535031944513321, -0.020902713760733604, -0.20017938315868378, -0.18147361278533936, -0.002961595542728901, 0.17713236808776855, -0.0025439716409891844, 0.24758104979991913, 0.18939314782619476, -0.2750265598297119, 0.42105913162231445, 0.003924707416445017, 0.23640717566013336, -0.08381854742765427, -0.032157719135284424, -0.13359752297401428, -0.409389466047287, -0.18211717903614044, -0.22197981178760529, -0.08614113181829453, 0.056238118559122086, -0.019057122990489006, 0.04019956290721893, 0.39090487360954285, -0.30705276131629944, 0.12695378065109253, 0.08686006814241409, 0.36644288897514343, 0.08600008487701416, 0.08701089024543762, 0.031133167445659637, -0.03276123106479645, -0.5074995756149292, 0.21369168162345886, 0.04377692937850952, -0.2071308195590973, -0.0444626659154892, 0.032509446144104004, -0.41266825795173645, -0.10228928178548813, 0.20228877663612366, 0.2691030204296112, 0.14829690754413605, 0.12262270599603653, -0.278850793838501, -0.02202809602022171, -0.017098242416977882, -0.008441062644124031, 0.12355460226535797, -0.1625877022743225, 0.1684841513633728, -0.1043611466884613, 0.19948172569274902, 0.022100720554590225, 0.273948073387146, -0.18220901489257812, 0.17954695224761963, 0.18541842699050903, -0.07567203789949417, 0.39236247539520264, -0.15112194418907166, 0.03709041699767113, -0.2775563597679138, -0.20774567127227783, -0.15703661739826202, -0.10796397179365158, 0.013282410800457, 0.35131844878196716, -0.06001387909054756, 0.15422995388507843, -0.034631021320819855, -0.0933588296175003, 0.10797914862632751, 0.32402336597442627, -0.445087194442749, 0.5772939920425415, -0.10872233659029007, 0.014757666736841202, 0.1295909732580185, 0.022508174180984497, 0.2910611033439636, -0.20512670278549194, -0.20228593051433563, -0.5294256806373596, 0.19536355137825012, -0.1619681417942047, -0.042378511279821396, -0.08653749525547028, 0.24018898606300354, 0.30509817600250244, -0.10772468149662018, -0.3427559435367584, 0.15139596164226532, 0.3605187237262726, 0.057905640453100204, -0.4502524137496948, -0.10969140380620956, 0.21222250163555145, 0.0675416812300682, -0.13049204647541046, -0.05281534790992737, 0.3407459855079651, -0.1568603217601776, 0.28412777185440063, -0.3144223392009735 ]
https://github.com/huggingface/datasets/issues/2272
Bug in Dataset.class_encode_column
This has been fixed in this commit: https://github.com/huggingface/datasets/pull/2254/commits/88676c930216cd4cc31741b99827b477d2b46cb6 It was introduced in #2246 : using map with `input_columns` doesn't return the other columns anymore
## Describe the bug All the rest of the columns except the one passed to `Dataset.class_encode_column` are discarded. ## Expected results All the original columns should be kept. This needs regression tests.
24
Bug in Dataset.class_encode_column
[ -0.11692366749048233, 0.08549413830041885, -0.20696699619293213, 0.27268028259277344, 0.6274911165237427, 0.08530985563993454, 0.37067902088165283, 0.29906705021858215, -0.20998284220695496, 0.1554633378982544, 0.2939855456352234, 0.44873547554016113, 0.04419342428445816, 0.12430565804243088, -0.10151445120573044, -0.08879822492599487, 0.2586122155189514, 0.20062866806983948, -0.27117013931274414, -0.3517119884490967, -0.3675891160964966, 0.15382525324821472, -0.21440234780311584, 0.18274009227752686, -0.05324508622288704, 0.06965714693069458, -0.041775088757276535, -0.048809632658958435, -0.2154638171195984, -0.057278867810964584, 0.1811116486787796, -0.12751859426498413, 0.12452704459428787, 0.21567854285240173, -0.00010084909445140511, -0.023244742304086685, 0.07069261372089386, 0.1047174409031868, -0.3718019425868988, 0.3825710713863373, -0.36775699257850647, -0.17908179759979248, -0.09678991883993149, -0.3528018593788147, -0.09423858672380447, -0.2699500024318695, -0.08427824825048447, -0.4378020465373993, -0.11519384384155273, 0.22106310725212097, 0.3665873408317566, -0.07428901642560959, -0.19766563177108765, -0.03242376819252968, 0.24144433438777924, 0.0956241562962532, -0.09861913323402405, -0.007774712517857552, -0.02405872568488121, 0.16004598140716553, -0.15450415015220642, 0.4359126389026642, 0.10106325149536133, -0.1433139145374298, 0.024703249335289, 0.250681072473526, -0.10785304009914398, 0.07146137207746506, 0.280927836894989, -0.05428176745772362, 0.416750431060791, -0.22707438468933105, -0.21872775256633759, 0.20500721037387848, 0.21188397705554962, -0.2598586678504944, 0.3251226544380188, -0.07432353496551514, 0.2749854624271393, 0.2873821556568146, -0.10375355184078217, 0.014957845211029053, -0.1496301293373108, 0.019046438857913017, -0.2138354331254959, 0.24857284128665924, -0.19080187380313873, 0.0791851207613945, -0.32749807834625244, 0.0009735829662531614, 0.2421356439590454, 0.06356598436832428, -0.12253299355506897, -0.005606113933026791, 0.0038433573208749294, -0.21866463124752045, -0.15690498054027557, 0.09865500777959824, -0.0028351296205073595, 0.006382042542099953, -0.33361756801605225, 0.15851381421089172, 0.22813965380191803, 0.04015373811125755, 0.012946446426212788, 0.11666547507047653, 0.10513292998075485, 0.520631730556488, 0.30079707503318787, -0.04670136049389839, -0.13843093812465668, 0.09283370524644852, -0.00926097109913826, 0.09608614444732666, 0.2955104410648346, -0.0041037132032215595, -0.09608630836009979, -0.1572962999343872, -0.41234660148620605, 0.5331855416297913, -0.06181352213025093, -0.019871097058057785, -0.09938310086727142, 0.29027464985847473, 0.11380449682474136, -0.016647258773446083, 0.16824519634246826, 0.18141211569309235, -0.018421830609440804, -0.4278107285499573, -0.3387264907360077, 0.10726489126682281, 0.0478731244802475, -0.1403355449438095, -0.19155940413475037, 0.18896283209323883, 0.03134553134441376, 0.28849807381629944, -0.08666287362575531, -0.13144174218177795, -0.1869465857744217, -0.021320680156350136, 0.1996779441833496, 0.05659981444478035, -0.25332391262054443, 0.23704053461551666, 0.1845700591802597, -0.23339615762233734, 0.06127084419131279, 0.13214927911758423, -0.2144337147474289, -0.044665928930044174, -0.36611026525497437, 0.3266030550003052, 0.1789901703596115, -0.01792861707508564, 0.3798941373825073, 0.19203926622867584, 0.44205236434936523, -0.34493252635002136, 0.25979912281036377, -0.2631208896636963, -0.18024368584156036, -0.07551242411136627, 0.11508882790803909, 0.054820168763399124, -0.3308120667934418, 0.11911094188690186, 0.12077198922634125, 0.014438021928071976, 0.4268415570259094, 0.015558670274913311, -0.09504629671573639, -0.11103124916553497, -0.2722441256046295, 0.23567014932632446, 0.30734339356422424, -0.31069308519363403, -0.5396867394447327, 0.3422243595123291, 0.038369059562683105, -0.09969718754291534, 0.1466352492570877, 0.0010988620342686772, -0.01330745778977871, -0.12843452394008636, 0.11661496758460999, 0.1475164294242859, 0.043925490230321884, 0.036283187568187714, -0.27291634678840637, 0.04717276245355606, 0.37135857343673706, 0.04244079813361168, -0.09542345255613327, 0.08536174148321152, 0.20627517998218536, 0.022460084408521652, 0.12124017626047134, -0.24988842010498047, 0.013621261343359947, 0.09977979212999344, -0.04529653862118721, -0.1720311939716339, 0.05158687010407448, -0.20765990018844604, -0.28988000750541687, -0.1627204567193985, 0.09990449994802475, -0.020468557253479958, -0.45247867703437805, -0.36216211318969727, -0.0749216228723526, -0.021747227758169174, -0.15214364230632782, 0.06818253546953201, 0.28942665457725525, -0.11896693706512451, -0.08837958425283432, 0.04675750434398651, -0.06988924741744995, 0.35191816091537476, -0.36532363295555115, -0.009112469851970673, -0.040707286447286606, -0.01843615062534809, -0.10099424421787262, 0.08491495251655579, -0.14386053383350372, 0.24715138971805573, 0.31497886776924133, -0.06346094608306885, -0.24473048746585846, 0.26864007115364075, -0.1417452096939087, -0.11587316542863846, -0.16114261746406555, -0.16844528913497925, 0.01566089130938053, -0.09005910158157349, 0.04127776622772217, -0.10874862968921661, 0.20185238122940063, 0.13782788813114166, -0.25532442331314087, 0.3949805200099945, 0.23088373243808746, -0.17613258957862854, 0.050032734870910645, -0.05366186425089836, 0.2627669870853424, 0.059870414435863495, -0.19627246260643005, -0.4665229022502899, 0.01615242473781109, 0.056713394820690155, 0.022542433813214302, 0.07959521561861038, -0.2981167733669281, 0.13217514753341675, 0.7626731395721436, -0.06528633832931519, 0.17692720890045166, -0.14539490640163422, -0.05269564688205719, -0.00017256566206924617, 0.059453196823596954, 0.552627682685852, 0.44979241490364075, 0.1530112326145172, 0.15997314453125, 0.08514543622732162, -0.3241419792175293, -0.12420517206192017, 0.1503344029188156, -0.1977834552526474, 0.0745895728468895, 0.15758323669433594, 0.170721173286438, -0.10101737827062607, -0.36395177245140076, 0.09733140468597412, 0.258289098739624, 0.1536424309015274, -0.40081697702407837, 0.28160879015922546, -0.6542672514915466, -0.17273704707622528, -0.017817137762904167, 0.1959456503391266, 0.34198975563049316, -0.2584018409252167, 0.0516965277493, -0.22001756727695465, -0.23458963632583618, 0.18410848081111908, -0.14931651949882507, 0.09431776404380798, 0.021372826769948006, 0.06247008219361305, 0.0952717512845993, -0.05841023102402687, -0.3310937285423279, 0.15631206333637238, 0.09677808731794357, -0.1784442961215973, 0.10514871031045914, -0.18418610095977783, -0.18311592936515808, -0.1939592957496643, -0.2697269320487976, 0.1545468121767044, -0.19722488522529602, 0.07959482818841934, 0.046893905848264694, -0.03672049567103386, -0.42637428641319275, -0.011036033742129803, 0.35159897804260254, 0.044125746935606, -0.09377963840961456, 0.19446024298667908, 0.08419990539550781, -0.24014438688755035, -0.3027920424938202, -0.5705877542495728, -0.11901777982711792, -0.042764339596033096, -0.1693834364414215, -0.19766096770763397, 0.12602904438972473, -0.044997673481702805, 0.017385775223374367, -0.025598978623747826, 0.14106914401054382, 0.0007504799286834896, -0.5896666646003723, -0.1669754683971405, 0.4368101954460144, -0.13441532850265503, -0.4432796835899353, -0.014328815042972565, 0.011362303979694843, 0.05401880294084549, 0.09100999683141708, -0.1685500293970108, -0.14547446370124817, -0.18025535345077515, 0.17218777537345886, -0.24762406945228577, -0.09595278650522232, 0.21573761105537415, -0.05370365083217621, -0.17868569493293762, -0.17250706255435944, -0.011573373340070248, 0.17123249173164368, -0.10410838574171066, -0.052521638572216034, -0.3112336993217468, 0.6237463355064392, -0.08304265141487122, -0.019511878490447998, 0.22556860744953156, -0.08718223869800568, 0.1821088045835495, -0.2078665792942047, 0.40597832202911377, 0.012093296274542809, 0.05093897879123688, 0.17544755339622498, -0.12580087780952454, -0.03332465887069702, 0.2235577553510666, -0.16416634619235992, -0.16810673475265503, 0.1991158276796341, 0.194401815533638, 0.07291125506162643, -0.14504744112491608, 0.0844835564494133, -0.11900593340396881, 0.059380725026130676, 0.2868052124977112, 0.37279072403907776, 0.07360756397247314, 0.055790722370147705, 0.04879331588745117, -0.060262080281972885, -0.2103326916694641, -0.13175955414772034, -0.28946107625961304, -0.3339649736881256, -0.12298234552145004, 0.16068921983242035, 0.156065434217453, 0.5613559484481812, -0.018787939101457596, -0.010496255941689014, 0.32007819414138794, -0.018062200397253036, 0.5874572992324829, -0.3374691605567932, 0.10797308385372162, 0.051923252642154694, 0.16970491409301758, -0.11556123197078705, -0.14896410703659058, -0.24313314259052277, 0.04384104534983635, -0.07362589240074158, 0.11351929605007172, -0.07219484448432922, 0.03361276164650917, 0.583392322063446, 0.026890065521001816, -0.23032359778881073, -0.17334631085395813, -0.056454531848430634, -0.294784814119339, -0.021584587171673775, 0.08919885754585266, 0.3867102861404419, 0.1120273768901825, -0.07608798891305923, -0.1669868677854538, -0.16299043595790863, -0.0674227625131607, -0.002361366990953684, 0.04335901141166687, 0.20238710939884186, -0.13302966952323914, -0.0029734207782894373, -0.15654678642749786, 0.16220435500144958, 0.10834848880767822, 0.42467349767684937, -0.11542095243930817, -0.24756687879562378, 0.25357764959335327, -0.4620608985424042, 0.37064674496650696, 0.16421929001808167, -0.24150227010250092, -0.03222212567925453, 0.08365675806999207, -0.0418100468814373, -0.06676537543535233, -0.23040331900119781, 0.4562265872955322, 0.16604028642177582, -0.15464907884597778, -0.38626351952552795, 0.3444211483001709, 0.10449529439210892, 0.02406337670981884, -0.042889103293418884, 0.20555490255355835, -0.3412349820137024, 0.15006276965141296, 0.01928580366075039, 0.7157283425331116, 0.2099035531282425, 0.12514397501945496, 0.21325336396694183, -0.21100063621997833, 0.37999650835990906, -0.2523995041847229, 0.19665661454200745, -0.2379547506570816, -0.530829131603241, -0.06486200541257858, 0.17742684483528137, 0.2910204529762268, -0.11879338324069977, -0.17032819986343384, 0.07832053303718567, -0.28082460165023804, 0.2732115685939789, 0.027081750333309174, -0.16727076470851898, -0.10203902423381805, -0.06666604429483414, -0.13933506608009338, 0.296068400144577, 0.22368858754634857, -0.22261177003383636, -0.0544673427939415, -0.012583129107952118, -0.11362481862306595, -0.2614958882331848, -0.18014182150363922, 0.1821579933166504, 0.10806088894605637, 0.24099212884902954, -0.03450179100036621, -0.42373400926589966, 0.07743848860263824, 0.14327746629714966, 0.3126184940338135, 0.04034559428691864, 0.028972646221518517, 0.10526334494352341, 0.13705159723758698, 0.4455038905143738, 0.09590860456228256, 0.14332373440265656, 0.3770667016506195, -0.05523097887635231, 0.020895114168524742, 0.010314157232642174, 0.003575071692466736, -0.09843023121356964, 0.11420349031686783, -0.01160958781838417, 0.23136986792087555, -0.41562819480895996, -0.07658307254314423, -0.08993588387966156, 0.32034140825271606, -0.4463379979133606, 0.25884684920310974, -0.11663702875375748, -0.15917615592479706, 0.16750845313072205, 0.23230092227458954, -0.35478517413139343, -0.16077327728271484, 0.46498602628707886, 0.37328919768333435, 0.12180604785680771, 0.5464224815368652, -0.09276468306779861, -0.31987079977989197, -0.30495765805244446, 0.1556394398212433, 0.39947032928466797, -0.18577121198177338, 0.02172713167965412, -0.24096904695034027, -0.018902292475104332, -0.024072125554084778, -0.015536601655185223, -0.14171966910362244, 0.09125221520662308, -0.2955804169178009, -0.26813870668411255, -0.26897141337394714, -0.05900677293539047, 0.12729482352733612, -0.032011065632104874, 0.10648496448993683, -0.054862793534994125, -0.10057103633880615, -0.057952504605054855, -0.41704025864601135, -0.2877182066440582, -0.047096237540245056, -0.04407833144068718, 0.22796952724456787, 0.34866276383399963, 0.10480008274316788, -0.05590405687689781, 0.28842267394065857, 0.2757359743118286, 0.021576160565018654, -0.34362921118736267, -0.33107703924179077, 0.06571609526872635, 0.16545681655406952, 0.17780821025371552, -0.027200454846024513, -0.12386807054281235, -0.21791866421699524, -0.08034755289554596, 0.04737860709428787, 0.04338870570063591, 0.11351912468671799, 0.23305536806583405, -0.06355173885822296, 0.13967876136302948, 0.14276008307933807, -0.18473157286643982, -0.04692193493247032, 0.12524789571762085, -0.04246993735432625, -0.0752604529261589, 0.09657073765993118, 0.10782506316900253, -0.037158578634262085, -0.12212830781936646, -0.16534648835659027, 0.04977605864405632, 0.2280862033367157, -0.5141013264656067, 0.22285418212413788, 0.17754285037517548, 0.12371364235877991, 0.20900088548660278, -0.4654286205768585, -0.43513262271881104, 0.19372758269309998, 0.25402283668518066, -0.3094817101955414, -0.14551953971385956, 0.056314025074243546, -0.03604075685143471, -0.1109488233923912, 0.19513942301273346, 0.06118761748075485, -0.06868623942136765, 0.026925530284643173, -0.06935784220695496, 0.3624260127544403, -0.25239235162734985, 0.09842053055763245, 0.48951998353004456, 0.009614990092813969, 0.2016943097114563, 0.39660629630088806, 0.158625990152359, 0.018024878576397896, 0.8067220449447632, 0.11640242487192154, 0.05897367000579834, 0.3036465644836426, 0.31482183933258057, -0.3426908850669861, -0.023721110075712204, 0.3878733813762665, 0.2691722810268402, -0.15866874158382416, 0.16265738010406494, 0.3742111921310425, -0.17773105204105377, -0.3944416642189026, -0.20135706663131714, -0.1694478690624237, -0.009503647685050964, -0.3805612027645111, -0.14042897522449493, 0.036815281957387924, -0.03309693932533264, -0.06082455441355705, -0.000730096478946507, -0.35294309258461, 0.21535661816596985, 0.22010646760463715, -0.11517805606126785, -0.0299107413738966, -0.24001379311084747, 0.11985520273447037, -0.2457859218120575, 0.1664542704820633, -0.29621556401252747, 0.4363127052783966, 0.08624531328678131, 0.06319223344326019, 0.2862412929534912, -0.113131083548069, 0.2071748822927475, 0.21456971764564514, 0.3122256100177765, -0.2381141036748886, -0.1971672773361206, -0.17506520450115204, 0.04891235753893852, 0.2358531653881073, 0.2192486971616745, 0.1489831805229187, 0.0070355124771595, 0.25787100195884705, -0.19352610409259796, 0.24361658096313477, 0.5101218223571777, 0.41954681277275085, -0.06105463206768036, 0.36377522349357605, -0.13661138713359833, -0.18091082572937012, -0.13798561692237854, -0.21374423801898956, -0.13158278167247772, -0.02608330175280571, 0.10494867712259293, 0.042897336184978485, 0.2260851263999939, -0.0009328979649581015, 0.14753086864948273, 0.1646754890680313, 0.35967105627059937, 0.08719424903392792, -0.400879442691803, 0.06137314438819885, -0.17407724261283875, -0.4770147204399109, 0.24687835574150085, -0.019326847046613693, -0.3147760331630707, -0.002980670426040888, 0.013746919110417366, 0.3005821406841278, -0.19989381730556488, 0.2784934639930725, 0.12394369393587112, -0.014556728303432465, -0.04347526282072067, -0.16107021272182465, -0.3321339786052704, 0.08087377995252609, 0.1210353672504425, -0.09652570635080338, -0.16072961688041687, 0.2907486855983734, 0.10443735867738724, 0.18378642201423645, -0.16802874207496643, -0.03771823272109032, -0.31412234902381897, -0.34414562582969666, 0.44700372219085693, 0.16976016759872437, 0.3944920003414154, -0.2900753319263458, 0.10065991431474686, 0.01596604660153389, -0.025041330605745316, -0.042783886194229126, 0.6303712725639343, 0.008074505254626274, 0.13603174686431885, -0.06149590015411377, -0.0581883043050766, 0.0248015895485878, 0.21622341871261597, -0.006058423314243555, 0.07006511092185974, -0.16416862607002258, 0.4294939637184143, -0.0494367778301239, -0.13266639411449432, -0.020728692412376404, -0.036674533039331436, 0.055242810398340225, 0.20158806443214417, 0.0472792312502861, -0.4839416742324829, 0.1281481683254242, -0.4028747081756592, -0.4628365933895111, 0.09331147372722626, 0.1989140659570694, 0.12315142899751663, -0.11138494312763214, -0.23725399374961853, -0.014818236231803894, 0.1794753521680832, -0.2578919231891632, -0.12810218334197998, 0.3582921326160431, -0.0792728066444397, 0.07147695869207382, -0.009231464937329292, 0.5672875642776489, -0.03800659999251366, -0.2573601007461548, 0.01329098641872406, -0.36450526118278503 ]
https://github.com/huggingface/datasets/issues/2267
DatasetDict save load Failing test in 1.6 not in 1.5
I'm not able to reproduce this, do you think you can provide a code that creates a DatasetDict that has this issue when saving and reloading ?
## Describe the bug We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema. Downgrading to `>1.6` -- fixes the problem. ## Steps to reproduce the bug ```python ### Load a dataset dict from jsonl path = '/test/foo' ds_dict.save_to_disk(path) ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6 ``` ## Expected results Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk. ## Actual results ``` # Infer features if None inferred_features = Features.from_arrow_schema(arrow_table.schema) if self.info.features is None: self.info.features = inferred_features # Infer fingerprint if None if self._fingerprint is None: self._fingerprint = generate_fingerprint(self) # Sanity checks assert self.features is not None, "Features can't be None in a Dataset object" assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object" if self.info.features.type != inferred_features.type: > raise ValueError( "External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format( self.info.features, self.info.features.type, inferred_features, inferred_features.type ) ) E ValueError: External features info don't match the dataset: E Got E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>> E E but expected something like E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>> ../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError ``` ## Versions - Datasets: 1.6.1 - Python: 3.8.5 (default, Jan 26 2021, 10:01:04) [Clang 12.0.0 (clang-1200.0.32.2)] - Platform: macOS-10.15.7-x86_64-i386-64bit ```
27
DatasetDict save load Failing test in 1.6 not in 1.5
[ -0.34518587589263916, 0.28418219089508057, -0.16639521718025208, 0.17386959493160248, 0.0921330451965332, -0.1542891412973404, 0.15528661012649536, 0.2898305058479309, 0.3556036949157715, 0.2503882944583893, 0.039753325283527374, 0.06044868752360344, 0.09538903832435608, 0.10385292023420334, -0.10662282258272171, 0.038110390305519104, -0.0291292741894722, 0.2998535931110382, -0.08182042837142944, 0.02487100660800934, -0.04510075971484184, 0.32712745666503906, -0.2637854516506195, -0.06382671743631363, -0.3456059694290161, 0.045517951250076294, -0.12523072957992554, 0.3174963593482971, -0.2657192051410675, -0.432526171207428, 0.3483031690120697, 0.5525068640708923, 0.21659491956233978, 0.32255077362060547, -0.00011123063450213522, 0.11306039243936539, 0.2755197286605835, -0.11410808563232422, -0.4877399206161499, -0.09834421426057816, -0.19327615201473236, 0.013389483094215393, 0.08067332953214645, -0.10992953181266785, 0.07479210942983627, 0.01667732745409012, 0.15254351496696472, -0.5130739808082581, 0.20094916224479675, 0.3443712294101715, 0.2443404644727707, 0.23871931433677673, 0.025197990238666534, -0.2866699695587158, 0.012523764744400978, 0.061186663806438446, 0.060656365007162094, 0.3832484483718872, 0.022682934999465942, -0.0864633247256279, -0.1469072550535202, 0.17837101221084595, 0.0814947709441185, 0.020270613953471184, -0.15970498323440552, -0.06962081789970398, -0.20232047140598297, 0.018807396292686462, 0.33255431056022644, 0.07844903320074081, 0.5725772976875305, -0.287529855966568, -0.29133784770965576, 0.11454769223928452, -0.03965004161000252, 0.0683179423213005, 0.43765610456466675, -0.20665279030799866, 0.18318915367126465, 0.2873144745826721, -0.07034531980752945, -0.3320816457271576, -0.25153300166130066, -0.11481912434101105, -0.1372309774160385, -0.2956993281841278, -0.21560679376125336, -0.04806062951683998, 0.006497299298644066, -0.06580924242734909, 0.32560694217681885, -0.1638869196176529, -0.3286060392856598, -0.3052196502685547, -0.061493635177612305, -0.05775083974003792, 0.10568871349096298, -0.0344143807888031, 0.21947069466114044, -0.282830148935318, 0.2938547134399414, 0.3892403244972229, 0.025660889223217964, -0.0750008150935173, 0.15472522377967834, 0.25570282340049744, 0.7795231938362122, 0.23322606086730957, 0.3502488136291504, 0.0665542483329773, -0.38498950004577637, 0.0873357355594635, 0.021141324192285538, -0.2964290678501129, 0.14743199944496155, -0.1981067806482315, 0.32940027117729187, -0.4378911554813385, -0.35795772075653076, 0.24833883345127106, 0.006672429386526346, -0.20555619895458221, 0.023019690066576004, 0.531091570854187, 0.07139801979064941, 0.08862586319446564, 0.16571278870105743, 0.1263970583677292, -0.08457830548286438, -0.22754152119159698, -0.3739204704761505, -0.017480678856372833, 0.17924663424491882, 0.0311599001288414, 0.43984395265579224, -0.19352978467941284, 0.2047204226255417, -0.1791457235813141, -0.33253052830696106, -0.11022814363241196, 0.08805171400308609, -0.11368019878864288, 0.2856742739677429, 0.20242029428482056, 0.02561291866004467, -0.027624106034636497, 0.0503418929874897, -0.048664338886737823, -0.003431766526773572, 0.20600023865699768, 0.144146129488945, -0.14547210931777954, 0.24195674061775208, 0.2636832296848297, -0.03565448522567749, -0.2700878381729126, 0.03142727166414261, 0.09233338385820389, 0.13549752533435822, -0.10825291275978088, -0.11845791339874268, -0.13633137941360474, -0.3224636912345886, -0.05808531120419502, 0.09590811282396317, 0.6017868518829346, -0.4415247440338135, 0.07339123636484146, 0.029589436948299408, -0.26935091614723206, 0.1250646710395813, -0.09178756922483444, 0.04040168598294258, 0.1107797622680664, -0.06695525348186493, 0.06165805831551552, 0.6244156360626221, -0.39438194036483765, -0.6770493388175964, 0.2893062233924866, 0.08277283608913422, -0.14883777499198914, -0.1018754094839096, -0.11891746520996094, 0.10686099529266357, 0.015359053388237953, 0.1308913230895996, 0.04758436605334282, 0.23260007798671722, 0.15887680649757385, -0.4434272348880768, -0.08819997310638428, 0.06811922043561935, 0.0964701920747757, 0.052061114460229874, -0.005942266434431076, 0.21432475745677948, -0.10952194780111313, 0.2350044548511505, -0.16505922377109528, -0.08886078745126724, 0.19270457327365875, 0.08890830725431442, -0.21162734925746918, 0.10737694054841995, -0.09072533994913101, -0.45727089047431946, 0.22862084209918976, -0.14334852993488312, -0.15274013578891754, 0.2376396656036377, -0.054223377257585526, -0.4445798993110657, 0.11434279382228851, -0.33945906162261963, 0.026661718264222145, 0.1485225409269333, 0.22131282091140747, -0.16746555268764496, 0.14665748178958893, -0.006623183377087116, 0.31315669417381287, -0.47484463453292847, -0.03251715004444122, 0.04414326697587967, 0.14058798551559448, -0.07723124325275421, -0.2733883261680603, 0.17191056907176971, -0.09942622482776642, 0.21093258261680603, -0.17352138459682465, -0.2467106133699417, 0.45284825563430786, 0.10049991309642792, -0.11579401046037674, 0.040420569479465485, -0.44160595536231995, -0.06147918850183487, -0.00304860295727849, 0.08845268934965134, 0.02172047086060047, 0.05458928644657135, 0.04408599063754082, -0.4821866750717163, 0.2788596749305725, -0.03809772804379463, -0.17944495379924774, 0.20460732281208038, -0.05076959356665611, 0.32036733627319336, -0.08619681000709534, 0.1784723848104477, -0.4681572914123535, 0.14112627506256104, -0.1362757831811905, 0.3092504143714905, 0.009044468402862549, -0.07635831087827682, 0.0905630812048912, 0.3824212849140167, 0.1360924392938614, 0.3182583451271057, 0.025322573259472847, 0.11365308612585068, -0.36556950211524963, -0.028386401012539864, 0.3083004653453827, 0.5906157493591309, 0.12681864202022552, 0.15727625787258148, -0.18829937279224396, -0.0185249000787735, -0.2195124328136444, 0.1217828020453453, -0.06974595785140991, -0.0008376146433874965, 0.1470131278038025, 0.2730500102043152, -0.1523767113685608, -0.5941970348358154, 0.013547212816774845, 0.08076898753643036, 0.0368187353014946, -0.2984195947647095, -0.09071435034275055, -0.20555272698402405, 0.28018486499786377, 0.020886044949293137, -0.22382789850234985, 0.09934008121490479, -0.3412381112575531, -0.01579074189066887, 0.249556303024292, 0.02238987199962139, 0.05936034768819809, -0.10816647857427597, 0.3073645830154419, 0.08877868205308914, -0.19888871908187866, -0.12088551372289658, -0.05461728945374489, -0.22214557230472565, 0.026340823620557785, -0.1085781678557396, 0.25002312660217285, 0.2363123893737793, -0.28667378425598145, -0.16766533255577087, -0.32845816016197205, -0.18948394060134888, 0.25377440452575684, 0.12494515627622604, -0.014535403810441494, 0.2072973996400833, 0.029306791722774506, 0.06216936185956001, 0.21922798454761505, 0.07496503740549088, -0.25692272186279297, -0.19651058316230774, 0.03281654790043831, 0.1903228759765625, -0.28242379426956177, -0.08887254446744919, -0.5019420385360718, -0.25811049342155457, -0.3685329854488373, 0.16034866869449615, -0.06770233064889908, 0.037878941744565964, -0.12107130885124207, 0.13634631037712097, 0.23571884632110596, -0.013351443223655224, 0.24947069585323334, -0.25352942943573, -0.23017701506614685, 0.04855255410075188, -0.2527899742126465, -0.6226625442504883, 0.06866574287414551, 0.14764311909675598, 0.20388223230838776, 0.24202491343021393, -0.36595478653907776, 0.06747987866401672, -0.21421387791633606, 0.34510430693626404, 0.1659756302833557, -0.058456238359212875, 0.5369576811790466, 0.09924907237291336, -0.09071332216262817, -0.23427914083003998, -0.20789356529712677, 0.2121218591928482, -0.02410462312400341, 0.06196729093790054, -0.413063645362854, 0.31635910272598267, -0.40159010887145996, 0.3782574236392975, 0.05443768575787544, -0.22787673771381378, 0.3395465314388275, 0.02108377404510975, 0.5244690775871277, -0.4081428050994873, -0.18640072643756866, 0.010440883226692677, -0.00761593971401453, 0.09643175452947617, 0.06770709902048111, -0.08208712935447693, 0.19479604065418243, -0.15513266623020172, -0.47895562648773193, -0.029190998524427414, -0.2794170081615448, -0.2137630581855774, -0.2859538495540619, 0.2666299343109131, 0.26304030418395996, 0.2900567948818207, -0.037344787269830704, 0.17580735683441162, -0.015013184398412704, 0.23642770946025848, 0.16268616914749146, -0.230299711227417, -0.4097802937030792, 0.46584948897361755, -0.40434730052948, 0.19665668904781342, -0.1186879575252533, 0.7131256461143494, -0.13084422051906586, -0.06993076205253601, 0.03478449210524559, -0.1806757152080536, 0.5430808067321777, -0.1419031322002411, 0.2100410908460617, 0.13290700316429138, -0.22273816168308258, -0.36782434582710266, 0.16555117070674896, -0.028796570375561714, 0.21645136177539825, -0.02986576221883297, 0.17657960951328278, -0.08817002177238464, -0.23556560277938843, 0.3038369119167328, 0.1553979068994522, -0.1797025501728058, -0.2773635685443878, -0.35146093368530273, -0.14931556582450867, -0.3016038239002228, -0.15374581515789032, -0.16022120416164398, 0.02032378315925598, -0.24533359706401825, -0.11175782978534698, -0.5205555558204651, -0.23189648985862732, 0.16447009146213531, 0.27032744884490967, 0.2830536365509033, -0.18669040501117706, 0.23402513563632965, 0.3199097216129303, 0.00024369738821405917, 0.25369977951049805, 0.3334802985191345, -0.2407834380865097, -0.24154727160930634, 0.2684885859489441, -0.14309878647327423, 0.0198737233877182, 0.18572239577770233, -0.24012111127376556, -0.39781424403190613, 0.203144371509552, -0.28223592042922974, -0.06540198624134064, 0.3855573236942291, 0.06160752847790718, 0.11918158084154129, -0.3213045597076416, -0.2223099023103714, 0.2760690748691559, -0.0360388457775116, -0.1941508650779724, 0.48328694701194763, -0.02458912506699562, -0.20195826888084412, 0.38919761776924133, -0.19353149831295013, 0.385487824678421, -0.057189732789993286, 0.22192375361919403, 0.21232812106609344, -0.31282591819763184, -0.057965610176324844, 0.4960169196128845, 0.05744941160082817, -0.5225237011909485, -0.4563314914703369, 0.0861956775188446, 0.0014626462943851948, 0.06383977085351944, 0.0185176320374012, -0.30575990676879883, 0.09605217725038528, 0.33515289425849915, -0.2860987186431885, 0.04389377310872078, 0.422437459230423, -0.22662946581840515, 0.025779923424124718, -0.22349382936954498, 0.2079620063304901, 0.1955544352531433, 0.1284918636083603, -0.12282311171293259, 0.05348458141088486, 0.12260441482067108, -0.28215789794921875, 0.1061420813202858, 0.26949799060821533, 0.004221914801746607, 0.4852985441684723, 0.19003494083881378, -0.30944040417671204, 0.17752490937709808, 0.15717095136642456, 0.4198122024536133, 0.14952360093593597, -0.1358947902917862, 0.19384931027889252, -0.20625409483909607, -0.041769735515117645, 0.11989764869213104, 0.011623221449553967, 0.2412334531545639, -0.014592696912586689, -0.27427035570144653, -0.07236229628324509, -0.22272257506847382, -0.18957310914993286, -0.1488478034734726, 0.09581635147333145, 0.08172333240509033, -0.5123041868209839, -0.26963019371032715, -0.17761674523353577, -0.205534428358078, -0.36334148049354553, 0.16727778315544128, 0.12409934401512146, 0.2679731249809265, 0.2621806263923645, 0.017388584092259407, -0.41277602314949036, -0.12695631384849548, 0.7278018593788147, -0.13751190900802612, -0.13632726669311523, 0.5741074681282043, -0.040023576468229294, -0.02810707315802574, -0.3943212628364563, -0.03061063215136528, 0.1681080162525177, -0.04769181087613106, 0.46193328499794006, -0.1728387326002121, -0.3020223379135132, 0.19585222005844116, 0.6177655458450317, -0.06816518306732178, -0.09080057591199875, 0.05460190773010254, -0.24305713176727295, -0.5445145964622498, -0.10406842082738876, 0.11840040236711502, 0.368209570646286, 0.21104787290096283, -0.12529665231704712, 0.05691170692443848, 0.05635767802596092, -0.33547958731651306, -0.07519012689590454, 0.10778027027845383, -0.054270803928375244, 0.011126670055091381, -0.06433359533548355, 0.13411635160446167, -0.20588892698287964, 0.1692872792482376, 0.10729259997606277, 0.08444757014513016, -0.23011372983455658, -0.12719187140464783, 0.1429697573184967, -0.0656975582242012, 0.2890632450580597, -0.16601094603538513, -0.25218573212623596, -0.01864970661699772, -0.093352310359478, 0.16255232691764832, 0.18213485181331635, -0.12501682341098785, 0.16982504725456238, 0.10010821372270584, 0.18671219050884247, 0.11861974000930786, 0.12041684985160828, -0.08717860281467438, 0.009589191526174545, -0.04146284982562065, 0.07970236241817474, -0.24769537150859833, -0.21774767339229584, 0.10389374941587448, -0.01924973540008068, 0.19150979816913605, 0.07616406679153442, -0.06274285167455673, -0.2495279312133789, -0.2833045423030853, 0.0870196521282196, 0.20384062826633453, 0.5142171382904053, -0.22671622037887573, -0.3069676160812378, -0.08119795471429825, 0.22254230082035065, -0.168095201253891, -0.1717025190591812, 0.2552044093608856, -0.014284470118582249, 0.15913088619709015, -0.014953368343412876, -0.27802759408950806, -0.3455246388912201, -0.023653699085116386, 0.41616061329841614, 0.42546096444129944, -0.28578096628189087, 0.024384446442127228, -0.15042942762374878, -0.1395220160484314, 0.09832412749528885, 0.5201716423034668, 0.09720741212368011, 0.08304032683372498, 0.37292882800102234, 0.07045695185661316, 0.43944430351257324, -0.1150888130068779, 0.4169316291809082, -0.10897258669137955, -0.22866635024547577, 0.2659083902835846, 0.06732025742530823, -0.1542167365550995, 0.043602846562862396, 0.1608523577451706, 0.049189358949661255, -0.3993607461452484, 0.016323426738381386, -0.2150762528181076, -0.2049526572227478, -0.10679410398006439, -0.2978190779685974, -0.2578641474246979, -0.13326027989387512, 0.23794488608837128, 0.04224097356200218, -0.24685519933700562, 0.30924859642982483, 0.15758125483989716, -0.07737883925437927, -0.12390678375959396, -0.3683101534843445, 0.29479050636291504, -0.0748891606926918, -0.12287367880344391, -0.1479150652885437, 0.37468141317367554, 0.21026819944381714, 0.1874494105577469, 0.2699615955352783, 0.3120207190513611, 0.2520717978477478, 0.26078516244888306, 0.20105968415737152, -0.007366162724792957, -0.07388874143362045, -0.1683795303106308, -0.17595255374908447, 0.37376534938812256, -0.059383995831012726, 0.2759178876876831, 0.43145230412483215, 0.2211725115776062, -0.11549950391054153, 0.1744358241558075, 0.3714359998703003, 0.16614533960819244, -0.08796697854995728, 0.38989007472991943, 0.18869303166866302, -0.31387603282928467, -0.04145986959338188, 0.005102332681417465, -0.15924060344696045, -0.054046228528022766, 0.21774844825267792, -0.037645019590854645, 0.19379009306430817, -0.10734564810991287, 0.10812760889530182, 0.14770975708961487, 0.49788427352905273, 0.18482424318790436, 0.1234954223036766, -0.2428186982870102, -0.10842754691839218, -0.6254067420959473, 0.1170109361410141, 0.1362062245607376, 0.18601718544960022, -0.06352321803569794, 0.10006356239318848, 0.08006658405065536, -0.1812436431646347, 0.07984555512666702, 0.3649944067001343, -0.14531797170639038, -0.2825430631637573, -0.26284852623939514, -0.08441394567489624, 0.12341633439064026, 0.01651078090071678, 0.048934854567050934, -0.5115612149238586, 0.37345871329307556, -0.09413030743598938, 0.11550095677375793, -0.07785019278526306, -0.19899633526802063, 0.017890244722366333, 0.0077756596729159355, 0.33201923966407776, 0.0812840387225151, 0.23753094673156738, -0.2387554943561554, -0.13716267049312592, -0.1954451948404312, -0.05556774139404297, 0.10713200271129608, 0.23659874498844147, 0.3101714253425598, 0.3238532841205597, 0.010980837978422642, 0.16063547134399414, -0.020401323214173317, 0.31483733654022217, 0.07653393596410751, 0.023601192981004715, 0.04573540389537811, 0.11497294157743454, 0.18491606414318085, 0.035486988723278046, 0.08507240563631058, 0.2513614594936371, -0.11513634026050568, 0.08136872947216034, -0.3011856973171234, -0.312756210565567, 0.3311196267604828, -0.06244906410574913, -0.1658387929201126, -0.21056702733039856, 0.265414834022522, 0.0881434753537178, -0.2846198081970215, -0.45565178990364075, 0.0551510751247406, 0.32819557189941406, -0.10202915966510773, -0.2109822779893875, 0.23304255306720734, 0.13405492901802063, 0.38657501339912415, -0.015461924485862255, 0.5186057090759277, 0.1434665471315384, -0.1999407559633255, -0.14741471409797668, -0.08678431063890457 ]
https://github.com/huggingface/datasets/issues/2267
DatasetDict save load Failing test in 1.6 not in 1.5
Hi, I just ran into a similar error. Here is the minimal code to reproduce: ```python from datasets import load_dataset, DatasetDict ds = load_dataset('super_glue', 'multirc') ds.save_to_disk('tempds') ds = DatasetDict.load_from_disk('tempds') ``` ```bash Reusing dataset super_glue (/home/idahl/.cache/huggingface/datasets/super_glue/multirc/1.0.2/2fb163bca9085c1deb906aff20f00c242227ff704a4e8c9cfdfe820be3abfc83) Traceback (most recent call last): File "/home/idahl/eval-util-expl/multirc/tmp.py", line 7, in <module> ds = DatasetDict.load_from_disk('tempds') File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/dataset_dict.py", line 710, in load_from_disk dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory) File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 687, in load_from_disk return Dataset( File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 274, in __init__ raise ValueError( ValueError: External features info don't match the dataset: Got {'answer': Value(dtype='string', id=None), 'idx': {'answer': Value(dtype='int32', id=None), 'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None)}, 'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)} with type struct<answer: string, idx: struct<answer: int32, paragraph: int32, question: int32>, label: int64, paragraph: string, question: string> but expected something like {'answer': Value(dtype='string', id=None), 'idx': {'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None), 'answer': Value(dtype='int32', id=None)}, 'label': Value(dtype='int64', id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)} with type struct<answer: string, idx: struct<paragraph: int32, question: int32, answer: int32>, label: int64, paragraph: string, question: string> ``` The non-matching part seems to be `'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None),` vs `'label': Value(dtype='int64', id=None),` And the order in the `<struct...` being different, which might cause the [features.type != inferred_features.type](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L274) condition to become true and raise this ValueError. I am using datasets version 1.6.2. Edit: can confirm, this works without error in version 1.5.0
## Describe the bug We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema. Downgrading to `>1.6` -- fixes the problem. ## Steps to reproduce the bug ```python ### Load a dataset dict from jsonl path = '/test/foo' ds_dict.save_to_disk(path) ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6 ``` ## Expected results Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk. ## Actual results ``` # Infer features if None inferred_features = Features.from_arrow_schema(arrow_table.schema) if self.info.features is None: self.info.features = inferred_features # Infer fingerprint if None if self._fingerprint is None: self._fingerprint = generate_fingerprint(self) # Sanity checks assert self.features is not None, "Features can't be None in a Dataset object" assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object" if self.info.features.type != inferred_features.type: > raise ValueError( "External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format( self.info.features, self.info.features.type, inferred_features, inferred_features.type ) ) E ValueError: External features info don't match the dataset: E Got E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>> E E but expected something like E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>> ../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError ``` ## Versions - Datasets: 1.6.1 - Python: 3.8.5 (default, Jan 26 2021, 10:01:04) [Clang 12.0.0 (clang-1200.0.32.2)] - Platform: macOS-10.15.7-x86_64-i386-64bit ```
226
DatasetDict save load Failing test in 1.6 not in 1.5
[ -0.34518587589263916, 0.28418219089508057, -0.16639521718025208, 0.17386959493160248, 0.0921330451965332, -0.1542891412973404, 0.15528661012649536, 0.2898305058479309, 0.3556036949157715, 0.2503882944583893, 0.039753325283527374, 0.06044868752360344, 0.09538903832435608, 0.10385292023420334, -0.10662282258272171, 0.038110390305519104, -0.0291292741894722, 0.2998535931110382, -0.08182042837142944, 0.02487100660800934, -0.04510075971484184, 0.32712745666503906, -0.2637854516506195, -0.06382671743631363, -0.3456059694290161, 0.045517951250076294, -0.12523072957992554, 0.3174963593482971, -0.2657192051410675, -0.432526171207428, 0.3483031690120697, 0.5525068640708923, 0.21659491956233978, 0.32255077362060547, -0.00011123063450213522, 0.11306039243936539, 0.2755197286605835, -0.11410808563232422, -0.4877399206161499, -0.09834421426057816, -0.19327615201473236, 0.013389483094215393, 0.08067332953214645, -0.10992953181266785, 0.07479210942983627, 0.01667732745409012, 0.15254351496696472, -0.5130739808082581, 0.20094916224479675, 0.3443712294101715, 0.2443404644727707, 0.23871931433677673, 0.025197990238666534, -0.2866699695587158, 0.012523764744400978, 0.061186663806438446, 0.060656365007162094, 0.3832484483718872, 0.022682934999465942, -0.0864633247256279, -0.1469072550535202, 0.17837101221084595, 0.0814947709441185, 0.020270613953471184, -0.15970498323440552, -0.06962081789970398, -0.20232047140598297, 0.018807396292686462, 0.33255431056022644, 0.07844903320074081, 0.5725772976875305, -0.287529855966568, -0.29133784770965576, 0.11454769223928452, -0.03965004161000252, 0.0683179423213005, 0.43765610456466675, -0.20665279030799866, 0.18318915367126465, 0.2873144745826721, -0.07034531980752945, -0.3320816457271576, -0.25153300166130066, -0.11481912434101105, -0.1372309774160385, -0.2956993281841278, -0.21560679376125336, -0.04806062951683998, 0.006497299298644066, -0.06580924242734909, 0.32560694217681885, -0.1638869196176529, -0.3286060392856598, -0.3052196502685547, -0.061493635177612305, -0.05775083974003792, 0.10568871349096298, -0.0344143807888031, 0.21947069466114044, -0.282830148935318, 0.2938547134399414, 0.3892403244972229, 0.025660889223217964, -0.0750008150935173, 0.15472522377967834, 0.25570282340049744, 0.7795231938362122, 0.23322606086730957, 0.3502488136291504, 0.0665542483329773, -0.38498950004577637, 0.0873357355594635, 0.021141324192285538, -0.2964290678501129, 0.14743199944496155, -0.1981067806482315, 0.32940027117729187, -0.4378911554813385, -0.35795772075653076, 0.24833883345127106, 0.006672429386526346, -0.20555619895458221, 0.023019690066576004, 0.531091570854187, 0.07139801979064941, 0.08862586319446564, 0.16571278870105743, 0.1263970583677292, -0.08457830548286438, -0.22754152119159698, -0.3739204704761505, -0.017480678856372833, 0.17924663424491882, 0.0311599001288414, 0.43984395265579224, -0.19352978467941284, 0.2047204226255417, -0.1791457235813141, -0.33253052830696106, -0.11022814363241196, 0.08805171400308609, -0.11368019878864288, 0.2856742739677429, 0.20242029428482056, 0.02561291866004467, -0.027624106034636497, 0.0503418929874897, -0.048664338886737823, -0.003431766526773572, 0.20600023865699768, 0.144146129488945, -0.14547210931777954, 0.24195674061775208, 0.2636832296848297, -0.03565448522567749, -0.2700878381729126, 0.03142727166414261, 0.09233338385820389, 0.13549752533435822, -0.10825291275978088, -0.11845791339874268, -0.13633137941360474, -0.3224636912345886, -0.05808531120419502, 0.09590811282396317, 0.6017868518829346, -0.4415247440338135, 0.07339123636484146, 0.029589436948299408, -0.26935091614723206, 0.1250646710395813, -0.09178756922483444, 0.04040168598294258, 0.1107797622680664, -0.06695525348186493, 0.06165805831551552, 0.6244156360626221, -0.39438194036483765, -0.6770493388175964, 0.2893062233924866, 0.08277283608913422, -0.14883777499198914, -0.1018754094839096, -0.11891746520996094, 0.10686099529266357, 0.015359053388237953, 0.1308913230895996, 0.04758436605334282, 0.23260007798671722, 0.15887680649757385, -0.4434272348880768, -0.08819997310638428, 0.06811922043561935, 0.0964701920747757, 0.052061114460229874, -0.005942266434431076, 0.21432475745677948, -0.10952194780111313, 0.2350044548511505, -0.16505922377109528, -0.08886078745126724, 0.19270457327365875, 0.08890830725431442, -0.21162734925746918, 0.10737694054841995, -0.09072533994913101, -0.45727089047431946, 0.22862084209918976, -0.14334852993488312, -0.15274013578891754, 0.2376396656036377, -0.054223377257585526, -0.4445798993110657, 0.11434279382228851, -0.33945906162261963, 0.026661718264222145, 0.1485225409269333, 0.22131282091140747, -0.16746555268764496, 0.14665748178958893, -0.006623183377087116, 0.31315669417381287, -0.47484463453292847, -0.03251715004444122, 0.04414326697587967, 0.14058798551559448, -0.07723124325275421, -0.2733883261680603, 0.17191056907176971, -0.09942622482776642, 0.21093258261680603, -0.17352138459682465, -0.2467106133699417, 0.45284825563430786, 0.10049991309642792, -0.11579401046037674, 0.040420569479465485, -0.44160595536231995, -0.06147918850183487, -0.00304860295727849, 0.08845268934965134, 0.02172047086060047, 0.05458928644657135, 0.04408599063754082, -0.4821866750717163, 0.2788596749305725, -0.03809772804379463, -0.17944495379924774, 0.20460732281208038, -0.05076959356665611, 0.32036733627319336, -0.08619681000709534, 0.1784723848104477, -0.4681572914123535, 0.14112627506256104, -0.1362757831811905, 0.3092504143714905, 0.009044468402862549, -0.07635831087827682, 0.0905630812048912, 0.3824212849140167, 0.1360924392938614, 0.3182583451271057, 0.025322573259472847, 0.11365308612585068, -0.36556950211524963, -0.028386401012539864, 0.3083004653453827, 0.5906157493591309, 0.12681864202022552, 0.15727625787258148, -0.18829937279224396, -0.0185249000787735, -0.2195124328136444, 0.1217828020453453, -0.06974595785140991, -0.0008376146433874965, 0.1470131278038025, 0.2730500102043152, -0.1523767113685608, -0.5941970348358154, 0.013547212816774845, 0.08076898753643036, 0.0368187353014946, -0.2984195947647095, -0.09071435034275055, -0.20555272698402405, 0.28018486499786377, 0.020886044949293137, -0.22382789850234985, 0.09934008121490479, -0.3412381112575531, -0.01579074189066887, 0.249556303024292, 0.02238987199962139, 0.05936034768819809, -0.10816647857427597, 0.3073645830154419, 0.08877868205308914, -0.19888871908187866, -0.12088551372289658, -0.05461728945374489, -0.22214557230472565, 0.026340823620557785, -0.1085781678557396, 0.25002312660217285, 0.2363123893737793, -0.28667378425598145, -0.16766533255577087, -0.32845816016197205, -0.18948394060134888, 0.25377440452575684, 0.12494515627622604, -0.014535403810441494, 0.2072973996400833, 0.029306791722774506, 0.06216936185956001, 0.21922798454761505, 0.07496503740549088, -0.25692272186279297, -0.19651058316230774, 0.03281654790043831, 0.1903228759765625, -0.28242379426956177, -0.08887254446744919, -0.5019420385360718, -0.25811049342155457, -0.3685329854488373, 0.16034866869449615, -0.06770233064889908, 0.037878941744565964, -0.12107130885124207, 0.13634631037712097, 0.23571884632110596, -0.013351443223655224, 0.24947069585323334, -0.25352942943573, -0.23017701506614685, 0.04855255410075188, -0.2527899742126465, -0.6226625442504883, 0.06866574287414551, 0.14764311909675598, 0.20388223230838776, 0.24202491343021393, -0.36595478653907776, 0.06747987866401672, -0.21421387791633606, 0.34510430693626404, 0.1659756302833557, -0.058456238359212875, 0.5369576811790466, 0.09924907237291336, -0.09071332216262817, -0.23427914083003998, -0.20789356529712677, 0.2121218591928482, -0.02410462312400341, 0.06196729093790054, -0.413063645362854, 0.31635910272598267, -0.40159010887145996, 0.3782574236392975, 0.05443768575787544, -0.22787673771381378, 0.3395465314388275, 0.02108377404510975, 0.5244690775871277, -0.4081428050994873, -0.18640072643756866, 0.010440883226692677, -0.00761593971401453, 0.09643175452947617, 0.06770709902048111, -0.08208712935447693, 0.19479604065418243, -0.15513266623020172, -0.47895562648773193, -0.029190998524427414, -0.2794170081615448, -0.2137630581855774, -0.2859538495540619, 0.2666299343109131, 0.26304030418395996, 0.2900567948818207, -0.037344787269830704, 0.17580735683441162, -0.015013184398412704, 0.23642770946025848, 0.16268616914749146, -0.230299711227417, -0.4097802937030792, 0.46584948897361755, -0.40434730052948, 0.19665668904781342, -0.1186879575252533, 0.7131256461143494, -0.13084422051906586, -0.06993076205253601, 0.03478449210524559, -0.1806757152080536, 0.5430808067321777, -0.1419031322002411, 0.2100410908460617, 0.13290700316429138, -0.22273816168308258, -0.36782434582710266, 0.16555117070674896, -0.028796570375561714, 0.21645136177539825, -0.02986576221883297, 0.17657960951328278, -0.08817002177238464, -0.23556560277938843, 0.3038369119167328, 0.1553979068994522, -0.1797025501728058, -0.2773635685443878, -0.35146093368530273, -0.14931556582450867, -0.3016038239002228, -0.15374581515789032, -0.16022120416164398, 0.02032378315925598, -0.24533359706401825, -0.11175782978534698, -0.5205555558204651, -0.23189648985862732, 0.16447009146213531, 0.27032744884490967, 0.2830536365509033, -0.18669040501117706, 0.23402513563632965, 0.3199097216129303, 0.00024369738821405917, 0.25369977951049805, 0.3334802985191345, -0.2407834380865097, -0.24154727160930634, 0.2684885859489441, -0.14309878647327423, 0.0198737233877182, 0.18572239577770233, -0.24012111127376556, -0.39781424403190613, 0.203144371509552, -0.28223592042922974, -0.06540198624134064, 0.3855573236942291, 0.06160752847790718, 0.11918158084154129, -0.3213045597076416, -0.2223099023103714, 0.2760690748691559, -0.0360388457775116, -0.1941508650779724, 0.48328694701194763, -0.02458912506699562, -0.20195826888084412, 0.38919761776924133, -0.19353149831295013, 0.385487824678421, -0.057189732789993286, 0.22192375361919403, 0.21232812106609344, -0.31282591819763184, -0.057965610176324844, 0.4960169196128845, 0.05744941160082817, -0.5225237011909485, -0.4563314914703369, 0.0861956775188446, 0.0014626462943851948, 0.06383977085351944, 0.0185176320374012, -0.30575990676879883, 0.09605217725038528, 0.33515289425849915, -0.2860987186431885, 0.04389377310872078, 0.422437459230423, -0.22662946581840515, 0.025779923424124718, -0.22349382936954498, 0.2079620063304901, 0.1955544352531433, 0.1284918636083603, -0.12282311171293259, 0.05348458141088486, 0.12260441482067108, -0.28215789794921875, 0.1061420813202858, 0.26949799060821533, 0.004221914801746607, 0.4852985441684723, 0.19003494083881378, -0.30944040417671204, 0.17752490937709808, 0.15717095136642456, 0.4198122024536133, 0.14952360093593597, -0.1358947902917862, 0.19384931027889252, -0.20625409483909607, -0.041769735515117645, 0.11989764869213104, 0.011623221449553967, 0.2412334531545639, -0.014592696912586689, -0.27427035570144653, -0.07236229628324509, -0.22272257506847382, -0.18957310914993286, -0.1488478034734726, 0.09581635147333145, 0.08172333240509033, -0.5123041868209839, -0.26963019371032715, -0.17761674523353577, -0.205534428358078, -0.36334148049354553, 0.16727778315544128, 0.12409934401512146, 0.2679731249809265, 0.2621806263923645, 0.017388584092259407, -0.41277602314949036, -0.12695631384849548, 0.7278018593788147, -0.13751190900802612, -0.13632726669311523, 0.5741074681282043, -0.040023576468229294, -0.02810707315802574, -0.3943212628364563, -0.03061063215136528, 0.1681080162525177, -0.04769181087613106, 0.46193328499794006, -0.1728387326002121, -0.3020223379135132, 0.19585222005844116, 0.6177655458450317, -0.06816518306732178, -0.09080057591199875, 0.05460190773010254, -0.24305713176727295, -0.5445145964622498, -0.10406842082738876, 0.11840040236711502, 0.368209570646286, 0.21104787290096283, -0.12529665231704712, 0.05691170692443848, 0.05635767802596092, -0.33547958731651306, -0.07519012689590454, 0.10778027027845383, -0.054270803928375244, 0.011126670055091381, -0.06433359533548355, 0.13411635160446167, -0.20588892698287964, 0.1692872792482376, 0.10729259997606277, 0.08444757014513016, -0.23011372983455658, -0.12719187140464783, 0.1429697573184967, -0.0656975582242012, 0.2890632450580597, -0.16601094603538513, -0.25218573212623596, -0.01864970661699772, -0.093352310359478, 0.16255232691764832, 0.18213485181331635, -0.12501682341098785, 0.16982504725456238, 0.10010821372270584, 0.18671219050884247, 0.11861974000930786, 0.12041684985160828, -0.08717860281467438, 0.009589191526174545, -0.04146284982562065, 0.07970236241817474, -0.24769537150859833, -0.21774767339229584, 0.10389374941587448, -0.01924973540008068, 0.19150979816913605, 0.07616406679153442, -0.06274285167455673, -0.2495279312133789, -0.2833045423030853, 0.0870196521282196, 0.20384062826633453, 0.5142171382904053, -0.22671622037887573, -0.3069676160812378, -0.08119795471429825, 0.22254230082035065, -0.168095201253891, -0.1717025190591812, 0.2552044093608856, -0.014284470118582249, 0.15913088619709015, -0.014953368343412876, -0.27802759408950806, -0.3455246388912201, -0.023653699085116386, 0.41616061329841614, 0.42546096444129944, -0.28578096628189087, 0.024384446442127228, -0.15042942762374878, -0.1395220160484314, 0.09832412749528885, 0.5201716423034668, 0.09720741212368011, 0.08304032683372498, 0.37292882800102234, 0.07045695185661316, 0.43944430351257324, -0.1150888130068779, 0.4169316291809082, -0.10897258669137955, -0.22866635024547577, 0.2659083902835846, 0.06732025742530823, -0.1542167365550995, 0.043602846562862396, 0.1608523577451706, 0.049189358949661255, -0.3993607461452484, 0.016323426738381386, -0.2150762528181076, -0.2049526572227478, -0.10679410398006439, -0.2978190779685974, -0.2578641474246979, -0.13326027989387512, 0.23794488608837128, 0.04224097356200218, -0.24685519933700562, 0.30924859642982483, 0.15758125483989716, -0.07737883925437927, -0.12390678375959396, -0.3683101534843445, 0.29479050636291504, -0.0748891606926918, -0.12287367880344391, -0.1479150652885437, 0.37468141317367554, 0.21026819944381714, 0.1874494105577469, 0.2699615955352783, 0.3120207190513611, 0.2520717978477478, 0.26078516244888306, 0.20105968415737152, -0.007366162724792957, -0.07388874143362045, -0.1683795303106308, -0.17595255374908447, 0.37376534938812256, -0.059383995831012726, 0.2759178876876831, 0.43145230412483215, 0.2211725115776062, -0.11549950391054153, 0.1744358241558075, 0.3714359998703003, 0.16614533960819244, -0.08796697854995728, 0.38989007472991943, 0.18869303166866302, -0.31387603282928467, -0.04145986959338188, 0.005102332681417465, -0.15924060344696045, -0.054046228528022766, 0.21774844825267792, -0.037645019590854645, 0.19379009306430817, -0.10734564810991287, 0.10812760889530182, 0.14770975708961487, 0.49788427352905273, 0.18482424318790436, 0.1234954223036766, -0.2428186982870102, -0.10842754691839218, -0.6254067420959473, 0.1170109361410141, 0.1362062245607376, 0.18601718544960022, -0.06352321803569794, 0.10006356239318848, 0.08006658405065536, -0.1812436431646347, 0.07984555512666702, 0.3649944067001343, -0.14531797170639038, -0.2825430631637573, -0.26284852623939514, -0.08441394567489624, 0.12341633439064026, 0.01651078090071678, 0.048934854567050934, -0.5115612149238586, 0.37345871329307556, -0.09413030743598938, 0.11550095677375793, -0.07785019278526306, -0.19899633526802063, 0.017890244722366333, 0.0077756596729159355, 0.33201923966407776, 0.0812840387225151, 0.23753094673156738, -0.2387554943561554, -0.13716267049312592, -0.1954451948404312, -0.05556774139404297, 0.10713200271129608, 0.23659874498844147, 0.3101714253425598, 0.3238532841205597, 0.010980837978422642, 0.16063547134399414, -0.020401323214173317, 0.31483733654022217, 0.07653393596410751, 0.023601192981004715, 0.04573540389537811, 0.11497294157743454, 0.18491606414318085, 0.035486988723278046, 0.08507240563631058, 0.2513614594936371, -0.11513634026050568, 0.08136872947216034, -0.3011856973171234, -0.312756210565567, 0.3311196267604828, -0.06244906410574913, -0.1658387929201126, -0.21056702733039856, 0.265414834022522, 0.0881434753537178, -0.2846198081970215, -0.45565178990364075, 0.0551510751247406, 0.32819557189941406, -0.10202915966510773, -0.2109822779893875, 0.23304255306720734, 0.13405492901802063, 0.38657501339912415, -0.015461924485862255, 0.5186057090759277, 0.1434665471315384, -0.1999407559633255, -0.14741471409797668, -0.08678431063890457 ]
https://github.com/huggingface/datasets/issues/2267
DatasetDict save load Failing test in 1.6 not in 1.5
My current workaround is to remove the idx feature: ``` from datasets import load_dataset, DatasetDict, Value ds = load_dataset('super_glue', 'multirc') ds = ds.remove_columns('idx') ds.save_to_disk('tempds') ds = DatasetDict.load_from_disk('tempds') ``` works.
## Describe the bug We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema. Downgrading to `>1.6` -- fixes the problem. ## Steps to reproduce the bug ```python ### Load a dataset dict from jsonl path = '/test/foo' ds_dict.save_to_disk(path) ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6 ``` ## Expected results Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk. ## Actual results ``` # Infer features if None inferred_features = Features.from_arrow_schema(arrow_table.schema) if self.info.features is None: self.info.features = inferred_features # Infer fingerprint if None if self._fingerprint is None: self._fingerprint = generate_fingerprint(self) # Sanity checks assert self.features is not None, "Features can't be None in a Dataset object" assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object" if self.info.features.type != inferred_features.type: > raise ValueError( "External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format( self.info.features, self.info.features.type, inferred_features, inferred_features.type ) ) E ValueError: External features info don't match the dataset: E Got E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>> E E but expected something like E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>> ../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError ``` ## Versions - Datasets: 1.6.1 - Python: 3.8.5 (default, Jan 26 2021, 10:01:04) [Clang 12.0.0 (clang-1200.0.32.2)] - Platform: macOS-10.15.7-x86_64-i386-64bit ```
29
DatasetDict save load Failing test in 1.6 not in 1.5
[ -0.34518587589263916, 0.28418219089508057, -0.16639521718025208, 0.17386959493160248, 0.0921330451965332, -0.1542891412973404, 0.15528661012649536, 0.2898305058479309, 0.3556036949157715, 0.2503882944583893, 0.039753325283527374, 0.06044868752360344, 0.09538903832435608, 0.10385292023420334, -0.10662282258272171, 0.038110390305519104, -0.0291292741894722, 0.2998535931110382, -0.08182042837142944, 0.02487100660800934, -0.04510075971484184, 0.32712745666503906, -0.2637854516506195, -0.06382671743631363, -0.3456059694290161, 0.045517951250076294, -0.12523072957992554, 0.3174963593482971, -0.2657192051410675, -0.432526171207428, 0.3483031690120697, 0.5525068640708923, 0.21659491956233978, 0.32255077362060547, -0.00011123063450213522, 0.11306039243936539, 0.2755197286605835, -0.11410808563232422, -0.4877399206161499, -0.09834421426057816, -0.19327615201473236, 0.013389483094215393, 0.08067332953214645, -0.10992953181266785, 0.07479210942983627, 0.01667732745409012, 0.15254351496696472, -0.5130739808082581, 0.20094916224479675, 0.3443712294101715, 0.2443404644727707, 0.23871931433677673, 0.025197990238666534, -0.2866699695587158, 0.012523764744400978, 0.061186663806438446, 0.060656365007162094, 0.3832484483718872, 0.022682934999465942, -0.0864633247256279, -0.1469072550535202, 0.17837101221084595, 0.0814947709441185, 0.020270613953471184, -0.15970498323440552, -0.06962081789970398, -0.20232047140598297, 0.018807396292686462, 0.33255431056022644, 0.07844903320074081, 0.5725772976875305, -0.287529855966568, -0.29133784770965576, 0.11454769223928452, -0.03965004161000252, 0.0683179423213005, 0.43765610456466675, -0.20665279030799866, 0.18318915367126465, 0.2873144745826721, -0.07034531980752945, -0.3320816457271576, -0.25153300166130066, -0.11481912434101105, -0.1372309774160385, -0.2956993281841278, -0.21560679376125336, -0.04806062951683998, 0.006497299298644066, -0.06580924242734909, 0.32560694217681885, -0.1638869196176529, -0.3286060392856598, -0.3052196502685547, -0.061493635177612305, -0.05775083974003792, 0.10568871349096298, -0.0344143807888031, 0.21947069466114044, -0.282830148935318, 0.2938547134399414, 0.3892403244972229, 0.025660889223217964, -0.0750008150935173, 0.15472522377967834, 0.25570282340049744, 0.7795231938362122, 0.23322606086730957, 0.3502488136291504, 0.0665542483329773, -0.38498950004577637, 0.0873357355594635, 0.021141324192285538, -0.2964290678501129, 0.14743199944496155, -0.1981067806482315, 0.32940027117729187, -0.4378911554813385, -0.35795772075653076, 0.24833883345127106, 0.006672429386526346, -0.20555619895458221, 0.023019690066576004, 0.531091570854187, 0.07139801979064941, 0.08862586319446564, 0.16571278870105743, 0.1263970583677292, -0.08457830548286438, -0.22754152119159698, -0.3739204704761505, -0.017480678856372833, 0.17924663424491882, 0.0311599001288414, 0.43984395265579224, -0.19352978467941284, 0.2047204226255417, -0.1791457235813141, -0.33253052830696106, -0.11022814363241196, 0.08805171400308609, -0.11368019878864288, 0.2856742739677429, 0.20242029428482056, 0.02561291866004467, -0.027624106034636497, 0.0503418929874897, -0.048664338886737823, -0.003431766526773572, 0.20600023865699768, 0.144146129488945, -0.14547210931777954, 0.24195674061775208, 0.2636832296848297, -0.03565448522567749, -0.2700878381729126, 0.03142727166414261, 0.09233338385820389, 0.13549752533435822, -0.10825291275978088, -0.11845791339874268, -0.13633137941360474, -0.3224636912345886, -0.05808531120419502, 0.09590811282396317, 0.6017868518829346, -0.4415247440338135, 0.07339123636484146, 0.029589436948299408, -0.26935091614723206, 0.1250646710395813, -0.09178756922483444, 0.04040168598294258, 0.1107797622680664, -0.06695525348186493, 0.06165805831551552, 0.6244156360626221, -0.39438194036483765, -0.6770493388175964, 0.2893062233924866, 0.08277283608913422, -0.14883777499198914, -0.1018754094839096, -0.11891746520996094, 0.10686099529266357, 0.015359053388237953, 0.1308913230895996, 0.04758436605334282, 0.23260007798671722, 0.15887680649757385, -0.4434272348880768, -0.08819997310638428, 0.06811922043561935, 0.0964701920747757, 0.052061114460229874, -0.005942266434431076, 0.21432475745677948, -0.10952194780111313, 0.2350044548511505, -0.16505922377109528, -0.08886078745126724, 0.19270457327365875, 0.08890830725431442, -0.21162734925746918, 0.10737694054841995, -0.09072533994913101, -0.45727089047431946, 0.22862084209918976, -0.14334852993488312, -0.15274013578891754, 0.2376396656036377, -0.054223377257585526, -0.4445798993110657, 0.11434279382228851, -0.33945906162261963, 0.026661718264222145, 0.1485225409269333, 0.22131282091140747, -0.16746555268764496, 0.14665748178958893, -0.006623183377087116, 0.31315669417381287, -0.47484463453292847, -0.03251715004444122, 0.04414326697587967, 0.14058798551559448, -0.07723124325275421, -0.2733883261680603, 0.17191056907176971, -0.09942622482776642, 0.21093258261680603, -0.17352138459682465, -0.2467106133699417, 0.45284825563430786, 0.10049991309642792, -0.11579401046037674, 0.040420569479465485, -0.44160595536231995, -0.06147918850183487, -0.00304860295727849, 0.08845268934965134, 0.02172047086060047, 0.05458928644657135, 0.04408599063754082, -0.4821866750717163, 0.2788596749305725, -0.03809772804379463, -0.17944495379924774, 0.20460732281208038, -0.05076959356665611, 0.32036733627319336, -0.08619681000709534, 0.1784723848104477, -0.4681572914123535, 0.14112627506256104, -0.1362757831811905, 0.3092504143714905, 0.009044468402862549, -0.07635831087827682, 0.0905630812048912, 0.3824212849140167, 0.1360924392938614, 0.3182583451271057, 0.025322573259472847, 0.11365308612585068, -0.36556950211524963, -0.028386401012539864, 0.3083004653453827, 0.5906157493591309, 0.12681864202022552, 0.15727625787258148, -0.18829937279224396, -0.0185249000787735, -0.2195124328136444, 0.1217828020453453, -0.06974595785140991, -0.0008376146433874965, 0.1470131278038025, 0.2730500102043152, -0.1523767113685608, -0.5941970348358154, 0.013547212816774845, 0.08076898753643036, 0.0368187353014946, -0.2984195947647095, -0.09071435034275055, -0.20555272698402405, 0.28018486499786377, 0.020886044949293137, -0.22382789850234985, 0.09934008121490479, -0.3412381112575531, -0.01579074189066887, 0.249556303024292, 0.02238987199962139, 0.05936034768819809, -0.10816647857427597, 0.3073645830154419, 0.08877868205308914, -0.19888871908187866, -0.12088551372289658, -0.05461728945374489, -0.22214557230472565, 0.026340823620557785, -0.1085781678557396, 0.25002312660217285, 0.2363123893737793, -0.28667378425598145, -0.16766533255577087, -0.32845816016197205, -0.18948394060134888, 0.25377440452575684, 0.12494515627622604, -0.014535403810441494, 0.2072973996400833, 0.029306791722774506, 0.06216936185956001, 0.21922798454761505, 0.07496503740549088, -0.25692272186279297, -0.19651058316230774, 0.03281654790043831, 0.1903228759765625, -0.28242379426956177, -0.08887254446744919, -0.5019420385360718, -0.25811049342155457, -0.3685329854488373, 0.16034866869449615, -0.06770233064889908, 0.037878941744565964, -0.12107130885124207, 0.13634631037712097, 0.23571884632110596, -0.013351443223655224, 0.24947069585323334, -0.25352942943573, -0.23017701506614685, 0.04855255410075188, -0.2527899742126465, -0.6226625442504883, 0.06866574287414551, 0.14764311909675598, 0.20388223230838776, 0.24202491343021393, -0.36595478653907776, 0.06747987866401672, -0.21421387791633606, 0.34510430693626404, 0.1659756302833557, -0.058456238359212875, 0.5369576811790466, 0.09924907237291336, -0.09071332216262817, -0.23427914083003998, -0.20789356529712677, 0.2121218591928482, -0.02410462312400341, 0.06196729093790054, -0.413063645362854, 0.31635910272598267, -0.40159010887145996, 0.3782574236392975, 0.05443768575787544, -0.22787673771381378, 0.3395465314388275, 0.02108377404510975, 0.5244690775871277, -0.4081428050994873, -0.18640072643756866, 0.010440883226692677, -0.00761593971401453, 0.09643175452947617, 0.06770709902048111, -0.08208712935447693, 0.19479604065418243, -0.15513266623020172, -0.47895562648773193, -0.029190998524427414, -0.2794170081615448, -0.2137630581855774, -0.2859538495540619, 0.2666299343109131, 0.26304030418395996, 0.2900567948818207, -0.037344787269830704, 0.17580735683441162, -0.015013184398412704, 0.23642770946025848, 0.16268616914749146, -0.230299711227417, -0.4097802937030792, 0.46584948897361755, -0.40434730052948, 0.19665668904781342, -0.1186879575252533, 0.7131256461143494, -0.13084422051906586, -0.06993076205253601, 0.03478449210524559, -0.1806757152080536, 0.5430808067321777, -0.1419031322002411, 0.2100410908460617, 0.13290700316429138, -0.22273816168308258, -0.36782434582710266, 0.16555117070674896, -0.028796570375561714, 0.21645136177539825, -0.02986576221883297, 0.17657960951328278, -0.08817002177238464, -0.23556560277938843, 0.3038369119167328, 0.1553979068994522, -0.1797025501728058, -0.2773635685443878, -0.35146093368530273, -0.14931556582450867, -0.3016038239002228, -0.15374581515789032, -0.16022120416164398, 0.02032378315925598, -0.24533359706401825, -0.11175782978534698, -0.5205555558204651, -0.23189648985862732, 0.16447009146213531, 0.27032744884490967, 0.2830536365509033, -0.18669040501117706, 0.23402513563632965, 0.3199097216129303, 0.00024369738821405917, 0.25369977951049805, 0.3334802985191345, -0.2407834380865097, -0.24154727160930634, 0.2684885859489441, -0.14309878647327423, 0.0198737233877182, 0.18572239577770233, -0.24012111127376556, -0.39781424403190613, 0.203144371509552, -0.28223592042922974, -0.06540198624134064, 0.3855573236942291, 0.06160752847790718, 0.11918158084154129, -0.3213045597076416, -0.2223099023103714, 0.2760690748691559, -0.0360388457775116, -0.1941508650779724, 0.48328694701194763, -0.02458912506699562, -0.20195826888084412, 0.38919761776924133, -0.19353149831295013, 0.385487824678421, -0.057189732789993286, 0.22192375361919403, 0.21232812106609344, -0.31282591819763184, -0.057965610176324844, 0.4960169196128845, 0.05744941160082817, -0.5225237011909485, -0.4563314914703369, 0.0861956775188446, 0.0014626462943851948, 0.06383977085351944, 0.0185176320374012, -0.30575990676879883, 0.09605217725038528, 0.33515289425849915, -0.2860987186431885, 0.04389377310872078, 0.422437459230423, -0.22662946581840515, 0.025779923424124718, -0.22349382936954498, 0.2079620063304901, 0.1955544352531433, 0.1284918636083603, -0.12282311171293259, 0.05348458141088486, 0.12260441482067108, -0.28215789794921875, 0.1061420813202858, 0.26949799060821533, 0.004221914801746607, 0.4852985441684723, 0.19003494083881378, -0.30944040417671204, 0.17752490937709808, 0.15717095136642456, 0.4198122024536133, 0.14952360093593597, -0.1358947902917862, 0.19384931027889252, -0.20625409483909607, -0.041769735515117645, 0.11989764869213104, 0.011623221449553967, 0.2412334531545639, -0.014592696912586689, -0.27427035570144653, -0.07236229628324509, -0.22272257506847382, -0.18957310914993286, -0.1488478034734726, 0.09581635147333145, 0.08172333240509033, -0.5123041868209839, -0.26963019371032715, -0.17761674523353577, -0.205534428358078, -0.36334148049354553, 0.16727778315544128, 0.12409934401512146, 0.2679731249809265, 0.2621806263923645, 0.017388584092259407, -0.41277602314949036, -0.12695631384849548, 0.7278018593788147, -0.13751190900802612, -0.13632726669311523, 0.5741074681282043, -0.040023576468229294, -0.02810707315802574, -0.3943212628364563, -0.03061063215136528, 0.1681080162525177, -0.04769181087613106, 0.46193328499794006, -0.1728387326002121, -0.3020223379135132, 0.19585222005844116, 0.6177655458450317, -0.06816518306732178, -0.09080057591199875, 0.05460190773010254, -0.24305713176727295, -0.5445145964622498, -0.10406842082738876, 0.11840040236711502, 0.368209570646286, 0.21104787290096283, -0.12529665231704712, 0.05691170692443848, 0.05635767802596092, -0.33547958731651306, -0.07519012689590454, 0.10778027027845383, -0.054270803928375244, 0.011126670055091381, -0.06433359533548355, 0.13411635160446167, -0.20588892698287964, 0.1692872792482376, 0.10729259997606277, 0.08444757014513016, -0.23011372983455658, -0.12719187140464783, 0.1429697573184967, -0.0656975582242012, 0.2890632450580597, -0.16601094603538513, -0.25218573212623596, -0.01864970661699772, -0.093352310359478, 0.16255232691764832, 0.18213485181331635, -0.12501682341098785, 0.16982504725456238, 0.10010821372270584, 0.18671219050884247, 0.11861974000930786, 0.12041684985160828, -0.08717860281467438, 0.009589191526174545, -0.04146284982562065, 0.07970236241817474, -0.24769537150859833, -0.21774767339229584, 0.10389374941587448, -0.01924973540008068, 0.19150979816913605, 0.07616406679153442, -0.06274285167455673, -0.2495279312133789, -0.2833045423030853, 0.0870196521282196, 0.20384062826633453, 0.5142171382904053, -0.22671622037887573, -0.3069676160812378, -0.08119795471429825, 0.22254230082035065, -0.168095201253891, -0.1717025190591812, 0.2552044093608856, -0.014284470118582249, 0.15913088619709015, -0.014953368343412876, -0.27802759408950806, -0.3455246388912201, -0.023653699085116386, 0.41616061329841614, 0.42546096444129944, -0.28578096628189087, 0.024384446442127228, -0.15042942762374878, -0.1395220160484314, 0.09832412749528885, 0.5201716423034668, 0.09720741212368011, 0.08304032683372498, 0.37292882800102234, 0.07045695185661316, 0.43944430351257324, -0.1150888130068779, 0.4169316291809082, -0.10897258669137955, -0.22866635024547577, 0.2659083902835846, 0.06732025742530823, -0.1542167365550995, 0.043602846562862396, 0.1608523577451706, 0.049189358949661255, -0.3993607461452484, 0.016323426738381386, -0.2150762528181076, -0.2049526572227478, -0.10679410398006439, -0.2978190779685974, -0.2578641474246979, -0.13326027989387512, 0.23794488608837128, 0.04224097356200218, -0.24685519933700562, 0.30924859642982483, 0.15758125483989716, -0.07737883925437927, -0.12390678375959396, -0.3683101534843445, 0.29479050636291504, -0.0748891606926918, -0.12287367880344391, -0.1479150652885437, 0.37468141317367554, 0.21026819944381714, 0.1874494105577469, 0.2699615955352783, 0.3120207190513611, 0.2520717978477478, 0.26078516244888306, 0.20105968415737152, -0.007366162724792957, -0.07388874143362045, -0.1683795303106308, -0.17595255374908447, 0.37376534938812256, -0.059383995831012726, 0.2759178876876831, 0.43145230412483215, 0.2211725115776062, -0.11549950391054153, 0.1744358241558075, 0.3714359998703003, 0.16614533960819244, -0.08796697854995728, 0.38989007472991943, 0.18869303166866302, -0.31387603282928467, -0.04145986959338188, 0.005102332681417465, -0.15924060344696045, -0.054046228528022766, 0.21774844825267792, -0.037645019590854645, 0.19379009306430817, -0.10734564810991287, 0.10812760889530182, 0.14770975708961487, 0.49788427352905273, 0.18482424318790436, 0.1234954223036766, -0.2428186982870102, -0.10842754691839218, -0.6254067420959473, 0.1170109361410141, 0.1362062245607376, 0.18601718544960022, -0.06352321803569794, 0.10006356239318848, 0.08006658405065536, -0.1812436431646347, 0.07984555512666702, 0.3649944067001343, -0.14531797170639038, -0.2825430631637573, -0.26284852623939514, -0.08441394567489624, 0.12341633439064026, 0.01651078090071678, 0.048934854567050934, -0.5115612149238586, 0.37345871329307556, -0.09413030743598938, 0.11550095677375793, -0.07785019278526306, -0.19899633526802063, 0.017890244722366333, 0.0077756596729159355, 0.33201923966407776, 0.0812840387225151, 0.23753094673156738, -0.2387554943561554, -0.13716267049312592, -0.1954451948404312, -0.05556774139404297, 0.10713200271129608, 0.23659874498844147, 0.3101714253425598, 0.3238532841205597, 0.010980837978422642, 0.16063547134399414, -0.020401323214173317, 0.31483733654022217, 0.07653393596410751, 0.023601192981004715, 0.04573540389537811, 0.11497294157743454, 0.18491606414318085, 0.035486988723278046, 0.08507240563631058, 0.2513614594936371, -0.11513634026050568, 0.08136872947216034, -0.3011856973171234, -0.312756210565567, 0.3311196267604828, -0.06244906410574913, -0.1658387929201126, -0.21056702733039856, 0.265414834022522, 0.0881434753537178, -0.2846198081970215, -0.45565178990364075, 0.0551510751247406, 0.32819557189941406, -0.10202915966510773, -0.2109822779893875, 0.23304255306720734, 0.13405492901802063, 0.38657501339912415, -0.015461924485862255, 0.5186057090759277, 0.1434665471315384, -0.1999407559633255, -0.14741471409797668, -0.08678431063890457 ]
https://github.com/huggingface/datasets/issues/2267
DatasetDict save load Failing test in 1.6 not in 1.5
It looks like this issue comes from the order of the fields in the 'idx' struct that is different for some reason. I'm looking into it. Note that as a workaround you can also flatten the nested features with `ds = ds.flatten()`
## Describe the bug We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema. Downgrading to `>1.6` -- fixes the problem. ## Steps to reproduce the bug ```python ### Load a dataset dict from jsonl path = '/test/foo' ds_dict.save_to_disk(path) ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6 ``` ## Expected results Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk. ## Actual results ``` # Infer features if None inferred_features = Features.from_arrow_schema(arrow_table.schema) if self.info.features is None: self.info.features = inferred_features # Infer fingerprint if None if self._fingerprint is None: self._fingerprint = generate_fingerprint(self) # Sanity checks assert self.features is not None, "Features can't be None in a Dataset object" assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object" if self.info.features.type != inferred_features.type: > raise ValueError( "External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format( self.info.features, self.info.features.type, inferred_features, inferred_features.type ) ) E ValueError: External features info don't match the dataset: E Got E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>> E E but expected something like E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>> ../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError ``` ## Versions - Datasets: 1.6.1 - Python: 3.8.5 (default, Jan 26 2021, 10:01:04) [Clang 12.0.0 (clang-1200.0.32.2)] - Platform: macOS-10.15.7-x86_64-i386-64bit ```
42
DatasetDict save load Failing test in 1.6 not in 1.5
[ -0.34518587589263916, 0.28418219089508057, -0.16639521718025208, 0.17386959493160248, 0.0921330451965332, -0.1542891412973404, 0.15528661012649536, 0.2898305058479309, 0.3556036949157715, 0.2503882944583893, 0.039753325283527374, 0.06044868752360344, 0.09538903832435608, 0.10385292023420334, -0.10662282258272171, 0.038110390305519104, -0.0291292741894722, 0.2998535931110382, -0.08182042837142944, 0.02487100660800934, -0.04510075971484184, 0.32712745666503906, -0.2637854516506195, -0.06382671743631363, -0.3456059694290161, 0.045517951250076294, -0.12523072957992554, 0.3174963593482971, -0.2657192051410675, -0.432526171207428, 0.3483031690120697, 0.5525068640708923, 0.21659491956233978, 0.32255077362060547, -0.00011123063450213522, 0.11306039243936539, 0.2755197286605835, -0.11410808563232422, -0.4877399206161499, -0.09834421426057816, -0.19327615201473236, 0.013389483094215393, 0.08067332953214645, -0.10992953181266785, 0.07479210942983627, 0.01667732745409012, 0.15254351496696472, -0.5130739808082581, 0.20094916224479675, 0.3443712294101715, 0.2443404644727707, 0.23871931433677673, 0.025197990238666534, -0.2866699695587158, 0.012523764744400978, 0.061186663806438446, 0.060656365007162094, 0.3832484483718872, 0.022682934999465942, -0.0864633247256279, -0.1469072550535202, 0.17837101221084595, 0.0814947709441185, 0.020270613953471184, -0.15970498323440552, -0.06962081789970398, -0.20232047140598297, 0.018807396292686462, 0.33255431056022644, 0.07844903320074081, 0.5725772976875305, -0.287529855966568, -0.29133784770965576, 0.11454769223928452, -0.03965004161000252, 0.0683179423213005, 0.43765610456466675, -0.20665279030799866, 0.18318915367126465, 0.2873144745826721, -0.07034531980752945, -0.3320816457271576, -0.25153300166130066, -0.11481912434101105, -0.1372309774160385, -0.2956993281841278, -0.21560679376125336, -0.04806062951683998, 0.006497299298644066, -0.06580924242734909, 0.32560694217681885, -0.1638869196176529, -0.3286060392856598, -0.3052196502685547, -0.061493635177612305, -0.05775083974003792, 0.10568871349096298, -0.0344143807888031, 0.21947069466114044, -0.282830148935318, 0.2938547134399414, 0.3892403244972229, 0.025660889223217964, -0.0750008150935173, 0.15472522377967834, 0.25570282340049744, 0.7795231938362122, 0.23322606086730957, 0.3502488136291504, 0.0665542483329773, -0.38498950004577637, 0.0873357355594635, 0.021141324192285538, -0.2964290678501129, 0.14743199944496155, -0.1981067806482315, 0.32940027117729187, -0.4378911554813385, -0.35795772075653076, 0.24833883345127106, 0.006672429386526346, -0.20555619895458221, 0.023019690066576004, 0.531091570854187, 0.07139801979064941, 0.08862586319446564, 0.16571278870105743, 0.1263970583677292, -0.08457830548286438, -0.22754152119159698, -0.3739204704761505, -0.017480678856372833, 0.17924663424491882, 0.0311599001288414, 0.43984395265579224, -0.19352978467941284, 0.2047204226255417, -0.1791457235813141, -0.33253052830696106, -0.11022814363241196, 0.08805171400308609, -0.11368019878864288, 0.2856742739677429, 0.20242029428482056, 0.02561291866004467, -0.027624106034636497, 0.0503418929874897, -0.048664338886737823, -0.003431766526773572, 0.20600023865699768, 0.144146129488945, -0.14547210931777954, 0.24195674061775208, 0.2636832296848297, -0.03565448522567749, -0.2700878381729126, 0.03142727166414261, 0.09233338385820389, 0.13549752533435822, -0.10825291275978088, -0.11845791339874268, -0.13633137941360474, -0.3224636912345886, -0.05808531120419502, 0.09590811282396317, 0.6017868518829346, -0.4415247440338135, 0.07339123636484146, 0.029589436948299408, -0.26935091614723206, 0.1250646710395813, -0.09178756922483444, 0.04040168598294258, 0.1107797622680664, -0.06695525348186493, 0.06165805831551552, 0.6244156360626221, -0.39438194036483765, -0.6770493388175964, 0.2893062233924866, 0.08277283608913422, -0.14883777499198914, -0.1018754094839096, -0.11891746520996094, 0.10686099529266357, 0.015359053388237953, 0.1308913230895996, 0.04758436605334282, 0.23260007798671722, 0.15887680649757385, -0.4434272348880768, -0.08819997310638428, 0.06811922043561935, 0.0964701920747757, 0.052061114460229874, -0.005942266434431076, 0.21432475745677948, -0.10952194780111313, 0.2350044548511505, -0.16505922377109528, -0.08886078745126724, 0.19270457327365875, 0.08890830725431442, -0.21162734925746918, 0.10737694054841995, -0.09072533994913101, -0.45727089047431946, 0.22862084209918976, -0.14334852993488312, -0.15274013578891754, 0.2376396656036377, -0.054223377257585526, -0.4445798993110657, 0.11434279382228851, -0.33945906162261963, 0.026661718264222145, 0.1485225409269333, 0.22131282091140747, -0.16746555268764496, 0.14665748178958893, -0.006623183377087116, 0.31315669417381287, -0.47484463453292847, -0.03251715004444122, 0.04414326697587967, 0.14058798551559448, -0.07723124325275421, -0.2733883261680603, 0.17191056907176971, -0.09942622482776642, 0.21093258261680603, -0.17352138459682465, -0.2467106133699417, 0.45284825563430786, 0.10049991309642792, -0.11579401046037674, 0.040420569479465485, -0.44160595536231995, -0.06147918850183487, -0.00304860295727849, 0.08845268934965134, 0.02172047086060047, 0.05458928644657135, 0.04408599063754082, -0.4821866750717163, 0.2788596749305725, -0.03809772804379463, -0.17944495379924774, 0.20460732281208038, -0.05076959356665611, 0.32036733627319336, -0.08619681000709534, 0.1784723848104477, -0.4681572914123535, 0.14112627506256104, -0.1362757831811905, 0.3092504143714905, 0.009044468402862549, -0.07635831087827682, 0.0905630812048912, 0.3824212849140167, 0.1360924392938614, 0.3182583451271057, 0.025322573259472847, 0.11365308612585068, -0.36556950211524963, -0.028386401012539864, 0.3083004653453827, 0.5906157493591309, 0.12681864202022552, 0.15727625787258148, -0.18829937279224396, -0.0185249000787735, -0.2195124328136444, 0.1217828020453453, -0.06974595785140991, -0.0008376146433874965, 0.1470131278038025, 0.2730500102043152, -0.1523767113685608, -0.5941970348358154, 0.013547212816774845, 0.08076898753643036, 0.0368187353014946, -0.2984195947647095, -0.09071435034275055, -0.20555272698402405, 0.28018486499786377, 0.020886044949293137, -0.22382789850234985, 0.09934008121490479, -0.3412381112575531, -0.01579074189066887, 0.249556303024292, 0.02238987199962139, 0.05936034768819809, -0.10816647857427597, 0.3073645830154419, 0.08877868205308914, -0.19888871908187866, -0.12088551372289658, -0.05461728945374489, -0.22214557230472565, 0.026340823620557785, -0.1085781678557396, 0.25002312660217285, 0.2363123893737793, -0.28667378425598145, -0.16766533255577087, -0.32845816016197205, -0.18948394060134888, 0.25377440452575684, 0.12494515627622604, -0.014535403810441494, 0.2072973996400833, 0.029306791722774506, 0.06216936185956001, 0.21922798454761505, 0.07496503740549088, -0.25692272186279297, -0.19651058316230774, 0.03281654790043831, 0.1903228759765625, -0.28242379426956177, -0.08887254446744919, -0.5019420385360718, -0.25811049342155457, -0.3685329854488373, 0.16034866869449615, -0.06770233064889908, 0.037878941744565964, -0.12107130885124207, 0.13634631037712097, 0.23571884632110596, -0.013351443223655224, 0.24947069585323334, -0.25352942943573, -0.23017701506614685, 0.04855255410075188, -0.2527899742126465, -0.6226625442504883, 0.06866574287414551, 0.14764311909675598, 0.20388223230838776, 0.24202491343021393, -0.36595478653907776, 0.06747987866401672, -0.21421387791633606, 0.34510430693626404, 0.1659756302833557, -0.058456238359212875, 0.5369576811790466, 0.09924907237291336, -0.09071332216262817, -0.23427914083003998, -0.20789356529712677, 0.2121218591928482, -0.02410462312400341, 0.06196729093790054, -0.413063645362854, 0.31635910272598267, -0.40159010887145996, 0.3782574236392975, 0.05443768575787544, -0.22787673771381378, 0.3395465314388275, 0.02108377404510975, 0.5244690775871277, -0.4081428050994873, -0.18640072643756866, 0.010440883226692677, -0.00761593971401453, 0.09643175452947617, 0.06770709902048111, -0.08208712935447693, 0.19479604065418243, -0.15513266623020172, -0.47895562648773193, -0.029190998524427414, -0.2794170081615448, -0.2137630581855774, -0.2859538495540619, 0.2666299343109131, 0.26304030418395996, 0.2900567948818207, -0.037344787269830704, 0.17580735683441162, -0.015013184398412704, 0.23642770946025848, 0.16268616914749146, -0.230299711227417, -0.4097802937030792, 0.46584948897361755, -0.40434730052948, 0.19665668904781342, -0.1186879575252533, 0.7131256461143494, -0.13084422051906586, -0.06993076205253601, 0.03478449210524559, -0.1806757152080536, 0.5430808067321777, -0.1419031322002411, 0.2100410908460617, 0.13290700316429138, -0.22273816168308258, -0.36782434582710266, 0.16555117070674896, -0.028796570375561714, 0.21645136177539825, -0.02986576221883297, 0.17657960951328278, -0.08817002177238464, -0.23556560277938843, 0.3038369119167328, 0.1553979068994522, -0.1797025501728058, -0.2773635685443878, -0.35146093368530273, -0.14931556582450867, -0.3016038239002228, -0.15374581515789032, -0.16022120416164398, 0.02032378315925598, -0.24533359706401825, -0.11175782978534698, -0.5205555558204651, -0.23189648985862732, 0.16447009146213531, 0.27032744884490967, 0.2830536365509033, -0.18669040501117706, 0.23402513563632965, 0.3199097216129303, 0.00024369738821405917, 0.25369977951049805, 0.3334802985191345, -0.2407834380865097, -0.24154727160930634, 0.2684885859489441, -0.14309878647327423, 0.0198737233877182, 0.18572239577770233, -0.24012111127376556, -0.39781424403190613, 0.203144371509552, -0.28223592042922974, -0.06540198624134064, 0.3855573236942291, 0.06160752847790718, 0.11918158084154129, -0.3213045597076416, -0.2223099023103714, 0.2760690748691559, -0.0360388457775116, -0.1941508650779724, 0.48328694701194763, -0.02458912506699562, -0.20195826888084412, 0.38919761776924133, -0.19353149831295013, 0.385487824678421, -0.057189732789993286, 0.22192375361919403, 0.21232812106609344, -0.31282591819763184, -0.057965610176324844, 0.4960169196128845, 0.05744941160082817, -0.5225237011909485, -0.4563314914703369, 0.0861956775188446, 0.0014626462943851948, 0.06383977085351944, 0.0185176320374012, -0.30575990676879883, 0.09605217725038528, 0.33515289425849915, -0.2860987186431885, 0.04389377310872078, 0.422437459230423, -0.22662946581840515, 0.025779923424124718, -0.22349382936954498, 0.2079620063304901, 0.1955544352531433, 0.1284918636083603, -0.12282311171293259, 0.05348458141088486, 0.12260441482067108, -0.28215789794921875, 0.1061420813202858, 0.26949799060821533, 0.004221914801746607, 0.4852985441684723, 0.19003494083881378, -0.30944040417671204, 0.17752490937709808, 0.15717095136642456, 0.4198122024536133, 0.14952360093593597, -0.1358947902917862, 0.19384931027889252, -0.20625409483909607, -0.041769735515117645, 0.11989764869213104, 0.011623221449553967, 0.2412334531545639, -0.014592696912586689, -0.27427035570144653, -0.07236229628324509, -0.22272257506847382, -0.18957310914993286, -0.1488478034734726, 0.09581635147333145, 0.08172333240509033, -0.5123041868209839, -0.26963019371032715, -0.17761674523353577, -0.205534428358078, -0.36334148049354553, 0.16727778315544128, 0.12409934401512146, 0.2679731249809265, 0.2621806263923645, 0.017388584092259407, -0.41277602314949036, -0.12695631384849548, 0.7278018593788147, -0.13751190900802612, -0.13632726669311523, 0.5741074681282043, -0.040023576468229294, -0.02810707315802574, -0.3943212628364563, -0.03061063215136528, 0.1681080162525177, -0.04769181087613106, 0.46193328499794006, -0.1728387326002121, -0.3020223379135132, 0.19585222005844116, 0.6177655458450317, -0.06816518306732178, -0.09080057591199875, 0.05460190773010254, -0.24305713176727295, -0.5445145964622498, -0.10406842082738876, 0.11840040236711502, 0.368209570646286, 0.21104787290096283, -0.12529665231704712, 0.05691170692443848, 0.05635767802596092, -0.33547958731651306, -0.07519012689590454, 0.10778027027845383, -0.054270803928375244, 0.011126670055091381, -0.06433359533548355, 0.13411635160446167, -0.20588892698287964, 0.1692872792482376, 0.10729259997606277, 0.08444757014513016, -0.23011372983455658, -0.12719187140464783, 0.1429697573184967, -0.0656975582242012, 0.2890632450580597, -0.16601094603538513, -0.25218573212623596, -0.01864970661699772, -0.093352310359478, 0.16255232691764832, 0.18213485181331635, -0.12501682341098785, 0.16982504725456238, 0.10010821372270584, 0.18671219050884247, 0.11861974000930786, 0.12041684985160828, -0.08717860281467438, 0.009589191526174545, -0.04146284982562065, 0.07970236241817474, -0.24769537150859833, -0.21774767339229584, 0.10389374941587448, -0.01924973540008068, 0.19150979816913605, 0.07616406679153442, -0.06274285167455673, -0.2495279312133789, -0.2833045423030853, 0.0870196521282196, 0.20384062826633453, 0.5142171382904053, -0.22671622037887573, -0.3069676160812378, -0.08119795471429825, 0.22254230082035065, -0.168095201253891, -0.1717025190591812, 0.2552044093608856, -0.014284470118582249, 0.15913088619709015, -0.014953368343412876, -0.27802759408950806, -0.3455246388912201, -0.023653699085116386, 0.41616061329841614, 0.42546096444129944, -0.28578096628189087, 0.024384446442127228, -0.15042942762374878, -0.1395220160484314, 0.09832412749528885, 0.5201716423034668, 0.09720741212368011, 0.08304032683372498, 0.37292882800102234, 0.07045695185661316, 0.43944430351257324, -0.1150888130068779, 0.4169316291809082, -0.10897258669137955, -0.22866635024547577, 0.2659083902835846, 0.06732025742530823, -0.1542167365550995, 0.043602846562862396, 0.1608523577451706, 0.049189358949661255, -0.3993607461452484, 0.016323426738381386, -0.2150762528181076, -0.2049526572227478, -0.10679410398006439, -0.2978190779685974, -0.2578641474246979, -0.13326027989387512, 0.23794488608837128, 0.04224097356200218, -0.24685519933700562, 0.30924859642982483, 0.15758125483989716, -0.07737883925437927, -0.12390678375959396, -0.3683101534843445, 0.29479050636291504, -0.0748891606926918, -0.12287367880344391, -0.1479150652885437, 0.37468141317367554, 0.21026819944381714, 0.1874494105577469, 0.2699615955352783, 0.3120207190513611, 0.2520717978477478, 0.26078516244888306, 0.20105968415737152, -0.007366162724792957, -0.07388874143362045, -0.1683795303106308, -0.17595255374908447, 0.37376534938812256, -0.059383995831012726, 0.2759178876876831, 0.43145230412483215, 0.2211725115776062, -0.11549950391054153, 0.1744358241558075, 0.3714359998703003, 0.16614533960819244, -0.08796697854995728, 0.38989007472991943, 0.18869303166866302, -0.31387603282928467, -0.04145986959338188, 0.005102332681417465, -0.15924060344696045, -0.054046228528022766, 0.21774844825267792, -0.037645019590854645, 0.19379009306430817, -0.10734564810991287, 0.10812760889530182, 0.14770975708961487, 0.49788427352905273, 0.18482424318790436, 0.1234954223036766, -0.2428186982870102, -0.10842754691839218, -0.6254067420959473, 0.1170109361410141, 0.1362062245607376, 0.18601718544960022, -0.06352321803569794, 0.10006356239318848, 0.08006658405065536, -0.1812436431646347, 0.07984555512666702, 0.3649944067001343, -0.14531797170639038, -0.2825430631637573, -0.26284852623939514, -0.08441394567489624, 0.12341633439064026, 0.01651078090071678, 0.048934854567050934, -0.5115612149238586, 0.37345871329307556, -0.09413030743598938, 0.11550095677375793, -0.07785019278526306, -0.19899633526802063, 0.017890244722366333, 0.0077756596729159355, 0.33201923966407776, 0.0812840387225151, 0.23753094673156738, -0.2387554943561554, -0.13716267049312592, -0.1954451948404312, -0.05556774139404297, 0.10713200271129608, 0.23659874498844147, 0.3101714253425598, 0.3238532841205597, 0.010980837978422642, 0.16063547134399414, -0.020401323214173317, 0.31483733654022217, 0.07653393596410751, 0.023601192981004715, 0.04573540389537811, 0.11497294157743454, 0.18491606414318085, 0.035486988723278046, 0.08507240563631058, 0.2513614594936371, -0.11513634026050568, 0.08136872947216034, -0.3011856973171234, -0.312756210565567, 0.3311196267604828, -0.06244906410574913, -0.1658387929201126, -0.21056702733039856, 0.265414834022522, 0.0881434753537178, -0.2846198081970215, -0.45565178990364075, 0.0551510751247406, 0.32819557189941406, -0.10202915966510773, -0.2109822779893875, 0.23304255306720734, 0.13405492901802063, 0.38657501339912415, -0.015461924485862255, 0.5186057090759277, 0.1434665471315384, -0.1999407559633255, -0.14741471409797668, -0.08678431063890457 ]
https://github.com/huggingface/datasets/issues/2267
DatasetDict save load Failing test in 1.6 not in 1.5
I just pushed a fix on `master`. We'll do a new release soon ! Thanks for reporting
## Describe the bug We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema. Downgrading to `>1.6` -- fixes the problem. ## Steps to reproduce the bug ```python ### Load a dataset dict from jsonl path = '/test/foo' ds_dict.save_to_disk(path) ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6 ``` ## Expected results Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk. ## Actual results ``` # Infer features if None inferred_features = Features.from_arrow_schema(arrow_table.schema) if self.info.features is None: self.info.features = inferred_features # Infer fingerprint if None if self._fingerprint is None: self._fingerprint = generate_fingerprint(self) # Sanity checks assert self.features is not None, "Features can't be None in a Dataset object" assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object" if self.info.features.type != inferred_features.type: > raise ValueError( "External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format( self.info.features, self.info.features.type, inferred_features, inferred_features.type ) ) E ValueError: External features info don't match the dataset: E Got E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>> E E but expected something like E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]} E with type E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>> ../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError ``` ## Versions - Datasets: 1.6.1 - Python: 3.8.5 (default, Jan 26 2021, 10:01:04) [Clang 12.0.0 (clang-1200.0.32.2)] - Platform: macOS-10.15.7-x86_64-i386-64bit ```
17
DatasetDict save load Failing test in 1.6 not in 1.5
[ -0.34518587589263916, 0.28418219089508057, -0.16639521718025208, 0.17386959493160248, 0.0921330451965332, -0.1542891412973404, 0.15528661012649536, 0.2898305058479309, 0.3556036949157715, 0.2503882944583893, 0.039753325283527374, 0.06044868752360344, 0.09538903832435608, 0.10385292023420334, -0.10662282258272171, 0.038110390305519104, -0.0291292741894722, 0.2998535931110382, -0.08182042837142944, 0.02487100660800934, -0.04510075971484184, 0.32712745666503906, -0.2637854516506195, -0.06382671743631363, -0.3456059694290161, 0.045517951250076294, -0.12523072957992554, 0.3174963593482971, -0.2657192051410675, -0.432526171207428, 0.3483031690120697, 0.5525068640708923, 0.21659491956233978, 0.32255077362060547, -0.00011123063450213522, 0.11306039243936539, 0.2755197286605835, -0.11410808563232422, -0.4877399206161499, -0.09834421426057816, -0.19327615201473236, 0.013389483094215393, 0.08067332953214645, -0.10992953181266785, 0.07479210942983627, 0.01667732745409012, 0.15254351496696472, -0.5130739808082581, 0.20094916224479675, 0.3443712294101715, 0.2443404644727707, 0.23871931433677673, 0.025197990238666534, -0.2866699695587158, 0.012523764744400978, 0.061186663806438446, 0.060656365007162094, 0.3832484483718872, 0.022682934999465942, -0.0864633247256279, -0.1469072550535202, 0.17837101221084595, 0.0814947709441185, 0.020270613953471184, -0.15970498323440552, -0.06962081789970398, -0.20232047140598297, 0.018807396292686462, 0.33255431056022644, 0.07844903320074081, 0.5725772976875305, -0.287529855966568, -0.29133784770965576, 0.11454769223928452, -0.03965004161000252, 0.0683179423213005, 0.43765610456466675, -0.20665279030799866, 0.18318915367126465, 0.2873144745826721, -0.07034531980752945, -0.3320816457271576, -0.25153300166130066, -0.11481912434101105, -0.1372309774160385, -0.2956993281841278, -0.21560679376125336, -0.04806062951683998, 0.006497299298644066, -0.06580924242734909, 0.32560694217681885, -0.1638869196176529, -0.3286060392856598, -0.3052196502685547, -0.061493635177612305, -0.05775083974003792, 0.10568871349096298, -0.0344143807888031, 0.21947069466114044, -0.282830148935318, 0.2938547134399414, 0.3892403244972229, 0.025660889223217964, -0.0750008150935173, 0.15472522377967834, 0.25570282340049744, 0.7795231938362122, 0.23322606086730957, 0.3502488136291504, 0.0665542483329773, -0.38498950004577637, 0.0873357355594635, 0.021141324192285538, -0.2964290678501129, 0.14743199944496155, -0.1981067806482315, 0.32940027117729187, -0.4378911554813385, -0.35795772075653076, 0.24833883345127106, 0.006672429386526346, -0.20555619895458221, 0.023019690066576004, 0.531091570854187, 0.07139801979064941, 0.08862586319446564, 0.16571278870105743, 0.1263970583677292, -0.08457830548286438, -0.22754152119159698, -0.3739204704761505, -0.017480678856372833, 0.17924663424491882, 0.0311599001288414, 0.43984395265579224, -0.19352978467941284, 0.2047204226255417, -0.1791457235813141, -0.33253052830696106, -0.11022814363241196, 0.08805171400308609, -0.11368019878864288, 0.2856742739677429, 0.20242029428482056, 0.02561291866004467, -0.027624106034636497, 0.0503418929874897, -0.048664338886737823, -0.003431766526773572, 0.20600023865699768, 0.144146129488945, -0.14547210931777954, 0.24195674061775208, 0.2636832296848297, -0.03565448522567749, -0.2700878381729126, 0.03142727166414261, 0.09233338385820389, 0.13549752533435822, -0.10825291275978088, -0.11845791339874268, -0.13633137941360474, -0.3224636912345886, -0.05808531120419502, 0.09590811282396317, 0.6017868518829346, -0.4415247440338135, 0.07339123636484146, 0.029589436948299408, -0.26935091614723206, 0.1250646710395813, -0.09178756922483444, 0.04040168598294258, 0.1107797622680664, -0.06695525348186493, 0.06165805831551552, 0.6244156360626221, -0.39438194036483765, -0.6770493388175964, 0.2893062233924866, 0.08277283608913422, -0.14883777499198914, -0.1018754094839096, -0.11891746520996094, 0.10686099529266357, 0.015359053388237953, 0.1308913230895996, 0.04758436605334282, 0.23260007798671722, 0.15887680649757385, -0.4434272348880768, -0.08819997310638428, 0.06811922043561935, 0.0964701920747757, 0.052061114460229874, -0.005942266434431076, 0.21432475745677948, -0.10952194780111313, 0.2350044548511505, -0.16505922377109528, -0.08886078745126724, 0.19270457327365875, 0.08890830725431442, -0.21162734925746918, 0.10737694054841995, -0.09072533994913101, -0.45727089047431946, 0.22862084209918976, -0.14334852993488312, -0.15274013578891754, 0.2376396656036377, -0.054223377257585526, -0.4445798993110657, 0.11434279382228851, -0.33945906162261963, 0.026661718264222145, 0.1485225409269333, 0.22131282091140747, -0.16746555268764496, 0.14665748178958893, -0.006623183377087116, 0.31315669417381287, -0.47484463453292847, -0.03251715004444122, 0.04414326697587967, 0.14058798551559448, -0.07723124325275421, -0.2733883261680603, 0.17191056907176971, -0.09942622482776642, 0.21093258261680603, -0.17352138459682465, -0.2467106133699417, 0.45284825563430786, 0.10049991309642792, -0.11579401046037674, 0.040420569479465485, -0.44160595536231995, -0.06147918850183487, -0.00304860295727849, 0.08845268934965134, 0.02172047086060047, 0.05458928644657135, 0.04408599063754082, -0.4821866750717163, 0.2788596749305725, -0.03809772804379463, -0.17944495379924774, 0.20460732281208038, -0.05076959356665611, 0.32036733627319336, -0.08619681000709534, 0.1784723848104477, -0.4681572914123535, 0.14112627506256104, -0.1362757831811905, 0.3092504143714905, 0.009044468402862549, -0.07635831087827682, 0.0905630812048912, 0.3824212849140167, 0.1360924392938614, 0.3182583451271057, 0.025322573259472847, 0.11365308612585068, -0.36556950211524963, -0.028386401012539864, 0.3083004653453827, 0.5906157493591309, 0.12681864202022552, 0.15727625787258148, -0.18829937279224396, -0.0185249000787735, -0.2195124328136444, 0.1217828020453453, -0.06974595785140991, -0.0008376146433874965, 0.1470131278038025, 0.2730500102043152, -0.1523767113685608, -0.5941970348358154, 0.013547212816774845, 0.08076898753643036, 0.0368187353014946, -0.2984195947647095, -0.09071435034275055, -0.20555272698402405, 0.28018486499786377, 0.020886044949293137, -0.22382789850234985, 0.09934008121490479, -0.3412381112575531, -0.01579074189066887, 0.249556303024292, 0.02238987199962139, 0.05936034768819809, -0.10816647857427597, 0.3073645830154419, 0.08877868205308914, -0.19888871908187866, -0.12088551372289658, -0.05461728945374489, -0.22214557230472565, 0.026340823620557785, -0.1085781678557396, 0.25002312660217285, 0.2363123893737793, -0.28667378425598145, -0.16766533255577087, -0.32845816016197205, -0.18948394060134888, 0.25377440452575684, 0.12494515627622604, -0.014535403810441494, 0.2072973996400833, 0.029306791722774506, 0.06216936185956001, 0.21922798454761505, 0.07496503740549088, -0.25692272186279297, -0.19651058316230774, 0.03281654790043831, 0.1903228759765625, -0.28242379426956177, -0.08887254446744919, -0.5019420385360718, -0.25811049342155457, -0.3685329854488373, 0.16034866869449615, -0.06770233064889908, 0.037878941744565964, -0.12107130885124207, 0.13634631037712097, 0.23571884632110596, -0.013351443223655224, 0.24947069585323334, -0.25352942943573, -0.23017701506614685, 0.04855255410075188, -0.2527899742126465, -0.6226625442504883, 0.06866574287414551, 0.14764311909675598, 0.20388223230838776, 0.24202491343021393, -0.36595478653907776, 0.06747987866401672, -0.21421387791633606, 0.34510430693626404, 0.1659756302833557, -0.058456238359212875, 0.5369576811790466, 0.09924907237291336, -0.09071332216262817, -0.23427914083003998, -0.20789356529712677, 0.2121218591928482, -0.02410462312400341, 0.06196729093790054, -0.413063645362854, 0.31635910272598267, -0.40159010887145996, 0.3782574236392975, 0.05443768575787544, -0.22787673771381378, 0.3395465314388275, 0.02108377404510975, 0.5244690775871277, -0.4081428050994873, -0.18640072643756866, 0.010440883226692677, -0.00761593971401453, 0.09643175452947617, 0.06770709902048111, -0.08208712935447693, 0.19479604065418243, -0.15513266623020172, -0.47895562648773193, -0.029190998524427414, -0.2794170081615448, -0.2137630581855774, -0.2859538495540619, 0.2666299343109131, 0.26304030418395996, 0.2900567948818207, -0.037344787269830704, 0.17580735683441162, -0.015013184398412704, 0.23642770946025848, 0.16268616914749146, -0.230299711227417, -0.4097802937030792, 0.46584948897361755, -0.40434730052948, 0.19665668904781342, -0.1186879575252533, 0.7131256461143494, -0.13084422051906586, -0.06993076205253601, 0.03478449210524559, -0.1806757152080536, 0.5430808067321777, -0.1419031322002411, 0.2100410908460617, 0.13290700316429138, -0.22273816168308258, -0.36782434582710266, 0.16555117070674896, -0.028796570375561714, 0.21645136177539825, -0.02986576221883297, 0.17657960951328278, -0.08817002177238464, -0.23556560277938843, 0.3038369119167328, 0.1553979068994522, -0.1797025501728058, -0.2773635685443878, -0.35146093368530273, -0.14931556582450867, -0.3016038239002228, -0.15374581515789032, -0.16022120416164398, 0.02032378315925598, -0.24533359706401825, -0.11175782978534698, -0.5205555558204651, -0.23189648985862732, 0.16447009146213531, 0.27032744884490967, 0.2830536365509033, -0.18669040501117706, 0.23402513563632965, 0.3199097216129303, 0.00024369738821405917, 0.25369977951049805, 0.3334802985191345, -0.2407834380865097, -0.24154727160930634, 0.2684885859489441, -0.14309878647327423, 0.0198737233877182, 0.18572239577770233, -0.24012111127376556, -0.39781424403190613, 0.203144371509552, -0.28223592042922974, -0.06540198624134064, 0.3855573236942291, 0.06160752847790718, 0.11918158084154129, -0.3213045597076416, -0.2223099023103714, 0.2760690748691559, -0.0360388457775116, -0.1941508650779724, 0.48328694701194763, -0.02458912506699562, -0.20195826888084412, 0.38919761776924133, -0.19353149831295013, 0.385487824678421, -0.057189732789993286, 0.22192375361919403, 0.21232812106609344, -0.31282591819763184, -0.057965610176324844, 0.4960169196128845, 0.05744941160082817, -0.5225237011909485, -0.4563314914703369, 0.0861956775188446, 0.0014626462943851948, 0.06383977085351944, 0.0185176320374012, -0.30575990676879883, 0.09605217725038528, 0.33515289425849915, -0.2860987186431885, 0.04389377310872078, 0.422437459230423, -0.22662946581840515, 0.025779923424124718, -0.22349382936954498, 0.2079620063304901, 0.1955544352531433, 0.1284918636083603, -0.12282311171293259, 0.05348458141088486, 0.12260441482067108, -0.28215789794921875, 0.1061420813202858, 0.26949799060821533, 0.004221914801746607, 0.4852985441684723, 0.19003494083881378, -0.30944040417671204, 0.17752490937709808, 0.15717095136642456, 0.4198122024536133, 0.14952360093593597, -0.1358947902917862, 0.19384931027889252, -0.20625409483909607, -0.041769735515117645, 0.11989764869213104, 0.011623221449553967, 0.2412334531545639, -0.014592696912586689, -0.27427035570144653, -0.07236229628324509, -0.22272257506847382, -0.18957310914993286, -0.1488478034734726, 0.09581635147333145, 0.08172333240509033, -0.5123041868209839, -0.26963019371032715, -0.17761674523353577, -0.205534428358078, -0.36334148049354553, 0.16727778315544128, 0.12409934401512146, 0.2679731249809265, 0.2621806263923645, 0.017388584092259407, -0.41277602314949036, -0.12695631384849548, 0.7278018593788147, -0.13751190900802612, -0.13632726669311523, 0.5741074681282043, -0.040023576468229294, -0.02810707315802574, -0.3943212628364563, -0.03061063215136528, 0.1681080162525177, -0.04769181087613106, 0.46193328499794006, -0.1728387326002121, -0.3020223379135132, 0.19585222005844116, 0.6177655458450317, -0.06816518306732178, -0.09080057591199875, 0.05460190773010254, -0.24305713176727295, -0.5445145964622498, -0.10406842082738876, 0.11840040236711502, 0.368209570646286, 0.21104787290096283, -0.12529665231704712, 0.05691170692443848, 0.05635767802596092, -0.33547958731651306, -0.07519012689590454, 0.10778027027845383, -0.054270803928375244, 0.011126670055091381, -0.06433359533548355, 0.13411635160446167, -0.20588892698287964, 0.1692872792482376, 0.10729259997606277, 0.08444757014513016, -0.23011372983455658, -0.12719187140464783, 0.1429697573184967, -0.0656975582242012, 0.2890632450580597, -0.16601094603538513, -0.25218573212623596, -0.01864970661699772, -0.093352310359478, 0.16255232691764832, 0.18213485181331635, -0.12501682341098785, 0.16982504725456238, 0.10010821372270584, 0.18671219050884247, 0.11861974000930786, 0.12041684985160828, -0.08717860281467438, 0.009589191526174545, -0.04146284982562065, 0.07970236241817474, -0.24769537150859833, -0.21774767339229584, 0.10389374941587448, -0.01924973540008068, 0.19150979816913605, 0.07616406679153442, -0.06274285167455673, -0.2495279312133789, -0.2833045423030853, 0.0870196521282196, 0.20384062826633453, 0.5142171382904053, -0.22671622037887573, -0.3069676160812378, -0.08119795471429825, 0.22254230082035065, -0.168095201253891, -0.1717025190591812, 0.2552044093608856, -0.014284470118582249, 0.15913088619709015, -0.014953368343412876, -0.27802759408950806, -0.3455246388912201, -0.023653699085116386, 0.41616061329841614, 0.42546096444129944, -0.28578096628189087, 0.024384446442127228, -0.15042942762374878, -0.1395220160484314, 0.09832412749528885, 0.5201716423034668, 0.09720741212368011, 0.08304032683372498, 0.37292882800102234, 0.07045695185661316, 0.43944430351257324, -0.1150888130068779, 0.4169316291809082, -0.10897258669137955, -0.22866635024547577, 0.2659083902835846, 0.06732025742530823, -0.1542167365550995, 0.043602846562862396, 0.1608523577451706, 0.049189358949661255, -0.3993607461452484, 0.016323426738381386, -0.2150762528181076, -0.2049526572227478, -0.10679410398006439, -0.2978190779685974, -0.2578641474246979, -0.13326027989387512, 0.23794488608837128, 0.04224097356200218, -0.24685519933700562, 0.30924859642982483, 0.15758125483989716, -0.07737883925437927, -0.12390678375959396, -0.3683101534843445, 0.29479050636291504, -0.0748891606926918, -0.12287367880344391, -0.1479150652885437, 0.37468141317367554, 0.21026819944381714, 0.1874494105577469, 0.2699615955352783, 0.3120207190513611, 0.2520717978477478, 0.26078516244888306, 0.20105968415737152, -0.007366162724792957, -0.07388874143362045, -0.1683795303106308, -0.17595255374908447, 0.37376534938812256, -0.059383995831012726, 0.2759178876876831, 0.43145230412483215, 0.2211725115776062, -0.11549950391054153, 0.1744358241558075, 0.3714359998703003, 0.16614533960819244, -0.08796697854995728, 0.38989007472991943, 0.18869303166866302, -0.31387603282928467, -0.04145986959338188, 0.005102332681417465, -0.15924060344696045, -0.054046228528022766, 0.21774844825267792, -0.037645019590854645, 0.19379009306430817, -0.10734564810991287, 0.10812760889530182, 0.14770975708961487, 0.49788427352905273, 0.18482424318790436, 0.1234954223036766, -0.2428186982870102, -0.10842754691839218, -0.6254067420959473, 0.1170109361410141, 0.1362062245607376, 0.18601718544960022, -0.06352321803569794, 0.10006356239318848, 0.08006658405065536, -0.1812436431646347, 0.07984555512666702, 0.3649944067001343, -0.14531797170639038, -0.2825430631637573, -0.26284852623939514, -0.08441394567489624, 0.12341633439064026, 0.01651078090071678, 0.048934854567050934, -0.5115612149238586, 0.37345871329307556, -0.09413030743598938, 0.11550095677375793, -0.07785019278526306, -0.19899633526802063, 0.017890244722366333, 0.0077756596729159355, 0.33201923966407776, 0.0812840387225151, 0.23753094673156738, -0.2387554943561554, -0.13716267049312592, -0.1954451948404312, -0.05556774139404297, 0.10713200271129608, 0.23659874498844147, 0.3101714253425598, 0.3238532841205597, 0.010980837978422642, 0.16063547134399414, -0.020401323214173317, 0.31483733654022217, 0.07653393596410751, 0.023601192981004715, 0.04573540389537811, 0.11497294157743454, 0.18491606414318085, 0.035486988723278046, 0.08507240563631058, 0.2513614594936371, -0.11513634026050568, 0.08136872947216034, -0.3011856973171234, -0.312756210565567, 0.3311196267604828, -0.06244906410574913, -0.1658387929201126, -0.21056702733039856, 0.265414834022522, 0.0881434753537178, -0.2846198081970215, -0.45565178990364075, 0.0551510751247406, 0.32819557189941406, -0.10202915966510773, -0.2109822779893875, 0.23304255306720734, 0.13405492901802063, 0.38657501339912415, -0.015461924485862255, 0.5186057090759277, 0.1434665471315384, -0.1999407559633255, -0.14741471409797668, -0.08678431063890457 ]
https://github.com/huggingface/datasets/issues/2262
NewsPH NLI dataset script fails to access test data.
Thanks @bhavitvyamalik for the fix ! The fix will be available in the next release. It's already available on the `master` branch. For now you can either install `datasets` from source or use `script_version="master"` in `load_dataset` to use the fixed version of this dataset.
In Newsph-NLI Dataset (#1192), it fails to access test data. According to the script below, the download manager will download the train data when trying to download the test data. https://github.com/huggingface/datasets/blob/2a2dd6316af2cc7fdf24e4779312e8ee0c7ed98b/datasets/newsph_nli/newsph_nli.py#L71 If you download it according to the script above, you can see that train and test receive the same data as shown below. ```python >>> from datasets import load_dataset >>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py") >>> newsph_nli DatasetDict({ train: Dataset({ features: ['premise', 'hypothesis', 'label'], num_rows: 420000 }) test: Dataset({ features: ['premise', 'hypothesis', 'label'], num_rows: 420000 }) validation: Dataset({ features: ['premise', 'hypothesis', 'label'], num_rows: 90000 }) }) >>> newsph_nli["train"][0] {'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).', 'label': 1, 'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'} >>> newsph_nli["test"][0] {'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).', 'label': 1, 'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'} ``` In local, I modified the code of the source as below and got the correct result. ```python 71 test_path = os.path.join(download_path, "test.csv") ``` ```python >>> from datasets import load_dataset >>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py") >>> newsph_nli DatasetDict({ train: Dataset({ features: ['premise', 'hypothesis', 'label'], num_rows: 420000 }) test: Dataset({ features: ['premise', 'hypothesis', 'label'], num_rows: 9000 }) validation: Dataset({ features: ['premise', 'hypothesis', 'label'], num_rows: 90000 }) }) >>> newsph_nli["train"][0] {'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).', 'label': 1, 'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'} >>> newsph_nli["test"][0] {'hypothesis': '-- JAI (@JaiPaller) September 13, 2019', 'label': 1, 'premise': 'Pinag-iingat ng Konsulado ng Pilipinas sa Dubai ang publiko, partikular ang mga donor, laban sa mga scam na gumagamit ng mga charitable organization.'} ``` I don't have experience with open source pull requests, so I suggest that you reflect them in the source. Thank you for reading :)
44
NewsPH NLI dataset script fails to access test data.
[ -0.2762983739376068, 0.3845696449279785, -0.1728920042514801, -0.05556948482990265, 0.051598142832517624, -0.05871512368321419, 0.37579110264778137, 0.36918821930885315, 0.07030545175075531, 0.3692725896835327, 0.20834510028362274, 0.14689363539218903, -0.0838562622666359, 0.31140291690826416, 0.017909741029143333, 0.14165928959846497, -0.06598533689975739, 0.2412266731262207, -0.13876648247241974, -0.0008261001785285771, -0.25047874450683594, 0.13863955438137054, -0.2308177351951599, 0.177871435880661, -0.13544385135173798, 0.08560539782047272, -0.14578130841255188, 0.38078492879867554, -0.030543820932507515, -0.42499950528144836, 0.053733065724372864, 0.282311350107193, -0.013330736197531223, 0.1660088747739792, -0.0001115631966968067, -0.049357615411281586, 0.3512438237667084, -0.11706600338220596, -0.4343512952327728, -0.09989321976900101, -0.49254629015922546, -0.4590376615524292, -0.178731307387352, -0.47536712884902954, -0.1456771045923233, -0.23209819197654724, 0.3176667392253876, -0.3454073667526245, 0.1268416941165924, 0.5790809988975525, 0.19914421439170837, 0.38246551156044006, -0.10148722678422928, -0.01406167820096016, 0.17105811834335327, 0.1082335039973259, -0.015108400024473667, -0.20758956670761108, 0.10330753773450851, -0.4500110447406769, -0.0345199853181839, 0.31776437163352966, 0.14890256524085999, -0.026849819347262383, -0.20341703295707703, 0.023523937910795212, 0.2232523113489151, 0.054021451622247696, 0.08691408485174179, 0.0625917911529541, 0.06252869963645935, -0.2686364948749542, -0.19439207017421722, 0.0795869305729866, -0.18554699420928955, 0.1866195797920227, 0.08312607556581497, 0.11270390450954437, -0.07657653093338013, 0.06296583265066147, -0.20295467972755432, 0.08695358783006668, -0.48041608929634094, 0.18612118065357208, -0.06716340780258179, 0.34784287214279175, 0.12143297493457794, 0.19217774271965027, 0.09010148793458939, -0.22031262516975403, 0.09602908790111542, 0.07904233038425446, -0.24347074329853058, 0.08172226697206497, 0.25126004219055176, -0.059500765055418015, 0.20719462633132935, -0.018462244421243668, 0.2480846345424652, 0.13399367034435272, 0.10977329313755035, 0.40314924716949463, 0.05576159805059433, 0.05044854059815407, 0.23853883147239685, -0.2914174199104309, 0.2890566289424896, 0.4017260670661926, 0.4385574758052826, 0.16550397872924805, 0.01780555211007595, -0.04529508575797081, 0.18529511988162994, 0.02478884905576706, 0.006027097348123789, -0.13023170828819275, 0.35366830229759216, -0.22055749595165253, -0.17483606934547424, 0.2868395149707794, 0.298531174659729, -0.14528833329677582, -0.12147252261638641, 0.5900628566741943, 0.29151010513305664, -0.023173587396740913, 0.07478724420070648, 0.31967923045158386, -0.16987104713916779, -0.09178727865219116, -0.29283180832862854, 0.14245179295539856, -0.2700061798095703, -0.03263259679079056, 0.5431524515151978, 0.5109531879425049, 0.2244434952735901, -0.3396373689174652, -0.1254306137561798, -0.259143203496933, 0.0673225000500679, 0.00400230847299099, 0.5829119086265564, 0.1133311465382576, 0.2267557829618454, 0.04877565801143646, -0.028924651443958282, 0.102480947971344, 0.060586851090192795, 0.15442225337028503, 0.17540858685970306, -0.27422595024108887, 0.17420142889022827, 0.16653437912464142, -0.20620222389698029, 0.12707218527793884, 0.36891448497772217, 0.07789051532745361, -0.07093774527311325, -0.4593573808670044, -0.1830829232931137, -0.04961402341723442, -0.16313879191875458, -0.04920554161071777, -0.006073067896068096, 0.40092507004737854, -0.12261049449443817, 0.08775107562541962, 0.09853921830654144, 0.00320526584982872, 0.14164000749588013, -0.03633315488696098, -0.2347877323627472, 0.06878843158483505, -0.15259142220020294, 0.15167516469955444, 0.5857893824577332, -0.37162864208221436, -0.5112378597259521, 0.19310665130615234, -0.06094794347882271, -0.3136976659297943, 0.2927898168563843, 0.08371420949697495, -0.08817944675683975, -0.12411225587129593, -0.3043215274810791, 0.22222211956977844, 0.04013828933238983, 0.3112344443798065, -0.053959354758262634, -0.12994122505187988, 0.2802566587924957, 0.2049274891614914, 0.08350807428359985, -0.017968403175473213, 0.09719391167163849, 0.4034910798072815, 0.513516366481781, -0.1451413333415985, 0.16043721139431, 0.046639323234558105, 0.10578440874814987, -0.24289269745349884, 0.1329754889011383, -0.11999230086803436, -0.0693853572010994, 0.09142258018255234, -0.027736950665712357, 0.004037161823362112, -0.1945418417453766, 0.08453939855098724, -0.47283563017845154, 0.2175695151090622, -0.19831761717796326, -0.14664378762245178, 0.2457139641046524, 0.4299519956111908, 0.09935467690229416, 0.05448141694068909, -0.18159513175487518, 0.24225473403930664, -0.18727368116378784, -0.23498746752738953, -0.3748418688774109, 0.20515088737010956, -0.1535457968711853, -0.17419488728046417, 0.09148349612951279, 0.3025165796279907, 0.12437842786312103, -0.07708220183849335, -0.019377490505576134, 0.22727234661579132, 0.08312579989433289, 0.09034059941768646, 0.2040809541940689, -0.05603020638227463, -0.03341042995452881, -0.6092852354049683, 0.40220940113067627, 0.30816128849983215, 0.12030216306447983, -0.03475390002131462, -0.5225619077682495, 0.35126855969429016, -0.10399067401885986, 0.0880279615521431, 0.11913428455591202, -0.07134900242090225, 0.27233487367630005, -0.2429298609495163, -0.27582231163978577, -0.31515854597091675, 0.08428486436605453, 0.035087648779153824, -0.017405813559889793, -0.14423251152038574, -0.06624168902635574, 0.1702713817358017, 0.5352984666824341, 0.05485253408551216, -0.12554048001766205, -0.08571738004684448, 0.053222957998514175, -0.0720403641462326, 0.08843082934617996, 0.4835810363292694, 0.25594156980514526, 0.14942830801010132, 0.030415771529078484, 0.12452893704175949, -0.09139503538608551, -0.2833211421966553, 0.0725739523768425, 0.018219146877527237, 0.03451492264866829, 0.1626998782157898, 0.28876763582229614, -0.2919341027736664, -0.19986434280872345, -0.017563696950674057, 0.231185182929039, 0.22624936699867249, -0.32646113634109497, 0.16727420687675476, 0.030986690893769264, -0.5149794220924377, 0.1249956265091896, 0.0389774888753891, 0.12534256279468536, -0.59893399477005, 0.10938748717308044, 0.1468200832605362, -0.049320440739393234, -0.1685725450515747, -0.21081863343715668, 0.1567729413509369, 0.1351250261068344, -0.01671561412513256, -0.23235876858234406, -0.28691667318344116, -0.13859836757183075, 0.07780251652002335, -0.06883738189935684, 0.37618517875671387, 0.18258249759674072, -0.1282653510570526, -0.12756280601024628, -0.45975807309150696, -0.10305535048246384, 0.16196443140506744, 0.028236979618668556, 0.4990190267562866, 0.15519222617149353, 0.31764376163482666, 0.12412557005882263, -0.02862164005637169, 0.19825275242328644, -0.31669726967811584, -0.07066573202610016, 0.35685205459594727, -0.021423226222395897, -0.049077361822128296, -0.13700415194034576, -0.6523498892784119, -0.13694360852241516, -0.2594609558582306, -0.10637354850769043, -0.14460022747516632, 0.278171569108963, 0.20863083004951477, 0.0638226568698883, -0.014517035335302353, -0.12497098743915558, -0.059491198509931564, -0.1909821480512619, 0.29080450534820557, 0.1457761526107788, -0.3602266013622284, -0.558182418346405, -0.15284517407417297, 0.009918726049363613, 0.2181384563446045, 0.13831371068954468, -0.2581453323364258, -0.08056274056434631, -0.11870894581079483, 0.1869141012430191, 0.0072002531960606575, -0.06050391122698784, 0.222763329744339, -0.00118178257253021, -0.13994401693344116, -0.2762857973575592, -0.05052760988473892, 0.24817202985286713, -0.0422716923058033, 0.19188304245471954, 0.17537453770637512, 0.41136378049850464, -0.09068592637777328, 0.40801090002059937, 0.23887161910533905, -0.15463845431804657, 0.36058899760246277, -0.5194858908653259, 0.30048510432243347, 0.1293906569480896, -0.23291008174419403, 0.0648621916770935, 0.20232675969600677, -0.011754986830055714, 0.1958797574043274, -0.18301673233509064, -0.27635571360588074, -0.12341880798339844, 0.10116463899612427, -0.29770806431770325, -0.27455848455429077, 0.09797213226556778, 0.12498599290847778, 0.20357976853847504, 0.5130919814109802, 0.3260975182056427, -0.33050817251205444, -0.2611504793167114, -0.23237524926662445, -0.08806052058935165, -0.009928346611559391, 0.05226028710603714, -0.096121646463871, -0.2791782021522522, -0.5584500432014465, 0.15883252024650574, 0.02519308030605316, 0.6535339951515198, -0.1953529715538025, -0.26501214504241943, 0.0617227666079998, -0.2008911669254303, 0.18919165432453156, -0.5103829503059387, 0.3990907073020935, 0.07352498918771744, 0.007454000413417816, -0.3822633624076843, 0.16015656292438507, -0.5836167931556702, 0.4370679259300232, -0.016199162229895592, 0.14044654369354248, -0.2004013955593109, -0.07766211032867432, 0.39650213718414307, -0.12800809741020203, -0.0839930921792984, -0.21594133973121643, 0.03490312770009041, -0.326388955116272, -0.35102999210357666, -0.09180867671966553, -0.06471548974514008, -0.002769174985587597, -0.41495880484580994, -0.024735407903790474, 0.08860734105110168, -0.07171217352151871, 0.010347220115363598, 0.5190410017967224, 0.1550583690404892, 0.06114278361201286, 0.04198884218931198, 0.07171658426523209, -0.04109063372015953, -0.04525383189320564, 0.28887811303138733, 0.24151235818862915, 0.1726526916027069, 0.28005215525627136, -0.3332672119140625, 0.5371590852737427, 0.5152285099029541, -0.11480451375246048, -0.2518267333507538, -0.03954269364476204, -0.3572094440460205, -0.07954004406929016, 0.1967839002609253, 0.24034595489501953, -0.15281501412391663, -0.031744275242090225, -0.17049705982208252, 0.20513951778411865, 0.03496813774108887, -0.15617325901985168, -0.16771823167800903, -0.16023793816566467, -0.09518960118293762, 0.44016963243484497, -0.13476823270320892, 0.696179211139679, 0.008021758869290352, 0.1778164803981781, 0.3317162096500397, 0.1385517716407776, 0.06107179820537567, -0.010188426822423935, 0.1831922084093094, -0.4722709357738495, 0.046776335686445236, 0.10213498771190643, -0.19759519398212433, -0.12078451365232468, 0.275191992521286, 0.007425171323120594, 0.2371450811624527, 0.2686322033405304, -0.22953622043132782, -0.050473544746637344, 0.27943748235702515, -0.26474905014038086, 0.16752514243125916, -0.34205275774002075, 0.11832593381404877, 0.02337115816771984, -0.06924376636743546, -0.09286531805992126, -0.165345698595047, -0.18450354039669037, -0.21948829293251038, -0.10941579192876816, 0.3237568438053131, 0.04570751637220383, -0.12315748631954193, -0.22655993700027466, -0.19597816467285156, -0.17679649591445923, 0.28976020216941833, 0.19945669174194336, 0.3140452802181244, -0.2036660611629486, -0.0020675058476626873, -0.11070111393928528, -0.18142838776111603, 0.18224933743476868, 0.20693647861480713, 0.19266696274280548, -0.15194818377494812, -0.5641480684280396, 0.018662938848137856, 0.03163179010152817, -0.11864876747131348, -0.23794223368167877, 0.12867341935634613, 0.012691560201346874, -0.4411848485469818, -0.23822662234306335, -0.07183180004358292, -0.42357897758483887, -0.09847075492143631, 0.17441970109939575, -0.09767221659421921, -0.22841353714466095, 0.2634434700012207, 0.20779265463352203, -0.27832964062690735, 0.006170002277940512, 0.11114917695522308, -0.10793151706457138, 0.2865625023841858, 0.5790879130363464, 0.1300366222858429, 0.11391819268465042, -0.3977245092391968, -0.1767316609621048, 0.5077782273292542, -0.3247438371181488, -0.14744262397289276, -0.006848402786999941, -0.03582600876688957, 0.4311169683933258, 0.4271012246608734, -0.21830154955387115, -0.1170278787612915, -0.08791463822126389, -0.4102652966976166, -0.20907512307167053, 0.07293272018432617, 0.04448268190026283, 0.22901667654514313, 0.21912258863449097, -0.05279063433408737, -0.17606671154499054, 0.018718110397458076, -0.3922361731529236, -0.11494872719049454, -0.19504986703395844, 0.22871528565883636, -0.005060248076915741, 0.0026127819437533617, 0.15789014101028442, -0.05363668128848076, 0.14975029230117798, 0.08217205107212067, -0.12992776930332184, -0.2793872654438019, 0.016195662319660187, 0.14432276785373688, 0.179496631026268, -0.07002358138561249, -0.43716996908187866, -0.18857532739639282, -0.1417073756456375, -0.07954095304012299, 0.012941623106598854, -0.12338215112686157, -0.023858875036239624, 0.43315979838371277, 0.14965862035751343, 0.1482604742050171, 0.34396082162857056, 0.02701874077320099, -0.144709050655365, 0.2851109504699707, -0.16218352317810059, 0.43443799018859863, -0.17663849890232086, -0.13630355894565582, -0.014039425179362297, 0.02001570723950863, 0.3834753632545471, 0.2678874135017395, 0.15678122639656067, -0.3144044876098633, -0.14705128967761993, -0.10507119446992874, 0.4462068974971771, 0.36137595772743225, -0.3844762444496155, 0.021480126306414604, -0.15612195432186127, 0.2069551795721054, -0.21271803975105286, 0.04837542399764061, 0.08557950705289841, -0.1456017792224884, 0.2846750319004059, 0.36734309792518616, 0.3653232753276825, -0.30296802520751953, 0.3238861560821533, 0.046890515834093094, 0.33666348457336426, -0.3738503158092499, -0.3752070367336273, 0.024808688089251518, -0.2405639886856079, -0.05654240772128105, 0.11295722424983978, 0.1412862092256546, 0.16999243199825287, 0.5159226655960083, 0.28652602434158325, 0.6165186166763306, 0.35277053713798523, 0.2140694111585617, -0.06592525541782379, -0.013730361126363277, 0.1849130243062973, 0.04815371334552765, 0.006879481021314859, 0.20368988811969757, 0.05749371275305748, 0.30627819895744324, -0.14995335042476654, 0.36446335911750793, -0.299343079328537, 0.04532478377223015, -0.060185760259628296, -0.2130124717950821, -0.3024970293045044, -0.1592993289232254, -0.23222851753234863, -0.25336626172065735, -0.11627700179815292, 0.1912555992603302, 0.22755280137062073, 0.08720455318689346, -0.02481694333255291, -0.2649598717689514, 0.31361493468284607, 0.16007345914840698, 0.08684664219617844, -0.3457995057106018, 0.2958787977695465, -0.003571766195818782, -0.005656941793859005, 0.37837815284729004, 0.3620043396949768, 0.4579116404056549, 0.05113034322857857, 0.03343028947710991, 0.22471670806407928, -0.15198230743408203, -0.3050801753997803, -0.23076404631137848, 0.34995928406715393, 0.19886402785778046, -0.005181315820664167, 0.409905344247818, 0.19931279122829437, -0.021938549354672432, -0.27185651659965515, 0.4696181118488312, -0.04973305016756058, 0.026033401489257812, -0.13615424931049347, -0.09586907923221588, -0.11638442426919937, -0.32832014560699463, -0.24142631888389587, -0.44439852237701416, -0.2692060172557831, 0.23268774151802063, -0.017948703840374947, 0.4389810264110565, -0.17567981779575348, 0.11269217729568481, 0.08660772442817688, 0.38529884815216064, 0.06955918669700623, 0.3648093342781067, -0.2258308231830597, -0.5184673070907593, -0.5669235587120056, 0.20751667022705078, -0.06953545659780502, -0.3842483460903168, 0.1376783698797226, 0.17191612720489502, 0.036881860345602036, -0.17076991498470306, 0.13823936879634857, -0.010911510325968266, -0.17928344011306763, 0.19909723103046417, -0.4359595477581024, -0.4222307503223419, 0.04250957816839218, 0.052380938082933426, -0.14726418256759644, -0.11325091123580933, 0.013768612407147884, -0.022612668573856354, 0.06660588830709457, -0.03664683923125267, -0.22080011665821075, 0.019014328718185425, 0.41611719131469727, 0.06280102580785751, 0.228513702750206, 0.5912582874298096, -0.301411509513855, 0.025456182658672333, -0.488892138004303, -0.05379357933998108, -0.11837014555931091, -0.06635739654302597, 0.08623938262462616, 0.14115484058856964, 0.07287488877773285, 0.1617179960012436, 0.1789478361606598, -0.2073034644126892, -0.163204163312912, -0.20850558578968048, 0.03251556307077408, 0.003322174306958914, -0.13130608201026917, -0.02562612108886242, -0.12378900498151779, 0.08673414587974548, 0.07152386754751205, 0.09260090440511703, 0.043768830597400665, -0.2713451087474823, 0.4135228991508484, -0.04327476769685745, -0.49950140714645386, -0.058348845690488815, 0.10024401545524597, -0.7232084274291992, -0.11062167584896088, -0.4581972658634186, 0.04362904652953148, 0.011234095320105553, 0.12306509912014008, -0.03369368985295296, 0.13459943234920502, 0.012568485923111439, -0.0186700988560915, -0.03979872912168503, 0.340016633272171, 0.2297624945640564, -0.09130901098251343, -0.11856073886156082, 0.06770908832550049 ]
https://github.com/huggingface/datasets/issues/2256
Running `datase.map` with `num_proc > 1` uses a lot of memory
Thanks for reporting ! We are working on this and we'll do a patch release very soon.
## Describe the bug Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow. ## Steps to reproduce the bug ```python from datasets import load_dataset dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False) def _prepare_sample(batch): return {"input_ids": list(), "attention_mask": list()} for split_name, dataset_split in list(dstc8_datset.items()): print(f"Processing {split_name}") encoded_dataset_split = dataset_split.map( function=_prepare_sample, batched=True, num_proc=4, remove_columns=dataset_split.column_names, batch_size=10, writer_batch_size=10, keep_in_memory=False, ) print(encoded_dataset_split) path = f"./data/encoded_{split_name}" encoded_dataset_split.save_to_disk(path) ``` ## Expected results Memory usage should stay within reasonable boundaries. ## Actual results This is htop-output from running the provided script. ![image](https://user-images.githubusercontent.com/8143425/115954836-66954980-a4f3-11eb-8340-0153bdc3a475.png) ## Versions ``` - Datasets: 1.6.0 - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] - Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10 ``` Running on WSL2
17
Running `datase.map` with `num_proc > 1` uses a lot of memory
[ 0.017026640474796295, -0.09525343775749207, -0.22408327460289001, 0.37434327602386475, 0.21219831705093384, -0.11806458979845047, 0.013961752876639366, 0.20367100834846497, 0.10392987728118896, 0.2086794674396515, -0.058750804513692856, 0.2750972807407379, -0.19250953197479248, 0.13216234743595123, -0.042170073837041855, 0.2790796458721161, 0.16899512708187103, 0.10198501497507095, -0.026879606768488884, -0.10996325314044952, -0.36957836151123047, 0.04816823825240135, -0.0583525151014328, -0.050519730895757675, -0.05167391151189804, 0.1446608304977417, 0.04372630640864372, 0.422036737203598, 0.00960568618029356, -0.6874069571495056, -0.06185009703040123, -0.2085181176662445, -0.015643410384655, 0.13719993829727173, -0.00011316050222376361, 0.06760215014219284, 0.16239917278289795, 0.060961779206991196, -0.1167495921254158, 0.441413551568985, -0.0031081296037882566, -0.30888548493385315, 0.11872359365224838, -0.2656903564929962, 0.06559896469116211, 0.11911067366600037, 0.15242934226989746, -0.45861461758613586, 0.14848464727401733, 0.3520108461380005, 0.2112196385860443, -0.22058477997779846, -0.10054659098386765, 0.10571827739477158, 0.08202662318944931, 0.014088613912463188, 0.19447927176952362, -0.29396313428878784, 0.16488946974277496, 0.11959460377693176, -0.13689249753952026, 0.24343740940093994, -0.041025400161743164, 0.07583120465278625, -0.043323107063770294, -0.0351802222430706, 0.532616376876831, -0.05404051020741463, 0.2818335294723511, -0.3125617206096649, 0.04900195077061653, -0.19160133600234985, 0.3874342143535614, -0.07024567574262619, -0.5076106190681458, -0.1937742531299591, 0.11543875187635422, -0.10033420473337173, -0.1561097502708435, 0.09116816520690918, 0.2502134442329407, -0.05169297009706497, 0.258762925863266, -0.13001412153244019, -0.1848568320274353, 0.07093489170074463, 0.031488485634326935, 0.14696122705936432, 0.4180976450443268, -0.23203130066394806, -0.47643646597862244, 0.29041194915771484, -0.012440410442650318, -0.008337460458278656, -0.1687871813774109, -0.18937164545059204, 0.3481355309486389, -0.2561609148979187, 0.12951748073101044, -0.4274294674396515, 0.1137375608086586, 0.3592018187046051, 0.15719884634017944, 0.07991912215948105, 0.4127914011478424, -0.28203627467155457, 0.22593367099761963, 0.1459924429655075, 0.17117922008037567, -0.3226466178894043, 0.2268475592136383, 0.03330456092953682, 0.21395529806613922, -0.26491430401802063, 0.09506481140851974, -0.04836651310324669, -0.1507062464952469, -0.1983848363161087, 0.10934873670339584, 0.34493499994277954, 0.239164799451828, 0.4380832314491272, 0.11534493416547775, 0.11351697146892548, 0.2767446041107178, 0.13423721492290497, -0.14951685070991516, -0.2036098837852478, -0.32119616866111755, -0.06319933384656906, -0.21208810806274414, -0.046418335288763046, -0.32384684681892395, -0.18281427025794983, 0.1998303234577179, 0.19191569089889526, 0.11639514565467834, -0.23956549167633057, -0.3933528959751129, -0.10729004442691803, 0.07227449119091034, -0.07022873312234879, 0.22392387688159943, 0.4635891914367676, -0.31557416915893555, 0.08382918685674667, -0.0165873896330595, 0.041598591953516006, -0.134555846452713, 0.3855772316455841, -0.11138270795345306, -0.3402656614780426, -0.06588158011436462, 0.15387950837612152, 0.06120918318629265, 0.4275605380535126, 0.11357435584068298, 0.14477375149726868, 0.19098997116088867, -0.33517929911613464, -0.16186293959617615, 0.032887231558561325, -0.48891064524650574, -0.1132335513830185, -0.007104953285306692, 0.39617007970809937, -0.3435913324356079, 0.10887108743190765, -0.0497790090739727, -0.2654540538787842, 0.34338995814323425, 0.17234231531620026, 0.0776137262582779, -0.17257417738437653, 0.0512763150036335, 0.1907849758863449, 0.2731926143169403, -0.12008075416088104, -0.7144668102264404, 0.32193154096603394, -0.2907380163669586, -0.4900856614112854, 0.13517875969409943, 0.25344324111938477, 0.25370532274246216, 0.15986473858356476, 0.1347021460533142, -0.15723958611488342, 0.04157433286309242, 0.39448240399360657, -0.3616718649864197, -0.061509132385253906, -0.18967397511005402, 0.14485371112823486, -0.030444113537669182, -0.18876314163208008, 0.2354688048362732, 0.19565176963806152, 0.184830442070961, 0.06934620440006256, 0.12917035818099976, 0.12325169891119003, -0.2305259108543396, -0.3616470694541931, 0.03400556370615959, -0.13554739952087402, -0.15873847901821136, 0.09197036176919937, -0.10025957971811295, -0.22343960404396057, -0.06835585832595825, -0.00010198914969805628, 0.1830417513847351, 0.13913047313690186, 0.19061346352100372, -0.2753894329071045, 0.17744718492031097, -0.11375437676906586, -0.04255862906575203, -0.17758172750473022, 0.12480396777391434, 0.3453863561153412, 0.2141292542219162, 0.04527366906404495, -0.1450684666633606, -0.17703863978385925, -0.07462643086910248, -0.20771200954914093, -0.20270846784114838, 0.07436040043830872, -0.15243510901927948, -0.07388998568058014, -0.03835063427686691, 0.14500324428081512, 0.5001693367958069, -0.3754054307937622, -0.04975919798016548, 0.10477020591497421, 0.3443700671195984, 0.20393188297748566, 0.17410704493522644, 0.06578533351421356, 0.12851761281490326, -0.2364410161972046, -0.3308802843093872, -0.13691627979278564, 0.06492379307746887, 0.1713639795780182, -0.0780227780342102, 0.037444863468408585, 0.4490587115287781, 0.11452922224998474, 0.1454506516456604, -0.3410212993621826, 0.1600632518529892, 0.577118992805481, -0.07413630932569504, 0.47858375310897827, 0.07261147350072861, 0.07779990136623383, 0.18814894556999207, -0.1933934986591339, 0.01078596618026495, 0.04785890877246857, -0.23273703455924988, -0.11772695183753967, 0.38291606307029724, -0.4594719409942627, 0.2770234942436218, 0.13094142079353333, 0.15078780055046082, -0.03786274045705795, 0.11743419617414474, -0.18152020871639252, 0.039147086441516876, 0.05174217000603676, -0.09730575978755951, -0.15086141228675842, 0.1853589564561844, -0.378826767206192, -0.33193591237068176, 0.05368313193321228, 0.14114663004875183, 0.22492007911205292, -0.18690858781337738, -0.19691823422908783, -0.23121105134487152, 0.39045101404190063, 0.4049925208091736, 0.4333195388317108, 0.2451392412185669, -0.11717412620782852, 0.043425630778074265, 0.15434657037258148, -0.028006425127387047, 0.0026095311623066664, 0.07985647022724152, 0.16462816298007965, 0.24134095013141632, -0.08355632424354553, 0.058918703347444534, -0.3962298035621643, -0.11078788340091705, 0.045005496591329575, 0.07007455825805664, 0.28219446539878845, 0.1848209649324417, -0.11350174248218536, 0.07855045050382614, -0.009444688446819782, -0.1302291452884674, 0.1515953242778778, 0.3159070312976837, -0.05585264414548874, 0.07534671574831009, -0.02279774658381939, -0.11786046624183655, 0.3015300929546356, -0.029425054788589478, -0.3052454888820648, -0.22549904882907867, 0.2504255473613739, 0.04738905653357506, 0.026171650737524033, -0.3701862096786499, -0.0797547698020935, -0.03061329573392868, -0.07791990786790848, 0.4462352395057678, 0.18288984894752502, 0.4120253920555115, -0.3494388461112976, 0.2099657654762268, 0.12642203271389008, 0.052068114280700684, 0.030901925638318062, -0.31939980387687683, -0.007185770198702812, -0.09354670345783234, -0.025719154626131058, -0.05449242144823074, 0.0276799313724041, 0.1300787776708603, 0.04780411347746849, 0.012235749512910843, -0.4430524408817291, -0.10372542589902878, -0.13792958855628967, 0.07621194422245026, 0.04738633334636688, -0.07117588073015213, 0.5148336291313171, 0.46861976385116577, -0.20888733863830566, 0.11995101720094681, -0.24954497814178467, 0.19770677387714386, 0.030701231211423874, -0.11340063065290451, -0.034192100167274475, 0.5302733778953552, 0.0954686850309372, -0.013593785464763641, 0.14712770283222198, -0.21872255206108093, 0.04803771525621414, 0.046747829765081406, 0.11615537106990814, -0.0075348056852817535, -0.014015612192451954, 0.2714855372905731, 0.09556979686021805, -0.20646658539772034, 0.35269856452941895, 0.03572116047143936, -0.5742660760879517, 0.1865030825138092, 0.205779567360878, 0.19659696519374847, -0.20611190795898438, 0.15695561468601227, -0.038446150720119476, -0.15946651995182037, 0.09252569079399109, 0.08644145727157593, -0.48500487208366394, -0.003628186183050275, -0.2713521718978882, -0.25707653164863586, -0.18909022212028503, -0.2245476096868515, -0.10410811007022858, -0.08363402634859085, -0.720974326133728, 0.21978797018527985, -0.12910526990890503, 0.12452133744955063, -0.030892452225089073, -0.141984224319458, 0.2715337872505188, -0.13799548149108887, 0.5918560028076172, -0.017558658495545387, 0.10786136984825134, -0.05991189926862717, -0.13365155458450317, -0.09643357992172241, 0.29257750511169434, -0.1398942917585373, 0.25080937147140503, 0.22415223717689514, 0.4123484790325165, -0.08880303055047989, -0.05084105208516121, 0.22222694754600525, -0.06750338524580002, -0.030182626098394394, -0.05205584689974785, -0.29814913868904114, -0.3569289445877075, -0.29218676686286926, 0.16157759726047516, 0.0856994166970253, -0.14745835959911346, 0.2813926637172699, -0.3761536478996277, -0.2086394876241684, -0.17975138127803802, 0.026338733732700348, -0.014479972422122955, 0.15509039163589478, -0.07109078019857407, -0.1490209698677063, 0.17922723293304443, 0.15376971662044525, 0.126495361328125, 0.16009259223937988, 0.0010718719568103552, 0.2472127079963684, 0.5169031023979187, -0.018288176506757736, 0.12091302126646042, 0.18648508191108704, 0.07410282641649246, -0.29620498418807983, -0.3612948954105377, 0.21459998190402985, -0.13117218017578125, 0.3985638916492462, 0.13406023383140564, 0.07669714838266373, -0.0986018180847168, -0.06808493286371231, 0.14218339323997498, 0.38566139340400696, -0.13706666231155396, -0.031402796506881714, -0.5341429114341736, -0.12939196825027466, 0.14149576425552368, 0.28375688195228577, 0.6403998732566833, -0.49220791459083557, 0.160325825214386, -0.18993663787841797, -0.018085205927491188, 0.26066097617149353, -0.566665768623352, 0.1991874724626541, 0.02118709310889244, -0.157183438539505, 0.07273197919130325, -0.0824752226471901, 0.02401081845164299, 0.2236727625131607, -0.040625691413879395, 0.0951351448893547, 0.1755388081073761, 0.2791385352611542, -0.006258255336433649, 0.17906412482261658, 0.5809512138366699, -0.2897743284702301, 0.07389600574970245, 0.19039177894592285, 0.17328418791294098, -0.3657779395580292, -0.05767347663640976, 0.12286154180765152, 0.28934404253959656, -0.2665387690067291, 0.0844297781586647, -0.247699573636055, -0.20592421293258667, 0.6053277850151062, -0.5085989832878113, 0.06626103073358536, -0.3923954963684082, 0.1315000206232071, -0.006240168120712042, 0.2510249614715576, 0.15390413999557495, -0.21306192874908447, 0.38335472345352173, 0.1547137051820755, 0.00796885509043932, 0.19623643159866333, -0.07608718425035477, -0.05016935616731644, -0.30325233936309814, 0.20780333876609802, -0.20848627388477325, -0.3046887516975403, -0.22224734723567963, 0.22826147079467773, -0.15448342263698578, 0.03956165909767151, 0.13630127906799316, -0.032601770013570786, -0.3848561644554138, -0.04625805467367172, 0.16129566729068756, 0.18762484192848206, -0.20313262939453125, 0.4562249481678009, 0.07954942435026169, -0.5572213530540466, -0.20430903136730194, 0.3115013539791107, 0.39955466985702515, 0.13817137479782104, 0.1499892771244049, -0.21126969158649445, -0.1817702054977417, -0.31199708580970764, -0.14556169509887695, 0.0793556421995163, 0.08913756906986237, 0.05062440037727356, 0.04599568247795105, -0.5559319257736206, -0.007488644681870937, -0.1959170699119568, 0.04763569310307503, 0.15677981078624725, -0.1345469206571579, 0.13492760062217712, -0.9469529390335083, 0.028895815834403038, -0.29958128929138184, 0.2641701102256775, 0.04600195959210396, 0.29070940613746643, -0.4795859754085541, 0.054717060178518295, -0.28265076875686646, 0.15932875871658325, -0.13061200082302094, 0.2547367215156555, 0.14263243973255157, -0.05109785497188568, -0.1865541785955429, -0.15045428276062012, 0.18255767226219177, 0.4199691712856293, -0.312138170003891, -0.27851465344429016, 0.4012570083141327, 0.12029001861810684, -0.03884972631931305, -0.13671284914016724, -0.15442916750907898, -0.02494022622704506, -0.07239535450935364, -0.1905851811170578, 0.22769993543624878, 0.019637437537312508, 0.04305345565080643, -0.25499415397644043, 0.3399241268634796, 0.09344463795423508, 0.5431179404258728, 0.39970850944519043, -0.13240428268909454, 0.2704547643661499, -0.49063777923583984, 0.27598607540130615, -0.1627195179462433, -0.15472351014614105, 0.3122447431087494, 0.23912006616592407, 0.1814577430486679, 0.10273337364196777, -0.10660755634307861, -0.07988069206476212, -0.22457537055015564, 0.2743816077709198, -0.02107653021812439, 0.3236095905303955, 0.03540589287877083, -0.15851250290870667, 0.13572482764720917, 0.23052901029586792, 0.007341230753809214, -0.15639057755470276, 0.31185197830200195, -0.0035607425961643457, 0.1849997490644455, 0.2696434259414673, 0.12333564460277557, 0.028465354815125465, 0.22842392325401306, 0.23705381155014038, -0.017000053077936172, -0.34527382254600525, -0.07512076944112778, 0.35016924142837524, -0.010684707202017307, -0.18964432179927826, 0.38194048404693604, 0.22728341817855835, 0.3568250238895416, 0.8521931767463684, -0.030143825337290764, 0.2798979878425598, 0.1931082308292389, 0.21461153030395508, -0.4119848310947418, -0.151774600148201, -0.08716284483671188, 0.7473504543304443, -0.3401390612125397, 0.2367350310087204, 0.13986138999462128, 0.009746626019477844, -0.3234897255897522, -0.1760217845439911, -0.3817685842514038, 0.16431905329227448, -0.39149799942970276, -0.31808120012283325, 0.3560566306114197, -0.1041688621044159, -0.039263930171728134, 0.14251714944839478, -0.13294018805027008, -0.007285106927156448, 0.7236797213554382, -0.14200562238693237, -0.1991828978061676, -0.10748924314975739, -0.17946845293045044, 0.12776531279087067, -0.18441985547542572, -0.24146009981632233, 0.041712455451488495, -0.25108832120895386, 0.05304324999451637, -0.16644726693630219, -0.08954454958438873, 0.27307945489883423, 0.35775673389434814, -0.3695843815803528, 0.05571230500936508, 0.020435355603694916, -0.11406005918979645, -0.42958271503448486, 0.09131535142660141, -0.015288788825273514, 0.18418030440807343, -0.12531928718090057, 0.0491647832095623, -0.12709785997867584, -0.17033204436302185, 0.3870925009250641, 0.039007045328617096, 0.10532671213150024, 0.07413829118013382, 0.11832549422979355, -0.13055911660194397, 0.2806647717952728, -0.1370507925748825, -0.4130612909793854, -0.4800073206424713, 0.014491472393274307, -0.44642728567123413, 0.4696817696094513, -0.05870882794260979, 0.09889177978038788, -0.24706393480300903, 0.442368745803833, -0.5210950374603271, -0.08769143372774124, -0.21000421047210693, 0.018880415707826614, -0.24789611995220184, 0.05263632535934448, -0.2311726212501526, 0.11024023592472076, -0.11110872030258179, 0.07002496719360352, -0.003301667980849743, 0.10021309554576874, -0.1480380743741989, 0.00029849950806237757, -0.077478788793087, -0.0023644196335226297, -0.17429618537425995, 0.34754443168640137, -0.19171170890331268, 0.028128597885370255, 0.22836372256278992, -0.46372246742248535, 0.4429040253162384, -0.17323040962219238, 0.18250241875648499, -0.08720003068447113, 0.1526929885149002, -0.07420755922794342, 0.4613531529903412, 0.5068002939224243, 0.20615999400615692, 0.17125210165977478, -0.14857421815395355, -0.11120560765266418, -0.11934677511453629, 0.10665515810251236, -0.06592191755771637, -0.09709804505109787, 0.13161475956439972, -0.23774322867393494, -0.3262682855129242, 0.17487598955631256, 0.0480320081114769, -0.08949082344770432, 0.07314258068799973, 0.39394792914390564, -0.014578170143067837, 0.04456402733922005, 0.1768377274274826, 0.03025342896580696, -0.16926997900009155, 0.12975551187992096, 0.16830864548683167, -0.007425543386489153, 0.06378237903118134, -0.2455766499042511, 0.13733111321926117, 0.0731884092092514, -0.2844037115573883, -0.13330020010471344, 0.16221867501735687, -0.023375658318400383, -0.13909825682640076, -0.11909676343202591, 0.10769536346197128, 0.06007795035839081, -0.005510737653821707, -0.6480048894882202, -0.053126562386751175, -0.11533474922180176, -0.3619599938392639, -0.2136981189250946, 0.32254672050476074, -0.04514171928167343, -0.038720160722732544, 0.11427522450685501, -0.38330644369125366 ]
https://github.com/huggingface/datasets/issues/2256
Running `datase.map` with `num_proc > 1` uses a lot of memory
We did a patch release to fix this issue. It should be fixed in the new version 1.6.1 Thanks again for reporting and for the details :)
## Describe the bug Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow. ## Steps to reproduce the bug ```python from datasets import load_dataset dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False) def _prepare_sample(batch): return {"input_ids": list(), "attention_mask": list()} for split_name, dataset_split in list(dstc8_datset.items()): print(f"Processing {split_name}") encoded_dataset_split = dataset_split.map( function=_prepare_sample, batched=True, num_proc=4, remove_columns=dataset_split.column_names, batch_size=10, writer_batch_size=10, keep_in_memory=False, ) print(encoded_dataset_split) path = f"./data/encoded_{split_name}" encoded_dataset_split.save_to_disk(path) ``` ## Expected results Memory usage should stay within reasonable boundaries. ## Actual results This is htop-output from running the provided script. ![image](https://user-images.githubusercontent.com/8143425/115954836-66954980-a4f3-11eb-8340-0153bdc3a475.png) ## Versions ``` - Datasets: 1.6.0 - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] - Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10 ``` Running on WSL2
27
Running `datase.map` with `num_proc > 1` uses a lot of memory
[ 0.017026640474796295, -0.09525343775749207, -0.22408327460289001, 0.37434327602386475, 0.21219831705093384, -0.11806458979845047, 0.013961752876639366, 0.20367100834846497, 0.10392987728118896, 0.2086794674396515, -0.058750804513692856, 0.2750972807407379, -0.19250953197479248, 0.13216234743595123, -0.042170073837041855, 0.2790796458721161, 0.16899512708187103, 0.10198501497507095, -0.026879606768488884, -0.10996325314044952, -0.36957836151123047, 0.04816823825240135, -0.0583525151014328, -0.050519730895757675, -0.05167391151189804, 0.1446608304977417, 0.04372630640864372, 0.422036737203598, 0.00960568618029356, -0.6874069571495056, -0.06185009703040123, -0.2085181176662445, -0.015643410384655, 0.13719993829727173, -0.00011316050222376361, 0.06760215014219284, 0.16239917278289795, 0.060961779206991196, -0.1167495921254158, 0.441413551568985, -0.0031081296037882566, -0.30888548493385315, 0.11872359365224838, -0.2656903564929962, 0.06559896469116211, 0.11911067366600037, 0.15242934226989746, -0.45861461758613586, 0.14848464727401733, 0.3520108461380005, 0.2112196385860443, -0.22058477997779846, -0.10054659098386765, 0.10571827739477158, 0.08202662318944931, 0.014088613912463188, 0.19447927176952362, -0.29396313428878784, 0.16488946974277496, 0.11959460377693176, -0.13689249753952026, 0.24343740940093994, -0.041025400161743164, 0.07583120465278625, -0.043323107063770294, -0.0351802222430706, 0.532616376876831, -0.05404051020741463, 0.2818335294723511, -0.3125617206096649, 0.04900195077061653, -0.19160133600234985, 0.3874342143535614, -0.07024567574262619, -0.5076106190681458, -0.1937742531299591, 0.11543875187635422, -0.10033420473337173, -0.1561097502708435, 0.09116816520690918, 0.2502134442329407, -0.05169297009706497, 0.258762925863266, -0.13001412153244019, -0.1848568320274353, 0.07093489170074463, 0.031488485634326935, 0.14696122705936432, 0.4180976450443268, -0.23203130066394806, -0.47643646597862244, 0.29041194915771484, -0.012440410442650318, -0.008337460458278656, -0.1687871813774109, -0.18937164545059204, 0.3481355309486389, -0.2561609148979187, 0.12951748073101044, -0.4274294674396515, 0.1137375608086586, 0.3592018187046051, 0.15719884634017944, 0.07991912215948105, 0.4127914011478424, -0.28203627467155457, 0.22593367099761963, 0.1459924429655075, 0.17117922008037567, -0.3226466178894043, 0.2268475592136383, 0.03330456092953682, 0.21395529806613922, -0.26491430401802063, 0.09506481140851974, -0.04836651310324669, -0.1507062464952469, -0.1983848363161087, 0.10934873670339584, 0.34493499994277954, 0.239164799451828, 0.4380832314491272, 0.11534493416547775, 0.11351697146892548, 0.2767446041107178, 0.13423721492290497, -0.14951685070991516, -0.2036098837852478, -0.32119616866111755, -0.06319933384656906, -0.21208810806274414, -0.046418335288763046, -0.32384684681892395, -0.18281427025794983, 0.1998303234577179, 0.19191569089889526, 0.11639514565467834, -0.23956549167633057, -0.3933528959751129, -0.10729004442691803, 0.07227449119091034, -0.07022873312234879, 0.22392387688159943, 0.4635891914367676, -0.31557416915893555, 0.08382918685674667, -0.0165873896330595, 0.041598591953516006, -0.134555846452713, 0.3855772316455841, -0.11138270795345306, -0.3402656614780426, -0.06588158011436462, 0.15387950837612152, 0.06120918318629265, 0.4275605380535126, 0.11357435584068298, 0.14477375149726868, 0.19098997116088867, -0.33517929911613464, -0.16186293959617615, 0.032887231558561325, -0.48891064524650574, -0.1132335513830185, -0.007104953285306692, 0.39617007970809937, -0.3435913324356079, 0.10887108743190765, -0.0497790090739727, -0.2654540538787842, 0.34338995814323425, 0.17234231531620026, 0.0776137262582779, -0.17257417738437653, 0.0512763150036335, 0.1907849758863449, 0.2731926143169403, -0.12008075416088104, -0.7144668102264404, 0.32193154096603394, -0.2907380163669586, -0.4900856614112854, 0.13517875969409943, 0.25344324111938477, 0.25370532274246216, 0.15986473858356476, 0.1347021460533142, -0.15723958611488342, 0.04157433286309242, 0.39448240399360657, -0.3616718649864197, -0.061509132385253906, -0.18967397511005402, 0.14485371112823486, -0.030444113537669182, -0.18876314163208008, 0.2354688048362732, 0.19565176963806152, 0.184830442070961, 0.06934620440006256, 0.12917035818099976, 0.12325169891119003, -0.2305259108543396, -0.3616470694541931, 0.03400556370615959, -0.13554739952087402, -0.15873847901821136, 0.09197036176919937, -0.10025957971811295, -0.22343960404396057, -0.06835585832595825, -0.00010198914969805628, 0.1830417513847351, 0.13913047313690186, 0.19061346352100372, -0.2753894329071045, 0.17744718492031097, -0.11375437676906586, -0.04255862906575203, -0.17758172750473022, 0.12480396777391434, 0.3453863561153412, 0.2141292542219162, 0.04527366906404495, -0.1450684666633606, -0.17703863978385925, -0.07462643086910248, -0.20771200954914093, -0.20270846784114838, 0.07436040043830872, -0.15243510901927948, -0.07388998568058014, -0.03835063427686691, 0.14500324428081512, 0.5001693367958069, -0.3754054307937622, -0.04975919798016548, 0.10477020591497421, 0.3443700671195984, 0.20393188297748566, 0.17410704493522644, 0.06578533351421356, 0.12851761281490326, -0.2364410161972046, -0.3308802843093872, -0.13691627979278564, 0.06492379307746887, 0.1713639795780182, -0.0780227780342102, 0.037444863468408585, 0.4490587115287781, 0.11452922224998474, 0.1454506516456604, -0.3410212993621826, 0.1600632518529892, 0.577118992805481, -0.07413630932569504, 0.47858375310897827, 0.07261147350072861, 0.07779990136623383, 0.18814894556999207, -0.1933934986591339, 0.01078596618026495, 0.04785890877246857, -0.23273703455924988, -0.11772695183753967, 0.38291606307029724, -0.4594719409942627, 0.2770234942436218, 0.13094142079353333, 0.15078780055046082, -0.03786274045705795, 0.11743419617414474, -0.18152020871639252, 0.039147086441516876, 0.05174217000603676, -0.09730575978755951, -0.15086141228675842, 0.1853589564561844, -0.378826767206192, -0.33193591237068176, 0.05368313193321228, 0.14114663004875183, 0.22492007911205292, -0.18690858781337738, -0.19691823422908783, -0.23121105134487152, 0.39045101404190063, 0.4049925208091736, 0.4333195388317108, 0.2451392412185669, -0.11717412620782852, 0.043425630778074265, 0.15434657037258148, -0.028006425127387047, 0.0026095311623066664, 0.07985647022724152, 0.16462816298007965, 0.24134095013141632, -0.08355632424354553, 0.058918703347444534, -0.3962298035621643, -0.11078788340091705, 0.045005496591329575, 0.07007455825805664, 0.28219446539878845, 0.1848209649324417, -0.11350174248218536, 0.07855045050382614, -0.009444688446819782, -0.1302291452884674, 0.1515953242778778, 0.3159070312976837, -0.05585264414548874, 0.07534671574831009, -0.02279774658381939, -0.11786046624183655, 0.3015300929546356, -0.029425054788589478, -0.3052454888820648, -0.22549904882907867, 0.2504255473613739, 0.04738905653357506, 0.026171650737524033, -0.3701862096786499, -0.0797547698020935, -0.03061329573392868, -0.07791990786790848, 0.4462352395057678, 0.18288984894752502, 0.4120253920555115, -0.3494388461112976, 0.2099657654762268, 0.12642203271389008, 0.052068114280700684, 0.030901925638318062, -0.31939980387687683, -0.007185770198702812, -0.09354670345783234, -0.025719154626131058, -0.05449242144823074, 0.0276799313724041, 0.1300787776708603, 0.04780411347746849, 0.012235749512910843, -0.4430524408817291, -0.10372542589902878, -0.13792958855628967, 0.07621194422245026, 0.04738633334636688, -0.07117588073015213, 0.5148336291313171, 0.46861976385116577, -0.20888733863830566, 0.11995101720094681, -0.24954497814178467, 0.19770677387714386, 0.030701231211423874, -0.11340063065290451, -0.034192100167274475, 0.5302733778953552, 0.0954686850309372, -0.013593785464763641, 0.14712770283222198, -0.21872255206108093, 0.04803771525621414, 0.046747829765081406, 0.11615537106990814, -0.0075348056852817535, -0.014015612192451954, 0.2714855372905731, 0.09556979686021805, -0.20646658539772034, 0.35269856452941895, 0.03572116047143936, -0.5742660760879517, 0.1865030825138092, 0.205779567360878, 0.19659696519374847, -0.20611190795898438, 0.15695561468601227, -0.038446150720119476, -0.15946651995182037, 0.09252569079399109, 0.08644145727157593, -0.48500487208366394, -0.003628186183050275, -0.2713521718978882, -0.25707653164863586, -0.18909022212028503, -0.2245476096868515, -0.10410811007022858, -0.08363402634859085, -0.720974326133728, 0.21978797018527985, -0.12910526990890503, 0.12452133744955063, -0.030892452225089073, -0.141984224319458, 0.2715337872505188, -0.13799548149108887, 0.5918560028076172, -0.017558658495545387, 0.10786136984825134, -0.05991189926862717, -0.13365155458450317, -0.09643357992172241, 0.29257750511169434, -0.1398942917585373, 0.25080937147140503, 0.22415223717689514, 0.4123484790325165, -0.08880303055047989, -0.05084105208516121, 0.22222694754600525, -0.06750338524580002, -0.030182626098394394, -0.05205584689974785, -0.29814913868904114, -0.3569289445877075, -0.29218676686286926, 0.16157759726047516, 0.0856994166970253, -0.14745835959911346, 0.2813926637172699, -0.3761536478996277, -0.2086394876241684, -0.17975138127803802, 0.026338733732700348, -0.014479972422122955, 0.15509039163589478, -0.07109078019857407, -0.1490209698677063, 0.17922723293304443, 0.15376971662044525, 0.126495361328125, 0.16009259223937988, 0.0010718719568103552, 0.2472127079963684, 0.5169031023979187, -0.018288176506757736, 0.12091302126646042, 0.18648508191108704, 0.07410282641649246, -0.29620498418807983, -0.3612948954105377, 0.21459998190402985, -0.13117218017578125, 0.3985638916492462, 0.13406023383140564, 0.07669714838266373, -0.0986018180847168, -0.06808493286371231, 0.14218339323997498, 0.38566139340400696, -0.13706666231155396, -0.031402796506881714, -0.5341429114341736, -0.12939196825027466, 0.14149576425552368, 0.28375688195228577, 0.6403998732566833, -0.49220791459083557, 0.160325825214386, -0.18993663787841797, -0.018085205927491188, 0.26066097617149353, -0.566665768623352, 0.1991874724626541, 0.02118709310889244, -0.157183438539505, 0.07273197919130325, -0.0824752226471901, 0.02401081845164299, 0.2236727625131607, -0.040625691413879395, 0.0951351448893547, 0.1755388081073761, 0.2791385352611542, -0.006258255336433649, 0.17906412482261658, 0.5809512138366699, -0.2897743284702301, 0.07389600574970245, 0.19039177894592285, 0.17328418791294098, -0.3657779395580292, -0.05767347663640976, 0.12286154180765152, 0.28934404253959656, -0.2665387690067291, 0.0844297781586647, -0.247699573636055, -0.20592421293258667, 0.6053277850151062, -0.5085989832878113, 0.06626103073358536, -0.3923954963684082, 0.1315000206232071, -0.006240168120712042, 0.2510249614715576, 0.15390413999557495, -0.21306192874908447, 0.38335472345352173, 0.1547137051820755, 0.00796885509043932, 0.19623643159866333, -0.07608718425035477, -0.05016935616731644, -0.30325233936309814, 0.20780333876609802, -0.20848627388477325, -0.3046887516975403, -0.22224734723567963, 0.22826147079467773, -0.15448342263698578, 0.03956165909767151, 0.13630127906799316, -0.032601770013570786, -0.3848561644554138, -0.04625805467367172, 0.16129566729068756, 0.18762484192848206, -0.20313262939453125, 0.4562249481678009, 0.07954942435026169, -0.5572213530540466, -0.20430903136730194, 0.3115013539791107, 0.39955466985702515, 0.13817137479782104, 0.1499892771244049, -0.21126969158649445, -0.1817702054977417, -0.31199708580970764, -0.14556169509887695, 0.0793556421995163, 0.08913756906986237, 0.05062440037727356, 0.04599568247795105, -0.5559319257736206, -0.007488644681870937, -0.1959170699119568, 0.04763569310307503, 0.15677981078624725, -0.1345469206571579, 0.13492760062217712, -0.9469529390335083, 0.028895815834403038, -0.29958128929138184, 0.2641701102256775, 0.04600195959210396, 0.29070940613746643, -0.4795859754085541, 0.054717060178518295, -0.28265076875686646, 0.15932875871658325, -0.13061200082302094, 0.2547367215156555, 0.14263243973255157, -0.05109785497188568, -0.1865541785955429, -0.15045428276062012, 0.18255767226219177, 0.4199691712856293, -0.312138170003891, -0.27851465344429016, 0.4012570083141327, 0.12029001861810684, -0.03884972631931305, -0.13671284914016724, -0.15442916750907898, -0.02494022622704506, -0.07239535450935364, -0.1905851811170578, 0.22769993543624878, 0.019637437537312508, 0.04305345565080643, -0.25499415397644043, 0.3399241268634796, 0.09344463795423508, 0.5431179404258728, 0.39970850944519043, -0.13240428268909454, 0.2704547643661499, -0.49063777923583984, 0.27598607540130615, -0.1627195179462433, -0.15472351014614105, 0.3122447431087494, 0.23912006616592407, 0.1814577430486679, 0.10273337364196777, -0.10660755634307861, -0.07988069206476212, -0.22457537055015564, 0.2743816077709198, -0.02107653021812439, 0.3236095905303955, 0.03540589287877083, -0.15851250290870667, 0.13572482764720917, 0.23052901029586792, 0.007341230753809214, -0.15639057755470276, 0.31185197830200195, -0.0035607425961643457, 0.1849997490644455, 0.2696434259414673, 0.12333564460277557, 0.028465354815125465, 0.22842392325401306, 0.23705381155014038, -0.017000053077936172, -0.34527382254600525, -0.07512076944112778, 0.35016924142837524, -0.010684707202017307, -0.18964432179927826, 0.38194048404693604, 0.22728341817855835, 0.3568250238895416, 0.8521931767463684, -0.030143825337290764, 0.2798979878425598, 0.1931082308292389, 0.21461153030395508, -0.4119848310947418, -0.151774600148201, -0.08716284483671188, 0.7473504543304443, -0.3401390612125397, 0.2367350310087204, 0.13986138999462128, 0.009746626019477844, -0.3234897255897522, -0.1760217845439911, -0.3817685842514038, 0.16431905329227448, -0.39149799942970276, -0.31808120012283325, 0.3560566306114197, -0.1041688621044159, -0.039263930171728134, 0.14251714944839478, -0.13294018805027008, -0.007285106927156448, 0.7236797213554382, -0.14200562238693237, -0.1991828978061676, -0.10748924314975739, -0.17946845293045044, 0.12776531279087067, -0.18441985547542572, -0.24146009981632233, 0.041712455451488495, -0.25108832120895386, 0.05304324999451637, -0.16644726693630219, -0.08954454958438873, 0.27307945489883423, 0.35775673389434814, -0.3695843815803528, 0.05571230500936508, 0.020435355603694916, -0.11406005918979645, -0.42958271503448486, 0.09131535142660141, -0.015288788825273514, 0.18418030440807343, -0.12531928718090057, 0.0491647832095623, -0.12709785997867584, -0.17033204436302185, 0.3870925009250641, 0.039007045328617096, 0.10532671213150024, 0.07413829118013382, 0.11832549422979355, -0.13055911660194397, 0.2806647717952728, -0.1370507925748825, -0.4130612909793854, -0.4800073206424713, 0.014491472393274307, -0.44642728567123413, 0.4696817696094513, -0.05870882794260979, 0.09889177978038788, -0.24706393480300903, 0.442368745803833, -0.5210950374603271, -0.08769143372774124, -0.21000421047210693, 0.018880415707826614, -0.24789611995220184, 0.05263632535934448, -0.2311726212501526, 0.11024023592472076, -0.11110872030258179, 0.07002496719360352, -0.003301667980849743, 0.10021309554576874, -0.1480380743741989, 0.00029849950806237757, -0.077478788793087, -0.0023644196335226297, -0.17429618537425995, 0.34754443168640137, -0.19171170890331268, 0.028128597885370255, 0.22836372256278992, -0.46372246742248535, 0.4429040253162384, -0.17323040962219238, 0.18250241875648499, -0.08720003068447113, 0.1526929885149002, -0.07420755922794342, 0.4613531529903412, 0.5068002939224243, 0.20615999400615692, 0.17125210165977478, -0.14857421815395355, -0.11120560765266418, -0.11934677511453629, 0.10665515810251236, -0.06592191755771637, -0.09709804505109787, 0.13161475956439972, -0.23774322867393494, -0.3262682855129242, 0.17487598955631256, 0.0480320081114769, -0.08949082344770432, 0.07314258068799973, 0.39394792914390564, -0.014578170143067837, 0.04456402733922005, 0.1768377274274826, 0.03025342896580696, -0.16926997900009155, 0.12975551187992096, 0.16830864548683167, -0.007425543386489153, 0.06378237903118134, -0.2455766499042511, 0.13733111321926117, 0.0731884092092514, -0.2844037115573883, -0.13330020010471344, 0.16221867501735687, -0.023375658318400383, -0.13909825682640076, -0.11909676343202591, 0.10769536346197128, 0.06007795035839081, -0.005510737653821707, -0.6480048894882202, -0.053126562386751175, -0.11533474922180176, -0.3619599938392639, -0.2136981189250946, 0.32254672050476074, -0.04514171928167343, -0.038720160722732544, 0.11427522450685501, -0.38330644369125366 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Hi ! Sorry to hear that. This may come from another issue then. First can we check if this latency comes from the dataset itself ? You can try to load your dataset and benchmark the speed of querying random examples inside it ? ```python import time import numpy as np from datasets import load_from_disk dataset = load_from_disk(...) # or from load_dataset... _start = time.time() n = 100 for i in np.random.default_rng(42).integers(0, len(dataset), size=n): _ = dataset[i] print(time.time() - _start) ``` If we see a significant speed difference between your two datasets then it would mean that there's an issue somewhere
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
101
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Hi @lhoestq, here is the result. I additionally measured time to `load_from_disk`: * 60GB ``` loading took: 22.618776321411133 ramdom indexing 100 times took: 0.10214924812316895 ``` * 600GB ``` loading took: 1176.1764674186707 ramdom indexing 100 times took: 2.853600025177002 ``` Hmm.. I double checked that it's version 1.6.0. The difference seems quite big, could it be related to the running environment?
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
59
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
I'm surprised by the speed change. Can you give more details about your dataset ? The speed depends on the number of batches in the arrow tables and the distribution of the lengths of the batches. You can access the batches by doing `dataset.data.to_batches()` (use only for debugging) (it doesn't bring data in memory). Also can you explain what parameters you used if you used `map` calls ? Also if you have some code that reproduces the issue I'd be happy to investigate it.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
84
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Also if you could give us more info about your env like your OS, version of pyarrow and if you're using an HDD or a SSD
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
26
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Here are some details of my 600GB dataset. This is a dataset AFTER the `map` function and once I load this dataset, I do not use `map` anymore in the training. Regarding the distribution of the lengths, it is almost uniform (90% is 512 tokens, and 10% is randomly shorter than that -- typical setting for language modeling). ``` len(batches): 492763 batches[0]: pyarrow.RecordBatch attention_mask: list<item: uint8> child 0, item: uint8 input_ids: list<item: int16> child 0, item: int16 special_tokens_mask: list<item: uint8> child 0, item: uint8 token_type_ids: list<item: uint8> child 0, item: uint8 ``` Here the some parameters to `map` function just in case it is relevant: ``` num_proc=1 # as multi processing is slower in my case load_from_cache_file=False ```
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
118
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Regarding the environment, I am running the code on a cloud server. Here are some info: ``` Ubuntu 18.04.5 LTS # cat /etc/issue pyarrow 3.0.0 # pip list | grep pyarrow ``` The data is stored in SSD and it is mounted to the machine via Network File System. If you could point me to some of the commands to check the details of the environment, I would be happy to provide relevant information @lhoestq !
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
76
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
I am not sure how I could provide you with the reproducible code, since the problem only arises when the data is big. For the moment, I would share the part that I think is relevant. Feel free to ask me for more info. ```python class MyModel(pytorch_lightning.LightningModule) def setup(self, stage): self.dataset = datasets.load_from_disk(path) self.dataset.set_format("torch") def train_dataloader(self): collate_fn = transformers.DataCollatorForLanguageModeling( tokenizer=transformers.ElectraTokenizerFast.from_pretrained(tok_path) ) dataloader = torch.utils.DataLoader( self.dataset, batch_size=32, collate_fn=collate_fn, num_workers=8, pin_memory=True, ) ```
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
71
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Hi ! Sorry for the delay I haven't had a chance to take a look at this yet. Are you still experiencing this issue ? I'm asking because the latest patch release 1.6.2 fixed a few memory issues that could have lead to slow downs
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
45
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Hi! I just ran the same code with different datasets (one is 60 GB and another 600 GB), and the latter runs much slower. ETA differs by 10x.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
28
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
@lhoestq and @hwijeen Despite upgrading to datasets 1.6.2, still experiencing extremely slow (2h00) loading for a 300Gb local dataset shard size 1.1Gb on local HDD (40Mb/s read speed). This corresponds almost exactly to total data divided by reading speed implying that it reads the entire dataset at each load. Stack details: ========= > GCC version: Could not collect > Clang version: Could not collect > CMake version: Could not collect > > Python version: 3.7 (64-bit runtime) > Is CUDA available: True > CUDA runtime version: 10.2.89 > GPU models and configuration: GPU 0: GeForce GTX 1050 > Nvidia driver version: 457.63 > cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll > HIP runtime version: N/A > MIOpen runtime version: N/A > > Versions of relevant libraries: > [pip3] datasets==1.6.2 > [pip3] transformers==4.5.1 > [pip3] numpy==1.19.1 > [pip3] numpydoc==1.1.0 > [pip3] pytorch-metric-learning==0.9.98 > [pip3] torch==1.8.1 > [pip3] torchaudio==0.8.1 > [pip3] torchvision==0.2.2 > [conda] blas 2.16 mkl conda-forge > [conda] cudatoolkit 10.2.89 hb195166_8 conda-forge > [conda] libblas 3.8.0 16_mkl conda-forge > [conda] libcblas 3.8.0 16_mkl conda-forge > [conda] liblapack 3.8.0 16_mkl conda-forge > [conda] liblapacke 3.8.0 16_mkl conda-forge > [conda] mkl 2020.1 216 > [conda] numpy 1.19.1 py37hae9e721_0 conda-forge > [conda] numpydoc 1.1.0 py_1 conda-forge > [conda] pytorch 1.8.1 py3.7_cuda10.2_cudnn7_0 pytorch > [conda] pytorch-metric-learning 0.9.98 pyh39e3cac_0 metric-learning > [conda] torchaudio 0.8.1 py37 pytorch > [conda] torchvision 0.2.2 py_3 pytorch
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
227
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Hi @lhoestq thanks for the quick turn-around, actually the plain vanilla way, without an particular knack or fashion, I tried to look into the documentation for some alternative but couldn't find any > dataset = load_from_disk(dataset_path=os.path.join(datasets_dir,dataset_dir))
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
36
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
I’m facing the same issue when loading a 900GB dataset (stored via `save_to_disk`): `load_from_disk(path_to_dir)` takes 1.5 hours and htop consistently shows high IO rates > 120 M/s.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
27
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
@tsproisl same here, smells like ~~teen spirit~~ intended generator inadvertently ending up iterator @lhoestq perhaps solution to detect bug location in code is to track its signature via HD read usage monitoring, option is to add tracking decorator on top each function and sequentially close all hatches from top to bottom, suggest PySmart https://pypi.org/project/pySMART/ a Smartmontools implementation
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
57
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
I wasn't able to reproduce this on a toy dataset of around 300GB: ```python import datasets as ds s = ds.load_dataset("squad", split="train") s4000 = ds.concatenate_datasets([s] * 4000) print(ds.utils.size_str(s4000.data.nbytes)) # '295.48 GiB' s4000.save_to_disk("tmp/squad_4000") ``` ```python import psutil import time from datasets import load_from_disk disk = "disk0" # You may have to change your disk here iocnt1 = psutil.disk_io_counters(perdisk=True)[disk] time1 = time.time() s4000_reloaded = load_from_disk("tmp/squad_4000") time2 = time.time() iocnt2 = psutil.disk_io_counters(perdisk=True)[disk] print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18 print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s ``` Could you run this on your side and tell me if how much time it takes ? Please run this when your machine is idle so that other processes don't interfere. I got these results on my macbook pro on datasets 1.6.2
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
130
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Just tried on google colab and got ~1min for a 15GB dataset (only 200 times SQuAD), while it should be instantaneous. The time is spent reading the Apache Arrow table from the memory mapped file. This might come a virtual disk management issue. I'm trying to see if I can still speed it up on colab.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
56
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
@lhoestq what is Google Colab's HD read speed, is it possible to introspect incl. make like SSD or HDD ?
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
20
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
@lhoestq Thank you! The issue is getting more interesting. The second script is still running, but it's definitely taking much longer than 15 seconds.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
24
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Okay, here’s the ouput: Blocks read 158396 Elapsed time: 529.10s Also using datasets 1.6.2. Do you have any ideas, how to pinpoint the problem?
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
24
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
@lhoestq, @tsproisl mmmh still writing on my side about 1h to go, thinking on it are your large datasets all monoblock unsharded ? mine is 335 times 1.18Gb shards.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
29
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
The 529.10s was a bit too optimistic. I cancelled the reading process once before running it completely, therefore the harddrive cache probably did its work. Here are three consecutive runs First run (freshly written to disk): Blocks read 309702 Elapsed time: 1267.74s Second run (immediately after): Blocks read 113944 Elapsed time: 417.55s Third run (immediately after): Blocks read 42518 Elapsed time: 199.19s
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
62
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
@lhoestq First test > elapsed time: 11219.05s Second test running bear with me, for Windows users slight trick to modify original "disk0" string: First find physical unit relevant key in dictionnary ``` import psutil psutil.disk_io_counters(perdisk=True) ``` > {'PhysicalDrive0': sdiskio(read_count=18453286, write_count=4075333, read_bytes=479546467840, write_bytes=161590275072, read_time=20659, write_time=2464), > 'PhysicalDrive1': sdiskio(read_count=1495778, write_count=388781, read_bytes=548628622336, write_bytes=318234849280, read_time=426066, write_time=19085)} In my case it's _PhysicalDrive1_ Then insert relevant key's string as _disk_ variable ``` psutil.disk_io_counters() disk = 'PhysicalDrive1' # You may have to change your disk here iocnt1 = psutil.disk_io_counters(perdisk=True)[disk] time1 = time.time() s4000_reloaded = load_from_disk("your path here") time2 = time.time() iocnt2 = psutil.disk_io_counters(perdisk=True)[disk] print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18 print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s ```
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
115
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Unfortunately no. Thanks for running the benchmark though, it shows that you machine does a lot of read operations. This is not expected: in other machines it does almost no read operations which enables a very fast loading. I did some tests on google colab and have the same issue. The first time the dataset arrow file is memory mapped takes always a lot of time (time seems linear with respect to the dataset size). Reloading the dataset is then instantaneous since the arrow file has already been memory mapped. I also tried using the Arrow IPC file format (see #1933) instead of the current streaming format that we use but it didn't help. Memory mapping is handled by the OS and depends on the disk you're using, so I'm not sure we can do much about it. I'll continue to investigate anyway, because I still don't know why in some cases it would go through the entire file (high `Blocks read ` as in your tests) and in other cases it would do almost no reading.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
177
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Just want to say that I am seeing the same issue. Dataset size if 268GB and it takes **3 hours** to load `load_from_disk`, using dataset version `1.9.0`. Filesystem underneath is `Lustre`
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
31
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Hi @lhoestq, confirmed Windows issue, exact same code running on Linux OS total loading time about 3 minutes.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
18
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2252
Slow dataloading with big datasets issue persists
Hmm that's different from what I got. I was on Ubuntu when reporting the initial issue.
Hi, I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122). However, the problem seems to persist. Here is the profiled results: 1) Running with 60GB ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 517.96 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ model_backward | 0.26144 |100 | 26.144 | 5.0475 | model_forward | 0.11123 |100 | 11.123 | 2.1474 | get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 | ``` 3) Running with 600GB, datasets==1.6.0 ``` Action | Mean duration (s) |Num calls | Total time (s) | Percentage % | ------------------------------------------------------------------------------------------------------------------------------------ Total | - |_ | 4563.2 | 100 % | ------------------------------------------------------------------------------------------------------------------------------------ get_train_batch | 5.1279 |100 | 512.79 | 11.237 | model_backward | 4.8394 |100 | 483.94 | 10.605 | model_forward | 0.12162 |100 | 12.162 | 0.26652 | ``` I see that `get_train_batch` lags when data is large. Could this be related to different issues? I would be happy to provide necessary information to investigate.
16
Slow dataloading with big datasets issue persists
[ -0.3379143476486206, 0.24119766056537628, -0.23487317562103271, 0.21613629162311554, 0.19453860819339752, -0.09882555156946182, 0.2690477669239044, 0.30331945419311523, 0.10507366061210632, 0.09826940298080444, -0.13185295462608337, -0.027542321011424065, 0.10590220987796783, 0.20390313863754272, -0.32862839102745056, 0.16624577343463898, 0.018378958106040955, 0.1423051655292511, -0.3006122410297394, -0.27946189045906067, 0.07450561225414276, -0.18865981698036194, -0.022744743153452873, -0.2876189947128296, -0.28217142820358276, -0.10142993181943893, 0.20933571457862854, 0.17208535969257355, -0.17031681537628174, -0.113465316593647, -0.01676842011511326, 0.2633727490901947, -0.062323197722435, 0.40701374411582947, -0.00009982079791370779, 0.02142828144133091, 0.1741272658109665, 0.13355150818824768, -0.493472695350647, 0.49532368779182434, 0.04345503821969032, -0.3906327188014984, -0.0632130354642868, -0.08671189844608307, 0.03092820569872856, -0.10657662898302078, -0.17635224759578705, -0.12810437381267548, 0.23856733739376068, -0.08366367965936661, 0.3296981453895569, 0.10397297888994217, -0.18954533338546753, -0.23219332098960876, 0.0025382002349942923, 0.029869521036744118, -0.07043036073446274, 0.23824508488178253, 0.449099600315094, -0.07315801084041595, -0.3923932909965515, 0.029536237940192223, -0.12646321952342987, 0.06471563875675201, -0.07159166038036346, -0.18573391437530518, -0.03565332293510437, 0.03755466639995575, 0.13292019069194794, 0.165251225233078, 0.48657798767089844, 0.16758213937282562, -0.21686972677707672, -0.20953254401683807, -0.1900847852230072, -0.23135392367839813, 0.1202545017004013, -0.1483650505542755, -0.11129652708768845, -0.10739199072122574, 0.047009069472551346, -0.1267913281917572, -0.00910821370780468, 0.06418710947036743, -0.13807730376720428, -0.19969917833805084, -0.07457251846790314, -0.11541006714105606, 0.12300387024879456, -0.255027711391449, 0.052401505410671234, -0.17636695504188538, 0.3488312363624573, 0.05422801524400711, -0.40677306056022644, -0.012699007987976074, 0.3187097907066345, 0.03466356545686722, 0.048997558653354645, -0.04908132925629616, 0.09300422668457031, 0.2760573625564575, 0.00009583670907886699, -0.15512296557426453, 0.43966859579086304, 0.09245255589485168, -0.3303121030330658, -0.24151106178760529, 0.4716617465019226, 0.03406757861375809, -0.28631722927093506, 0.13593697547912598, -0.17628617584705353, -0.2076359987258911, 0.19947949051856995, -0.3676208555698395, -0.05709240958094597, -0.1594381183385849, -0.23650625348091125, 0.11560893058776855, 0.20512445271015167, -0.07964954525232315, 0.14212289452552795, 0.44077789783477783, -0.15834827721118927, 0.23508915305137634, 0.0524660125374794, -0.09183765947818756, -0.2769366204738617, -0.19335933029651642, -0.26730024814605713, -0.23062166571617126, -0.14815856516361237, 0.051013216376304626, 0.40529802441596985, -0.11636374145746231, -0.14178983867168427, 0.14027166366577148, -0.01375554408878088, -0.030262818560004234, -0.13242056965827942, -0.2631322145462036, -0.1602097451686859, 0.03483724594116211, -0.1441451609134674, 0.43711912631988525, -0.028926266357302666, 0.1418897807598114, -0.1567213535308838, -0.052766937762498856, -0.41672635078430176, -0.21803319454193115, 0.1689622402191162, 0.349293977022171, 0.03010088950395584, 0.032229308038949966, -0.1661459505558014, -0.009092282503843307, -0.2129705399274826, -0.08377479016780853, -0.36576253175735474, 0.08362118899822235, 0.14314094185829163, -0.019905928522348404, 0.025509756058454514, 0.41337111592292786, -0.2344103753566742, 0.15881021320819855, -0.2338150441646576, 0.16529053449630737, 0.2534365952014923, 0.5402155518531799, -0.1986248791217804, 0.1898178905248642, -0.12030256539583206, -0.12053435295820236, 0.2752486765384674, -0.09305430948734283, -0.6065157055854797, 0.4148111641407013, -0.18988730013370514, -0.07081274688243866, 0.2506397068500519, 0.23632510006427765, 0.35847747325897217, -0.2843351662158966, 0.23374809324741364, 0.4717908799648285, 0.07000157982110977, 0.22420267760753632, -0.3713316023349762, -0.02663387358188629, -0.11836422234773636, 0.4554637372493744, -0.04218428581953049, 0.11459025740623474, 0.24814510345458984, 0.1592664122581482, 0.18791547417640686, -0.05227692797780037, 0.03139889985322952, 0.2703886032104492, 0.09048061072826385, -0.10955610871315002, -0.03763874992728233, 0.2666216194629669, -0.45715057849884033, 0.19583626091480255, 0.18237102031707764, -0.1238689050078392, 0.21762071549892426, 0.06946172565221786, -0.2148706316947937, -0.1096334457397461, -0.19485041499137878, 0.3025459051132202, 0.18213236331939697, 0.08351112902164459, -0.0035587602760642767, 0.15635430812835693, 0.20898394286632538, 0.2800122797489166, -0.2592436969280243, -0.134954035282135, -0.11041217297315598, 0.1376926451921463, 0.10827838629484177, -0.17750796675682068, 0.36122483015060425, -0.05083891749382019, 0.035819172859191895, -0.13047313690185547, -0.13424593210220337, -0.054262418299913406, -0.08713635802268982, 0.2473168522119522, 0.08735891431570053, 0.23486636579036713, 0.040256112813949585, 0.21927474439144135, 0.17691245675086975, 0.035266466438770294, 0.21557524800300598, -0.15857796370983124, -0.08563949912786484, 0.32032495737075806, -0.17798757553100586, 0.03510814160108566, 0.22832033038139343, -0.33283722400665283, 0.38408976793289185, -0.02428060956299305, 0.37856224179267883, 0.031026853248476982, 0.44086915254592896, 0.16246163845062256, 0.36822178959846497, 0.37092646956443787, -0.10405239462852478, 0.09141092002391815, 0.29319867491722107, 0.07639587670564651, -0.05046159774065018, 0.1203666403889656, -0.0066904849372804165, -0.037662848830223083, 0.01684674620628357, -0.063726045191288, 0.4893690347671509, 0.30202531814575195, 0.09878581017255783, -0.24595847725868225, 0.23292985558509827, -0.30259162187576294, 0.06537477672100067, -0.10266022384166718, 0.16638348996639252, 0.3102746307849884, 0.302706241607666, -0.07631738483905792, -0.3609935939311981, -0.1690816432237625, 0.2813648581504822, 0.18752926588058472, -0.04945455864071846, -0.06129368022084236, -0.19476976990699768, 0.007136831991374493, -0.03001938760280609, -0.028391344472765923, -0.08664465695619583, -0.23109936714172363, 0.03686707466840744, 0.19689367711544037, -0.17531369626522064, 0.11216337978839874, 0.012894142419099808, 0.321514755487442, 0.1713694930076599, -0.13369175791740417, -0.12056233733892441, -0.1742478311061859, -0.11158562451601028, 0.1839347928762436, 0.2387481927871704, -0.07370179891586304, 0.1889302134513855, 0.18943345546722412, -0.04128655046224594, -0.11675061285495758, -0.18997281789779663, -0.01824212446808815, 0.21630246937274933, -0.027567580342292786, -0.27886831760406494, 0.3536382019519806, 0.25312432646751404, -0.15286676585674286, 0.21317972242832184, -0.2589322030544281, -0.07611341774463654, 0.1872459352016449, -0.0886407271027565, 0.043792881071567535, 0.09780406951904297, -0.27785220742225647, -0.16394580900669098, -0.5151047706604004, 0.21530084311962128, -0.11450380086898804, 0.09924259036779404, 0.15936894714832306, 0.08011087030172348, -0.12047865241765976, 0.13691465556621552, 0.19026325643062592, -0.16189782321453094, -0.35716453194618225, 0.3189350664615631, 0.007618587929755449, -0.29933759570121765, -0.3729797899723053, -0.02888144925236702, 0.005337781738489866, 0.3013976812362671, -0.30260688066482544, 0.1955692023038864, -0.45322322845458984, 0.15916591882705688, 0.059043578803539276, 0.2009296864271164, 0.10412297397851944, -0.2422981858253479, -0.34383857250213623, -0.09064730256795883, -0.02136942744255066, 0.03649634122848511, -0.046220455318689346, 0.14157478511333466, -0.3584398925304413, 0.24261832237243652, -0.052515849471092224, 0.4187874495983124, 0.03380362689495087, -0.17206093668937683, 0.35800376534461975, 0.1862005591392517, 0.3885679244995117, -0.12177237868309021, -0.2756253182888031, 0.023859279230237007, -0.14956772327423096, 0.00801350362598896, 0.24999506771564484, -0.07545968145132065, -0.3113879859447479, -0.09258925914764404, -0.0257271695882082, -0.062397025525569916, -0.21879364550113678, 0.2040475457906723, 0.026468170806765556, 0.041731078177690506, 0.2563554346561432, -0.08283687382936478, -0.3336426019668579, -0.145773783326149, 0.06195734068751335, -0.19510237872600555, -0.11294755339622498, -0.3580546975135803, -0.12785111367702484, 0.30862462520599365, -0.43042677640914917, 0.05174916237592697, -0.19553735852241516, 0.30780646204948425, 0.08754380792379379, -0.23928053677082062, 0.2240891456604004, 0.10165950655937195, 0.46732184290885925, 0.10679236054420471, 0.26415592432022095, -0.2233525663614273, -0.12561888992786407, -0.14306823909282684, -0.02721213735640049, -0.07238440960645676, 0.1023162230849266, 0.44725272059440613, 0.2581774592399597, -0.4548158049583435, -0.1208227127790451, 0.08309804648160934, 0.1555299460887909, -0.05965615063905716, -0.34594640135765076, -0.14946427941322327, -0.02519863471388817, -0.010041679255664349, 0.10697043687105179, -0.017208779230713844, 0.08580822497606277, -0.1754309982061386, -0.19869861006736755, -0.29071810841560364, 0.06884714215993881, 0.18425904214382172, 0.017659947276115417, 0.12973347306251526, 0.028526877984404564, 0.48625537753105164, -0.04098447039723396, 0.32135653495788574, 0.3322237730026245, 0.5907743573188782, -0.02628427930176258, -0.08842051774263382, 0.3542581796646118, 0.02808562107384205, 0.10803637653589249, 0.44950324296951294, 0.30564671754837036, -0.07817281037569046, -0.2029910534620285, 0.2432185560464859, -0.3364776074886322, 0.1773367077112198, 0.13141702115535736, -0.12255817651748657, -0.2882671058177948, 0.04234152287244797, 0.37348246574401855, -0.03435998037457466, 0.05752227455377579, 0.32699596881866455, -0.2132236361503601, 0.1271018534898758, 0.011317966505885124, -0.10010235011577606, 0.8172362446784973, -0.26021456718444824, 0.11873152107000351, -0.17245949804782867, 0.03579123690724373, 0.11359886825084686, -0.28439995646476746, -0.040365856140851974, -0.26514187455177307, -0.3981735110282898, 0.3295348286628723, -0.1057545393705368, 0.0060846274718642235, 0.1990974247455597, 0.02450822852551937, 0.0016282142605632544, -0.0918838232755661, 0.2678208649158478, -0.1910751760005951, 0.4108101725578308, 0.01539247389882803, -0.2534596920013428, -0.4648924469947815, 0.2529776096343994, 0.10188712179660797, 0.09725683927536011, -0.10461536049842834, -0.013466275297105312, -0.01605827733874321, -0.04354976862668991, 0.05179249867796898, -0.0008064302965067327, -0.05038931593298912, 0.48360610008239746, -0.052711691707372665, -0.09812743961811066, -0.011587359011173248, -0.1314885914325714, -0.3296126425266266, 0.21820342540740967, -0.05432700365781784, 0.17995864152908325, -0.1040802001953125, 0.20196115970611572, 0.10482162982225418, -0.21977181732654572, 0.14722436666488647, -0.11467072367668152, 0.12870879471302032, -0.007516053039580584, -0.08362428098917007, -0.18449652194976807, -0.213282510638237, 0.24576036632061005, 0.04227311164140701, -0.38008004426956177, -0.11971999704837799, -0.016734616830945015, 0.04171261936426163, -0.059250544756650925, 0.2779942452907562, 0.22213639318943024, 0.10450262576341629, 0.25843730568885803, 0.24945713579654694, -0.24325920641422272, -0.22642087936401367, 0.6324506998062134, 0.05672451853752136, -0.07374667376279831, 0.4765279293060303, -0.07184884697198868, -0.3130547106266022, -0.2688257098197937, 0.037281494587659836, 0.3087914288043976, -0.38886287808418274, 0.20500518381595612, -0.15928547084331512, -0.16031841933727264, 0.24579748511314392, -0.07405593246221542, 0.01763128489255905, -0.13964898884296417, -0.11110278964042664, -0.1833598017692566, -0.24938525259494781, -0.05619242042303085, -0.18565453588962555, -0.038486506789922714, -0.20427997410297394, -0.18258285522460938, -0.08451548218727112, 0.41718173027038574, -0.4579015374183655, 0.09285291284322739, -0.0570216104388237, 0.08860036730766296, 0.09385179728269577, -0.38407355546951294, 0.08229169249534607, -0.022961638867855072, 0.274671733379364, -0.018323523923754692, -0.0923563688993454, -0.4367782175540924, 0.0664350613951683, 0.07603264600038528, -0.10533801466226578, 0.01615782454609871, 0.03138940408825874, -0.33892586827278137, -0.005140836350619793, -0.158164843916893, 0.14066973328590393, -0.06804008036851883, -0.09461506456136703, -0.36649614572525024, 0.39517349004745483, 0.03427222743630409, -0.09040015190839767, 0.34093597531318665, 0.06533721834421158, 0.2747858166694641, 0.09589949995279312, -0.08589283376932144, -0.04103081300854683, -0.21090437471866608, -0.18938519060611725, 0.04325300455093384, 0.266684889793396, -0.06555692851543427, 0.31171122193336487, -0.36781516671180725, 0.045056749135255814, 0.3160598576068878, 0.26002931594848633, 0.4946984350681305, 0.07968584448099136, -0.338689923286438, 0.08116816729307175, 0.32892706990242004, -0.11571316421031952, -0.29540061950683594, 0.0582779124379158, -0.1362875998020172, 0.07511503249406815, 0.10328749567270279, 0.14786945283412933, -0.09575788676738739, 0.1825675219297409, 0.023506635800004005, 0.11378522962331772, 0.05585670471191406, -0.16467691957950592, 0.09266914427280426, 0.25667840242385864, -0.1420697420835495, 0.361796498298645, 0.17336107790470123, -0.01895158924162388, 0.3212583065032959, 0.0812869518995285, 0.35507771372795105, -0.05445960909128189, 0.21335047483444214, -0.2947756052017212, -0.5203680396080017, 0.14317242801189423, 0.3969954252243042, -0.19266825914382935, 0.09883718192577362, -0.11129302531480789, 0.031024333089590073, -0.04802878573536873, -0.002292576478794217, -0.29758068919181824, 0.1090601459145546, -0.30312874913215637, -0.025104934349656105, 0.2345695197582245, -0.13240332901477814, -0.1519707888364792, 0.07098561525344849, -0.24774472415447235, 0.0666748657822609, 0.09309504926204681, 0.16814586520195007, 0.08210653811693192, -0.5101925730705261, -0.10165800154209137, 0.027323011308908463, 0.19353730976581573, -0.1723499298095703, 0.20642168819904327, -0.13420911133289337, -0.05777335911989212, 0.12676569819450378, 0.18178170919418335, 0.36065417528152466, 0.35653117299079895, 0.16844625771045685, 0.08878947794437408, 0.04935762286186218, -0.15140646696090698, -0.28822061419487, 0.36476126313209534, 0.0032787721138447523, 0.1507798135280609, 0.17330284416675568, 0.18042513728141785, -0.4314885139465332, -0.3435203433036804, 0.03887030854821205, -0.27503687143325806, -0.13215693831443787, 0.05476929247379303, 0.18706510961055756, -0.1979309320449829, -0.3220537006855011, -0.14174653589725494, -0.210297092795372, -0.26665160059928894, 0.28145378828048706, -0.3521045744419098, 0.1027761772274971, -0.10716592520475388, 0.14396224915981293, -0.31936758756637573, 0.7685775756835938, 0.24335621297359467, 0.2246306836605072, -0.2747213840484619, -0.17982858419418335, -0.5545996427536011, 0.2898878753185272, -0.3687400817871094, 0.11231257021427155, 0.06772779673337936, 0.5417276620864868, 0.14451318979263306, 0.019332120195031166, 0.032683614641427994, -0.09251817315816879, -0.03992508724331856, -0.14397533237934113, -0.5313015580177307, 0.09567587822675705, 0.03367933630943298, 0.03278901427984238, -0.05420057475566864, -0.49840760231018066, 0.24036000669002533, -0.005999651737511158, 0.2805693447589874, 0.013503299094736576, -0.09116967767477036, -0.18831486999988556, 0.39895012974739075, 0.2842514216899872, -0.012044128961861134, 0.3038026690483093, 0.055535830557346344, -0.34260237216949463, -0.38187992572784424, -0.16546104848384857, 0.03707766532897949, 0.11465374380350113, 0.32524123787879944, -0.0701008290052414, -0.010283964686095715, -0.050231847912073135, -0.03570003807544708, 0.10490189492702484, -0.14857491850852966, 0.03531895577907562, 0.08644923567771912, -0.1465514600276947, 0.12291150540113449, 0.3894011080265045, 0.11092765629291534, 0.24325324594974518, -0.03847137466073036, 0.016466038301587105, -0.3924693465232849, -0.21976205706596375, 0.17030225694179535, -0.08475220948457718, -0.17237059772014618, -0.22331811487674713, 0.44977450370788574, -0.0446559339761734, 0.24046555161476135, -0.12325673550367355, 0.10664699971675873, 0.23776116967201233, -0.02881583571434021, -0.07331956923007965, 0.33030635118484497, -0.1093934029340744, -0.019943876191973686, 0.027100911363959312, 0.16566826403141022, -0.016739455983042717, -0.16038119792938232, -0.049841560423374176, 0.035643018782138824 ]
https://github.com/huggingface/datasets/issues/2250
some issue in loading local txt file as Dataset for run_mlm.py
Hi, 1. try ```python dataset = load_dataset("text", data_files={"train": ["a1.txt", "b1.txt"], "test": ["c1.txt"]}) ``` instead. Sadly, I can't reproduce the error on my machine. If the above code doesn't resolve the issue, try to update the library to the newest version (`pip install datasets --upgrade`). 2. https://github.com/huggingface/transformers/blob/3ed5e97ba04ce9b24b4a7161ea74572598a4c480/examples/pytorch/language-modeling/run_mlm.py#L258-L259 This is the original code. You'll have to modify the example source to work with multiple train files. To make it easier, let's say "|" will act as a delimiter between files: ```python if data_args.train_file is not None: data_files["train"] = data_args.train_file.split("|") # + .split("|") ``` Then call the script as follows (**dataset_name must be None**): ```bash python run_mlm.py [... other args] --train_file a1.txt|b1.txt ```
![image](https://user-images.githubusercontent.com/14968123/115773877-18cef300-a3c6-11eb-8e58-a9cbfd1001ec.png) first of all, I tried to load 3 .txt files as a dataset (sure that the directory and permission is OK.), I face with the below error. > FileNotFoundError: [Errno 2] No such file or directory: 'c' by removing one of the training .txt files It's fixed and although if I put all file as training it's ok ![image](https://user-images.githubusercontent.com/14968123/115774207-867b1f00-a3c6-11eb-953b-905cfb112d25.png) ![image](https://user-images.githubusercontent.com/14968123/115774264-9b57b280-a3c6-11eb-9f36-7b109f0e5a31.png) after this, my question is how could I use this defined Dataset for run_mlm.py for from scratch pretraining. by using --train_file path_to_train_file just can use one .txt , .csv or, .json file. I tried to set my defined Dataset as --dataset_name but the below issue occurs. > Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 336, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 621, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/dataset/dataset.py > During handling of the above exception, another exception occurred: > Traceback (most recent call last): File "run_mlm.py", line 486, in <module> main() File "run_mlm.py", line 242, in main datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name, cache_dir=model_args.cache_dir) File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 719, in load_dataset use_auth_token=use_auth_token, File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 347, in prepare_module combined_path, github_file_path FileNotFoundError: Couldn't find file locally at dataset/dataset.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.6.0/datasets/dataset/dataset.py. The file is also not present on the master branch on github.
110
some issue in loading local txt file as Dataset for run_mlm.py
[ -0.3615783154964447, -0.043436866253614426, -0.11581188440322876, 0.13512976467609406, 0.3201223611831665, 0.023467807099223137, 0.3959560692310333, 0.39863935112953186, 0.2328670471906662, 0.003913163673132658, 0.15834368765354156, 0.1643429547548294, -0.034104783087968826, 0.2631700932979584, 0.09644067287445068, -0.14756903052330017, -0.14513276517391205, 0.15910165011882782, -0.020562030375003815, -0.26138317584991455, -0.15952222049236298, 0.291861891746521, -0.0009297766955569386, 0.00839967280626297, -0.2566108703613281, -0.09328356385231018, 0.08304993808269501, 0.5165311694145203, -0.0680033266544342, -0.256884902715683, -0.08294851332902908, -0.17667008936405182, 0.2814105153083801, 0.3118763566017151, -0.00010099948121933267, 0.10095996409654617, 0.14571613073349, -0.12151675671339035, -0.16418595612049103, -0.051117610186338425, 0.10060287266969681, -0.1719193309545517, 0.26316922903060913, -0.18490491807460785, -0.1260255128145218, -0.16492797434329987, 0.1210482120513916, -0.3854638636112213, 0.28437238931655884, 0.5490003824234009, 0.2959417402744293, 0.2020682394504547, -0.018455971032381058, 0.07925679534673691, 0.42775580286979675, 0.14758846163749695, 0.10858841985464096, 0.380167692899704, 0.1436929553747177, -0.2908460795879364, -0.035952188074588776, 0.3245314359664917, -0.2316707968711853, 0.21906521916389465, 0.20319271087646484, 0.23296302556991577, 0.4413682818412781, -0.01760663278400898, 0.08463039994239807, 0.20980753004550934, 0.35455945134162903, -0.45044881105422974, -0.10188762098550797, -0.1305859237909317, -0.01164949219673872, -0.4116550087928772, 0.06491472572088242, 0.22048886120319366, -0.18889836966991425, 0.31443536281585693, 0.18356630206108093, -0.08792038261890411, -0.2540684640407562, 0.05552253872156143, -0.04471239820122719, 0.13084015250205994, -0.1492343693971634, -0.03471548855304718, -0.08969400078058243, 0.22234739363193512, 0.17123520374298096, 0.02006729133427143, 0.17846664786338806, 0.13119515776634216, -0.06976630538702011, 0.18652625381946564, -0.05654186010360718, -0.08943608403205872, -0.025231612846255302, -0.28708603978157043, -0.015205915085971355, 0.0625729188323021, 0.30117082595825195, 0.2100079208612442, 0.1293461173772812, -0.1539108008146286, -0.023995505645871162, 0.09304076433181763, 0.33451735973358154, -0.27903711795806885, -0.3938288390636444, -0.05635708570480347, -0.20773132145404816, -0.20612137019634247, -0.04230451211333275, -0.01396146509796381, 0.1910935789346695, -0.3423944413661957, -0.1891142576932907, 0.03599825128912926, -0.13649414479732513, -0.05273200571537018, -0.1036527082324028, 0.4106219708919525, -0.0583573542535305, -0.20919382572174072, 0.22348542511463165, 0.1693045198917389, -0.4159567356109619, -0.02168727107346058, -0.24669474363327026, 0.15455177426338196, 0.038660138845443726, -0.19043739140033722, 0.20088860392570496, 0.014081576839089394, 0.37154707312583923, -0.06240945681929588, 0.010960961692035198, -0.07876034080982208, 0.2712634205818176, -0.2318970113992691, 0.07139774411916733, 0.4797991216182709, 0.03176978603005409, -0.0921410620212555, 0.36525118350982666, -0.029318196699023247, 0.02061045914888382, 0.14804787933826447, -0.15289606153964996, -0.32506534457206726, 0.07949385046958923, 0.2406502664089203, 0.29752299189567566, -0.012582727707922459, 0.27490079402923584, 0.07581758499145508, 0.4150695204734802, -0.06507497280836105, -0.20698289573192596, -0.29398494958877563, -0.08818276226520538, -0.15553076565265656, 0.23296339809894562, 0.4425473213195801, -0.33137384057044983, 0.15994049608707428, -0.1879989504814148, -0.048849303275346756, 0.24531903862953186, 0.2828027009963989, -0.23848213255405426, 0.47150999307632446, -0.1345696598291397, 0.3603556752204895, 0.22552470862865448, -0.512495756149292, 0.10346673429012299, 0.5497696995735168, -0.2700114846229553, -0.1078040674328804, 0.2104712277650833, 0.021812114864587784, -0.11969336122274399, 0.019993407651782036, 0.33898961544036865, 0.1867903769016266, 0.11877330392599106, 0.1725093424320221, -0.30129024386405945, -0.08908850699663162, -0.021941183134913445, 0.2629857659339905, -0.11085780709981918, 0.006620724685490131, 0.2833266854286194, -0.016532499343156815, 0.14563994109630585, -0.0813739076256752, -0.02629159390926361, 0.167626291513443, 0.00927715003490448, -0.010333129204809666, 0.11339908838272095, 0.002607561182230711, -0.06397019326686859, -0.17888762056827545, -0.20364174246788025, 0.15668900310993195, -0.34083810448646545, -0.10797842592000961, -0.23296211659908295, 0.13509105145931244, -0.18902280926704407, -0.03464192524552345, 0.22459882497787476, 0.020562171936035156, -0.05323057249188423, 0.2023371309041977, -0.10291539132595062, -0.04459977522492409, -0.29671964049339294, 0.0033313508611172438, -0.05642766132950783, -0.015747172757983208, -0.11520148813724518, -0.14119398593902588, 0.17671974003314972, 0.11933568120002747, 0.0006070961826480925, -0.19307127594947815, -0.1528465747833252, 0.3934198319911957, 0.08347683399915695, 0.224514901638031, -0.1879916489124298, 0.027455296367406845, 0.05599656701087952, 0.04662682116031647, 0.32094910740852356, 0.10125739127397537, 0.27166375517845154, -0.10624757409095764, -0.1769658774137497, 0.27914658188819885, 0.2888941168785095, -0.014051827602088451, 0.18089212477207184, -0.25947684049606323, 0.1965014785528183, -0.07379887998104095, 0.08213920891284943, -0.25173303484916687, 0.19865815341472626, 0.05753083527088165, 0.17597873508930206, -0.19970229268074036, -0.29645800590515137, 0.1314505636692047, 0.42112845182418823, 0.257676899433136, 0.30966630578041077, -0.10479974746704102, -0.3932977020740509, -0.00043910808744840324, 0.005351978819817305, 0.1635395586490631, 0.3492330014705658, 0.27547487616539, -0.06143844127655029, 0.2640848457813263, -0.05539080128073692, -0.4525696635246277, 0.25179117918014526, -0.13813655078411102, -0.0073274713940918446, 0.4948101043701172, -0.060191575437784195, -0.2796851396560669, -0.45629721879959106, 0.1988086849451065, -0.02259519137442112, 0.4632149040699005, -0.32694730162620544, 0.16765548288822174, -0.330526202917099, -0.1666238009929657, -0.26206207275390625, 0.15309998393058777, 0.009612788446247578, -0.06818071007728577, -0.11819251626729965, 0.15234878659248352, -0.0018192589050158858, -0.01966916210949421, 0.2257392704486847, -0.046067073941230774, 0.20384106040000916, -0.04318799078464508, 0.2513617277145386, -0.20861363410949707, -0.3804739713668823, 0.13342614471912384, 0.3208548426628113, 0.28136998414993286, 0.15162239968776703, -0.2164766788482666, -0.16880221664905548, 0.1205294132232666, 0.09878381341695786, 0.12661898136138916, 0.09721184521913528, 0.23709411919116974, 0.11271761357784271, 0.2926897406578064, -0.04737834259867668, 0.04138266295194626, 0.3040538728237152, -0.0759626254439354, -0.09534245729446411, -0.1390737146139145, 0.21835580468177795, -0.30031418800354004, -0.2425435185432434, -0.6694472432136536, -0.5846332311630249, -0.25308769941329956, 0.201738640666008, 0.26300954818725586, 0.21677154302597046, 0.1299695372581482, 0.22782213985919952, 0.2498438060283661, 0.0813630074262619, 0.03785945102572441, -0.0409260056912899, -0.1588415652513504, 0.19827933609485626, -0.2784501612186432, -0.38857871294021606, 0.24266508221626282, 0.13341791927814484, -0.16198253631591797, -0.01739071123301983, -0.506282389163971, -0.14967340230941772, 0.18700674176216125, -0.0882711261510849, -0.04026719555258751, 0.24307331442832947, 0.14809317886829376, 0.023534683510661125, -0.1850019097328186, -0.1936729997396469, -0.052235085517168045, 0.22534160315990448, -0.14670424163341522, -0.05327467620372772, 0.029405880719423294, 0.49394699931144714, -0.23281031847000122, 0.21743574738502502, 0.08027917146682739, -0.12448176741600037, 0.17362332344055176, -0.2955310642719269, 0.04829477518796921, -0.18024305999279022, -0.2632947862148285, 0.22206561267375946, 0.007586623542010784, -0.2822060286998749, 0.39927294850349426, 0.15288087725639343, 0.045816272497177124, -0.13248641788959503, 0.06264905631542206, -0.023494025692343712, -0.21738003194332123, 0.15902988612651825, 0.3529644310474396, 0.2925633192062378, 0.20738019049167633, 0.21097332239151, -0.07645400613546371, -0.09323908388614655, 0.019291779026389122, 0.40412548184394836, -0.15643350780010223, 0.05492061749100685, -0.4585903584957123, -0.07303126901388168, -0.37108203768730164, 0.09837450832128525, 0.1380518078804016, 0.32679179310798645, -0.19392117857933044, -0.1530490666627884, 0.2643056809902191, -0.07224111258983612, 0.6033869981765747, -0.19289997220039368, 0.009252591989934444, 0.19195565581321716, 0.11969981342554092, -0.0029462147504091263, 0.07943880558013916, -0.08968666940927505, 0.542285144329071, -0.048049114644527435, 0.3626229166984558, -0.08087461441755295, -0.039408888667821884, 0.0903882384300232, 0.1914394646883011, -0.16278879344463348, -0.3571435511112213, -0.27719396352767944, -0.10505478829145432, -0.37135636806488037, -0.17841237783432007, 0.041909895837306976, 0.03770822286605835, -0.13776089251041412, 0.0643090084195137, 0.13603875041007996, 0.07105781137943268, 0.20984989404678345, 0.0614626444876194, 0.30504173040390015, -0.06339733302593231, -0.09718670696020126, 0.07033136487007141, 0.419915109872818, 0.2982427775859833, 0.38924309611320496, -0.3345470428466797, -0.055604830384254456, 0.044251326471567154, -0.39892327785491943, 0.2961321473121643, 0.2589665651321411, -0.17575834691524506, -0.012269914150238037, 0.3155677616596222, -0.2207762598991394, 0.03208930045366287, 0.1636345088481903, 0.10803662240505219, -0.02321801893413067, 0.10855192691087723, -0.5031285285949707, 0.23085065186023712, -0.16871632635593414, 0.1819629818201065, -0.12466240674257278, -0.5601910948753357, -0.3717326819896698, 0.059043459594249725, -0.2730514109134674, 0.537656307220459, -0.04524078220129013, 0.27246561646461487, 0.2908810079097748, 0.05465537682175636, -0.04074206203222275, -0.3180713653564453, 0.25041526556015015, -0.48202943801879883, 0.16024886071681976, -0.007160065695643425, -0.10093199461698532, 0.12097819894552231, 0.09882950782775879, -0.1202240064740181, -0.05170224979519844, -0.006050772033631802, 0.008775138296186924, -0.10541845113039017, 0.4203181266784668, 0.10410171002149582, -0.287871778011322, -0.47729334235191345, 0.1792580485343933, 0.011510121636092663, 0.23881900310516357, -0.11000467091798782, -0.26744720339775085, 0.020768478512763977, 0.006840233691036701, 0.1288854330778122, -0.03255505859851837, -0.561250627040863, 0.1777167022228241, -0.15878449380397797, -0.1895950436592102, -0.11769358813762665, -0.01424322184175253, 0.14640285074710846, 0.1171441301703453, -0.24388925731182098, -0.11850269883871078, -0.002647029235959053, -0.23507064580917358, 0.01840810663998127, 0.14335967600345612, 0.2015560269355774, -0.13924141228199005, -0.10247150808572769, 0.04189316928386688, -0.1636931300163269, -0.24979548156261444, 0.12267189472913742, -0.24188809096813202, 0.3985922634601593, -0.2723512649536133, -0.4194621741771698, -0.017255321145057678, -0.06055368110537529, -0.12563569843769073, 0.23220956325531006, 0.20593109726905823, -0.13234014809131622, 0.1335153430700302, 0.02703266777098179, -0.39846736192703247, -0.20828379690647125, 0.6626732349395752, -0.10722006112337112, 0.16815032064914703, 0.48826220631599426, 0.4259984493255615, -0.11738743633031845, -0.3801947832107544, 0.12018280476331711, 0.007393221370875835, -0.024813299998641014, 0.3509725034236908, 0.2815925180912018, 0.02632053568959236, 0.08393062651157379, 0.2525060176849365, 0.09148374199867249, -0.13252714276313782, -0.06971472501754761, -0.5704939961433411, -0.36100444197654724, -0.12993182241916656, 0.16779616475105286, -0.06507959961891174, 0.2493850737810135, 0.5028743147850037, 0.022571083158254623, -0.24915289878845215, -0.40799885988235474, -0.006117138545960188, 0.18776904046535492, -0.0326150543987751, 0.24484498798847198, -0.11602292954921722, 0.29449954628944397, 0.1825902909040451, 0.24695833027362823, -0.013877775520086288, -0.36720970273017883, -0.3645017147064209, -0.08965673297643661, 0.07481353729963303, -0.029503323137760162, -0.2616655230522156, 0.000873049721121788, -0.5070293545722961, -0.24961085617542267, -0.04327080026268959, 0.027097007259726524, -0.04567904770374298, -0.19056735932826996, 0.03579721227288246, -0.10239246487617493, 0.1814504712820053, 0.09309454262256622, -0.03685750439763069, -0.3411681056022644, -0.24787850677967072, -0.03332929313182831, -0.15771499276161194, -0.1457017958164215, 0.017358828336000443, 0.2447114884853363, -0.15515217185020447, -0.004634997807443142, 0.2175648808479309, 0.26600944995880127, -0.4296332597732544, -0.1201329380273819, 0.014142852276563644, 0.17160342633724213, 0.3071262240409851, -0.3211643695831299, 0.05602005496621132, 0.17665152251720428, 0.23780839145183563, -0.2713308036327362, 0.00020044282427988946, 0.19777889549732208, -0.20982839167118073, 0.12348759919404984, 0.18645557761192322, 0.43931257724761963, -0.08780477195978165, -0.10861761122941971, 0.10551288723945618, 0.4142349362373352, -0.1744295209646225, -0.3135596811771393, 0.26848191022872925, -0.1482943445444107, 0.2508971095085144, -0.051325723528862, 0.38767436146736145, 0.04050549492239952, 0.6082910299301147, 0.02103353664278984, -0.19149313867092133, 0.21602511405944824, 0.020406730473041534, -0.4856322407722473, -0.3742569088935852, 0.3433568775653839, 0.22138290107250214, -0.15481480956077576, 0.32459771633148193, 0.07869120687246323, 0.2297312468290329, -0.2764143943786621, 0.09145006537437439, -0.030854489654302597, 0.15048488974571228, -0.31302013993263245, -0.3026832044124603, -0.10804335027933121, -0.13394737243652344, 0.05318354815244675, -0.1262543499469757, -0.11192344129085541, 0.1838473528623581, -0.2403334528207779, -0.004890534095466137, -0.04823795333504677, -0.1293160617351532, -0.06252051144838333, -0.06582079827785492, 0.026444468647241592, -0.22882398962974548, 0.120041623711586, 0.034116826951503754, 0.13957177102565765, 0.12354550510644913, -0.1744181215763092, 0.3331436514854431, 0.44739335775375366, -0.22017425298690796, -0.26217755675315857, -0.038831859827041626, -0.056832991540431976, -0.12578068673610687, -0.015221385285258293, 0.017818477004766464, 0.3286934494972229, 0.29471394419670105, 0.16154807806015015, -0.15870508551597595, 0.32622045278549194, 0.09938967972993851, -0.25135019421577454, -0.02376018650829792, -0.08602213114500046, 0.20013488829135895, -0.22577886283397675, -0.26113370060920715, 0.05237371101975441, -0.42067307233810425, -0.024889929220080376, 0.6524026393890381, -0.053849246352910995, 0.20465047657489777, -0.1920049786567688, 0.16884896159172058, -0.16524915397167206, 0.5653127431869507, 0.10455554723739624, -0.01313445158302784, -0.17810897529125214, 0.12259500473737717, -0.6548846364021301, 0.09595158696174622, -0.22239413857460022, -0.4251326322555542, -0.12019664794206619, 0.10625641793012619, 0.35682564973831177, 0.1111249253153801, -0.138667032122612, -0.11932697147130966, -0.03836968541145325, -0.09680212289094925, -0.13053907454013824, -0.26918843388557434, -0.2238965481519699, 0.17209447920322418, 0.15211308002471924, -0.23762360215187073, 0.21868690848350525, -0.19163177907466888, 0.2879709303379059, -0.5192118287086487, 0.10041239112615585, 0.017463263124227524, 0.1348910629749298, 0.22438032925128937, -0.0645735040307045, 0.23133504390716553, -0.13678011298179626, -0.018060879781842232, -0.03759249672293663, 0.1751006543636322, -0.10097998380661011, 0.2047131210565567, 0.17043747007846832, 0.28256022930145264, -0.1745523363351822, -0.21159198880195618, -0.2527402937412262, 0.2356499284505844, 0.21358419954776764, -0.14101675152778625, 0.06621064245700836, 0.16935774683952332, 0.16575470566749573, -0.03428960219025612, 0.09233032166957855, 0.2528496980667114, 0.021874895319342613, -0.08413995802402496, -0.1854134500026703, -0.2561922073364258, 0.2520846724510193, -0.5231321454048157, -0.15784993767738342, -0.03669120371341705, 0.1218053475022316, 0.013643333688378334, 0.0798024907708168, -0.45908302068710327, 0.14669401943683624, 0.3045407235622406, -0.19099193811416626, -0.13554586470127106, 0.32991981506347656, -0.004613937344402075, 0.018616488203406334, -0.009915421716868877, -0.07212170958518982, 0.10848293453454971, -0.2936442196369171, -0.3397306203842163, -0.2615642845630646 ]
https://github.com/huggingface/datasets/issues/2243
Map is slow and processes batches one after another
Hi @villmow, thanks for reporting. Could you please try with the Datasets version 1.6? We released it yesterday and it fixes some issues about the processing speed. You can see the fix implemented by @lhoestq here: #2122. Once you update Datasets, please confirm if the problem persists.
## Describe the bug I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry. I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps. pseudo code: ```python ds = datasets.load_from_disk("path") new_dataset = ds.map(work, batched=True, ...) # fast uses all processes final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another ``` ## Expected results Second stage should be as fast as the first stage. ## Versions Paste the output of the following code: - Datasets: 1.5.0 - Python: 3.8.8 (default, Feb 24 2021, 21:46:12) - Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10 Do you guys have any idea? Thanks a lot!
47
Map is slow and processes batches one after another
[ -0.346902459859848, -0.33231914043426514, -0.26421380043029785, 0.20019122958183289, 0.07460776716470718, 0.06493444740772247, 0.08279702067375183, 0.5155574083328247, 0.3761083781719208, 0.12328721582889557, 0.09739602357149124, 0.20408199727535248, 0.016164349392056465, -0.20952676236629486, -0.3919113576412201, 0.1688389629125595, -0.07409495860338211, -0.04059314355254173, -0.0006117211887612939, -0.2060561180114746, -0.1830347627401352, -0.10038626939058304, -0.05386185646057129, 0.0703747570514679, 0.030000220984220505, -0.29590171575546265, 0.09416571259498596, -0.10722612589597702, -0.15231265127658844, -0.22050584852695465, -0.34138092398643494, 0.08079907298088074, -0.35335657000541687, 0.5078496932983398, -0.00009880245488602668, -0.020771032199263573, 0.04354316368699074, 0.39986029267311096, 0.10131819546222687, 0.5644356608390808, -0.30631476640701294, -0.2024446278810501, -0.07338310778141022, -0.27934595942497253, 0.13657952845096588, 0.02235913649201393, 0.1507650762796402, -0.3295906186103821, 0.31476807594299316, -0.012234442867338657, 0.31727835536003113, 0.1598130166530609, -0.4638504087924957, -0.08151277154684067, 0.28990787267684937, -0.098148413002491, 0.020126773044466972, 0.014915372245013714, 0.3477391302585602, -0.20551301538944244, -0.41291430592536926, 0.3378390073776245, -0.37297582626342773, 0.14065930247306824, 0.011179848574101925, 0.004806108772754669, 0.7656608819961548, -0.16561837494373322, 0.29259970784187317, -0.033935707062482834, -0.25106433033943176, 0.21209140121936798, 0.2623359262943268, -0.163104847073555, -0.33520203828811646, 0.022947978228330612, 0.09529877454042435, -0.10500805824995041, -0.14843355119228363, -0.2512674629688263, -0.37201809883117676, 0.14504694938659668, 0.19337530434131622, -0.07892788201570511, 0.00828841608017683, 0.16868816316127777, 0.23826923966407776, 0.002585870446637273, 0.27918222546577454, -0.0737704485654831, -0.020783908665180206, -0.20284403860569, -0.04861947521567345, 0.17144007980823517, -0.26865965127944946, 0.0821915715932846, 0.43497923016548157, 0.08063942939043045, 0.011250465176999569, -0.4446554481983185, 0.11177041381597519, 0.3328620493412018, 0.1382351964712143, -0.014861262403428555, 0.16460958123207092, -0.018670301884412766, -0.030656469985842705, 0.04383845627307892, 0.1428426206111908, -0.12722641229629517, -0.2725907266139984, 0.1849134862422943, 0.04652993381023407, -0.32563382387161255, 0.004765454679727554, 0.05651769042015076, -0.12138470262289047, 0.16678567230701447, 0.07295296341180801, 0.009446556679904461, -0.04851233586668968, -0.10116931051015854, 0.19843320548534393, 0.30274179577827454, -0.11139313131570816, 0.02612820826470852, -0.06724396347999573, -0.429477721452713, -0.16147276759147644, 0.2546689510345459, -0.25917795300483704, -0.23914240300655365, -0.35595494508743286, 0.09963365644216537, -0.06382684409618378, -0.052846986800432205, -0.08613016456365585, 0.21114608645439148, -0.3877299129962921, -0.039947960525751114, -0.06248798221349716, -0.20529575645923615, 0.11264385282993317, -0.056133996695280075, -0.019549550488591194, 0.41936826705932617, 0.16015058755874634, 0.21953600645065308, -0.13072507083415985, 0.04029920697212219, -0.34722018241882324, -0.03930031135678291, 0.2900112271308899, 0.2976366877555847, 0.30773651599884033, 0.27771511673927307, 0.16725315153598785, -0.0739043802022934, 0.051212139427661896, -0.13370971381664276, -0.2565891146659851, 0.013744770549237728, -0.2034359872341156, -0.16059765219688416, -0.047615665942430496, 0.42236146330833435, 0.05025829002261162, 0.020967863500118256, -0.030996056273579597, 0.10492072254419327, 0.2687608599662781, 0.523412823677063, 0.022686192765831947, 0.31269219517707825, -0.2544722259044647, -0.00810905173420906, 0.07355087250471115, -0.1960623860359192, -0.21346105635166168, 0.42441755533218384, -0.4188637137413025, -0.1253466010093689, 0.13709425926208496, 0.11594847589731216, 0.32039564847946167, 0.04190303385257721, 0.45294493436813354, 0.18919745087623596, -0.05264270305633545, 0.37786051630973816, -0.26831719279289246, 0.008595299907028675, -0.1868087649345398, -0.03396426513791084, -0.04229334369301796, 0.011501544155180454, 0.06302433460950851, -0.3055112659931183, 0.2197834849357605, -0.11960487812757492, -0.05113394185900688, 0.1328306496143341, -0.01651775650680065, -0.23572635650634766, -0.0831679031252861, 0.22719676792621613, -0.1855338215827942, 0.03203566372394562, -0.28564783930778503, -0.21701855957508087, 0.05983464792370796, -0.031117629259824753, 0.028442811220884323, 0.015629086643457413, -0.11477912962436676, 0.2455955445766449, 0.25732624530792236, 0.21298736333847046, -0.03352643549442291, -0.010363341309130192, 0.25019603967666626, -0.2034085988998413, 0.09319977462291718, -0.22552019357681274, -0.010361218824982643, -0.11390915513038635, -0.11689040809869766, -0.1321275681257248, 0.11777393519878387, -0.18408437073230743, 0.22070980072021484, -0.19346776604652405, -0.0033772361930459738, 0.14432284235954285, -0.017980189993977547, 0.31626057624816895, 0.15206991136074066, 0.11638747155666351, 0.1015356257557869, 0.32056671380996704, -0.020570946857333183, -0.044901542365550995, 0.05576915293931961, -0.35787099599838257, -0.055347051471471786, 0.10730158537626266, 0.17043666541576385, 0.4153853952884674, -0.025398705154657364, -0.09540905803442001, 0.016269512474536896, 0.00924677960574627, 0.3061281144618988, -0.11059220880270004, 0.24755358695983887, 0.17703957855701447, 0.2672322690486908, 0.27773189544677734, 0.1896236687898636, 0.1418425440788269, 0.4417087137699127, -0.03519785776734352, 0.004277384839951992, 0.034885235130786896, -0.089284248650074, 0.08981502801179886, 0.007180888205766678, -0.05985037609934807, 0.06340697407722473, 0.17671863734722137, -0.050875432789325714, -0.23932433128356934, 0.17840252816677094, -0.11489767581224442, 0.03816940635442734, 0.07324880361557007, 0.2802654504776001, 0.1546289175748825, 0.0572182722389698, -0.13831621408462524, -0.30543816089630127, -0.31304827332496643, 0.08564291149377823, 0.21857713162899017, 0.053784459829330444, -0.2167840600013733, -0.08006998896598816, -0.010241859592497349, 0.007231398485600948, 0.09149244427680969, 0.21361394226551056, -0.2520252764225006, 0.11436688154935837, 0.06936531513929367, -0.16448752582073212, 0.1660841703414917, 0.30653974413871765, 0.10398644208908081, 0.31879496574401855, 0.06635374575853348, -0.1062910407781601, -0.33500924706459045, -0.1379772126674652, 0.18375025689601898, 0.2548683285713196, -0.09168681502342224, 0.3119211196899414, -0.04650845006108284, -0.052791837602853775, -0.12349822372198105, 0.027728289365768433, 0.06862431764602661, -0.17848549783229828, -0.22540953755378723, 0.017256373539566994, 0.3368085026741028, -0.4049243927001953, -0.1920146644115448, 0.24644166231155396, -0.5248057246208191, -0.1333831399679184, -0.0667431503534317, -0.21015965938568115, -0.43538692593574524, -0.09720790386199951, -0.002828591503202915, 0.11836624145507812, -0.3503793776035309, 0.14163604378700256, -0.04214233160018921, 0.3617205023765564, 0.09661304950714111, 0.10985496640205383, 0.22366610169410706, -0.04773056134581566, -0.12851761281490326, -0.02115696296095848, -0.14970536530017853, 0.23467230796813965, 0.020000029355287552, -0.10136129707098007, -0.27647367119789124, -0.018301060423254967, 0.022069329395890236, 0.08295054733753204, -0.3556922376155853, 0.12816977500915527, -0.410552442073822, 0.16329123079776764, 0.12142471969127655, 0.025538813322782516, 0.30962109565734863, 0.1603921800851822, -0.44851920008659363, 0.06061500310897827, -0.12577614188194275, 0.09407918155193329, 0.1549614667892456, -0.14693890511989594, -0.023620877414941788, 0.3271965980529785, -0.033563174307346344, 0.5745299458503723, 0.1320427805185318, -0.10007313638925552, 0.08619054406881332, -0.03396201506257057, -0.05471619963645935, -0.08458318561315536, -0.3129940629005432, -0.06037275865674019, 0.05679281800985336, -0.2795211374759674, 0.39427119493484497, -0.11474058777093887, -0.4025883376598358, 0.04747721180319786, 0.0788792222738266, -0.09748449921607971, -0.14900179207324982, 0.1307830810546875, 0.0708470270037651, 0.14306633174419403, -0.10778213292360306, 0.09321731328964233, -0.41705700755119324, -0.1029118150472641, 0.26866042613983154, -0.33130693435668945, 0.08678101003170013, -0.4194377064704895, -0.2532420754432678, 0.16139353811740875, -0.5163278579711914, 0.2065575271844864, 0.06316199898719788, -0.004503914620727301, -0.25463926792144775, 0.06263594329357147, 0.133987694978714, 0.08031817525625229, 0.5949674248695374, -0.06951828300952911, 0.15460839867591858, -0.013076528906822205, 0.01931835152208805, -0.15857303142547607, -0.004691111855208874, -0.08585498481988907, 0.21265363693237305, 0.5223545432090759, 0.28489387035369873, -0.09591425955295563, -0.07792156934738159, -0.09557786583900452, -0.033900611102581024, -0.07409623265266418, -0.06725269556045532, -0.05426112189888954, -0.08532381057739258, -0.15357846021652222, 0.08508431911468506, -0.13780786097049713, -0.16937318444252014, 0.3008474111557007, -0.42953982949256897, 0.14373959600925446, 0.10346667468547821, 0.08218349516391754, 0.15081048011779785, 0.1284276396036148, 0.23775513470172882, 0.18602393567562103, 0.11378461122512817, 0.14729078114032745, -0.07350459694862366, 0.18882708251476288, -0.01377431396394968, 0.29769086837768555, 0.22475284337997437, -0.04892999678850174, 0.1370001882314682, 0.4183053970336914, 0.2177979052066803, -0.03945394232869148, 0.04496103152632713, 0.3600701093673706, -0.05156572908163071, -0.06126309186220169, 0.5058532953262329, -0.03470697999000549, -0.3690623939037323, 0.03576401248574257, 0.06898422539234161, 0.21453918516635895, -0.3013429641723633, 0.48143815994262695, -0.5957074165344238, -0.0008296839077956975, 0.49186983704566956, 0.30282703042030334, 0.7559138536453247, -0.49517279863357544, -0.20713476836681366, 0.00007914913294371217, 0.23882678151130676, -0.26381343603134155, -0.04151406139135361, 0.20135557651519775, -0.21015842258930206, -0.17463386058807373, 0.18545986711978912, -0.1413612812757492, 0.0626562088727951, 0.14488805830478668, -0.17442327737808228, -0.18681736290454865, -0.021221105009317398, 0.38763293623924255, -0.1391032636165619, 0.07981579750776291, 0.4471867084503174, -0.30000996589660645, -0.02632308378815651, 0.2255588173866272, 0.07257629930973053, 0.11534838378429413, -0.1200302317738533, -0.03058956377208233, 0.033728212118148804, -0.1223452091217041, 0.05633119121193886, -0.09768079221248627, -0.2391946017742157, 0.2287825047969818, -0.19580544531345367, 0.33101531863212585, -0.435708224773407, 0.05255059525370598, -0.38108694553375244, 0.23120847344398499, 0.03408496454358101, 0.2928927540779114, 0.43501025438308716, 0.12346415221691132, -0.07326580584049225, -0.2757701575756073, -0.34896793961524963, -0.02323385886847973, 0.00305627821944654, 0.11772868782281876, -0.09656953811645508, -0.21251416206359863, -0.44712644815444946, 0.272704154253006, 0.11840091645717621, -0.008783208206295967, -0.15736521780490875, -0.005829107016324997, -0.2395108938217163, -0.01036023534834385, 0.27847951650619507, -0.1641843169927597, 0.22064365446567535, 0.5427923202514648, 0.0462692528963089, -0.2771815359592438, -0.10953604429960251, 0.2817230820655823, 0.1345994472503662, -0.026337143033742905, 0.23852726817131042, 0.0057832286693155766, -0.3318210542201996, -0.4043583571910858, -0.0778452455997467, -0.02904658205807209, -0.053970519453287125, 0.11884172260761261, -0.26706671714782715, -0.24351446330547333, 0.3382922112941742, 0.2162581980228424, 0.06774992495775223, 0.11211716383695602, -0.09653472155332565, -0.005903475917875767, -0.20061877369880676, -0.012249695137143135, -0.0071066757664084435, 0.043952953070402145, -0.14529132843017578, -0.07800097018480301, -0.045934341847896576, 0.48983436822891235, -0.4504971504211426, -0.09748747944831848, -0.15718966722488403, 0.19932296872138977, -0.05590682849287987, -0.0716409981250763, 0.14316916465759277, -0.08263438194990158, 0.3163793683052063, 0.11651577800512314, -0.22907544672489166, -0.3902067542076111, 0.23426930606365204, 0.07876712083816528, -0.16792908310890198, -0.09630007296800613, 0.1483621746301651, -0.08629357069730759, 0.024882424622774124, -0.2966083884239197, -0.03250075876712799, 0.05929221212863922, -0.09443078190088272, -0.5242846012115479, 0.13561104238033295, -0.10098852962255478, 0.3209577202796936, 0.19018341600894928, -0.18880660831928253, 0.004411095287650824, -0.13668881356716156, -0.15999558568000793, 0.057495828717947006, -0.32697421312332153, 0.14633463323116302, 0.013685522601008415, 0.41359782218933105, 0.052094507962465286, 0.281484991312027, -0.08110599219799042, -0.21731922030448914, 0.5401442646980286, -0.04313499480485916, 0.09196742624044418, 0.07598821818828583, -0.1635495126247406, -0.1250855028629303, 0.3680283725261688, -0.08354318886995316, -0.12343098223209381, 0.46341753005981445, -0.12679541110992432, 0.19402287900447845, 0.012339101172983646, 0.045216191560029984, -0.20632722973823547, 0.07968655973672867, 0.19251751899719238, 0.025867361575365067, -0.35279613733291626, -0.11679340898990631, 0.1489734798669815, 0.30891865491867065, -0.3032325208187103, 0.19489333033561707, -0.028398267924785614, 0.10300831496715546, 0.15143127739429474, 0.103162981569767, 0.14090780913829803, 0.09835553169250488, 0.3951481878757477, -0.049719247967004776, -0.3312107026576996, 0.22376692295074463, 0.3597697913646698, -0.3410908877849579, 0.14143691956996918, 0.32919755578041077, 0.0451715849339962, -0.18000884354114532, -0.30821362137794495, -0.3514571785926819, 0.2930070757865906, -0.28072425723075867, 0.027657341212034225, -0.1339443475008011, -0.05422248691320419, 0.0819537341594696, 0.15477867424488068, 0.2046668827533722, 0.3192395269870758, 0.39560702443122864, 0.07546132802963257, 0.10068987309932709, 0.1296057254076004, -0.3609299063682556, -0.15469573438167572, 0.45216214656829834, -0.2770078778266907, 0.13359272480010986, -0.37595292925834656, 0.00841719750314951, -0.1908087432384491, 0.3052169978618622, 0.15191476047039032, 0.5150671005249023, -0.047792550176382065, 0.11560624837875366, -0.10119399428367615, -0.15390358865261078, -0.3401761054992676, 0.30340608954429626, -0.10269775986671448, -0.13604195415973663, 0.1063881441950798, 0.22204911708831787, -0.45488059520721436, -0.14192605018615723, -0.13586367666721344, -0.06657703220844269, 0.5260953307151794, -0.10076070576906204, 0.14284591376781464, -0.15595141053199768, 0.0017646246124058962, -0.07890987396240234, -0.32409191131591797, -0.19555668532848358, 0.17921701073646545, -0.403156578540802, 0.15054762363433838, -0.13592752814292908, 0.15940678119659424, -0.21661294996738434, 0.5045703649520874, 0.05458083376288414, 0.07794332504272461, -0.3355932831764221, -0.20178744196891785, -0.20382685959339142, 0.07549679279327393, -0.32237136363983154, 0.18578341603279114, 0.01230894960463047, 0.10326281934976578, 0.020695963874459267, 0.06016653776168823, 0.23431864380836487, -0.2477051317691803, -0.2636207044124603, 0.0882115513086319, -0.33509451150894165, 0.37777814269065857, -0.06657037883996964, 0.010407470166683197, 0.1702563613653183, -0.3967393636703491, 0.6546357870101929, -0.2005673050880432, 0.3361153304576874, -0.11358538269996643, -0.06194237619638443, -0.1589442938566208, 0.1569148153066635, 0.4262062907218933, 0.14343968033790588, 0.006144917104393244, -0.21607941389083862, -0.14001420140266418, -0.1447472721338272, -0.021142736077308655, 0.14240191876888275, -0.055129677057266235, 0.42343640327453613, 0.04672573506832123, -0.08889749646186829, -0.06427671015262604, -0.19776619970798492, 0.18474341928958893, 0.1162036657333374, 0.337516725063324, 0.15266238152980804, 0.02748800255358219, -0.08982112258672714, 0.3604832589626312, -0.03847603499889374, 0.16342808306217194, 0.16771180927753448, 0.027324756607413292, -0.14502522349357605, -0.3080488443374634, 0.23182165622711182, -0.4071289002895355, -0.2470616102218628, 0.005687588360160589, 0.24450860917568207, -0.13184240460395813, 0.19587789475917816, 0.030912064015865326, -0.20821821689605713, 0.1344963163137436, -0.0014098885003477335, -0.11419598013162613, 0.035713788121938705, -0.16152171790599823, -0.08974677324295044, -0.011011305265128613, -0.05934930592775345, 0.0024842347484081984, -0.37748658657073975, -0.04926518723368645, -0.06943122297525406 ]
https://github.com/huggingface/datasets/issues/2243
Map is slow and processes batches one after another
Hi @albertvillanova, thanks for the reply. I just tried the new version and the problem still persists. Do I need to rebuild the saved dataset (which I load from disk) with the 1.6.0 version of datasets? My script loads this dataset and creates new datasets from it. I tried it without rebuilding. See this short video of what happens. It does not create all processes at the same time: https://user-images.githubusercontent.com/2743060/115720139-0da3a500-a37d-11eb-833a-9bbacc70868d.mp4
## Describe the bug I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry. I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps. pseudo code: ```python ds = datasets.load_from_disk("path") new_dataset = ds.map(work, batched=True, ...) # fast uses all processes final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another ``` ## Expected results Second stage should be as fast as the first stage. ## Versions Paste the output of the following code: - Datasets: 1.5.0 - Python: 3.8.8 (default, Feb 24 2021, 21:46:12) - Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10 Do you guys have any idea? Thanks a lot!
70
Map is slow and processes batches one after another
[ -0.346902459859848, -0.33231914043426514, -0.26421380043029785, 0.20019122958183289, 0.07460776716470718, 0.06493444740772247, 0.08279702067375183, 0.5155574083328247, 0.3761083781719208, 0.12328721582889557, 0.09739602357149124, 0.20408199727535248, 0.016164349392056465, -0.20952676236629486, -0.3919113576412201, 0.1688389629125595, -0.07409495860338211, -0.04059314355254173, -0.0006117211887612939, -0.2060561180114746, -0.1830347627401352, -0.10038626939058304, -0.05386185646057129, 0.0703747570514679, 0.030000220984220505, -0.29590171575546265, 0.09416571259498596, -0.10722612589597702, -0.15231265127658844, -0.22050584852695465, -0.34138092398643494, 0.08079907298088074, -0.35335657000541687, 0.5078496932983398, -0.00009880245488602668, -0.020771032199263573, 0.04354316368699074, 0.39986029267311096, 0.10131819546222687, 0.5644356608390808, -0.30631476640701294, -0.2024446278810501, -0.07338310778141022, -0.27934595942497253, 0.13657952845096588, 0.02235913649201393, 0.1507650762796402, -0.3295906186103821, 0.31476807594299316, -0.012234442867338657, 0.31727835536003113, 0.1598130166530609, -0.4638504087924957, -0.08151277154684067, 0.28990787267684937, -0.098148413002491, 0.020126773044466972, 0.014915372245013714, 0.3477391302585602, -0.20551301538944244, -0.41291430592536926, 0.3378390073776245, -0.37297582626342773, 0.14065930247306824, 0.011179848574101925, 0.004806108772754669, 0.7656608819961548, -0.16561837494373322, 0.29259970784187317, -0.033935707062482834, -0.25106433033943176, 0.21209140121936798, 0.2623359262943268, -0.163104847073555, -0.33520203828811646, 0.022947978228330612, 0.09529877454042435, -0.10500805824995041, -0.14843355119228363, -0.2512674629688263, -0.37201809883117676, 0.14504694938659668, 0.19337530434131622, -0.07892788201570511, 0.00828841608017683, 0.16868816316127777, 0.23826923966407776, 0.002585870446637273, 0.27918222546577454, -0.0737704485654831, -0.020783908665180206, -0.20284403860569, -0.04861947521567345, 0.17144007980823517, -0.26865965127944946, 0.0821915715932846, 0.43497923016548157, 0.08063942939043045, 0.011250465176999569, -0.4446554481983185, 0.11177041381597519, 0.3328620493412018, 0.1382351964712143, -0.014861262403428555, 0.16460958123207092, -0.018670301884412766, -0.030656469985842705, 0.04383845627307892, 0.1428426206111908, -0.12722641229629517, -0.2725907266139984, 0.1849134862422943, 0.04652993381023407, -0.32563382387161255, 0.004765454679727554, 0.05651769042015076, -0.12138470262289047, 0.16678567230701447, 0.07295296341180801, 0.009446556679904461, -0.04851233586668968, -0.10116931051015854, 0.19843320548534393, 0.30274179577827454, -0.11139313131570816, 0.02612820826470852, -0.06724396347999573, -0.429477721452713, -0.16147276759147644, 0.2546689510345459, -0.25917795300483704, -0.23914240300655365, -0.35595494508743286, 0.09963365644216537, -0.06382684409618378, -0.052846986800432205, -0.08613016456365585, 0.21114608645439148, -0.3877299129962921, -0.039947960525751114, -0.06248798221349716, -0.20529575645923615, 0.11264385282993317, -0.056133996695280075, -0.019549550488591194, 0.41936826705932617, 0.16015058755874634, 0.21953600645065308, -0.13072507083415985, 0.04029920697212219, -0.34722018241882324, -0.03930031135678291, 0.2900112271308899, 0.2976366877555847, 0.30773651599884033, 0.27771511673927307, 0.16725315153598785, -0.0739043802022934, 0.051212139427661896, -0.13370971381664276, -0.2565891146659851, 0.013744770549237728, -0.2034359872341156, -0.16059765219688416, -0.047615665942430496, 0.42236146330833435, 0.05025829002261162, 0.020967863500118256, -0.030996056273579597, 0.10492072254419327, 0.2687608599662781, 0.523412823677063, 0.022686192765831947, 0.31269219517707825, -0.2544722259044647, -0.00810905173420906, 0.07355087250471115, -0.1960623860359192, -0.21346105635166168, 0.42441755533218384, -0.4188637137413025, -0.1253466010093689, 0.13709425926208496, 0.11594847589731216, 0.32039564847946167, 0.04190303385257721, 0.45294493436813354, 0.18919745087623596, -0.05264270305633545, 0.37786051630973816, -0.26831719279289246, 0.008595299907028675, -0.1868087649345398, -0.03396426513791084, -0.04229334369301796, 0.011501544155180454, 0.06302433460950851, -0.3055112659931183, 0.2197834849357605, -0.11960487812757492, -0.05113394185900688, 0.1328306496143341, -0.01651775650680065, -0.23572635650634766, -0.0831679031252861, 0.22719676792621613, -0.1855338215827942, 0.03203566372394562, -0.28564783930778503, -0.21701855957508087, 0.05983464792370796, -0.031117629259824753, 0.028442811220884323, 0.015629086643457413, -0.11477912962436676, 0.2455955445766449, 0.25732624530792236, 0.21298736333847046, -0.03352643549442291, -0.010363341309130192, 0.25019603967666626, -0.2034085988998413, 0.09319977462291718, -0.22552019357681274, -0.010361218824982643, -0.11390915513038635, -0.11689040809869766, -0.1321275681257248, 0.11777393519878387, -0.18408437073230743, 0.22070980072021484, -0.19346776604652405, -0.0033772361930459738, 0.14432284235954285, -0.017980189993977547, 0.31626057624816895, 0.15206991136074066, 0.11638747155666351, 0.1015356257557869, 0.32056671380996704, -0.020570946857333183, -0.044901542365550995, 0.05576915293931961, -0.35787099599838257, -0.055347051471471786, 0.10730158537626266, 0.17043666541576385, 0.4153853952884674, -0.025398705154657364, -0.09540905803442001, 0.016269512474536896, 0.00924677960574627, 0.3061281144618988, -0.11059220880270004, 0.24755358695983887, 0.17703957855701447, 0.2672322690486908, 0.27773189544677734, 0.1896236687898636, 0.1418425440788269, 0.4417087137699127, -0.03519785776734352, 0.004277384839951992, 0.034885235130786896, -0.089284248650074, 0.08981502801179886, 0.007180888205766678, -0.05985037609934807, 0.06340697407722473, 0.17671863734722137, -0.050875432789325714, -0.23932433128356934, 0.17840252816677094, -0.11489767581224442, 0.03816940635442734, 0.07324880361557007, 0.2802654504776001, 0.1546289175748825, 0.0572182722389698, -0.13831621408462524, -0.30543816089630127, -0.31304827332496643, 0.08564291149377823, 0.21857713162899017, 0.053784459829330444, -0.2167840600013733, -0.08006998896598816, -0.010241859592497349, 0.007231398485600948, 0.09149244427680969, 0.21361394226551056, -0.2520252764225006, 0.11436688154935837, 0.06936531513929367, -0.16448752582073212, 0.1660841703414917, 0.30653974413871765, 0.10398644208908081, 0.31879496574401855, 0.06635374575853348, -0.1062910407781601, -0.33500924706459045, -0.1379772126674652, 0.18375025689601898, 0.2548683285713196, -0.09168681502342224, 0.3119211196899414, -0.04650845006108284, -0.052791837602853775, -0.12349822372198105, 0.027728289365768433, 0.06862431764602661, -0.17848549783229828, -0.22540953755378723, 0.017256373539566994, 0.3368085026741028, -0.4049243927001953, -0.1920146644115448, 0.24644166231155396, -0.5248057246208191, -0.1333831399679184, -0.0667431503534317, -0.21015965938568115, -0.43538692593574524, -0.09720790386199951, -0.002828591503202915, 0.11836624145507812, -0.3503793776035309, 0.14163604378700256, -0.04214233160018921, 0.3617205023765564, 0.09661304950714111, 0.10985496640205383, 0.22366610169410706, -0.04773056134581566, -0.12851761281490326, -0.02115696296095848, -0.14970536530017853, 0.23467230796813965, 0.020000029355287552, -0.10136129707098007, -0.27647367119789124, -0.018301060423254967, 0.022069329395890236, 0.08295054733753204, -0.3556922376155853, 0.12816977500915527, -0.410552442073822, 0.16329123079776764, 0.12142471969127655, 0.025538813322782516, 0.30962109565734863, 0.1603921800851822, -0.44851920008659363, 0.06061500310897827, -0.12577614188194275, 0.09407918155193329, 0.1549614667892456, -0.14693890511989594, -0.023620877414941788, 0.3271965980529785, -0.033563174307346344, 0.5745299458503723, 0.1320427805185318, -0.10007313638925552, 0.08619054406881332, -0.03396201506257057, -0.05471619963645935, -0.08458318561315536, -0.3129940629005432, -0.06037275865674019, 0.05679281800985336, -0.2795211374759674, 0.39427119493484497, -0.11474058777093887, -0.4025883376598358, 0.04747721180319786, 0.0788792222738266, -0.09748449921607971, -0.14900179207324982, 0.1307830810546875, 0.0708470270037651, 0.14306633174419403, -0.10778213292360306, 0.09321731328964233, -0.41705700755119324, -0.1029118150472641, 0.26866042613983154, -0.33130693435668945, 0.08678101003170013, -0.4194377064704895, -0.2532420754432678, 0.16139353811740875, -0.5163278579711914, 0.2065575271844864, 0.06316199898719788, -0.004503914620727301, -0.25463926792144775, 0.06263594329357147, 0.133987694978714, 0.08031817525625229, 0.5949674248695374, -0.06951828300952911, 0.15460839867591858, -0.013076528906822205, 0.01931835152208805, -0.15857303142547607, -0.004691111855208874, -0.08585498481988907, 0.21265363693237305, 0.5223545432090759, 0.28489387035369873, -0.09591425955295563, -0.07792156934738159, -0.09557786583900452, -0.033900611102581024, -0.07409623265266418, -0.06725269556045532, -0.05426112189888954, -0.08532381057739258, -0.15357846021652222, 0.08508431911468506, -0.13780786097049713, -0.16937318444252014, 0.3008474111557007, -0.42953982949256897, 0.14373959600925446, 0.10346667468547821, 0.08218349516391754, 0.15081048011779785, 0.1284276396036148, 0.23775513470172882, 0.18602393567562103, 0.11378461122512817, 0.14729078114032745, -0.07350459694862366, 0.18882708251476288, -0.01377431396394968, 0.29769086837768555, 0.22475284337997437, -0.04892999678850174, 0.1370001882314682, 0.4183053970336914, 0.2177979052066803, -0.03945394232869148, 0.04496103152632713, 0.3600701093673706, -0.05156572908163071, -0.06126309186220169, 0.5058532953262329, -0.03470697999000549, -0.3690623939037323, 0.03576401248574257, 0.06898422539234161, 0.21453918516635895, -0.3013429641723633, 0.48143815994262695, -0.5957074165344238, -0.0008296839077956975, 0.49186983704566956, 0.30282703042030334, 0.7559138536453247, -0.49517279863357544, -0.20713476836681366, 0.00007914913294371217, 0.23882678151130676, -0.26381343603134155, -0.04151406139135361, 0.20135557651519775, -0.21015842258930206, -0.17463386058807373, 0.18545986711978912, -0.1413612812757492, 0.0626562088727951, 0.14488805830478668, -0.17442327737808228, -0.18681736290454865, -0.021221105009317398, 0.38763293623924255, -0.1391032636165619, 0.07981579750776291, 0.4471867084503174, -0.30000996589660645, -0.02632308378815651, 0.2255588173866272, 0.07257629930973053, 0.11534838378429413, -0.1200302317738533, -0.03058956377208233, 0.033728212118148804, -0.1223452091217041, 0.05633119121193886, -0.09768079221248627, -0.2391946017742157, 0.2287825047969818, -0.19580544531345367, 0.33101531863212585, -0.435708224773407, 0.05255059525370598, -0.38108694553375244, 0.23120847344398499, 0.03408496454358101, 0.2928927540779114, 0.43501025438308716, 0.12346415221691132, -0.07326580584049225, -0.2757701575756073, -0.34896793961524963, -0.02323385886847973, 0.00305627821944654, 0.11772868782281876, -0.09656953811645508, -0.21251416206359863, -0.44712644815444946, 0.272704154253006, 0.11840091645717621, -0.008783208206295967, -0.15736521780490875, -0.005829107016324997, -0.2395108938217163, -0.01036023534834385, 0.27847951650619507, -0.1641843169927597, 0.22064365446567535, 0.5427923202514648, 0.0462692528963089, -0.2771815359592438, -0.10953604429960251, 0.2817230820655823, 0.1345994472503662, -0.026337143033742905, 0.23852726817131042, 0.0057832286693155766, -0.3318210542201996, -0.4043583571910858, -0.0778452455997467, -0.02904658205807209, -0.053970519453287125, 0.11884172260761261, -0.26706671714782715, -0.24351446330547333, 0.3382922112941742, 0.2162581980228424, 0.06774992495775223, 0.11211716383695602, -0.09653472155332565, -0.005903475917875767, -0.20061877369880676, -0.012249695137143135, -0.0071066757664084435, 0.043952953070402145, -0.14529132843017578, -0.07800097018480301, -0.045934341847896576, 0.48983436822891235, -0.4504971504211426, -0.09748747944831848, -0.15718966722488403, 0.19932296872138977, -0.05590682849287987, -0.0716409981250763, 0.14316916465759277, -0.08263438194990158, 0.3163793683052063, 0.11651577800512314, -0.22907544672489166, -0.3902067542076111, 0.23426930606365204, 0.07876712083816528, -0.16792908310890198, -0.09630007296800613, 0.1483621746301651, -0.08629357069730759, 0.024882424622774124, -0.2966083884239197, -0.03250075876712799, 0.05929221212863922, -0.09443078190088272, -0.5242846012115479, 0.13561104238033295, -0.10098852962255478, 0.3209577202796936, 0.19018341600894928, -0.18880660831928253, 0.004411095287650824, -0.13668881356716156, -0.15999558568000793, 0.057495828717947006, -0.32697421312332153, 0.14633463323116302, 0.013685522601008415, 0.41359782218933105, 0.052094507962465286, 0.281484991312027, -0.08110599219799042, -0.21731922030448914, 0.5401442646980286, -0.04313499480485916, 0.09196742624044418, 0.07598821818828583, -0.1635495126247406, -0.1250855028629303, 0.3680283725261688, -0.08354318886995316, -0.12343098223209381, 0.46341753005981445, -0.12679541110992432, 0.19402287900447845, 0.012339101172983646, 0.045216191560029984, -0.20632722973823547, 0.07968655973672867, 0.19251751899719238, 0.025867361575365067, -0.35279613733291626, -0.11679340898990631, 0.1489734798669815, 0.30891865491867065, -0.3032325208187103, 0.19489333033561707, -0.028398267924785614, 0.10300831496715546, 0.15143127739429474, 0.103162981569767, 0.14090780913829803, 0.09835553169250488, 0.3951481878757477, -0.049719247967004776, -0.3312107026576996, 0.22376692295074463, 0.3597697913646698, -0.3410908877849579, 0.14143691956996918, 0.32919755578041077, 0.0451715849339962, -0.18000884354114532, -0.30821362137794495, -0.3514571785926819, 0.2930070757865906, -0.28072425723075867, 0.027657341212034225, -0.1339443475008011, -0.05422248691320419, 0.0819537341594696, 0.15477867424488068, 0.2046668827533722, 0.3192395269870758, 0.39560702443122864, 0.07546132802963257, 0.10068987309932709, 0.1296057254076004, -0.3609299063682556, -0.15469573438167572, 0.45216214656829834, -0.2770078778266907, 0.13359272480010986, -0.37595292925834656, 0.00841719750314951, -0.1908087432384491, 0.3052169978618622, 0.15191476047039032, 0.5150671005249023, -0.047792550176382065, 0.11560624837875366, -0.10119399428367615, -0.15390358865261078, -0.3401761054992676, 0.30340608954429626, -0.10269775986671448, -0.13604195415973663, 0.1063881441950798, 0.22204911708831787, -0.45488059520721436, -0.14192605018615723, -0.13586367666721344, -0.06657703220844269, 0.5260953307151794, -0.10076070576906204, 0.14284591376781464, -0.15595141053199768, 0.0017646246124058962, -0.07890987396240234, -0.32409191131591797, -0.19555668532848358, 0.17921701073646545, -0.403156578540802, 0.15054762363433838, -0.13592752814292908, 0.15940678119659424, -0.21661294996738434, 0.5045703649520874, 0.05458083376288414, 0.07794332504272461, -0.3355932831764221, -0.20178744196891785, -0.20382685959339142, 0.07549679279327393, -0.32237136363983154, 0.18578341603279114, 0.01230894960463047, 0.10326281934976578, 0.020695963874459267, 0.06016653776168823, 0.23431864380836487, -0.2477051317691803, -0.2636207044124603, 0.0882115513086319, -0.33509451150894165, 0.37777814269065857, -0.06657037883996964, 0.010407470166683197, 0.1702563613653183, -0.3967393636703491, 0.6546357870101929, -0.2005673050880432, 0.3361153304576874, -0.11358538269996643, -0.06194237619638443, -0.1589442938566208, 0.1569148153066635, 0.4262062907218933, 0.14343968033790588, 0.006144917104393244, -0.21607941389083862, -0.14001420140266418, -0.1447472721338272, -0.021142736077308655, 0.14240191876888275, -0.055129677057266235, 0.42343640327453613, 0.04672573506832123, -0.08889749646186829, -0.06427671015262604, -0.19776619970798492, 0.18474341928958893, 0.1162036657333374, 0.337516725063324, 0.15266238152980804, 0.02748800255358219, -0.08982112258672714, 0.3604832589626312, -0.03847603499889374, 0.16342808306217194, 0.16771180927753448, 0.027324756607413292, -0.14502522349357605, -0.3080488443374634, 0.23182165622711182, -0.4071289002895355, -0.2470616102218628, 0.005687588360160589, 0.24450860917568207, -0.13184240460395813, 0.19587789475917816, 0.030912064015865326, -0.20821821689605713, 0.1344963163137436, -0.0014098885003477335, -0.11419598013162613, 0.035713788121938705, -0.16152171790599823, -0.08974677324295044, -0.011011305265128613, -0.05934930592775345, 0.0024842347484081984, -0.37748658657073975, -0.04926518723368645, -0.06943122297525406 ]
https://github.com/huggingface/datasets/issues/2243
Map is slow and processes batches one after another
There can be a bit of delay between the creations of the processes but this delay should be the same for both your `map` calls. We should look into this. Also if you hav some code that reproduces this issue on google colab that'd be really useful ! Regarding the speed differences: This looks like a similar issue as https://github.com/huggingface/datasets/issues/1992 who is experiencing the same speed differences between processes. This is a known bug that we are investigating. As of now I've never managed to reproduce it on my machine so it's pretty hard for me to find where this issue comes from.
## Describe the bug I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry. I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps. pseudo code: ```python ds = datasets.load_from_disk("path") new_dataset = ds.map(work, batched=True, ...) # fast uses all processes final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another ``` ## Expected results Second stage should be as fast as the first stage. ## Versions Paste the output of the following code: - Datasets: 1.5.0 - Python: 3.8.8 (default, Feb 24 2021, 21:46:12) - Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10 Do you guys have any idea? Thanks a lot!
103
Map is slow and processes batches one after another
[ -0.346902459859848, -0.33231914043426514, -0.26421380043029785, 0.20019122958183289, 0.07460776716470718, 0.06493444740772247, 0.08279702067375183, 0.5155574083328247, 0.3761083781719208, 0.12328721582889557, 0.09739602357149124, 0.20408199727535248, 0.016164349392056465, -0.20952676236629486, -0.3919113576412201, 0.1688389629125595, -0.07409495860338211, -0.04059314355254173, -0.0006117211887612939, -0.2060561180114746, -0.1830347627401352, -0.10038626939058304, -0.05386185646057129, 0.0703747570514679, 0.030000220984220505, -0.29590171575546265, 0.09416571259498596, -0.10722612589597702, -0.15231265127658844, -0.22050584852695465, -0.34138092398643494, 0.08079907298088074, -0.35335657000541687, 0.5078496932983398, -0.00009880245488602668, -0.020771032199263573, 0.04354316368699074, 0.39986029267311096, 0.10131819546222687, 0.5644356608390808, -0.30631476640701294, -0.2024446278810501, -0.07338310778141022, -0.27934595942497253, 0.13657952845096588, 0.02235913649201393, 0.1507650762796402, -0.3295906186103821, 0.31476807594299316, -0.012234442867338657, 0.31727835536003113, 0.1598130166530609, -0.4638504087924957, -0.08151277154684067, 0.28990787267684937, -0.098148413002491, 0.020126773044466972, 0.014915372245013714, 0.3477391302585602, -0.20551301538944244, -0.41291430592536926, 0.3378390073776245, -0.37297582626342773, 0.14065930247306824, 0.011179848574101925, 0.004806108772754669, 0.7656608819961548, -0.16561837494373322, 0.29259970784187317, -0.033935707062482834, -0.25106433033943176, 0.21209140121936798, 0.2623359262943268, -0.163104847073555, -0.33520203828811646, 0.022947978228330612, 0.09529877454042435, -0.10500805824995041, -0.14843355119228363, -0.2512674629688263, -0.37201809883117676, 0.14504694938659668, 0.19337530434131622, -0.07892788201570511, 0.00828841608017683, 0.16868816316127777, 0.23826923966407776, 0.002585870446637273, 0.27918222546577454, -0.0737704485654831, -0.020783908665180206, -0.20284403860569, -0.04861947521567345, 0.17144007980823517, -0.26865965127944946, 0.0821915715932846, 0.43497923016548157, 0.08063942939043045, 0.011250465176999569, -0.4446554481983185, 0.11177041381597519, 0.3328620493412018, 0.1382351964712143, -0.014861262403428555, 0.16460958123207092, -0.018670301884412766, -0.030656469985842705, 0.04383845627307892, 0.1428426206111908, -0.12722641229629517, -0.2725907266139984, 0.1849134862422943, 0.04652993381023407, -0.32563382387161255, 0.004765454679727554, 0.05651769042015076, -0.12138470262289047, 0.16678567230701447, 0.07295296341180801, 0.009446556679904461, -0.04851233586668968, -0.10116931051015854, 0.19843320548534393, 0.30274179577827454, -0.11139313131570816, 0.02612820826470852, -0.06724396347999573, -0.429477721452713, -0.16147276759147644, 0.2546689510345459, -0.25917795300483704, -0.23914240300655365, -0.35595494508743286, 0.09963365644216537, -0.06382684409618378, -0.052846986800432205, -0.08613016456365585, 0.21114608645439148, -0.3877299129962921, -0.039947960525751114, -0.06248798221349716, -0.20529575645923615, 0.11264385282993317, -0.056133996695280075, -0.019549550488591194, 0.41936826705932617, 0.16015058755874634, 0.21953600645065308, -0.13072507083415985, 0.04029920697212219, -0.34722018241882324, -0.03930031135678291, 0.2900112271308899, 0.2976366877555847, 0.30773651599884033, 0.27771511673927307, 0.16725315153598785, -0.0739043802022934, 0.051212139427661896, -0.13370971381664276, -0.2565891146659851, 0.013744770549237728, -0.2034359872341156, -0.16059765219688416, -0.047615665942430496, 0.42236146330833435, 0.05025829002261162, 0.020967863500118256, -0.030996056273579597, 0.10492072254419327, 0.2687608599662781, 0.523412823677063, 0.022686192765831947, 0.31269219517707825, -0.2544722259044647, -0.00810905173420906, 0.07355087250471115, -0.1960623860359192, -0.21346105635166168, 0.42441755533218384, -0.4188637137413025, -0.1253466010093689, 0.13709425926208496, 0.11594847589731216, 0.32039564847946167, 0.04190303385257721, 0.45294493436813354, 0.18919745087623596, -0.05264270305633545, 0.37786051630973816, -0.26831719279289246, 0.008595299907028675, -0.1868087649345398, -0.03396426513791084, -0.04229334369301796, 0.011501544155180454, 0.06302433460950851, -0.3055112659931183, 0.2197834849357605, -0.11960487812757492, -0.05113394185900688, 0.1328306496143341, -0.01651775650680065, -0.23572635650634766, -0.0831679031252861, 0.22719676792621613, -0.1855338215827942, 0.03203566372394562, -0.28564783930778503, -0.21701855957508087, 0.05983464792370796, -0.031117629259824753, 0.028442811220884323, 0.015629086643457413, -0.11477912962436676, 0.2455955445766449, 0.25732624530792236, 0.21298736333847046, -0.03352643549442291, -0.010363341309130192, 0.25019603967666626, -0.2034085988998413, 0.09319977462291718, -0.22552019357681274, -0.010361218824982643, -0.11390915513038635, -0.11689040809869766, -0.1321275681257248, 0.11777393519878387, -0.18408437073230743, 0.22070980072021484, -0.19346776604652405, -0.0033772361930459738, 0.14432284235954285, -0.017980189993977547, 0.31626057624816895, 0.15206991136074066, 0.11638747155666351, 0.1015356257557869, 0.32056671380996704, -0.020570946857333183, -0.044901542365550995, 0.05576915293931961, -0.35787099599838257, -0.055347051471471786, 0.10730158537626266, 0.17043666541576385, 0.4153853952884674, -0.025398705154657364, -0.09540905803442001, 0.016269512474536896, 0.00924677960574627, 0.3061281144618988, -0.11059220880270004, 0.24755358695983887, 0.17703957855701447, 0.2672322690486908, 0.27773189544677734, 0.1896236687898636, 0.1418425440788269, 0.4417087137699127, -0.03519785776734352, 0.004277384839951992, 0.034885235130786896, -0.089284248650074, 0.08981502801179886, 0.007180888205766678, -0.05985037609934807, 0.06340697407722473, 0.17671863734722137, -0.050875432789325714, -0.23932433128356934, 0.17840252816677094, -0.11489767581224442, 0.03816940635442734, 0.07324880361557007, 0.2802654504776001, 0.1546289175748825, 0.0572182722389698, -0.13831621408462524, -0.30543816089630127, -0.31304827332496643, 0.08564291149377823, 0.21857713162899017, 0.053784459829330444, -0.2167840600013733, -0.08006998896598816, -0.010241859592497349, 0.007231398485600948, 0.09149244427680969, 0.21361394226551056, -0.2520252764225006, 0.11436688154935837, 0.06936531513929367, -0.16448752582073212, 0.1660841703414917, 0.30653974413871765, 0.10398644208908081, 0.31879496574401855, 0.06635374575853348, -0.1062910407781601, -0.33500924706459045, -0.1379772126674652, 0.18375025689601898, 0.2548683285713196, -0.09168681502342224, 0.3119211196899414, -0.04650845006108284, -0.052791837602853775, -0.12349822372198105, 0.027728289365768433, 0.06862431764602661, -0.17848549783229828, -0.22540953755378723, 0.017256373539566994, 0.3368085026741028, -0.4049243927001953, -0.1920146644115448, 0.24644166231155396, -0.5248057246208191, -0.1333831399679184, -0.0667431503534317, -0.21015965938568115, -0.43538692593574524, -0.09720790386199951, -0.002828591503202915, 0.11836624145507812, -0.3503793776035309, 0.14163604378700256, -0.04214233160018921, 0.3617205023765564, 0.09661304950714111, 0.10985496640205383, 0.22366610169410706, -0.04773056134581566, -0.12851761281490326, -0.02115696296095848, -0.14970536530017853, 0.23467230796813965, 0.020000029355287552, -0.10136129707098007, -0.27647367119789124, -0.018301060423254967, 0.022069329395890236, 0.08295054733753204, -0.3556922376155853, 0.12816977500915527, -0.410552442073822, 0.16329123079776764, 0.12142471969127655, 0.025538813322782516, 0.30962109565734863, 0.1603921800851822, -0.44851920008659363, 0.06061500310897827, -0.12577614188194275, 0.09407918155193329, 0.1549614667892456, -0.14693890511989594, -0.023620877414941788, 0.3271965980529785, -0.033563174307346344, 0.5745299458503723, 0.1320427805185318, -0.10007313638925552, 0.08619054406881332, -0.03396201506257057, -0.05471619963645935, -0.08458318561315536, -0.3129940629005432, -0.06037275865674019, 0.05679281800985336, -0.2795211374759674, 0.39427119493484497, -0.11474058777093887, -0.4025883376598358, 0.04747721180319786, 0.0788792222738266, -0.09748449921607971, -0.14900179207324982, 0.1307830810546875, 0.0708470270037651, 0.14306633174419403, -0.10778213292360306, 0.09321731328964233, -0.41705700755119324, -0.1029118150472641, 0.26866042613983154, -0.33130693435668945, 0.08678101003170013, -0.4194377064704895, -0.2532420754432678, 0.16139353811740875, -0.5163278579711914, 0.2065575271844864, 0.06316199898719788, -0.004503914620727301, -0.25463926792144775, 0.06263594329357147, 0.133987694978714, 0.08031817525625229, 0.5949674248695374, -0.06951828300952911, 0.15460839867591858, -0.013076528906822205, 0.01931835152208805, -0.15857303142547607, -0.004691111855208874, -0.08585498481988907, 0.21265363693237305, 0.5223545432090759, 0.28489387035369873, -0.09591425955295563, -0.07792156934738159, -0.09557786583900452, -0.033900611102581024, -0.07409623265266418, -0.06725269556045532, -0.05426112189888954, -0.08532381057739258, -0.15357846021652222, 0.08508431911468506, -0.13780786097049713, -0.16937318444252014, 0.3008474111557007, -0.42953982949256897, 0.14373959600925446, 0.10346667468547821, 0.08218349516391754, 0.15081048011779785, 0.1284276396036148, 0.23775513470172882, 0.18602393567562103, 0.11378461122512817, 0.14729078114032745, -0.07350459694862366, 0.18882708251476288, -0.01377431396394968, 0.29769086837768555, 0.22475284337997437, -0.04892999678850174, 0.1370001882314682, 0.4183053970336914, 0.2177979052066803, -0.03945394232869148, 0.04496103152632713, 0.3600701093673706, -0.05156572908163071, -0.06126309186220169, 0.5058532953262329, -0.03470697999000549, -0.3690623939037323, 0.03576401248574257, 0.06898422539234161, 0.21453918516635895, -0.3013429641723633, 0.48143815994262695, -0.5957074165344238, -0.0008296839077956975, 0.49186983704566956, 0.30282703042030334, 0.7559138536453247, -0.49517279863357544, -0.20713476836681366, 0.00007914913294371217, 0.23882678151130676, -0.26381343603134155, -0.04151406139135361, 0.20135557651519775, -0.21015842258930206, -0.17463386058807373, 0.18545986711978912, -0.1413612812757492, 0.0626562088727951, 0.14488805830478668, -0.17442327737808228, -0.18681736290454865, -0.021221105009317398, 0.38763293623924255, -0.1391032636165619, 0.07981579750776291, 0.4471867084503174, -0.30000996589660645, -0.02632308378815651, 0.2255588173866272, 0.07257629930973053, 0.11534838378429413, -0.1200302317738533, -0.03058956377208233, 0.033728212118148804, -0.1223452091217041, 0.05633119121193886, -0.09768079221248627, -0.2391946017742157, 0.2287825047969818, -0.19580544531345367, 0.33101531863212585, -0.435708224773407, 0.05255059525370598, -0.38108694553375244, 0.23120847344398499, 0.03408496454358101, 0.2928927540779114, 0.43501025438308716, 0.12346415221691132, -0.07326580584049225, -0.2757701575756073, -0.34896793961524963, -0.02323385886847973, 0.00305627821944654, 0.11772868782281876, -0.09656953811645508, -0.21251416206359863, -0.44712644815444946, 0.272704154253006, 0.11840091645717621, -0.008783208206295967, -0.15736521780490875, -0.005829107016324997, -0.2395108938217163, -0.01036023534834385, 0.27847951650619507, -0.1641843169927597, 0.22064365446567535, 0.5427923202514648, 0.0462692528963089, -0.2771815359592438, -0.10953604429960251, 0.2817230820655823, 0.1345994472503662, -0.026337143033742905, 0.23852726817131042, 0.0057832286693155766, -0.3318210542201996, -0.4043583571910858, -0.0778452455997467, -0.02904658205807209, -0.053970519453287125, 0.11884172260761261, -0.26706671714782715, -0.24351446330547333, 0.3382922112941742, 0.2162581980228424, 0.06774992495775223, 0.11211716383695602, -0.09653472155332565, -0.005903475917875767, -0.20061877369880676, -0.012249695137143135, -0.0071066757664084435, 0.043952953070402145, -0.14529132843017578, -0.07800097018480301, -0.045934341847896576, 0.48983436822891235, -0.4504971504211426, -0.09748747944831848, -0.15718966722488403, 0.19932296872138977, -0.05590682849287987, -0.0716409981250763, 0.14316916465759277, -0.08263438194990158, 0.3163793683052063, 0.11651577800512314, -0.22907544672489166, -0.3902067542076111, 0.23426930606365204, 0.07876712083816528, -0.16792908310890198, -0.09630007296800613, 0.1483621746301651, -0.08629357069730759, 0.024882424622774124, -0.2966083884239197, -0.03250075876712799, 0.05929221212863922, -0.09443078190088272, -0.5242846012115479, 0.13561104238033295, -0.10098852962255478, 0.3209577202796936, 0.19018341600894928, -0.18880660831928253, 0.004411095287650824, -0.13668881356716156, -0.15999558568000793, 0.057495828717947006, -0.32697421312332153, 0.14633463323116302, 0.013685522601008415, 0.41359782218933105, 0.052094507962465286, 0.281484991312027, -0.08110599219799042, -0.21731922030448914, 0.5401442646980286, -0.04313499480485916, 0.09196742624044418, 0.07598821818828583, -0.1635495126247406, -0.1250855028629303, 0.3680283725261688, -0.08354318886995316, -0.12343098223209381, 0.46341753005981445, -0.12679541110992432, 0.19402287900447845, 0.012339101172983646, 0.045216191560029984, -0.20632722973823547, 0.07968655973672867, 0.19251751899719238, 0.025867361575365067, -0.35279613733291626, -0.11679340898990631, 0.1489734798669815, 0.30891865491867065, -0.3032325208187103, 0.19489333033561707, -0.028398267924785614, 0.10300831496715546, 0.15143127739429474, 0.103162981569767, 0.14090780913829803, 0.09835553169250488, 0.3951481878757477, -0.049719247967004776, -0.3312107026576996, 0.22376692295074463, 0.3597697913646698, -0.3410908877849579, 0.14143691956996918, 0.32919755578041077, 0.0451715849339962, -0.18000884354114532, -0.30821362137794495, -0.3514571785926819, 0.2930070757865906, -0.28072425723075867, 0.027657341212034225, -0.1339443475008011, -0.05422248691320419, 0.0819537341594696, 0.15477867424488068, 0.2046668827533722, 0.3192395269870758, 0.39560702443122864, 0.07546132802963257, 0.10068987309932709, 0.1296057254076004, -0.3609299063682556, -0.15469573438167572, 0.45216214656829834, -0.2770078778266907, 0.13359272480010986, -0.37595292925834656, 0.00841719750314951, -0.1908087432384491, 0.3052169978618622, 0.15191476047039032, 0.5150671005249023, -0.047792550176382065, 0.11560624837875366, -0.10119399428367615, -0.15390358865261078, -0.3401761054992676, 0.30340608954429626, -0.10269775986671448, -0.13604195415973663, 0.1063881441950798, 0.22204911708831787, -0.45488059520721436, -0.14192605018615723, -0.13586367666721344, -0.06657703220844269, 0.5260953307151794, -0.10076070576906204, 0.14284591376781464, -0.15595141053199768, 0.0017646246124058962, -0.07890987396240234, -0.32409191131591797, -0.19555668532848358, 0.17921701073646545, -0.403156578540802, 0.15054762363433838, -0.13592752814292908, 0.15940678119659424, -0.21661294996738434, 0.5045703649520874, 0.05458083376288414, 0.07794332504272461, -0.3355932831764221, -0.20178744196891785, -0.20382685959339142, 0.07549679279327393, -0.32237136363983154, 0.18578341603279114, 0.01230894960463047, 0.10326281934976578, 0.020695963874459267, 0.06016653776168823, 0.23431864380836487, -0.2477051317691803, -0.2636207044124603, 0.0882115513086319, -0.33509451150894165, 0.37777814269065857, -0.06657037883996964, 0.010407470166683197, 0.1702563613653183, -0.3967393636703491, 0.6546357870101929, -0.2005673050880432, 0.3361153304576874, -0.11358538269996643, -0.06194237619638443, -0.1589442938566208, 0.1569148153066635, 0.4262062907218933, 0.14343968033790588, 0.006144917104393244, -0.21607941389083862, -0.14001420140266418, -0.1447472721338272, -0.021142736077308655, 0.14240191876888275, -0.055129677057266235, 0.42343640327453613, 0.04672573506832123, -0.08889749646186829, -0.06427671015262604, -0.19776619970798492, 0.18474341928958893, 0.1162036657333374, 0.337516725063324, 0.15266238152980804, 0.02748800255358219, -0.08982112258672714, 0.3604832589626312, -0.03847603499889374, 0.16342808306217194, 0.16771180927753448, 0.027324756607413292, -0.14502522349357605, -0.3080488443374634, 0.23182165622711182, -0.4071289002895355, -0.2470616102218628, 0.005687588360160589, 0.24450860917568207, -0.13184240460395813, 0.19587789475917816, 0.030912064015865326, -0.20821821689605713, 0.1344963163137436, -0.0014098885003477335, -0.11419598013162613, 0.035713788121938705, -0.16152171790599823, -0.08974677324295044, -0.011011305265128613, -0.05934930592775345, 0.0024842347484081984, -0.37748658657073975, -0.04926518723368645, -0.06943122297525406 ]
https://github.com/huggingface/datasets/issues/2243
Map is slow and processes batches one after another
Upgrade to 1.6.1 solved my problem somehow. I did not change any of my code, but now it starts all processes around the same time.
## Describe the bug I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry. I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps. pseudo code: ```python ds = datasets.load_from_disk("path") new_dataset = ds.map(work, batched=True, ...) # fast uses all processes final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another ``` ## Expected results Second stage should be as fast as the first stage. ## Versions Paste the output of the following code: - Datasets: 1.5.0 - Python: 3.8.8 (default, Feb 24 2021, 21:46:12) - Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10 Do you guys have any idea? Thanks a lot!
25
Map is slow and processes batches one after another
[ -0.346902459859848, -0.33231914043426514, -0.26421380043029785, 0.20019122958183289, 0.07460776716470718, 0.06493444740772247, 0.08279702067375183, 0.5155574083328247, 0.3761083781719208, 0.12328721582889557, 0.09739602357149124, 0.20408199727535248, 0.016164349392056465, -0.20952676236629486, -0.3919113576412201, 0.1688389629125595, -0.07409495860338211, -0.04059314355254173, -0.0006117211887612939, -0.2060561180114746, -0.1830347627401352, -0.10038626939058304, -0.05386185646057129, 0.0703747570514679, 0.030000220984220505, -0.29590171575546265, 0.09416571259498596, -0.10722612589597702, -0.15231265127658844, -0.22050584852695465, -0.34138092398643494, 0.08079907298088074, -0.35335657000541687, 0.5078496932983398, -0.00009880245488602668, -0.020771032199263573, 0.04354316368699074, 0.39986029267311096, 0.10131819546222687, 0.5644356608390808, -0.30631476640701294, -0.2024446278810501, -0.07338310778141022, -0.27934595942497253, 0.13657952845096588, 0.02235913649201393, 0.1507650762796402, -0.3295906186103821, 0.31476807594299316, -0.012234442867338657, 0.31727835536003113, 0.1598130166530609, -0.4638504087924957, -0.08151277154684067, 0.28990787267684937, -0.098148413002491, 0.020126773044466972, 0.014915372245013714, 0.3477391302585602, -0.20551301538944244, -0.41291430592536926, 0.3378390073776245, -0.37297582626342773, 0.14065930247306824, 0.011179848574101925, 0.004806108772754669, 0.7656608819961548, -0.16561837494373322, 0.29259970784187317, -0.033935707062482834, -0.25106433033943176, 0.21209140121936798, 0.2623359262943268, -0.163104847073555, -0.33520203828811646, 0.022947978228330612, 0.09529877454042435, -0.10500805824995041, -0.14843355119228363, -0.2512674629688263, -0.37201809883117676, 0.14504694938659668, 0.19337530434131622, -0.07892788201570511, 0.00828841608017683, 0.16868816316127777, 0.23826923966407776, 0.002585870446637273, 0.27918222546577454, -0.0737704485654831, -0.020783908665180206, -0.20284403860569, -0.04861947521567345, 0.17144007980823517, -0.26865965127944946, 0.0821915715932846, 0.43497923016548157, 0.08063942939043045, 0.011250465176999569, -0.4446554481983185, 0.11177041381597519, 0.3328620493412018, 0.1382351964712143, -0.014861262403428555, 0.16460958123207092, -0.018670301884412766, -0.030656469985842705, 0.04383845627307892, 0.1428426206111908, -0.12722641229629517, -0.2725907266139984, 0.1849134862422943, 0.04652993381023407, -0.32563382387161255, 0.004765454679727554, 0.05651769042015076, -0.12138470262289047, 0.16678567230701447, 0.07295296341180801, 0.009446556679904461, -0.04851233586668968, -0.10116931051015854, 0.19843320548534393, 0.30274179577827454, -0.11139313131570816, 0.02612820826470852, -0.06724396347999573, -0.429477721452713, -0.16147276759147644, 0.2546689510345459, -0.25917795300483704, -0.23914240300655365, -0.35595494508743286, 0.09963365644216537, -0.06382684409618378, -0.052846986800432205, -0.08613016456365585, 0.21114608645439148, -0.3877299129962921, -0.039947960525751114, -0.06248798221349716, -0.20529575645923615, 0.11264385282993317, -0.056133996695280075, -0.019549550488591194, 0.41936826705932617, 0.16015058755874634, 0.21953600645065308, -0.13072507083415985, 0.04029920697212219, -0.34722018241882324, -0.03930031135678291, 0.2900112271308899, 0.2976366877555847, 0.30773651599884033, 0.27771511673927307, 0.16725315153598785, -0.0739043802022934, 0.051212139427661896, -0.13370971381664276, -0.2565891146659851, 0.013744770549237728, -0.2034359872341156, -0.16059765219688416, -0.047615665942430496, 0.42236146330833435, 0.05025829002261162, 0.020967863500118256, -0.030996056273579597, 0.10492072254419327, 0.2687608599662781, 0.523412823677063, 0.022686192765831947, 0.31269219517707825, -0.2544722259044647, -0.00810905173420906, 0.07355087250471115, -0.1960623860359192, -0.21346105635166168, 0.42441755533218384, -0.4188637137413025, -0.1253466010093689, 0.13709425926208496, 0.11594847589731216, 0.32039564847946167, 0.04190303385257721, 0.45294493436813354, 0.18919745087623596, -0.05264270305633545, 0.37786051630973816, -0.26831719279289246, 0.008595299907028675, -0.1868087649345398, -0.03396426513791084, -0.04229334369301796, 0.011501544155180454, 0.06302433460950851, -0.3055112659931183, 0.2197834849357605, -0.11960487812757492, -0.05113394185900688, 0.1328306496143341, -0.01651775650680065, -0.23572635650634766, -0.0831679031252861, 0.22719676792621613, -0.1855338215827942, 0.03203566372394562, -0.28564783930778503, -0.21701855957508087, 0.05983464792370796, -0.031117629259824753, 0.028442811220884323, 0.015629086643457413, -0.11477912962436676, 0.2455955445766449, 0.25732624530792236, 0.21298736333847046, -0.03352643549442291, -0.010363341309130192, 0.25019603967666626, -0.2034085988998413, 0.09319977462291718, -0.22552019357681274, -0.010361218824982643, -0.11390915513038635, -0.11689040809869766, -0.1321275681257248, 0.11777393519878387, -0.18408437073230743, 0.22070980072021484, -0.19346776604652405, -0.0033772361930459738, 0.14432284235954285, -0.017980189993977547, 0.31626057624816895, 0.15206991136074066, 0.11638747155666351, 0.1015356257557869, 0.32056671380996704, -0.020570946857333183, -0.044901542365550995, 0.05576915293931961, -0.35787099599838257, -0.055347051471471786, 0.10730158537626266, 0.17043666541576385, 0.4153853952884674, -0.025398705154657364, -0.09540905803442001, 0.016269512474536896, 0.00924677960574627, 0.3061281144618988, -0.11059220880270004, 0.24755358695983887, 0.17703957855701447, 0.2672322690486908, 0.27773189544677734, 0.1896236687898636, 0.1418425440788269, 0.4417087137699127, -0.03519785776734352, 0.004277384839951992, 0.034885235130786896, -0.089284248650074, 0.08981502801179886, 0.007180888205766678, -0.05985037609934807, 0.06340697407722473, 0.17671863734722137, -0.050875432789325714, -0.23932433128356934, 0.17840252816677094, -0.11489767581224442, 0.03816940635442734, 0.07324880361557007, 0.2802654504776001, 0.1546289175748825, 0.0572182722389698, -0.13831621408462524, -0.30543816089630127, -0.31304827332496643, 0.08564291149377823, 0.21857713162899017, 0.053784459829330444, -0.2167840600013733, -0.08006998896598816, -0.010241859592497349, 0.007231398485600948, 0.09149244427680969, 0.21361394226551056, -0.2520252764225006, 0.11436688154935837, 0.06936531513929367, -0.16448752582073212, 0.1660841703414917, 0.30653974413871765, 0.10398644208908081, 0.31879496574401855, 0.06635374575853348, -0.1062910407781601, -0.33500924706459045, -0.1379772126674652, 0.18375025689601898, 0.2548683285713196, -0.09168681502342224, 0.3119211196899414, -0.04650845006108284, -0.052791837602853775, -0.12349822372198105, 0.027728289365768433, 0.06862431764602661, -0.17848549783229828, -0.22540953755378723, 0.017256373539566994, 0.3368085026741028, -0.4049243927001953, -0.1920146644115448, 0.24644166231155396, -0.5248057246208191, -0.1333831399679184, -0.0667431503534317, -0.21015965938568115, -0.43538692593574524, -0.09720790386199951, -0.002828591503202915, 0.11836624145507812, -0.3503793776035309, 0.14163604378700256, -0.04214233160018921, 0.3617205023765564, 0.09661304950714111, 0.10985496640205383, 0.22366610169410706, -0.04773056134581566, -0.12851761281490326, -0.02115696296095848, -0.14970536530017853, 0.23467230796813965, 0.020000029355287552, -0.10136129707098007, -0.27647367119789124, -0.018301060423254967, 0.022069329395890236, 0.08295054733753204, -0.3556922376155853, 0.12816977500915527, -0.410552442073822, 0.16329123079776764, 0.12142471969127655, 0.025538813322782516, 0.30962109565734863, 0.1603921800851822, -0.44851920008659363, 0.06061500310897827, -0.12577614188194275, 0.09407918155193329, 0.1549614667892456, -0.14693890511989594, -0.023620877414941788, 0.3271965980529785, -0.033563174307346344, 0.5745299458503723, 0.1320427805185318, -0.10007313638925552, 0.08619054406881332, -0.03396201506257057, -0.05471619963645935, -0.08458318561315536, -0.3129940629005432, -0.06037275865674019, 0.05679281800985336, -0.2795211374759674, 0.39427119493484497, -0.11474058777093887, -0.4025883376598358, 0.04747721180319786, 0.0788792222738266, -0.09748449921607971, -0.14900179207324982, 0.1307830810546875, 0.0708470270037651, 0.14306633174419403, -0.10778213292360306, 0.09321731328964233, -0.41705700755119324, -0.1029118150472641, 0.26866042613983154, -0.33130693435668945, 0.08678101003170013, -0.4194377064704895, -0.2532420754432678, 0.16139353811740875, -0.5163278579711914, 0.2065575271844864, 0.06316199898719788, -0.004503914620727301, -0.25463926792144775, 0.06263594329357147, 0.133987694978714, 0.08031817525625229, 0.5949674248695374, -0.06951828300952911, 0.15460839867591858, -0.013076528906822205, 0.01931835152208805, -0.15857303142547607, -0.004691111855208874, -0.08585498481988907, 0.21265363693237305, 0.5223545432090759, 0.28489387035369873, -0.09591425955295563, -0.07792156934738159, -0.09557786583900452, -0.033900611102581024, -0.07409623265266418, -0.06725269556045532, -0.05426112189888954, -0.08532381057739258, -0.15357846021652222, 0.08508431911468506, -0.13780786097049713, -0.16937318444252014, 0.3008474111557007, -0.42953982949256897, 0.14373959600925446, 0.10346667468547821, 0.08218349516391754, 0.15081048011779785, 0.1284276396036148, 0.23775513470172882, 0.18602393567562103, 0.11378461122512817, 0.14729078114032745, -0.07350459694862366, 0.18882708251476288, -0.01377431396394968, 0.29769086837768555, 0.22475284337997437, -0.04892999678850174, 0.1370001882314682, 0.4183053970336914, 0.2177979052066803, -0.03945394232869148, 0.04496103152632713, 0.3600701093673706, -0.05156572908163071, -0.06126309186220169, 0.5058532953262329, -0.03470697999000549, -0.3690623939037323, 0.03576401248574257, 0.06898422539234161, 0.21453918516635895, -0.3013429641723633, 0.48143815994262695, -0.5957074165344238, -0.0008296839077956975, 0.49186983704566956, 0.30282703042030334, 0.7559138536453247, -0.49517279863357544, -0.20713476836681366, 0.00007914913294371217, 0.23882678151130676, -0.26381343603134155, -0.04151406139135361, 0.20135557651519775, -0.21015842258930206, -0.17463386058807373, 0.18545986711978912, -0.1413612812757492, 0.0626562088727951, 0.14488805830478668, -0.17442327737808228, -0.18681736290454865, -0.021221105009317398, 0.38763293623924255, -0.1391032636165619, 0.07981579750776291, 0.4471867084503174, -0.30000996589660645, -0.02632308378815651, 0.2255588173866272, 0.07257629930973053, 0.11534838378429413, -0.1200302317738533, -0.03058956377208233, 0.033728212118148804, -0.1223452091217041, 0.05633119121193886, -0.09768079221248627, -0.2391946017742157, 0.2287825047969818, -0.19580544531345367, 0.33101531863212585, -0.435708224773407, 0.05255059525370598, -0.38108694553375244, 0.23120847344398499, 0.03408496454358101, 0.2928927540779114, 0.43501025438308716, 0.12346415221691132, -0.07326580584049225, -0.2757701575756073, -0.34896793961524963, -0.02323385886847973, 0.00305627821944654, 0.11772868782281876, -0.09656953811645508, -0.21251416206359863, -0.44712644815444946, 0.272704154253006, 0.11840091645717621, -0.008783208206295967, -0.15736521780490875, -0.005829107016324997, -0.2395108938217163, -0.01036023534834385, 0.27847951650619507, -0.1641843169927597, 0.22064365446567535, 0.5427923202514648, 0.0462692528963089, -0.2771815359592438, -0.10953604429960251, 0.2817230820655823, 0.1345994472503662, -0.026337143033742905, 0.23852726817131042, 0.0057832286693155766, -0.3318210542201996, -0.4043583571910858, -0.0778452455997467, -0.02904658205807209, -0.053970519453287125, 0.11884172260761261, -0.26706671714782715, -0.24351446330547333, 0.3382922112941742, 0.2162581980228424, 0.06774992495775223, 0.11211716383695602, -0.09653472155332565, -0.005903475917875767, -0.20061877369880676, -0.012249695137143135, -0.0071066757664084435, 0.043952953070402145, -0.14529132843017578, -0.07800097018480301, -0.045934341847896576, 0.48983436822891235, -0.4504971504211426, -0.09748747944831848, -0.15718966722488403, 0.19932296872138977, -0.05590682849287987, -0.0716409981250763, 0.14316916465759277, -0.08263438194990158, 0.3163793683052063, 0.11651577800512314, -0.22907544672489166, -0.3902067542076111, 0.23426930606365204, 0.07876712083816528, -0.16792908310890198, -0.09630007296800613, 0.1483621746301651, -0.08629357069730759, 0.024882424622774124, -0.2966083884239197, -0.03250075876712799, 0.05929221212863922, -0.09443078190088272, -0.5242846012115479, 0.13561104238033295, -0.10098852962255478, 0.3209577202796936, 0.19018341600894928, -0.18880660831928253, 0.004411095287650824, -0.13668881356716156, -0.15999558568000793, 0.057495828717947006, -0.32697421312332153, 0.14633463323116302, 0.013685522601008415, 0.41359782218933105, 0.052094507962465286, 0.281484991312027, -0.08110599219799042, -0.21731922030448914, 0.5401442646980286, -0.04313499480485916, 0.09196742624044418, 0.07598821818828583, -0.1635495126247406, -0.1250855028629303, 0.3680283725261688, -0.08354318886995316, -0.12343098223209381, 0.46341753005981445, -0.12679541110992432, 0.19402287900447845, 0.012339101172983646, 0.045216191560029984, -0.20632722973823547, 0.07968655973672867, 0.19251751899719238, 0.025867361575365067, -0.35279613733291626, -0.11679340898990631, 0.1489734798669815, 0.30891865491867065, -0.3032325208187103, 0.19489333033561707, -0.028398267924785614, 0.10300831496715546, 0.15143127739429474, 0.103162981569767, 0.14090780913829803, 0.09835553169250488, 0.3951481878757477, -0.049719247967004776, -0.3312107026576996, 0.22376692295074463, 0.3597697913646698, -0.3410908877849579, 0.14143691956996918, 0.32919755578041077, 0.0451715849339962, -0.18000884354114532, -0.30821362137794495, -0.3514571785926819, 0.2930070757865906, -0.28072425723075867, 0.027657341212034225, -0.1339443475008011, -0.05422248691320419, 0.0819537341594696, 0.15477867424488068, 0.2046668827533722, 0.3192395269870758, 0.39560702443122864, 0.07546132802963257, 0.10068987309932709, 0.1296057254076004, -0.3609299063682556, -0.15469573438167572, 0.45216214656829834, -0.2770078778266907, 0.13359272480010986, -0.37595292925834656, 0.00841719750314951, -0.1908087432384491, 0.3052169978618622, 0.15191476047039032, 0.5150671005249023, -0.047792550176382065, 0.11560624837875366, -0.10119399428367615, -0.15390358865261078, -0.3401761054992676, 0.30340608954429626, -0.10269775986671448, -0.13604195415973663, 0.1063881441950798, 0.22204911708831787, -0.45488059520721436, -0.14192605018615723, -0.13586367666721344, -0.06657703220844269, 0.5260953307151794, -0.10076070576906204, 0.14284591376781464, -0.15595141053199768, 0.0017646246124058962, -0.07890987396240234, -0.32409191131591797, -0.19555668532848358, 0.17921701073646545, -0.403156578540802, 0.15054762363433838, -0.13592752814292908, 0.15940678119659424, -0.21661294996738434, 0.5045703649520874, 0.05458083376288414, 0.07794332504272461, -0.3355932831764221, -0.20178744196891785, -0.20382685959339142, 0.07549679279327393, -0.32237136363983154, 0.18578341603279114, 0.01230894960463047, 0.10326281934976578, 0.020695963874459267, 0.06016653776168823, 0.23431864380836487, -0.2477051317691803, -0.2636207044124603, 0.0882115513086319, -0.33509451150894165, 0.37777814269065857, -0.06657037883996964, 0.010407470166683197, 0.1702563613653183, -0.3967393636703491, 0.6546357870101929, -0.2005673050880432, 0.3361153304576874, -0.11358538269996643, -0.06194237619638443, -0.1589442938566208, 0.1569148153066635, 0.4262062907218933, 0.14343968033790588, 0.006144917104393244, -0.21607941389083862, -0.14001420140266418, -0.1447472721338272, -0.021142736077308655, 0.14240191876888275, -0.055129677057266235, 0.42343640327453613, 0.04672573506832123, -0.08889749646186829, -0.06427671015262604, -0.19776619970798492, 0.18474341928958893, 0.1162036657333374, 0.337516725063324, 0.15266238152980804, 0.02748800255358219, -0.08982112258672714, 0.3604832589626312, -0.03847603499889374, 0.16342808306217194, 0.16771180927753448, 0.027324756607413292, -0.14502522349357605, -0.3080488443374634, 0.23182165622711182, -0.4071289002895355, -0.2470616102218628, 0.005687588360160589, 0.24450860917568207, -0.13184240460395813, 0.19587789475917816, 0.030912064015865326, -0.20821821689605713, 0.1344963163137436, -0.0014098885003477335, -0.11419598013162613, 0.035713788121938705, -0.16152171790599823, -0.08974677324295044, -0.011011305265128613, -0.05934930592775345, 0.0024842347484081984, -0.37748658657073975, -0.04926518723368645, -0.06943122297525406 ]
https://github.com/huggingface/datasets/issues/2243
Map is slow and processes batches one after another
Nice ! I'm glad this works now. Closing for now, but feel free to re-open if you experience this issue again.
## Describe the bug I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry. I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps. pseudo code: ```python ds = datasets.load_from_disk("path") new_dataset = ds.map(work, batched=True, ...) # fast uses all processes final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another ``` ## Expected results Second stage should be as fast as the first stage. ## Versions Paste the output of the following code: - Datasets: 1.5.0 - Python: 3.8.8 (default, Feb 24 2021, 21:46:12) - Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10 Do you guys have any idea? Thanks a lot!
21
Map is slow and processes batches one after another
[ -0.346902459859848, -0.33231914043426514, -0.26421380043029785, 0.20019122958183289, 0.07460776716470718, 0.06493444740772247, 0.08279702067375183, 0.5155574083328247, 0.3761083781719208, 0.12328721582889557, 0.09739602357149124, 0.20408199727535248, 0.016164349392056465, -0.20952676236629486, -0.3919113576412201, 0.1688389629125595, -0.07409495860338211, -0.04059314355254173, -0.0006117211887612939, -0.2060561180114746, -0.1830347627401352, -0.10038626939058304, -0.05386185646057129, 0.0703747570514679, 0.030000220984220505, -0.29590171575546265, 0.09416571259498596, -0.10722612589597702, -0.15231265127658844, -0.22050584852695465, -0.34138092398643494, 0.08079907298088074, -0.35335657000541687, 0.5078496932983398, -0.00009880245488602668, -0.020771032199263573, 0.04354316368699074, 0.39986029267311096, 0.10131819546222687, 0.5644356608390808, -0.30631476640701294, -0.2024446278810501, -0.07338310778141022, -0.27934595942497253, 0.13657952845096588, 0.02235913649201393, 0.1507650762796402, -0.3295906186103821, 0.31476807594299316, -0.012234442867338657, 0.31727835536003113, 0.1598130166530609, -0.4638504087924957, -0.08151277154684067, 0.28990787267684937, -0.098148413002491, 0.020126773044466972, 0.014915372245013714, 0.3477391302585602, -0.20551301538944244, -0.41291430592536926, 0.3378390073776245, -0.37297582626342773, 0.14065930247306824, 0.011179848574101925, 0.004806108772754669, 0.7656608819961548, -0.16561837494373322, 0.29259970784187317, -0.033935707062482834, -0.25106433033943176, 0.21209140121936798, 0.2623359262943268, -0.163104847073555, -0.33520203828811646, 0.022947978228330612, 0.09529877454042435, -0.10500805824995041, -0.14843355119228363, -0.2512674629688263, -0.37201809883117676, 0.14504694938659668, 0.19337530434131622, -0.07892788201570511, 0.00828841608017683, 0.16868816316127777, 0.23826923966407776, 0.002585870446637273, 0.27918222546577454, -0.0737704485654831, -0.020783908665180206, -0.20284403860569, -0.04861947521567345, 0.17144007980823517, -0.26865965127944946, 0.0821915715932846, 0.43497923016548157, 0.08063942939043045, 0.011250465176999569, -0.4446554481983185, 0.11177041381597519, 0.3328620493412018, 0.1382351964712143, -0.014861262403428555, 0.16460958123207092, -0.018670301884412766, -0.030656469985842705, 0.04383845627307892, 0.1428426206111908, -0.12722641229629517, -0.2725907266139984, 0.1849134862422943, 0.04652993381023407, -0.32563382387161255, 0.004765454679727554, 0.05651769042015076, -0.12138470262289047, 0.16678567230701447, 0.07295296341180801, 0.009446556679904461, -0.04851233586668968, -0.10116931051015854, 0.19843320548534393, 0.30274179577827454, -0.11139313131570816, 0.02612820826470852, -0.06724396347999573, -0.429477721452713, -0.16147276759147644, 0.2546689510345459, -0.25917795300483704, -0.23914240300655365, -0.35595494508743286, 0.09963365644216537, -0.06382684409618378, -0.052846986800432205, -0.08613016456365585, 0.21114608645439148, -0.3877299129962921, -0.039947960525751114, -0.06248798221349716, -0.20529575645923615, 0.11264385282993317, -0.056133996695280075, -0.019549550488591194, 0.41936826705932617, 0.16015058755874634, 0.21953600645065308, -0.13072507083415985, 0.04029920697212219, -0.34722018241882324, -0.03930031135678291, 0.2900112271308899, 0.2976366877555847, 0.30773651599884033, 0.27771511673927307, 0.16725315153598785, -0.0739043802022934, 0.051212139427661896, -0.13370971381664276, -0.2565891146659851, 0.013744770549237728, -0.2034359872341156, -0.16059765219688416, -0.047615665942430496, 0.42236146330833435, 0.05025829002261162, 0.020967863500118256, -0.030996056273579597, 0.10492072254419327, 0.2687608599662781, 0.523412823677063, 0.022686192765831947, 0.31269219517707825, -0.2544722259044647, -0.00810905173420906, 0.07355087250471115, -0.1960623860359192, -0.21346105635166168, 0.42441755533218384, -0.4188637137413025, -0.1253466010093689, 0.13709425926208496, 0.11594847589731216, 0.32039564847946167, 0.04190303385257721, 0.45294493436813354, 0.18919745087623596, -0.05264270305633545, 0.37786051630973816, -0.26831719279289246, 0.008595299907028675, -0.1868087649345398, -0.03396426513791084, -0.04229334369301796, 0.011501544155180454, 0.06302433460950851, -0.3055112659931183, 0.2197834849357605, -0.11960487812757492, -0.05113394185900688, 0.1328306496143341, -0.01651775650680065, -0.23572635650634766, -0.0831679031252861, 0.22719676792621613, -0.1855338215827942, 0.03203566372394562, -0.28564783930778503, -0.21701855957508087, 0.05983464792370796, -0.031117629259824753, 0.028442811220884323, 0.015629086643457413, -0.11477912962436676, 0.2455955445766449, 0.25732624530792236, 0.21298736333847046, -0.03352643549442291, -0.010363341309130192, 0.25019603967666626, -0.2034085988998413, 0.09319977462291718, -0.22552019357681274, -0.010361218824982643, -0.11390915513038635, -0.11689040809869766, -0.1321275681257248, 0.11777393519878387, -0.18408437073230743, 0.22070980072021484, -0.19346776604652405, -0.0033772361930459738, 0.14432284235954285, -0.017980189993977547, 0.31626057624816895, 0.15206991136074066, 0.11638747155666351, 0.1015356257557869, 0.32056671380996704, -0.020570946857333183, -0.044901542365550995, 0.05576915293931961, -0.35787099599838257, -0.055347051471471786, 0.10730158537626266, 0.17043666541576385, 0.4153853952884674, -0.025398705154657364, -0.09540905803442001, 0.016269512474536896, 0.00924677960574627, 0.3061281144618988, -0.11059220880270004, 0.24755358695983887, 0.17703957855701447, 0.2672322690486908, 0.27773189544677734, 0.1896236687898636, 0.1418425440788269, 0.4417087137699127, -0.03519785776734352, 0.004277384839951992, 0.034885235130786896, -0.089284248650074, 0.08981502801179886, 0.007180888205766678, -0.05985037609934807, 0.06340697407722473, 0.17671863734722137, -0.050875432789325714, -0.23932433128356934, 0.17840252816677094, -0.11489767581224442, 0.03816940635442734, 0.07324880361557007, 0.2802654504776001, 0.1546289175748825, 0.0572182722389698, -0.13831621408462524, -0.30543816089630127, -0.31304827332496643, 0.08564291149377823, 0.21857713162899017, 0.053784459829330444, -0.2167840600013733, -0.08006998896598816, -0.010241859592497349, 0.007231398485600948, 0.09149244427680969, 0.21361394226551056, -0.2520252764225006, 0.11436688154935837, 0.06936531513929367, -0.16448752582073212, 0.1660841703414917, 0.30653974413871765, 0.10398644208908081, 0.31879496574401855, 0.06635374575853348, -0.1062910407781601, -0.33500924706459045, -0.1379772126674652, 0.18375025689601898, 0.2548683285713196, -0.09168681502342224, 0.3119211196899414, -0.04650845006108284, -0.052791837602853775, -0.12349822372198105, 0.027728289365768433, 0.06862431764602661, -0.17848549783229828, -0.22540953755378723, 0.017256373539566994, 0.3368085026741028, -0.4049243927001953, -0.1920146644115448, 0.24644166231155396, -0.5248057246208191, -0.1333831399679184, -0.0667431503534317, -0.21015965938568115, -0.43538692593574524, -0.09720790386199951, -0.002828591503202915, 0.11836624145507812, -0.3503793776035309, 0.14163604378700256, -0.04214233160018921, 0.3617205023765564, 0.09661304950714111, 0.10985496640205383, 0.22366610169410706, -0.04773056134581566, -0.12851761281490326, -0.02115696296095848, -0.14970536530017853, 0.23467230796813965, 0.020000029355287552, -0.10136129707098007, -0.27647367119789124, -0.018301060423254967, 0.022069329395890236, 0.08295054733753204, -0.3556922376155853, 0.12816977500915527, -0.410552442073822, 0.16329123079776764, 0.12142471969127655, 0.025538813322782516, 0.30962109565734863, 0.1603921800851822, -0.44851920008659363, 0.06061500310897827, -0.12577614188194275, 0.09407918155193329, 0.1549614667892456, -0.14693890511989594, -0.023620877414941788, 0.3271965980529785, -0.033563174307346344, 0.5745299458503723, 0.1320427805185318, -0.10007313638925552, 0.08619054406881332, -0.03396201506257057, -0.05471619963645935, -0.08458318561315536, -0.3129940629005432, -0.06037275865674019, 0.05679281800985336, -0.2795211374759674, 0.39427119493484497, -0.11474058777093887, -0.4025883376598358, 0.04747721180319786, 0.0788792222738266, -0.09748449921607971, -0.14900179207324982, 0.1307830810546875, 0.0708470270037651, 0.14306633174419403, -0.10778213292360306, 0.09321731328964233, -0.41705700755119324, -0.1029118150472641, 0.26866042613983154, -0.33130693435668945, 0.08678101003170013, -0.4194377064704895, -0.2532420754432678, 0.16139353811740875, -0.5163278579711914, 0.2065575271844864, 0.06316199898719788, -0.004503914620727301, -0.25463926792144775, 0.06263594329357147, 0.133987694978714, 0.08031817525625229, 0.5949674248695374, -0.06951828300952911, 0.15460839867591858, -0.013076528906822205, 0.01931835152208805, -0.15857303142547607, -0.004691111855208874, -0.08585498481988907, 0.21265363693237305, 0.5223545432090759, 0.28489387035369873, -0.09591425955295563, -0.07792156934738159, -0.09557786583900452, -0.033900611102581024, -0.07409623265266418, -0.06725269556045532, -0.05426112189888954, -0.08532381057739258, -0.15357846021652222, 0.08508431911468506, -0.13780786097049713, -0.16937318444252014, 0.3008474111557007, -0.42953982949256897, 0.14373959600925446, 0.10346667468547821, 0.08218349516391754, 0.15081048011779785, 0.1284276396036148, 0.23775513470172882, 0.18602393567562103, 0.11378461122512817, 0.14729078114032745, -0.07350459694862366, 0.18882708251476288, -0.01377431396394968, 0.29769086837768555, 0.22475284337997437, -0.04892999678850174, 0.1370001882314682, 0.4183053970336914, 0.2177979052066803, -0.03945394232869148, 0.04496103152632713, 0.3600701093673706, -0.05156572908163071, -0.06126309186220169, 0.5058532953262329, -0.03470697999000549, -0.3690623939037323, 0.03576401248574257, 0.06898422539234161, 0.21453918516635895, -0.3013429641723633, 0.48143815994262695, -0.5957074165344238, -0.0008296839077956975, 0.49186983704566956, 0.30282703042030334, 0.7559138536453247, -0.49517279863357544, -0.20713476836681366, 0.00007914913294371217, 0.23882678151130676, -0.26381343603134155, -0.04151406139135361, 0.20135557651519775, -0.21015842258930206, -0.17463386058807373, 0.18545986711978912, -0.1413612812757492, 0.0626562088727951, 0.14488805830478668, -0.17442327737808228, -0.18681736290454865, -0.021221105009317398, 0.38763293623924255, -0.1391032636165619, 0.07981579750776291, 0.4471867084503174, -0.30000996589660645, -0.02632308378815651, 0.2255588173866272, 0.07257629930973053, 0.11534838378429413, -0.1200302317738533, -0.03058956377208233, 0.033728212118148804, -0.1223452091217041, 0.05633119121193886, -0.09768079221248627, -0.2391946017742157, 0.2287825047969818, -0.19580544531345367, 0.33101531863212585, -0.435708224773407, 0.05255059525370598, -0.38108694553375244, 0.23120847344398499, 0.03408496454358101, 0.2928927540779114, 0.43501025438308716, 0.12346415221691132, -0.07326580584049225, -0.2757701575756073, -0.34896793961524963, -0.02323385886847973, 0.00305627821944654, 0.11772868782281876, -0.09656953811645508, -0.21251416206359863, -0.44712644815444946, 0.272704154253006, 0.11840091645717621, -0.008783208206295967, -0.15736521780490875, -0.005829107016324997, -0.2395108938217163, -0.01036023534834385, 0.27847951650619507, -0.1641843169927597, 0.22064365446567535, 0.5427923202514648, 0.0462692528963089, -0.2771815359592438, -0.10953604429960251, 0.2817230820655823, 0.1345994472503662, -0.026337143033742905, 0.23852726817131042, 0.0057832286693155766, -0.3318210542201996, -0.4043583571910858, -0.0778452455997467, -0.02904658205807209, -0.053970519453287125, 0.11884172260761261, -0.26706671714782715, -0.24351446330547333, 0.3382922112941742, 0.2162581980228424, 0.06774992495775223, 0.11211716383695602, -0.09653472155332565, -0.005903475917875767, -0.20061877369880676, -0.012249695137143135, -0.0071066757664084435, 0.043952953070402145, -0.14529132843017578, -0.07800097018480301, -0.045934341847896576, 0.48983436822891235, -0.4504971504211426, -0.09748747944831848, -0.15718966722488403, 0.19932296872138977, -0.05590682849287987, -0.0716409981250763, 0.14316916465759277, -0.08263438194990158, 0.3163793683052063, 0.11651577800512314, -0.22907544672489166, -0.3902067542076111, 0.23426930606365204, 0.07876712083816528, -0.16792908310890198, -0.09630007296800613, 0.1483621746301651, -0.08629357069730759, 0.024882424622774124, -0.2966083884239197, -0.03250075876712799, 0.05929221212863922, -0.09443078190088272, -0.5242846012115479, 0.13561104238033295, -0.10098852962255478, 0.3209577202796936, 0.19018341600894928, -0.18880660831928253, 0.004411095287650824, -0.13668881356716156, -0.15999558568000793, 0.057495828717947006, -0.32697421312332153, 0.14633463323116302, 0.013685522601008415, 0.41359782218933105, 0.052094507962465286, 0.281484991312027, -0.08110599219799042, -0.21731922030448914, 0.5401442646980286, -0.04313499480485916, 0.09196742624044418, 0.07598821818828583, -0.1635495126247406, -0.1250855028629303, 0.3680283725261688, -0.08354318886995316, -0.12343098223209381, 0.46341753005981445, -0.12679541110992432, 0.19402287900447845, 0.012339101172983646, 0.045216191560029984, -0.20632722973823547, 0.07968655973672867, 0.19251751899719238, 0.025867361575365067, -0.35279613733291626, -0.11679340898990631, 0.1489734798669815, 0.30891865491867065, -0.3032325208187103, 0.19489333033561707, -0.028398267924785614, 0.10300831496715546, 0.15143127739429474, 0.103162981569767, 0.14090780913829803, 0.09835553169250488, 0.3951481878757477, -0.049719247967004776, -0.3312107026576996, 0.22376692295074463, 0.3597697913646698, -0.3410908877849579, 0.14143691956996918, 0.32919755578041077, 0.0451715849339962, -0.18000884354114532, -0.30821362137794495, -0.3514571785926819, 0.2930070757865906, -0.28072425723075867, 0.027657341212034225, -0.1339443475008011, -0.05422248691320419, 0.0819537341594696, 0.15477867424488068, 0.2046668827533722, 0.3192395269870758, 0.39560702443122864, 0.07546132802963257, 0.10068987309932709, 0.1296057254076004, -0.3609299063682556, -0.15469573438167572, 0.45216214656829834, -0.2770078778266907, 0.13359272480010986, -0.37595292925834656, 0.00841719750314951, -0.1908087432384491, 0.3052169978618622, 0.15191476047039032, 0.5150671005249023, -0.047792550176382065, 0.11560624837875366, -0.10119399428367615, -0.15390358865261078, -0.3401761054992676, 0.30340608954429626, -0.10269775986671448, -0.13604195415973663, 0.1063881441950798, 0.22204911708831787, -0.45488059520721436, -0.14192605018615723, -0.13586367666721344, -0.06657703220844269, 0.5260953307151794, -0.10076070576906204, 0.14284591376781464, -0.15595141053199768, 0.0017646246124058962, -0.07890987396240234, -0.32409191131591797, -0.19555668532848358, 0.17921701073646545, -0.403156578540802, 0.15054762363433838, -0.13592752814292908, 0.15940678119659424, -0.21661294996738434, 0.5045703649520874, 0.05458083376288414, 0.07794332504272461, -0.3355932831764221, -0.20178744196891785, -0.20382685959339142, 0.07549679279327393, -0.32237136363983154, 0.18578341603279114, 0.01230894960463047, 0.10326281934976578, 0.020695963874459267, 0.06016653776168823, 0.23431864380836487, -0.2477051317691803, -0.2636207044124603, 0.0882115513086319, -0.33509451150894165, 0.37777814269065857, -0.06657037883996964, 0.010407470166683197, 0.1702563613653183, -0.3967393636703491, 0.6546357870101929, -0.2005673050880432, 0.3361153304576874, -0.11358538269996643, -0.06194237619638443, -0.1589442938566208, 0.1569148153066635, 0.4262062907218933, 0.14343968033790588, 0.006144917104393244, -0.21607941389083862, -0.14001420140266418, -0.1447472721338272, -0.021142736077308655, 0.14240191876888275, -0.055129677057266235, 0.42343640327453613, 0.04672573506832123, -0.08889749646186829, -0.06427671015262604, -0.19776619970798492, 0.18474341928958893, 0.1162036657333374, 0.337516725063324, 0.15266238152980804, 0.02748800255358219, -0.08982112258672714, 0.3604832589626312, -0.03847603499889374, 0.16342808306217194, 0.16771180927753448, 0.027324756607413292, -0.14502522349357605, -0.3080488443374634, 0.23182165622711182, -0.4071289002895355, -0.2470616102218628, 0.005687588360160589, 0.24450860917568207, -0.13184240460395813, 0.19587789475917816, 0.030912064015865326, -0.20821821689605713, 0.1344963163137436, -0.0014098885003477335, -0.11419598013162613, 0.035713788121938705, -0.16152171790599823, -0.08974677324295044, -0.011011305265128613, -0.05934930592775345, 0.0024842347484081984, -0.37748658657073975, -0.04926518723368645, -0.06943122297525406 ]
https://github.com/huggingface/datasets/issues/2239
Error loading wikihow dataset
Hi @odellus, thanks for reporting. The `wikihow` dataset has 2 versions: - `all`: Consisting of the concatenation of all paragraphs as the articles and the bold lines as the reference summaries. - `sep`: Consisting of each paragraph and its summary. Therefore, in order to load it, you have to specify which version you would like, for example: ```python dataset = load_dataset('wikihow', 'all') ``` Please, tell me if this solves your problem.
## Describe the bug When attempting to load wikihow into a dataset with ```python from datasets import load_dataset dataset = load_dataset('wikihow', data_dir='./wikihow') ``` I get the message: ``` AttributeError: 'BuilderConfig' object has no attribute 'filename' ``` at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2). ## Steps to reproduce the bug I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use ```python from datasets import load_dataset dataset = load_dataset('wikihow') ``` to load the dataset. I do so and I get the message ``` AssertionError: The dataset wikihow with config all requires manual data. Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset. You need to download the following two files manually: 1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv 2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv The <path/to/folder> can e.g. be "~/manual_wikihow_data". Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`. . Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>') ``` So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory. Then I run ```python from datasets import load_dataset dataset = load_dataset('wikihow', data_dir='./wikihow') ``` that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2) ## Expected results I expected it to load the downloaded files into a dataset. ## Actual results ```python Using custom data configuration default-data_dir=.%2Fwikihow Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-5e4d40142f30> in <module> ----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow') ~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs) 745 try_from_hf_gcs=try_from_hf_gcs, 746 base_path=base_path,--> 747 use_auth_token=use_auth_token, 748 ) 749 ~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 577 if not downloaded_from_gcs: 578 self._download_and_prepare( --> 579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 580 ) 581 # Sync info ~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 632 split_dict = SplitDict(dataset_name=self.name) 633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 635 636 # Checksums verification ~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager) 132 133 path_to_manual_file = os.path.join( --> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename 135 ) 136 AttributeError: 'BuilderConfig' object has no attribute 'filename' ``` ## Versions Paste the output of the following code: ```python import datasets import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ``` - Datasets: 1.5.0 - Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0] - Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic ```
71
Error loading wikihow dataset
[ -0.36638569831848145, 0.04876377433538437, -0.18951064348220825, 0.4150294363498688, 0.03014254942536354, 0.20959940552711487, 0.16296613216400146, 0.31043609976768494, 0.24446822702884674, -0.04168110340833664, 0.023462699726223946, 0.23286360502243042, 0.15272341668605804, 0.2729851007461548, -0.08649477362632751, -0.31277942657470703, 0.02907014638185501, 0.21979063749313354, -0.0895112007856369, -0.005953074898570776, -0.2665093243122101, 0.034676771610975266, -0.43484562635421753, 0.2266211360692978, -0.16571131348609924, -0.12431788444519043, 0.04542131721973419, 0.11304394155740738, -0.07836052775382996, -0.4004054665565491, 0.20540384948253632, 0.22648131847381592, 0.3045493960380554, 0.19802142679691315, -0.00009952227264875546, -0.014604213647544384, 0.3345169425010681, 0.03717871010303497, -0.31600451469421387, 0.32303157448768616, -0.22333282232284546, -0.0611761249601841, 0.07781710475683212, -0.34004074335098267, -0.003080906579270959, -0.05961232632398605, 0.014138830825686455, 0.10485562682151794, 0.3634624779224396, 0.12759310007095337, 0.34891635179519653, -0.023273643106222153, 0.2548006772994995, -0.1254761964082718, 0.33522915840148926, -0.1983776092529297, 0.03920206427574158, 0.06819179654121399, 0.07785359025001526, -0.42889073491096497, -0.07739373296499252, 0.40041497349739075, -0.1201949417591095, 0.14941400289535522, 0.19070491194725037, -0.07761339098215103, 0.12959180772304535, -0.04584846273064613, 0.4904523491859436, 0.2620808780193329, 0.9323694705963135, 0.10952740907669067, -0.036088649183511734, 0.10238459706306458, 0.13255754113197327, 0.13352148234844208, 0.36404740810394287, 0.13978780806064606, -0.33563852310180664, 0.1896778792142868, 0.011886920779943466, -0.140104278922081, -0.13410289585590363, 0.3066677749156952, -0.1366402506828308, 0.5914531946182251, 0.041076648980379105, 0.0994625985622406, -0.14930875599384308, -0.06997223198413849, 0.30558449029922485, -0.1168721467256546, -0.16440483927726746, 0.12123780697584152, 0.1290379911661148, 0.12919098138809204, 0.292070597410202, 0.2654036283493042, 0.11387936025857925, -0.38947537541389465, -0.21269622445106506, 0.24004420638084412, 0.21699929237365723, -0.05987425521016121, 0.5450785756111145, -0.0343974232673645, -0.06434925645589828, 0.07786671072244644, 0.29575252532958984, 0.2878434658050537, -0.1312057375907898, -0.007647561375051737, -0.1424613744020462, -0.0789642259478569, 0.055283039808273315, -0.3193885385990143, 0.09987762570381165, -0.13497839868068695, -0.2024070918560028, 0.15803413093090057, 0.21725375950336456, -0.10503245145082474, -0.134759321808815, 0.41388559341430664, -0.07037501782178879, 0.2797316014766693, 0.16411499679088593, 0.1983138620853424, -0.013010343536734581, 0.09629008919000626, -0.17554418742656708, 0.0750773623585701, -0.025602536275982857, 0.12108194082975388, 0.11594093590974808, 0.20475880801677704, 0.16069158911705017, 0.010203892365098, -0.06421880424022675, -0.3215616047382355, 0.05676058679819107, 0.2376040667295456, -0.11568589508533478, 0.268087774515152, 0.1689961850643158, 0.21374736726284027, 0.2278478443622589, -0.2411152720451355, 0.043424200266599655, 0.2075173258781433, -0.32638442516326904, -0.2869594097137451, -0.22735069692134857, 0.2846405506134033, 0.021635321900248528, 0.08365635573863983, -0.31095820665359497, -0.03232066333293915, 0.07636954635381699, -0.4087862968444824, -0.20247779786586761, 0.022533558309078217, 0.06911983340978622, -0.09701206535100937, 0.1373877078294754, 0.34248632192611694, -0.35894277691841125, 0.1318276822566986, -0.07007474452257156, -0.12415258586406708, -0.0695493295788765, -0.02704659476876259, -0.386849045753479, 0.36489957571029663, -0.254067599773407, -0.0376790352165699, 0.32798632979393005, -0.37801793217658997, -0.4197882115840912, 0.12293685227632523, -0.05406920984387398, 0.0772806704044342, -0.18491311371326447, 0.007584395818412304, -0.05006864666938782, 0.0012996508739888668, 0.2548102140426636, 0.06465227156877518, 0.12639601528644562, 0.12548233568668365, -0.26855480670928955, -0.17280784249305725, 0.10265059769153595, 0.13744591176509857, 0.13837306201457977, 0.09059049934148788, 0.14017938077449799, 0.14725248515605927, 0.2240302711725235, -0.1741679608821869, -0.21083642542362213, 0.13937504589557648, -0.03096768446266651, 0.06758174300193787, 0.13386446237564087, 0.13731418550014496, -0.3696642816066742, -0.025924937799572945, 0.23231102526187897, 0.06110121309757233, -0.041983406990766525, -0.005097837653011084, -0.422822505235672, 0.19762487709522247, -0.2476998269557953, -0.0408233106136322, 0.3596257269382477, 0.14026081562042236, -0.1887931525707245, 0.11238211393356323, 0.03355034813284874, -0.1920313984155655, -0.2746492028236389, -0.047853220254182816, -0.03844849392771721, 0.3017904460430145, -0.18344993889331818, -0.1262887567281723, 0.17889782786369324, 0.03958183526992798, 0.17980758845806122, -0.021759910508990288, -0.11902575194835663, 0.23181501030921936, 0.13273225724697113, 0.06184600293636322, 0.12471545487642288, -0.25098052620887756, -0.030554767698049545, -0.4994998574256897, 0.0489504411816597, -0.022641047835350037, 0.13668617606163025, -0.07653312385082245, -0.05730576440691948, 0.16556057333946228, -0.19573722779750824, -0.002069387584924698, 0.011362810619175434, 0.11291991174221039, 0.4748041331768036, -0.036352455615997314, 0.21848413348197937, -0.333455353975296, 0.051519375294446945, 0.23837070167064667, -0.15166914463043213, -0.22475846111774445, -0.06562347710132599, 0.005498079117387533, 0.27168118953704834, 0.07232251018285751, 0.3187442421913147, 0.04488006979227066, -0.17428603768348694, -0.15514343976974487, 0.2536792457103729, -0.039333198219537735, 0.13067255914211273, 0.21080760657787323, -0.08838469535112381, -0.06189590319991112, -0.0869831070303917, -0.18197457492351532, 0.23888731002807617, -0.05998146906495094, 0.2529897689819336, 0.18749608099460602, -0.04864715039730072, -0.11651312559843063, -0.32422155141830444, -0.07130050659179688, -0.03215809911489487, 0.29348239302635193, -0.16164232790470123, -0.13514293730258942, -0.029681039974093437, -0.3753074109554291, 0.24085795879364014, -0.015275497920811176, -0.126447856426239, -0.4762396514415741, 0.09369965642690659, 0.19963404536247253, -0.09970714151859283, 0.15203946828842163, -0.1081741601228714, 0.13313870131969452, 0.11358318477869034, 0.22885414958000183, -0.18825176358222961, -0.5418753623962402, -0.21832546591758728, 0.2056434452533722, 0.2150249034166336, 0.32669803500175476, 0.30199167132377625, -0.3352504074573517, 0.018089396879076958, -0.28773000836372375, -0.2685377597808838, 0.2396153211593628, 0.17713452875614166, 0.34396716952323914, 0.07171450555324554, 0.7450783848762512, -0.1881704330444336, -0.4500809609889984, 0.29700177907943726, -0.16833218932151794, 0.04955502599477768, 0.0955432802438736, -0.052269212901592255, -0.20073525607585907, -0.023898093029856682, -0.36407285928726196, -0.07560808956623077, -0.1639733910560608, -0.2637345492839813, 0.22129635512828827, 0.09944791346788406, -0.0010511610889807343, 0.23813524842262268, 0.08351033180952072, 0.18315985798835754, 0.06517104059457779, -0.35206517577171326, -0.29520183801651, 0.3742113411426544, -0.3123929500579834, -0.45563602447509766, 0.25651857256889343, -0.216327965259552, 0.27211081981658936, -0.024410177022218704, -0.6347957253456116, -0.10583581030368805, 0.019984818994998932, 0.19403672218322754, 0.12686359882354736, 0.05373106524348259, 0.0312493946403265, 0.09670311957597733, -0.15459874272346497, -0.13582076132297516, -0.04978789761662483, -0.1276756376028061, -0.14963166415691376, -0.008350701071321964, 0.0029953091870993376, 0.3828848898410797, -0.24357958137989044, 0.7535643577575684, -0.12424539029598236, 0.22378571331501007, 0.33855006098747253, -0.12202563136816025, 0.27631890773773193, -0.1599692553281784, -0.1396179497241974, -0.08741525560617447, -0.07477840781211853, -0.01452755369246006, 0.32691457867622375, 0.03742389753460884, -0.6523091197013855, -0.2906985580921173, 0.011563091538846493, -0.4381089210510254, -0.36480629444122314, -0.09432809799909592, 0.2473786175251007, 0.00581868551671505, 0.33719444274902344, 0.21371935307979584, -0.3540395498275757, -0.31185173988342285, 0.0833771750330925, 0.23634769022464752, 0.06910568475723267, -0.14137877523899078, -0.18833930790424347, 0.0073884716257452965, -0.2456471472978592, 0.1800878793001175, 0.14343783259391785, 0.18896107375621796, -0.10569780319929123, -0.012172031216323376, 0.07093854248523712, -0.1626431792974472, 0.3206542730331421, -0.4828658401966095, 0.2082163244485855, 0.07448754459619522, 0.10311203449964523, -0.11946358531713486, -0.05479280278086662, -0.18094049394130707, -0.16725419461727142, 0.14861516654491425, 0.24828873574733734, -0.1887229084968567, 0.02690470963716507, 0.34281474351882935, -0.030424876138567924, -0.15444281697273254, -0.24088864028453827, -0.17774751782417297, -0.37429824471473694, -0.3377362787723541, -0.19739916920661926, -0.1189885213971138, 0.23239921033382416, -0.13823522627353668, -0.0664680078625679, -0.1493544578552246, 0.09812159836292267, -0.13137167692184448, 0.3065974712371826, 0.29970425367355347, 0.19325701892375946, -0.15976622700691223, 0.1618777960538864, 0.23653069138526917, 0.21057581901550293, 0.31359297037124634, 0.15922164916992188, 0.05837034434080124, -0.03310347720980644, -0.27772605419158936, -0.09170334041118622, 0.2558070719242096, -0.03060031123459339, -0.23800761997699738, 0.0883808434009552, 0.0635659396648407, -0.1851864457130432, 0.15779076516628265, 0.1225108802318573, -0.11721746623516083, -0.4119233787059784, -0.23416703939437866, 0.4795505404472351, 0.057211603969335556, -0.18945446610450745, 0.36291220784187317, 0.3362416923046112, -0.2984558343887329, 0.02783139981329441, 0.16131825745105743, 0.8621096611022949, -0.2301826924085617, 0.10273489356040955, 0.39509645104408264, 0.022223200649023056, 0.16867958009243011, -0.1524035930633545, 0.10463204234838486, -0.28776079416275024, -0.2676078677177429, -0.09929443150758743, 0.04934731125831604, -0.016630515456199646, 0.16968455910682678, -0.23913715779781342, 0.05053951218724251, 0.04452664405107498, 0.29866304993629456, -0.025189392268657684, 0.25594744086265564, -0.0022076123859733343, 0.06184696406126022, -0.3682026267051697, 0.20523597300052643, -0.040748294442892075, -0.012463794089853764, -0.4238004982471466, 0.025144435465335846, 0.20553064346313477, -0.35890308022499084, -0.3533259630203247, 0.12573836743831635, 0.0015165242366492748, 0.32960566878318787, -0.31086021661758423, -0.12810064852237701, -0.06182219088077545, 0.41363584995269775, -0.18190516531467438, 0.1445218324661255, -0.3235502243041992, 0.24400077760219574, -0.2767791450023651, -0.43060627579689026, -0.35423845052719116, 0.26519107818603516, 0.08458378911018372, -0.20167845487594604, -0.37263253331184387, 0.15529151260852814, -0.07450636476278305, -0.22803960740566254, -0.2015654295682907, 0.06818969547748566, 0.04452832415699959, -0.2625710070133209, -0.22495223581790924, -0.033170849084854126, -0.01642579957842827, -0.14376772940158844, 0.2358061522245407, -0.13329879939556122, -0.029267970472574234, -0.040608685463666916, 0.32611653208732605, -0.2460249364376068, -0.15190580487251282, 0.29860326647758484, 0.02964595891535282, -0.02846958115696907, 0.45226356387138367, 0.3236192762851715, -0.2420046031475067, -0.40956035256385803, -0.015553617849946022, 0.13651341199874878, -0.16399282217025757, -0.10844492167234421, 0.1585727334022522, 0.003481431631371379, 0.02533872239291668, 0.3671841025352478, 0.045679960399866104, -0.017518963664770126, 0.1360480636358261, -0.43748506903648376, -0.18271301686763763, 0.3221679925918579, -0.04424548149108887, 0.15094409883022308, -0.003155411221086979, -0.3442283570766449, 0.05314711853861809, 0.14359663426876068, -0.435263067483902, -0.07541264593601227, -0.18837031722068787, 0.04401075839996338, 0.12810878455638885, 0.24972224235534668, -0.18127238750457764, 0.11635341495275497, 0.37285006046295166, -0.08092856407165527, -0.010290357284247875, -0.39309442043304443, 0.04082164168357849, 0.07812486588954926, 0.10037065297365189, -0.29871666431427, -0.03540550544857979, -0.24545744061470032, -0.07582911849021912, -0.15846025943756104, 0.1515655219554901, -0.12936526536941528, -0.08572448045015335, 0.04950524494051933, 0.06185945123434067, 0.14858651161193848, -0.21970272064208984, 0.2295784205198288, -0.10651835054159164, 0.43493181467056274, -0.16648603975772858, -0.00723438523709774, 0.235914409160614, -0.05801721662282944, 0.07305658608675003, 0.09701280295848846, -0.028185386210680008, 0.2589271664619446, 0.16114965081214905, -0.2843337059020996, 0.10943391919136047, 0.3614744544029236, -0.025815924629569054, 0.22038249671459198, -0.19732055068016052, -0.007301139645278454, 0.09110688418149948, 0.27686208486557007, -0.2580150067806244, -0.10711803287267685, 0.4576025903224945, -0.0773327499628067, 0.0071145836263895035, 0.060206104069948196, -0.04804060235619545, -0.3399873673915863, -0.06273690611124039, 0.10726391524076462, 0.22438961267471313, -0.3210374712944031, 0.19475920498371124, 0.46808576583862305, -0.13948658108711243, 0.010976362973451614, -0.36816152930259705, 0.27344080805778503, -0.017592141404747963, 0.46826767921447754, 0.03272051736712456, 0.16691488027572632, -0.007592702284455299, 0.09528477489948273, -0.055238861590623856, -0.2328162044286728, 0.13993698358535767, 0.3286297917366028, -0.15941663086414337, 0.22847025096416473, 0.11962535232305527, -0.3181167244911194, 0.14976444840431213, 0.1685897707939148, -0.4742209315299988, 0.00403408519923687, -0.2074432224035263, -0.06514770537614822, -0.3156715929508209, -0.3485090732574463, 0.22529402375221252, 0.2004614770412445, -0.08253521472215652, -0.024146512150764465, 0.16540871560573578, 0.05401474982500076, -0.07809536904096603, -0.30579185485839844, 0.45875611901283264, 0.09648783504962921, -0.028354402631521225, -0.13055993616580963, 0.011087813414633274, 0.13575544953346252, 0.1052667498588562, 0.2119208425283432, 0.12017454952001572, 0.22457192838191986, 0.2494790107011795, -0.31744953989982605, -0.06734094768762589, 0.06979463249444962, -0.2309272587299347, -0.14811697602272034, 0.1956445276737213, 0.26392248272895813, 0.08110208064317703, 0.18591608107089996, 0.36594536900520325, -0.23661872744560242, 0.026456573978066444, 0.21283996105194092, -0.017881102859973907, -0.051451098173856735, -0.2713007628917694, -0.2684977054595947, -0.044137950986623764, -0.042573682963848114, 0.01180474366992712, -0.05032574385404587, 0.12517480552196503, 0.2263641357421875, 0.12718848884105682, 0.13914161920547485, -0.12490832060575485, 0.12387009710073471, -0.18039727210998535, 0.5565199851989746, 0.39244332909584045, 0.3297680616378784, -0.018596302717924118, -0.28138041496276855, -0.6662119030952454, 0.23767414689064026, -0.005013048183172941, -0.2860397696495056, 0.15620405972003937, -0.11980156600475311, 0.1093800738453865, 0.23333647847175598, 0.16818976402282715, -0.23154444992542267, 0.05170146003365517, 0.1826486587524414, -0.24762305617332458, -0.24757011234760284, 0.31119292974472046, 0.10272594541311264, -0.23453816771507263, -0.3757905662059784, 0.17827962338924408, -0.34046471118927, 0.22006846964359283, -0.1122438982129097, 0.23950517177581787, -0.23562480509281158, -0.06131860613822937, 0.19470074772834778, 0.09230124205350876, 0.6461443305015564, -0.1820662021636963, 0.03615044802427292, -0.1808895319700241, -0.3442414104938507, 0.13095329701900482, 0.23782707750797272, 0.19098766148090363, 0.24170181155204773, -0.06549963355064392, 0.08389509469270706, 0.07327529042959213, 0.1026751771569252, 0.07044006139039993, 0.574054479598999, -0.09379827976226807, 0.025597969070076942, 0.059042274951934814, -0.058805033564567566, 0.22725634276866913, 0.05049075558781624, 0.0450860820710659, 0.047407638281583786, 0.01611059345304966, -0.29934707283973694, 0.22309091687202454, -0.4899680018424988, -0.42204099893569946, -0.19490516185760498, -0.045763079077005386, -0.16236622631549835, -0.057099100202322006, -0.25427910685539246, 0.08427368849515915, 0.2780769467353821, -0.04795936122536659, -0.22702844440937042, 0.008923267014324665, 0.23496204614639282, -0.07019698619842529, -0.09630707651376724, 0.2954123318195343, -0.04460689797997475, -0.24428004026412964, -0.3250510096549988, -0.1289101094007492 ]
https://github.com/huggingface/datasets/issues/2239
Error loading wikihow dataset
Good call out. I did try that and that's when it told me to download the dataset. Don't believe I have tried it with local files. Will try first thing in the morning and get back to you. On Mon, Apr 19, 2021, 11:17 PM Albert Villanova del Moral < ***@***.***> wrote: > Hi @odellus <https://github.com/odellus>, thanks for reporting. > > The wikihow dataset has 2 versions: > > - all: Consisting of the concatenation of all paragraphs as the > articles and the bold lines as the reference summaries. > - sep: Consisting of each paragraph and its summary. > > Therefore, in order to load it, you have to specify which version you > would like, for example: > > dataset = load_dataset('wikihow', 'all') > > Please, tell me if this solves your problem. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/2239#issuecomment-823004146>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABDYI3HVRTBI2QT3BOG262DTJUL57ANCNFSM43GV5BZQ> > . >
## Describe the bug When attempting to load wikihow into a dataset with ```python from datasets import load_dataset dataset = load_dataset('wikihow', data_dir='./wikihow') ``` I get the message: ``` AttributeError: 'BuilderConfig' object has no attribute 'filename' ``` at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2). ## Steps to reproduce the bug I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use ```python from datasets import load_dataset dataset = load_dataset('wikihow') ``` to load the dataset. I do so and I get the message ``` AssertionError: The dataset wikihow with config all requires manual data. Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset. You need to download the following two files manually: 1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv 2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv The <path/to/folder> can e.g. be "~/manual_wikihow_data". Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`. . Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>') ``` So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory. Then I run ```python from datasets import load_dataset dataset = load_dataset('wikihow', data_dir='./wikihow') ``` that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2) ## Expected results I expected it to load the downloaded files into a dataset. ## Actual results ```python Using custom data configuration default-data_dir=.%2Fwikihow Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-5e4d40142f30> in <module> ----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow') ~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs) 745 try_from_hf_gcs=try_from_hf_gcs, 746 base_path=base_path,--> 747 use_auth_token=use_auth_token, 748 ) 749 ~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 577 if not downloaded_from_gcs: 578 self._download_and_prepare( --> 579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 580 ) 581 # Sync info ~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 632 split_dict = SplitDict(dataset_name=self.name) 633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 635 636 # Checksums verification ~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager) 132 133 path_to_manual_file = os.path.join( --> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename 135 ) 136 AttributeError: 'BuilderConfig' object has no attribute 'filename' ``` ## Versions Paste the output of the following code: ```python import datasets import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ``` - Datasets: 1.5.0 - Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0] - Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic ```
168
Error loading wikihow dataset
[ -0.36638569831848145, 0.04876377433538437, -0.18951064348220825, 0.4150294363498688, 0.03014254942536354, 0.20959940552711487, 0.16296613216400146, 0.31043609976768494, 0.24446822702884674, -0.04168110340833664, 0.023462699726223946, 0.23286360502243042, 0.15272341668605804, 0.2729851007461548, -0.08649477362632751, -0.31277942657470703, 0.02907014638185501, 0.21979063749313354, -0.0895112007856369, -0.005953074898570776, -0.2665093243122101, 0.034676771610975266, -0.43484562635421753, 0.2266211360692978, -0.16571131348609924, -0.12431788444519043, 0.04542131721973419, 0.11304394155740738, -0.07836052775382996, -0.4004054665565491, 0.20540384948253632, 0.22648131847381592, 0.3045493960380554, 0.19802142679691315, -0.00009952227264875546, -0.014604213647544384, 0.3345169425010681, 0.03717871010303497, -0.31600451469421387, 0.32303157448768616, -0.22333282232284546, -0.0611761249601841, 0.07781710475683212, -0.34004074335098267, -0.003080906579270959, -0.05961232632398605, 0.014138830825686455, 0.10485562682151794, 0.3634624779224396, 0.12759310007095337, 0.34891635179519653, -0.023273643106222153, 0.2548006772994995, -0.1254761964082718, 0.33522915840148926, -0.1983776092529297, 0.03920206427574158, 0.06819179654121399, 0.07785359025001526, -0.42889073491096497, -0.07739373296499252, 0.40041497349739075, -0.1201949417591095, 0.14941400289535522, 0.19070491194725037, -0.07761339098215103, 0.12959180772304535, -0.04584846273064613, 0.4904523491859436, 0.2620808780193329, 0.9323694705963135, 0.10952740907669067, -0.036088649183511734, 0.10238459706306458, 0.13255754113197327, 0.13352148234844208, 0.36404740810394287, 0.13978780806064606, -0.33563852310180664, 0.1896778792142868, 0.011886920779943466, -0.140104278922081, -0.13410289585590363, 0.3066677749156952, -0.1366402506828308, 0.5914531946182251, 0.041076648980379105, 0.0994625985622406, -0.14930875599384308, -0.06997223198413849, 0.30558449029922485, -0.1168721467256546, -0.16440483927726746, 0.12123780697584152, 0.1290379911661148, 0.12919098138809204, 0.292070597410202, 0.2654036283493042, 0.11387936025857925, -0.38947537541389465, -0.21269622445106506, 0.24004420638084412, 0.21699929237365723, -0.05987425521016121, 0.5450785756111145, -0.0343974232673645, -0.06434925645589828, 0.07786671072244644, 0.29575252532958984, 0.2878434658050537, -0.1312057375907898, -0.007647561375051737, -0.1424613744020462, -0.0789642259478569, 0.055283039808273315, -0.3193885385990143, 0.09987762570381165, -0.13497839868068695, -0.2024070918560028, 0.15803413093090057, 0.21725375950336456, -0.10503245145082474, -0.134759321808815, 0.41388559341430664, -0.07037501782178879, 0.2797316014766693, 0.16411499679088593, 0.1983138620853424, -0.013010343536734581, 0.09629008919000626, -0.17554418742656708, 0.0750773623585701, -0.025602536275982857, 0.12108194082975388, 0.11594093590974808, 0.20475880801677704, 0.16069158911705017, 0.010203892365098, -0.06421880424022675, -0.3215616047382355, 0.05676058679819107, 0.2376040667295456, -0.11568589508533478, 0.268087774515152, 0.1689961850643158, 0.21374736726284027, 0.2278478443622589, -0.2411152720451355, 0.043424200266599655, 0.2075173258781433, -0.32638442516326904, -0.2869594097137451, -0.22735069692134857, 0.2846405506134033, 0.021635321900248528, 0.08365635573863983, -0.31095820665359497, -0.03232066333293915, 0.07636954635381699, -0.4087862968444824, -0.20247779786586761, 0.022533558309078217, 0.06911983340978622, -0.09701206535100937, 0.1373877078294754, 0.34248632192611694, -0.35894277691841125, 0.1318276822566986, -0.07007474452257156, -0.12415258586406708, -0.0695493295788765, -0.02704659476876259, -0.386849045753479, 0.36489957571029663, -0.254067599773407, -0.0376790352165699, 0.32798632979393005, -0.37801793217658997, -0.4197882115840912, 0.12293685227632523, -0.05406920984387398, 0.0772806704044342, -0.18491311371326447, 0.007584395818412304, -0.05006864666938782, 0.0012996508739888668, 0.2548102140426636, 0.06465227156877518, 0.12639601528644562, 0.12548233568668365, -0.26855480670928955, -0.17280784249305725, 0.10265059769153595, 0.13744591176509857, 0.13837306201457977, 0.09059049934148788, 0.14017938077449799, 0.14725248515605927, 0.2240302711725235, -0.1741679608821869, -0.21083642542362213, 0.13937504589557648, -0.03096768446266651, 0.06758174300193787, 0.13386446237564087, 0.13731418550014496, -0.3696642816066742, -0.025924937799572945, 0.23231102526187897, 0.06110121309757233, -0.041983406990766525, -0.005097837653011084, -0.422822505235672, 0.19762487709522247, -0.2476998269557953, -0.0408233106136322, 0.3596257269382477, 0.14026081562042236, -0.1887931525707245, 0.11238211393356323, 0.03355034813284874, -0.1920313984155655, -0.2746492028236389, -0.047853220254182816, -0.03844849392771721, 0.3017904460430145, -0.18344993889331818, -0.1262887567281723, 0.17889782786369324, 0.03958183526992798, 0.17980758845806122, -0.021759910508990288, -0.11902575194835663, 0.23181501030921936, 0.13273225724697113, 0.06184600293636322, 0.12471545487642288, -0.25098052620887756, -0.030554767698049545, -0.4994998574256897, 0.0489504411816597, -0.022641047835350037, 0.13668617606163025, -0.07653312385082245, -0.05730576440691948, 0.16556057333946228, -0.19573722779750824, -0.002069387584924698, 0.011362810619175434, 0.11291991174221039, 0.4748041331768036, -0.036352455615997314, 0.21848413348197937, -0.333455353975296, 0.051519375294446945, 0.23837070167064667, -0.15166914463043213, -0.22475846111774445, -0.06562347710132599, 0.005498079117387533, 0.27168118953704834, 0.07232251018285751, 0.3187442421913147, 0.04488006979227066, -0.17428603768348694, -0.15514343976974487, 0.2536792457103729, -0.039333198219537735, 0.13067255914211273, 0.21080760657787323, -0.08838469535112381, -0.06189590319991112, -0.0869831070303917, -0.18197457492351532, 0.23888731002807617, -0.05998146906495094, 0.2529897689819336, 0.18749608099460602, -0.04864715039730072, -0.11651312559843063, -0.32422155141830444, -0.07130050659179688, -0.03215809911489487, 0.29348239302635193, -0.16164232790470123, -0.13514293730258942, -0.029681039974093437, -0.3753074109554291, 0.24085795879364014, -0.015275497920811176, -0.126447856426239, -0.4762396514415741, 0.09369965642690659, 0.19963404536247253, -0.09970714151859283, 0.15203946828842163, -0.1081741601228714, 0.13313870131969452, 0.11358318477869034, 0.22885414958000183, -0.18825176358222961, -0.5418753623962402, -0.21832546591758728, 0.2056434452533722, 0.2150249034166336, 0.32669803500175476, 0.30199167132377625, -0.3352504074573517, 0.018089396879076958, -0.28773000836372375, -0.2685377597808838, 0.2396153211593628, 0.17713452875614166, 0.34396716952323914, 0.07171450555324554, 0.7450783848762512, -0.1881704330444336, -0.4500809609889984, 0.29700177907943726, -0.16833218932151794, 0.04955502599477768, 0.0955432802438736, -0.052269212901592255, -0.20073525607585907, -0.023898093029856682, -0.36407285928726196, -0.07560808956623077, -0.1639733910560608, -0.2637345492839813, 0.22129635512828827, 0.09944791346788406, -0.0010511610889807343, 0.23813524842262268, 0.08351033180952072, 0.18315985798835754, 0.06517104059457779, -0.35206517577171326, -0.29520183801651, 0.3742113411426544, -0.3123929500579834, -0.45563602447509766, 0.25651857256889343, -0.216327965259552, 0.27211081981658936, -0.024410177022218704, -0.6347957253456116, -0.10583581030368805, 0.019984818994998932, 0.19403672218322754, 0.12686359882354736, 0.05373106524348259, 0.0312493946403265, 0.09670311957597733, -0.15459874272346497, -0.13582076132297516, -0.04978789761662483, -0.1276756376028061, -0.14963166415691376, -0.008350701071321964, 0.0029953091870993376, 0.3828848898410797, -0.24357958137989044, 0.7535643577575684, -0.12424539029598236, 0.22378571331501007, 0.33855006098747253, -0.12202563136816025, 0.27631890773773193, -0.1599692553281784, -0.1396179497241974, -0.08741525560617447, -0.07477840781211853, -0.01452755369246006, 0.32691457867622375, 0.03742389753460884, -0.6523091197013855, -0.2906985580921173, 0.011563091538846493, -0.4381089210510254, -0.36480629444122314, -0.09432809799909592, 0.2473786175251007, 0.00581868551671505, 0.33719444274902344, 0.21371935307979584, -0.3540395498275757, -0.31185173988342285, 0.0833771750330925, 0.23634769022464752, 0.06910568475723267, -0.14137877523899078, -0.18833930790424347, 0.0073884716257452965, -0.2456471472978592, 0.1800878793001175, 0.14343783259391785, 0.18896107375621796, -0.10569780319929123, -0.012172031216323376, 0.07093854248523712, -0.1626431792974472, 0.3206542730331421, -0.4828658401966095, 0.2082163244485855, 0.07448754459619522, 0.10311203449964523, -0.11946358531713486, -0.05479280278086662, -0.18094049394130707, -0.16725419461727142, 0.14861516654491425, 0.24828873574733734, -0.1887229084968567, 0.02690470963716507, 0.34281474351882935, -0.030424876138567924, -0.15444281697273254, -0.24088864028453827, -0.17774751782417297, -0.37429824471473694, -0.3377362787723541, -0.19739916920661926, -0.1189885213971138, 0.23239921033382416, -0.13823522627353668, -0.0664680078625679, -0.1493544578552246, 0.09812159836292267, -0.13137167692184448, 0.3065974712371826, 0.29970425367355347, 0.19325701892375946, -0.15976622700691223, 0.1618777960538864, 0.23653069138526917, 0.21057581901550293, 0.31359297037124634, 0.15922164916992188, 0.05837034434080124, -0.03310347720980644, -0.27772605419158936, -0.09170334041118622, 0.2558070719242096, -0.03060031123459339, -0.23800761997699738, 0.0883808434009552, 0.0635659396648407, -0.1851864457130432, 0.15779076516628265, 0.1225108802318573, -0.11721746623516083, -0.4119233787059784, -0.23416703939437866, 0.4795505404472351, 0.057211603969335556, -0.18945446610450745, 0.36291220784187317, 0.3362416923046112, -0.2984558343887329, 0.02783139981329441, 0.16131825745105743, 0.8621096611022949, -0.2301826924085617, 0.10273489356040955, 0.39509645104408264, 0.022223200649023056, 0.16867958009243011, -0.1524035930633545, 0.10463204234838486, -0.28776079416275024, -0.2676078677177429, -0.09929443150758743, 0.04934731125831604, -0.016630515456199646, 0.16968455910682678, -0.23913715779781342, 0.05053951218724251, 0.04452664405107498, 0.29866304993629456, -0.025189392268657684, 0.25594744086265564, -0.0022076123859733343, 0.06184696406126022, -0.3682026267051697, 0.20523597300052643, -0.040748294442892075, -0.012463794089853764, -0.4238004982471466, 0.025144435465335846, 0.20553064346313477, -0.35890308022499084, -0.3533259630203247, 0.12573836743831635, 0.0015165242366492748, 0.32960566878318787, -0.31086021661758423, -0.12810064852237701, -0.06182219088077545, 0.41363584995269775, -0.18190516531467438, 0.1445218324661255, -0.3235502243041992, 0.24400077760219574, -0.2767791450023651, -0.43060627579689026, -0.35423845052719116, 0.26519107818603516, 0.08458378911018372, -0.20167845487594604, -0.37263253331184387, 0.15529151260852814, -0.07450636476278305, -0.22803960740566254, -0.2015654295682907, 0.06818969547748566, 0.04452832415699959, -0.2625710070133209, -0.22495223581790924, -0.033170849084854126, -0.01642579957842827, -0.14376772940158844, 0.2358061522245407, -0.13329879939556122, -0.029267970472574234, -0.040608685463666916, 0.32611653208732605, -0.2460249364376068, -0.15190580487251282, 0.29860326647758484, 0.02964595891535282, -0.02846958115696907, 0.45226356387138367, 0.3236192762851715, -0.2420046031475067, -0.40956035256385803, -0.015553617849946022, 0.13651341199874878, -0.16399282217025757, -0.10844492167234421, 0.1585727334022522, 0.003481431631371379, 0.02533872239291668, 0.3671841025352478, 0.045679960399866104, -0.017518963664770126, 0.1360480636358261, -0.43748506903648376, -0.18271301686763763, 0.3221679925918579, -0.04424548149108887, 0.15094409883022308, -0.003155411221086979, -0.3442283570766449, 0.05314711853861809, 0.14359663426876068, -0.435263067483902, -0.07541264593601227, -0.18837031722068787, 0.04401075839996338, 0.12810878455638885, 0.24972224235534668, -0.18127238750457764, 0.11635341495275497, 0.37285006046295166, -0.08092856407165527, -0.010290357284247875, -0.39309442043304443, 0.04082164168357849, 0.07812486588954926, 0.10037065297365189, -0.29871666431427, -0.03540550544857979, -0.24545744061470032, -0.07582911849021912, -0.15846025943756104, 0.1515655219554901, -0.12936526536941528, -0.08572448045015335, 0.04950524494051933, 0.06185945123434067, 0.14858651161193848, -0.21970272064208984, 0.2295784205198288, -0.10651835054159164, 0.43493181467056274, -0.16648603975772858, -0.00723438523709774, 0.235914409160614, -0.05801721662282944, 0.07305658608675003, 0.09701280295848846, -0.028185386210680008, 0.2589271664619446, 0.16114965081214905, -0.2843337059020996, 0.10943391919136047, 0.3614744544029236, -0.025815924629569054, 0.22038249671459198, -0.19732055068016052, -0.007301139645278454, 0.09110688418149948, 0.27686208486557007, -0.2580150067806244, -0.10711803287267685, 0.4576025903224945, -0.0773327499628067, 0.0071145836263895035, 0.060206104069948196, -0.04804060235619545, -0.3399873673915863, -0.06273690611124039, 0.10726391524076462, 0.22438961267471313, -0.3210374712944031, 0.19475920498371124, 0.46808576583862305, -0.13948658108711243, 0.010976362973451614, -0.36816152930259705, 0.27344080805778503, -0.017592141404747963, 0.46826767921447754, 0.03272051736712456, 0.16691488027572632, -0.007592702284455299, 0.09528477489948273, -0.055238861590623856, -0.2328162044286728, 0.13993698358535767, 0.3286297917366028, -0.15941663086414337, 0.22847025096416473, 0.11962535232305527, -0.3181167244911194, 0.14976444840431213, 0.1685897707939148, -0.4742209315299988, 0.00403408519923687, -0.2074432224035263, -0.06514770537614822, -0.3156715929508209, -0.3485090732574463, 0.22529402375221252, 0.2004614770412445, -0.08253521472215652, -0.024146512150764465, 0.16540871560573578, 0.05401474982500076, -0.07809536904096603, -0.30579185485839844, 0.45875611901283264, 0.09648783504962921, -0.028354402631521225, -0.13055993616580963, 0.011087813414633274, 0.13575544953346252, 0.1052667498588562, 0.2119208425283432, 0.12017454952001572, 0.22457192838191986, 0.2494790107011795, -0.31744953989982605, -0.06734094768762589, 0.06979463249444962, -0.2309272587299347, -0.14811697602272034, 0.1956445276737213, 0.26392248272895813, 0.08110208064317703, 0.18591608107089996, 0.36594536900520325, -0.23661872744560242, 0.026456573978066444, 0.21283996105194092, -0.017881102859973907, -0.051451098173856735, -0.2713007628917694, -0.2684977054595947, -0.044137950986623764, -0.042573682963848114, 0.01180474366992712, -0.05032574385404587, 0.12517480552196503, 0.2263641357421875, 0.12718848884105682, 0.13914161920547485, -0.12490832060575485, 0.12387009710073471, -0.18039727210998535, 0.5565199851989746, 0.39244332909584045, 0.3297680616378784, -0.018596302717924118, -0.28138041496276855, -0.6662119030952454, 0.23767414689064026, -0.005013048183172941, -0.2860397696495056, 0.15620405972003937, -0.11980156600475311, 0.1093800738453865, 0.23333647847175598, 0.16818976402282715, -0.23154444992542267, 0.05170146003365517, 0.1826486587524414, -0.24762305617332458, -0.24757011234760284, 0.31119292974472046, 0.10272594541311264, -0.23453816771507263, -0.3757905662059784, 0.17827962338924408, -0.34046471118927, 0.22006846964359283, -0.1122438982129097, 0.23950517177581787, -0.23562480509281158, -0.06131860613822937, 0.19470074772834778, 0.09230124205350876, 0.6461443305015564, -0.1820662021636963, 0.03615044802427292, -0.1808895319700241, -0.3442414104938507, 0.13095329701900482, 0.23782707750797272, 0.19098766148090363, 0.24170181155204773, -0.06549963355064392, 0.08389509469270706, 0.07327529042959213, 0.1026751771569252, 0.07044006139039993, 0.574054479598999, -0.09379827976226807, 0.025597969070076942, 0.059042274951934814, -0.058805033564567566, 0.22725634276866913, 0.05049075558781624, 0.0450860820710659, 0.047407638281583786, 0.01611059345304966, -0.29934707283973694, 0.22309091687202454, -0.4899680018424988, -0.42204099893569946, -0.19490516185760498, -0.045763079077005386, -0.16236622631549835, -0.057099100202322006, -0.25427910685539246, 0.08427368849515915, 0.2780769467353821, -0.04795936122536659, -0.22702844440937042, 0.008923267014324665, 0.23496204614639282, -0.07019698619842529, -0.09630707651376724, 0.2954123318195343, -0.04460689797997475, -0.24428004026412964, -0.3250510096549988, -0.1289101094007492 ]
https://github.com/huggingface/datasets/issues/2239
Error loading wikihow dataset
Hi @odellus, yes you are right. Due to the server where the `wikihow` dataset is hosted, the dataset can't be downloaded automatically by `huggingface` and you have to download it manually as you did. Nevertheless, you have to specify which dataset version you would like to load anyway: ```python dataset = load_dataset('wikihow', 'all', data_dir='./wikihow') ``` or ```python dataset = load_dataset('wikihow', 'sep', data_dir='./wikihow') ``` I find that the instructions given by `huggingface` are not clear enough: I am going to fix this. Please tell me if this eventually works for you.
## Describe the bug When attempting to load wikihow into a dataset with ```python from datasets import load_dataset dataset = load_dataset('wikihow', data_dir='./wikihow') ``` I get the message: ``` AttributeError: 'BuilderConfig' object has no attribute 'filename' ``` at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2). ## Steps to reproduce the bug I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use ```python from datasets import load_dataset dataset = load_dataset('wikihow') ``` to load the dataset. I do so and I get the message ``` AssertionError: The dataset wikihow with config all requires manual data. Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset. You need to download the following two files manually: 1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv 2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv The <path/to/folder> can e.g. be "~/manual_wikihow_data". Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`. . Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>') ``` So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory. Then I run ```python from datasets import load_dataset dataset = load_dataset('wikihow', data_dir='./wikihow') ``` that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2) ## Expected results I expected it to load the downloaded files into a dataset. ## Actual results ```python Using custom data configuration default-data_dir=.%2Fwikihow Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-5e4d40142f30> in <module> ----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow') ~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs) 745 try_from_hf_gcs=try_from_hf_gcs, 746 base_path=base_path,--> 747 use_auth_token=use_auth_token, 748 ) 749 ~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 577 if not downloaded_from_gcs: 578 self._download_and_prepare( --> 579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 580 ) 581 # Sync info ~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 632 split_dict = SplitDict(dataset_name=self.name) 633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 635 636 # Checksums verification ~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager) 132 133 path_to_manual_file = os.path.join( --> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename 135 ) 136 AttributeError: 'BuilderConfig' object has no attribute 'filename' ``` ## Versions Paste the output of the following code: ```python import datasets import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ``` - Datasets: 1.5.0 - Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0] - Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic ```
90
Error loading wikihow dataset
[ -0.36638569831848145, 0.04876377433538437, -0.18951064348220825, 0.4150294363498688, 0.03014254942536354, 0.20959940552711487, 0.16296613216400146, 0.31043609976768494, 0.24446822702884674, -0.04168110340833664, 0.023462699726223946, 0.23286360502243042, 0.15272341668605804, 0.2729851007461548, -0.08649477362632751, -0.31277942657470703, 0.02907014638185501, 0.21979063749313354, -0.0895112007856369, -0.005953074898570776, -0.2665093243122101, 0.034676771610975266, -0.43484562635421753, 0.2266211360692978, -0.16571131348609924, -0.12431788444519043, 0.04542131721973419, 0.11304394155740738, -0.07836052775382996, -0.4004054665565491, 0.20540384948253632, 0.22648131847381592, 0.3045493960380554, 0.19802142679691315, -0.00009952227264875546, -0.014604213647544384, 0.3345169425010681, 0.03717871010303497, -0.31600451469421387, 0.32303157448768616, -0.22333282232284546, -0.0611761249601841, 0.07781710475683212, -0.34004074335098267, -0.003080906579270959, -0.05961232632398605, 0.014138830825686455, 0.10485562682151794, 0.3634624779224396, 0.12759310007095337, 0.34891635179519653, -0.023273643106222153, 0.2548006772994995, -0.1254761964082718, 0.33522915840148926, -0.1983776092529297, 0.03920206427574158, 0.06819179654121399, 0.07785359025001526, -0.42889073491096497, -0.07739373296499252, 0.40041497349739075, -0.1201949417591095, 0.14941400289535522, 0.19070491194725037, -0.07761339098215103, 0.12959180772304535, -0.04584846273064613, 0.4904523491859436, 0.2620808780193329, 0.9323694705963135, 0.10952740907669067, -0.036088649183511734, 0.10238459706306458, 0.13255754113197327, 0.13352148234844208, 0.36404740810394287, 0.13978780806064606, -0.33563852310180664, 0.1896778792142868, 0.011886920779943466, -0.140104278922081, -0.13410289585590363, 0.3066677749156952, -0.1366402506828308, 0.5914531946182251, 0.041076648980379105, 0.0994625985622406, -0.14930875599384308, -0.06997223198413849, 0.30558449029922485, -0.1168721467256546, -0.16440483927726746, 0.12123780697584152, 0.1290379911661148, 0.12919098138809204, 0.292070597410202, 0.2654036283493042, 0.11387936025857925, -0.38947537541389465, -0.21269622445106506, 0.24004420638084412, 0.21699929237365723, -0.05987425521016121, 0.5450785756111145, -0.0343974232673645, -0.06434925645589828, 0.07786671072244644, 0.29575252532958984, 0.2878434658050537, -0.1312057375907898, -0.007647561375051737, -0.1424613744020462, -0.0789642259478569, 0.055283039808273315, -0.3193885385990143, 0.09987762570381165, -0.13497839868068695, -0.2024070918560028, 0.15803413093090057, 0.21725375950336456, -0.10503245145082474, -0.134759321808815, 0.41388559341430664, -0.07037501782178879, 0.2797316014766693, 0.16411499679088593, 0.1983138620853424, -0.013010343536734581, 0.09629008919000626, -0.17554418742656708, 0.0750773623585701, -0.025602536275982857, 0.12108194082975388, 0.11594093590974808, 0.20475880801677704, 0.16069158911705017, 0.010203892365098, -0.06421880424022675, -0.3215616047382355, 0.05676058679819107, 0.2376040667295456, -0.11568589508533478, 0.268087774515152, 0.1689961850643158, 0.21374736726284027, 0.2278478443622589, -0.2411152720451355, 0.043424200266599655, 0.2075173258781433, -0.32638442516326904, -0.2869594097137451, -0.22735069692134857, 0.2846405506134033, 0.021635321900248528, 0.08365635573863983, -0.31095820665359497, -0.03232066333293915, 0.07636954635381699, -0.4087862968444824, -0.20247779786586761, 0.022533558309078217, 0.06911983340978622, -0.09701206535100937, 0.1373877078294754, 0.34248632192611694, -0.35894277691841125, 0.1318276822566986, -0.07007474452257156, -0.12415258586406708, -0.0695493295788765, -0.02704659476876259, -0.386849045753479, 0.36489957571029663, -0.254067599773407, -0.0376790352165699, 0.32798632979393005, -0.37801793217658997, -0.4197882115840912, 0.12293685227632523, -0.05406920984387398, 0.0772806704044342, -0.18491311371326447, 0.007584395818412304, -0.05006864666938782, 0.0012996508739888668, 0.2548102140426636, 0.06465227156877518, 0.12639601528644562, 0.12548233568668365, -0.26855480670928955, -0.17280784249305725, 0.10265059769153595, 0.13744591176509857, 0.13837306201457977, 0.09059049934148788, 0.14017938077449799, 0.14725248515605927, 0.2240302711725235, -0.1741679608821869, -0.21083642542362213, 0.13937504589557648, -0.03096768446266651, 0.06758174300193787, 0.13386446237564087, 0.13731418550014496, -0.3696642816066742, -0.025924937799572945, 0.23231102526187897, 0.06110121309757233, -0.041983406990766525, -0.005097837653011084, -0.422822505235672, 0.19762487709522247, -0.2476998269557953, -0.0408233106136322, 0.3596257269382477, 0.14026081562042236, -0.1887931525707245, 0.11238211393356323, 0.03355034813284874, -0.1920313984155655, -0.2746492028236389, -0.047853220254182816, -0.03844849392771721, 0.3017904460430145, -0.18344993889331818, -0.1262887567281723, 0.17889782786369324, 0.03958183526992798, 0.17980758845806122, -0.021759910508990288, -0.11902575194835663, 0.23181501030921936, 0.13273225724697113, 0.06184600293636322, 0.12471545487642288, -0.25098052620887756, -0.030554767698049545, -0.4994998574256897, 0.0489504411816597, -0.022641047835350037, 0.13668617606163025, -0.07653312385082245, -0.05730576440691948, 0.16556057333946228, -0.19573722779750824, -0.002069387584924698, 0.011362810619175434, 0.11291991174221039, 0.4748041331768036, -0.036352455615997314, 0.21848413348197937, -0.333455353975296, 0.051519375294446945, 0.23837070167064667, -0.15166914463043213, -0.22475846111774445, -0.06562347710132599, 0.005498079117387533, 0.27168118953704834, 0.07232251018285751, 0.3187442421913147, 0.04488006979227066, -0.17428603768348694, -0.15514343976974487, 0.2536792457103729, -0.039333198219537735, 0.13067255914211273, 0.21080760657787323, -0.08838469535112381, -0.06189590319991112, -0.0869831070303917, -0.18197457492351532, 0.23888731002807617, -0.05998146906495094, 0.2529897689819336, 0.18749608099460602, -0.04864715039730072, -0.11651312559843063, -0.32422155141830444, -0.07130050659179688, -0.03215809911489487, 0.29348239302635193, -0.16164232790470123, -0.13514293730258942, -0.029681039974093437, -0.3753074109554291, 0.24085795879364014, -0.015275497920811176, -0.126447856426239, -0.4762396514415741, 0.09369965642690659, 0.19963404536247253, -0.09970714151859283, 0.15203946828842163, -0.1081741601228714, 0.13313870131969452, 0.11358318477869034, 0.22885414958000183, -0.18825176358222961, -0.5418753623962402, -0.21832546591758728, 0.2056434452533722, 0.2150249034166336, 0.32669803500175476, 0.30199167132377625, -0.3352504074573517, 0.018089396879076958, -0.28773000836372375, -0.2685377597808838, 0.2396153211593628, 0.17713452875614166, 0.34396716952323914, 0.07171450555324554, 0.7450783848762512, -0.1881704330444336, -0.4500809609889984, 0.29700177907943726, -0.16833218932151794, 0.04955502599477768, 0.0955432802438736, -0.052269212901592255, -0.20073525607585907, -0.023898093029856682, -0.36407285928726196, -0.07560808956623077, -0.1639733910560608, -0.2637345492839813, 0.22129635512828827, 0.09944791346788406, -0.0010511610889807343, 0.23813524842262268, 0.08351033180952072, 0.18315985798835754, 0.06517104059457779, -0.35206517577171326, -0.29520183801651, 0.3742113411426544, -0.3123929500579834, -0.45563602447509766, 0.25651857256889343, -0.216327965259552, 0.27211081981658936, -0.024410177022218704, -0.6347957253456116, -0.10583581030368805, 0.019984818994998932, 0.19403672218322754, 0.12686359882354736, 0.05373106524348259, 0.0312493946403265, 0.09670311957597733, -0.15459874272346497, -0.13582076132297516, -0.04978789761662483, -0.1276756376028061, -0.14963166415691376, -0.008350701071321964, 0.0029953091870993376, 0.3828848898410797, -0.24357958137989044, 0.7535643577575684, -0.12424539029598236, 0.22378571331501007, 0.33855006098747253, -0.12202563136816025, 0.27631890773773193, -0.1599692553281784, -0.1396179497241974, -0.08741525560617447, -0.07477840781211853, -0.01452755369246006, 0.32691457867622375, 0.03742389753460884, -0.6523091197013855, -0.2906985580921173, 0.011563091538846493, -0.4381089210510254, -0.36480629444122314, -0.09432809799909592, 0.2473786175251007, 0.00581868551671505, 0.33719444274902344, 0.21371935307979584, -0.3540395498275757, -0.31185173988342285, 0.0833771750330925, 0.23634769022464752, 0.06910568475723267, -0.14137877523899078, -0.18833930790424347, 0.0073884716257452965, -0.2456471472978592, 0.1800878793001175, 0.14343783259391785, 0.18896107375621796, -0.10569780319929123, -0.012172031216323376, 0.07093854248523712, -0.1626431792974472, 0.3206542730331421, -0.4828658401966095, 0.2082163244485855, 0.07448754459619522, 0.10311203449964523, -0.11946358531713486, -0.05479280278086662, -0.18094049394130707, -0.16725419461727142, 0.14861516654491425, 0.24828873574733734, -0.1887229084968567, 0.02690470963716507, 0.34281474351882935, -0.030424876138567924, -0.15444281697273254, -0.24088864028453827, -0.17774751782417297, -0.37429824471473694, -0.3377362787723541, -0.19739916920661926, -0.1189885213971138, 0.23239921033382416, -0.13823522627353668, -0.0664680078625679, -0.1493544578552246, 0.09812159836292267, -0.13137167692184448, 0.3065974712371826, 0.29970425367355347, 0.19325701892375946, -0.15976622700691223, 0.1618777960538864, 0.23653069138526917, 0.21057581901550293, 0.31359297037124634, 0.15922164916992188, 0.05837034434080124, -0.03310347720980644, -0.27772605419158936, -0.09170334041118622, 0.2558070719242096, -0.03060031123459339, -0.23800761997699738, 0.0883808434009552, 0.0635659396648407, -0.1851864457130432, 0.15779076516628265, 0.1225108802318573, -0.11721746623516083, -0.4119233787059784, -0.23416703939437866, 0.4795505404472351, 0.057211603969335556, -0.18945446610450745, 0.36291220784187317, 0.3362416923046112, -0.2984558343887329, 0.02783139981329441, 0.16131825745105743, 0.8621096611022949, -0.2301826924085617, 0.10273489356040955, 0.39509645104408264, 0.022223200649023056, 0.16867958009243011, -0.1524035930633545, 0.10463204234838486, -0.28776079416275024, -0.2676078677177429, -0.09929443150758743, 0.04934731125831604, -0.016630515456199646, 0.16968455910682678, -0.23913715779781342, 0.05053951218724251, 0.04452664405107498, 0.29866304993629456, -0.025189392268657684, 0.25594744086265564, -0.0022076123859733343, 0.06184696406126022, -0.3682026267051697, 0.20523597300052643, -0.040748294442892075, -0.012463794089853764, -0.4238004982471466, 0.025144435465335846, 0.20553064346313477, -0.35890308022499084, -0.3533259630203247, 0.12573836743831635, 0.0015165242366492748, 0.32960566878318787, -0.31086021661758423, -0.12810064852237701, -0.06182219088077545, 0.41363584995269775, -0.18190516531467438, 0.1445218324661255, -0.3235502243041992, 0.24400077760219574, -0.2767791450023651, -0.43060627579689026, -0.35423845052719116, 0.26519107818603516, 0.08458378911018372, -0.20167845487594604, -0.37263253331184387, 0.15529151260852814, -0.07450636476278305, -0.22803960740566254, -0.2015654295682907, 0.06818969547748566, 0.04452832415699959, -0.2625710070133209, -0.22495223581790924, -0.033170849084854126, -0.01642579957842827, -0.14376772940158844, 0.2358061522245407, -0.13329879939556122, -0.029267970472574234, -0.040608685463666916, 0.32611653208732605, -0.2460249364376068, -0.15190580487251282, 0.29860326647758484, 0.02964595891535282, -0.02846958115696907, 0.45226356387138367, 0.3236192762851715, -0.2420046031475067, -0.40956035256385803, -0.015553617849946022, 0.13651341199874878, -0.16399282217025757, -0.10844492167234421, 0.1585727334022522, 0.003481431631371379, 0.02533872239291668, 0.3671841025352478, 0.045679960399866104, -0.017518963664770126, 0.1360480636358261, -0.43748506903648376, -0.18271301686763763, 0.3221679925918579, -0.04424548149108887, 0.15094409883022308, -0.003155411221086979, -0.3442283570766449, 0.05314711853861809, 0.14359663426876068, -0.435263067483902, -0.07541264593601227, -0.18837031722068787, 0.04401075839996338, 0.12810878455638885, 0.24972224235534668, -0.18127238750457764, 0.11635341495275497, 0.37285006046295166, -0.08092856407165527, -0.010290357284247875, -0.39309442043304443, 0.04082164168357849, 0.07812486588954926, 0.10037065297365189, -0.29871666431427, -0.03540550544857979, -0.24545744061470032, -0.07582911849021912, -0.15846025943756104, 0.1515655219554901, -0.12936526536941528, -0.08572448045015335, 0.04950524494051933, 0.06185945123434067, 0.14858651161193848, -0.21970272064208984, 0.2295784205198288, -0.10651835054159164, 0.43493181467056274, -0.16648603975772858, -0.00723438523709774, 0.235914409160614, -0.05801721662282944, 0.07305658608675003, 0.09701280295848846, -0.028185386210680008, 0.2589271664619446, 0.16114965081214905, -0.2843337059020996, 0.10943391919136047, 0.3614744544029236, -0.025815924629569054, 0.22038249671459198, -0.19732055068016052, -0.007301139645278454, 0.09110688418149948, 0.27686208486557007, -0.2580150067806244, -0.10711803287267685, 0.4576025903224945, -0.0773327499628067, 0.0071145836263895035, 0.060206104069948196, -0.04804060235619545, -0.3399873673915863, -0.06273690611124039, 0.10726391524076462, 0.22438961267471313, -0.3210374712944031, 0.19475920498371124, 0.46808576583862305, -0.13948658108711243, 0.010976362973451614, -0.36816152930259705, 0.27344080805778503, -0.017592141404747963, 0.46826767921447754, 0.03272051736712456, 0.16691488027572632, -0.007592702284455299, 0.09528477489948273, -0.055238861590623856, -0.2328162044286728, 0.13993698358535767, 0.3286297917366028, -0.15941663086414337, 0.22847025096416473, 0.11962535232305527, -0.3181167244911194, 0.14976444840431213, 0.1685897707939148, -0.4742209315299988, 0.00403408519923687, -0.2074432224035263, -0.06514770537614822, -0.3156715929508209, -0.3485090732574463, 0.22529402375221252, 0.2004614770412445, -0.08253521472215652, -0.024146512150764465, 0.16540871560573578, 0.05401474982500076, -0.07809536904096603, -0.30579185485839844, 0.45875611901283264, 0.09648783504962921, -0.028354402631521225, -0.13055993616580963, 0.011087813414633274, 0.13575544953346252, 0.1052667498588562, 0.2119208425283432, 0.12017454952001572, 0.22457192838191986, 0.2494790107011795, -0.31744953989982605, -0.06734094768762589, 0.06979463249444962, -0.2309272587299347, -0.14811697602272034, 0.1956445276737213, 0.26392248272895813, 0.08110208064317703, 0.18591608107089996, 0.36594536900520325, -0.23661872744560242, 0.026456573978066444, 0.21283996105194092, -0.017881102859973907, -0.051451098173856735, -0.2713007628917694, -0.2684977054595947, -0.044137950986623764, -0.042573682963848114, 0.01180474366992712, -0.05032574385404587, 0.12517480552196503, 0.2263641357421875, 0.12718848884105682, 0.13914161920547485, -0.12490832060575485, 0.12387009710073471, -0.18039727210998535, 0.5565199851989746, 0.39244332909584045, 0.3297680616378784, -0.018596302717924118, -0.28138041496276855, -0.6662119030952454, 0.23767414689064026, -0.005013048183172941, -0.2860397696495056, 0.15620405972003937, -0.11980156600475311, 0.1093800738453865, 0.23333647847175598, 0.16818976402282715, -0.23154444992542267, 0.05170146003365517, 0.1826486587524414, -0.24762305617332458, -0.24757011234760284, 0.31119292974472046, 0.10272594541311264, -0.23453816771507263, -0.3757905662059784, 0.17827962338924408, -0.34046471118927, 0.22006846964359283, -0.1122438982129097, 0.23950517177581787, -0.23562480509281158, -0.06131860613822937, 0.19470074772834778, 0.09230124205350876, 0.6461443305015564, -0.1820662021636963, 0.03615044802427292, -0.1808895319700241, -0.3442414104938507, 0.13095329701900482, 0.23782707750797272, 0.19098766148090363, 0.24170181155204773, -0.06549963355064392, 0.08389509469270706, 0.07327529042959213, 0.1026751771569252, 0.07044006139039993, 0.574054479598999, -0.09379827976226807, 0.025597969070076942, 0.059042274951934814, -0.058805033564567566, 0.22725634276866913, 0.05049075558781624, 0.0450860820710659, 0.047407638281583786, 0.01611059345304966, -0.29934707283973694, 0.22309091687202454, -0.4899680018424988, -0.42204099893569946, -0.19490516185760498, -0.045763079077005386, -0.16236622631549835, -0.057099100202322006, -0.25427910685539246, 0.08427368849515915, 0.2780769467353821, -0.04795936122536659, -0.22702844440937042, 0.008923267014324665, 0.23496204614639282, -0.07019698619842529, -0.09630707651376724, 0.2954123318195343, -0.04460689797997475, -0.24428004026412964, -0.3250510096549988, -0.1289101094007492 ]
https://github.com/huggingface/datasets/issues/2237
Update Dataset.dataset_size after transformed with map
@albertvillanova I would like to take this up. It would be great if you could point me as to how the dataset size is calculated in HF. Thanks!
After loading a dataset, if we transform it by using `.map` its `dataset_size` attirbute is not updated.
28
Update Dataset.dataset_size after transformed with map
[ -0.4626283049583435, -0.016579532995820045, -0.2819615602493286, -0.15447942912578583, 0.19684837758541107, -0.014374127611517906, 0.21581947803497314, 0.17575323581695557, 0.05242995172739029, -0.0476793572306633, 0.0647471696138382, 0.44608888030052185, -0.04585227742791176, 0.2547246217727661, -0.04960808902978897, 0.24678662419319153, 0.10792018473148346, 0.21160154044628143, -0.5252497792243958, -0.054785359650850296, -0.3550794720649719, -0.021967468783259392, -0.3064214289188385, -0.3310825526714325, -0.06606867909431458, -0.15273457765579224, -0.13631722331047058, 0.048477690666913986, -0.2990758717060089, -0.12286324054002762, 0.0032983869314193726, 0.08476042002439499, 0.04122214391827583, 0.07694930583238602, -0.00010508405102882534, 0.03975725173950195, -0.11984679847955704, -0.09055685997009277, 0.028181668370962143, 0.28296273946762085, -0.2647770345211029, -0.4760998785495758, -0.4276747703552246, -0.2505887746810913, 0.16485239565372467, -0.4840359091758728, 0.003098824992775917, -0.2214093804359436, 0.1593678742647171, 0.05588805302977562, 0.25213295221328735, -0.05142326280474663, 0.17545951902866364, -0.13507772982120514, -0.08245378732681274, 0.30442866683006287, 0.34504303336143494, 0.10916568338871002, -0.028807111084461212, 0.1567630171775818, -0.15479010343551636, 0.5728707909584045, 0.11008544266223907, -0.16340795159339905, 0.20803143084049225, -0.235615074634552, 0.20341497659683228, 0.0424690879881382, 0.259777307510376, -0.28669607639312744, 0.32312965393066406, -0.332009494304657, -0.15433888137340546, -0.1211758479475975, -0.053752440959215164, 0.014584065414965153, -0.20973780751228333, -0.17521777749061584, 0.3973601162433624, 0.022458108142018318, -0.5183032155036926, -0.41361114382743835, 0.12867332994937897, 0.1588483601808548, -0.49255597591400146, 0.44862738251686096, -0.08777443319559097, 0.2092818319797516, -0.3121519982814789, -0.2954261302947998, 0.07165101915597916, 0.1921973079442978, -0.2052610218524933, 0.11383123695850372, 0.005767172202467918, -0.26571017503738403, 0.27473184466362, -0.09981850534677505, 0.188643679022789, -0.31143397092819214, -0.0951305404305458, 0.07378482818603516, -0.1490042358636856, -0.01825239136815071, 0.10774247348308563, 0.31096163392066956, -0.03446614742279053, 0.35694968700408936, -0.12436716258525848, -0.0279068760573864, -0.23688645660877228, 0.05041036009788513, 0.05486424267292023, -0.4518486261367798, 0.14480678737163544, 0.10719893127679825, 0.20796801149845123, 0.19167962670326233, 0.18796102702617645, 0.05527886748313904, 0.05435722693800926, 0.10352268069982529, -0.14927442371845245, 0.19826625287532806, 0.16591951251029968, 0.23885999619960785, 0.19262348115444183, 0.07615847140550613, 0.15494747459888458, -0.11716604977846146, -0.2974436283111572, -0.217558816075325, -0.041401077061891556, -0.25889426469802856, -0.12236858904361725, 0.3615007698535919, 0.2636335790157318, -0.207564577460289, -0.1129172071814537, -0.03864450752735138, -0.12769632041454315, 0.08394946157932281, 0.42961663007736206, 0.21892675757408142, -0.08081795275211334, -0.15452106297016144, -0.1260593682527542, 0.10514994710683823, -0.1178903579711914, 0.37005847692489624, -0.23571069538593292, -0.015465809032320976, 0.08360329270362854, 0.26887765526771545, 0.1744447499513626, -0.04894719645380974, -0.12539398670196533, 0.3404737412929535, 0.45499247312545776, -0.45927560329437256, 0.14648668467998505, -0.17599357664585114, -0.26904308795928955, -0.15182198584079742, 0.03713786602020264, 0.17748650908470154, -0.33861517906188965, -0.12969854474067688, -0.02665184997022152, 0.038856375962495804, -0.048729583621025085, 0.11877626180648804, -0.0858938992023468, 0.03690730407834053, -0.14438533782958984, 0.19116128981113434, 0.5034160017967224, 0.15470531582832336, -0.5686337351799011, 0.10001011192798615, -0.21504120528697968, -0.34314024448394775, -0.13827064633369446, -0.022273465991020203, 0.2548029124736786, 0.021080411970615387, -0.1136118695139885, 0.18827997148036957, -0.1408982127904892, 0.19071893393993378, -0.3163524568080902, -0.14645680785179138, 0.16718706488609314, -0.20227637887001038, 0.36950117349624634, 0.18501482903957367, 0.3850823938846588, 0.21469803154468536, 0.2671303153038025, -0.0055917976424098015, 0.29456478357315063, 0.2985921800136566, -0.16733162105083466, -0.3459509015083313, 0.0269259512424469, -0.0007024143706075847, -0.19073842465877533, -0.1597851812839508, -0.151701420545578, -0.404089093208313, 0.1758003979921341, -0.08104339987039566, -0.435509592294693, 0.01640002243220806, 0.30723121762275696, 0.10735190659761429, 0.16652308404445648, 0.1614788919687271, 0.09851528704166412, -0.16486084461212158, 0.09186224639415741, -0.18636956810951233, -0.08195190131664276, -0.04162023216485977, -0.3160449266433716, 0.14304783940315247, 0.1470881700515747, -0.041270021349191666, -0.13607773184776306, -0.06863811612129211, 0.08359601348638535, 0.033678337931632996, -0.23082035779953003, 0.3640967905521393, -0.20930330455303192, 0.24062807857990265, 0.09526903927326202, 0.07264216244220734, 0.18294364213943481, 0.11513397097587585, 0.4782610535621643, -0.24299773573875427, -0.04400993511080742, 0.17458891868591309, -0.20181655883789062, 0.14044299721717834, 0.08920269459486008, 0.07539039105176926, -0.10726239532232285, -0.07266354560852051, 0.1370980441570282, 0.021137284114956856, -0.12247279286384583, -0.2291409969329834, -0.6372315287590027, -0.020440489053726196, 0.1566895693540573, -0.002487744437530637, 0.21455666422843933, 0.22840730845928192, 0.5441616177558899, 0.0010432183044031262, -0.015313970856368542, -0.021544115617871284, -0.4470655620098114, -0.14722314476966858, 0.08922822773456573, 0.36417388916015625, 0.4368368983268738, 0.2649257183074951, 0.33783653378486633, -0.007472843863070011, 0.11530861258506775, -0.01772371307015419, 0.11640878021717072, -0.24763065576553345, 0.19361405074596405, 0.2804969549179077, 0.3961726725101471, -0.20777520537376404, -0.13275282084941864, 0.3163033127784729, 0.194997176527977, 0.01354645099490881, -0.010932417586445808, -0.1501818150281906, 0.040951889008283615, -0.0671161338686943, -0.01999448798596859, -0.04644344747066498, -0.08071338385343552, -0.16449002921581268, -0.05169341713190079, -0.03787779435515404, -0.21832560002803802, 0.3481397032737732, 0.334230899810791, -0.2789388597011566, 0.38664743304252625, -0.21909679472446442, 0.09617311507463455, -0.01986052840948105, 0.010406481102108955, 0.18497087061405182, -0.14714764058589935, -0.20323453843593597, 0.24049168825149536, -0.216791033744812, 0.21053682267665863, -0.31377214193344116, -0.5121395587921143, -0.06394676119089127, -0.022428326308727264, -0.16597934067249298, 0.16173933446407318, 0.2240641713142395, -0.04420651122927666, 0.23605723679065704, 0.13321948051452637, -0.1563195288181305, -0.008547556586563587, -0.2341398447751999, -0.010356264188885689, 0.05744076892733574, -0.16921618580818176, -0.3252536952495575, -0.14419421553611755, -0.18195192515850067, 0.10920638591051102, 0.01989203318953514, -0.04353414848446846, 0.05841688811779022, 0.5659000277519226, -0.3080143928527832, 0.11859353631734848, -0.1601540595293045, -0.26185041666030884, -0.1808626353740692, 0.2953391373157501, -0.10792959481477737, 0.0593869611620903, 0.01477352250367403, -0.23963432013988495, 0.17488479614257812, 0.46364763379096985, -0.25045254826545715, 0.017642520368099213, -0.1333237737417221, 0.11686459928750992, -0.13803187012672424, 0.21952328085899353, 0.7675552368164062, 0.041684966534376144, -0.20263560116291046, -0.12424126267433167, -0.2085949033498764, -0.024609828367829323, 0.47942906618118286, 0.13549421727657318, -0.15222537517547607, 0.3095785081386566, 0.01630524732172489, 0.3013540804386139, -0.09230884164571762, -0.30175453424453735, 0.0024699242785573006, -0.1628597378730774, 0.21684275567531586, -0.0912758931517601, 0.005165223032236099, 0.09642671048641205, 0.06628108024597168, -0.15002384781837463, 0.11062876880168915, 0.0027914296369999647, -0.22689960896968842, 0.25704002380371094, -0.5069756507873535, -0.20501931011676788, -0.05512494966387749, 0.21264418959617615, -0.010902461595833302, 0.45758435130119324, 0.3546518385410309, 0.05416938289999962, -0.4562666714191437, 0.10750079154968262, -0.06552093476057053, -0.22152826189994812, 0.1447010338306427, -0.010024940595030785, -0.07671406120061874, 0.1219082921743393, -0.1946030557155609, 0.4685541093349457, -0.034302204847335815, -0.05263194441795349, 0.21496954560279846, -0.2731223404407501, -0.26707959175109863, 0.07838128507137299, 0.5425275564193726, -0.09397363662719727, 0.12275873869657516, -0.021852165460586548, -0.09673622250556946, -0.16431033611297607, 0.07575792074203491, -0.0910518616437912, 0.1272338330745697, 0.17651434242725372, 0.5693953633308411, 0.06999841332435608, 0.17373256385326385, 0.19815067946910858, 0.23903875052928925, -0.10973581671714783, 0.18354164063930511, -0.05685483664274216, -0.10112504661083221, -0.49521884322166443, 0.3826407194137573, -0.00841026846319437, 0.004563388880342245, 0.13727182149887085, -0.07834330201148987, -0.3744286000728607, -0.3782942295074463, -0.29840603470802307, 0.3128289580345154, 0.3518126308917999, 0.49452921748161316, -0.12668314576148987, -0.058573439717292786, 0.2565203607082367, 0.296075701713562, 0.3009567856788635, -0.03477818891406059, -0.0410756915807724, -0.008846310898661613, 0.05884500592947006, 0.36739224195480347, 0.22133272886276245, -0.1101885735988617, -0.23001456260681152, 0.08504990488290787, 0.3274863362312317, -0.28715360164642334, 0.375707745552063, 0.2159050852060318, 0.08985640853643417, -0.2271873652935028, -0.22967113554477692, 0.1612532138824463, 0.04069065302610397, -0.0024796605575829744, 0.07660839706659317, -0.12134310603141785, -0.4259684085845947, 0.16109855473041534, 0.2962292432785034, 0.5950571894645691, -0.06554094702005386, 0.051806673407554626, -0.009496658109128475, -0.03974546864628792, -0.05519050732254982, -0.3778722882270813, 0.12862911820411682, -0.11736589670181274, -0.1869666427373886, 0.1487172693014145, 0.10514184087514877, 0.13486188650131226, 0.3495141565799713, -0.3489627540111542, -0.11620272696018219, 0.12387608736753464, 0.1562422215938568, -0.10780985653400421, -0.04030052199959755, -0.04911916330456734, -0.08243127912282944, -0.02545536495745182, 0.23836466670036316, -0.07261984050273895, -0.14652059972286224, -0.03659496828913689, 0.0540950670838356, 0.06081557646393776, -0.20533743500709534, 0.13469845056533813, -0.26289287209510803, -0.5216031670570374, 0.09279094636440277, -0.2873939275741577, -0.22428570687770844, -0.08132139593362808, 0.26607567071914673, -0.18149173259735107, 0.5070511102676392, 0.16215527057647705, 0.15868344902992249, 0.11860871315002441, 0.30331966280937195, 0.03997979685664177, 0.16716651618480682, -0.037801142781972885, 0.14414028823375702, -0.1256394237279892, -0.06516807526350021, -0.1157166063785553, -0.008036154322326183, -0.33172109723091125, 0.026643818244338036, 0.1254914551973343, -0.6029376983642578, -0.06443595886230469, 0.08215197920799255, -0.028886210173368454, -0.049848005175590515, 0.17983362078666687, -0.012079364620149136, 0.044015973806381226, 0.43106094002723694, 0.22536256909370422, -0.3619212210178375, -0.08268512040376663, 0.5266600251197815, 0.04649806022644043, 0.20930369198322296, 0.31345057487487793, -0.3519514799118042, 0.028616629540920258, -0.21253956854343414, 0.18757355213165283, -0.02363935299217701, -0.15231935679912567, 0.11764169484376907, -0.029737090691924095, -0.04685467109084129, -0.12820544838905334, -0.10064030438661575, -0.012517906725406647, 0.2815280258655548, -0.0633324608206749, -0.1575285792350769, -0.6565317511558533, 0.39339548349380493, 0.0003691979800350964, 0.22739824652671814, 0.2446744292974472, 0.14878129959106445, -0.16100572049617767, 0.24599243700504303, -0.39781105518341064, -0.02412823960185051, 0.2821671962738037, 0.14971764385700226, -0.06841517984867096, 0.25528207421302795, -0.09917490184307098, -0.30595654249191284, 0.21660421788692474, 0.15053297579288483, -0.013672443106770515, -0.35617274045944214, 0.06825333833694458, -0.001217924291267991, 0.018708011135458946, 0.1503361165523529, 0.06689257174730301, -0.273418128490448, -0.1477411687374115, -0.3246854543685913, -0.04364081472158432, -0.03744311258196831, 0.05801691114902496, 0.16947542130947113, 0.1660141497850418, -0.1580016314983368, 0.28855565190315247, 0.0010469378903508186, 0.06378643959760666, -0.08070126920938492, -0.3644046485424042, 0.3937186002731323, 0.20246654748916626, -0.011472964659333229, 0.07067215442657471, -0.04541783407330513, 0.4275268614292145, 0.07096032798290253, 0.20195846259593964, -0.0854317843914032, -0.04315291717648506, 0.13751906156539917, 0.3338559567928314, 0.1339886337518692, -0.07719523459672928, -0.08292435109615326, 0.09392888844013214, 0.3096504807472229, -0.41135016083717346, 0.1637873500585556, 0.33546149730682373, 0.09556075930595398, 0.12347478419542313, 0.12674908339977264, 0.08327076584100723, 0.19939576089382172, 0.05374636873602867, 0.27877986431121826, -0.0347212478518486, -0.14451390504837036, 0.10531102120876312, 0.6300969123840332, -0.11304336786270142, 0.06266818940639496, 0.2037208080291748, 0.4213365614414215, 0.16687040030956268, 0.6469559669494629, 0.1287633180618286, 0.3216184377670288, -0.07604645192623138, 0.21846164762973785, -0.20361317694187164, -0.3750910758972168, 0.09268134087324142, 0.04321557655930519, -0.21862249076366425, 0.2185574620962143, 0.3408600389957428, -0.06999854743480682, 0.1745360940694809, -0.4539589285850525, -0.04200981184840202, 0.4806208908557892, -0.1822548508644104, -0.1584746241569519, 0.03249436244368553, -0.15744219720363617, -0.10893980413675308, -0.020325925201177597, -0.17425844073295593, -0.061014894396066666, 0.44132232666015625, -0.370158314704895, 0.07074365764856339, -0.1245478019118309, 0.01423970703035593, -0.32949501276016235, -0.04738832637667656, -0.29277896881103516, 0.2257145345211029, 0.011736155487596989, 0.05801478773355484, 0.2384978085756302, 0.17546965181827545, 0.0621829479932785, 0.011967046186327934, 0.03455830365419388, 0.22989791631698608, 0.0008219124283641577, -0.22743341326713562, -0.395113468170166, -0.11890914291143417, 0.006381583865731955, -0.09751305729150772, 0.03553224354982376, 0.2619853615760803, -0.223411425948143, 0.03850220516324043, -0.02213495410978794, 0.10862525552511215, -0.04265806823968887, 0.21037563681602478, 0.12625662982463837, -0.35310477018356323, -0.158819779753685, -0.26747027039527893, -0.2322087436914444, -0.21120423078536987, 0.34861862659454346, -0.18823933601379395, 0.28114524483680725, 0.056948110461235046, 0.14122578501701355, 0.07304920256137848, 0.38862234354019165, 0.13652031123638153, -0.3718838095664978, -0.15650075674057007, -0.35167771577835083, -0.3809677064418793, 0.005615765228867531, 0.19307371973991394, -0.08731436729431152, -0.26404067873954773, 0.013010235503315926, 0.23144444823265076, -0.1269616037607193, 0.355975866317749, -0.2875535786151886, 0.14234133064746857, 0.1639648824930191, 0.09249527752399445, -0.31391963362693787, -0.4898880422115326, 0.02907067909836769, 0.35015398263931274, -0.2216687798500061, -0.006026136688888073, 0.1030476838350296, 0.18606556951999664, -0.21639657020568848, 0.07673227041959763, -0.17514881491661072, -0.033188994973897934, 0.5404481887817383, 0.038895461708307266, 0.11925160884857178, -0.38485661149024963, 0.16849078238010406, -0.14725390076637268, -0.09069815278053284, -0.23867343366146088, 0.4268674850463867, 0.11016325652599335, 0.34422704577445984, -0.2686775028705597, -0.15720251202583313, 0.10003071278333664, -0.32392850518226624, 0.13831648230552673, 0.024582481011748314, -0.10367900878190994, 0.15595462918281555, -0.01783151738345623, -0.10020070523023605, 0.02242213860154152, 0.4413713216781616, 0.06749049574136734, 0.197798490524292, -0.02552231028676033, -0.3466997444629669, 0.34101107716560364, -0.20413821935653687, -0.4713650941848755, 0.04284399747848511, 0.0020027600694447756, -0.19929273426532745, -0.39661145210266113, -0.21765589714050293, 0.22798825800418854, 0.32050231099128723, -0.08973143249750137, 0.13794465363025665, 0.15183378756046295, -0.12552408874034882, -0.024371324107050896, -0.00343933398835361, 0.538062572479248, 0.001017920090816915, -0.25332412123680115, -0.3281160891056061, -0.20071537792682648 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
Hi ! Indeed there's no verification on the uniqueness nor the types of the keys. Do you already have some ideas of what you would like to implement and how ?
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
31
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
Hey @lhoestq, thank you so much for the opportunity. Although I haven't had much experience with the HF Datasets code, after a careful look at how the `ArrowWriter` functions, I think we can implement this as follows: 1. First, we would have to update the `ArrowWriter.write()` function here: https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L296 so that it accepts an additional argument `key` which would be appended along with the example here after hashing. 2. Then, we would need to create a `Hasher` class which will take the key as its input and return a hash for it (We might need to use some hash salt which can be passed to the ArrowWriter.writer() with value equal to the `split_name` for differentiating between same keys of different splits) We can use the `hashlib.md5` function for hashing which will conert each key to its byte code before hashing (depending on the data type of the key) **Thus, the `key` type will be verified here**. 3. Now, we would have to edit this https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L257 so that it iterates over each `(hash, example)` pair (sorted according to hash). We can then simply **check whether each hash is different from the previous hash** (since they will be sorted) However, since I'm not very familiar with how the data is being written on disk in the form of a table, I might need some guidance for Step 3. Please let me know your thought on this. Thanks!
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
235
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
Interesting ! We keep the dataset sorted in the order examples are generated by the builder (we expect the dataset builders to generate examples in deterministic order). Therefore I don't think we should shuffle the examples with the hashing. Let me know what you think. Other that that, I really like the idea of checking for keys duplicates in `write_examples_on_file` :) This looks like a great plan ! Feel free to open a PR and ping me if you have questions or if I can help
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
86
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
@lhoestq I'm glad you liked the idea! I think that since the keys will be unique and deterministic in the nature themselves, so even if we shuffle the examples according to the hash, a deterministic order would still be maintained (as the keys will always have the same hash, whenever the dataset is generated). And since, we are not dealing with time series data (which would require the data to be in original order), I don't think the order of examples would matter much, as long as the order is deterministic and constant for all users. I think that this is also what was originally envisioned as mentioned in the documentation here: https://github.com/huggingface/datasets/blob/6775661b19d2ec339784f3d84553a3996a1d86c3/src/datasets/builder.py#L973 Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples. Let me know your thoughts in it! I would be opening a PR soon :)
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
171
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
When users load their own data, they expect the order to stay the same. I think that shuffling the data can make things inconvenient. > I think that this is also what was originally envisioned as mentioned in the documentation here: This part was originally developed by tensorflow datasets, and tensorflow datasets indeed does the shuffling. However in this library this is probably not what we want in the general case. But if @albertvillanova and @thomwolf you have opinions on this please let us know. > Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples. Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch, but there might still be duplicates across batches. For 10 000 examples the hashes can just be stored as a python `set`. Otherwise if we want full deduplication, we need an extra tool that allows to temporarily save and query hashes that may need to use disk space rather than memory.
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
224
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
Yes I think we want to keep the original order by default and only shuffle when the user ask for it (for instance by calling `dataset.shuffle()`). That’s how I had it in mind originally.
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
34
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
Hey @lhoestq, I just had a more in-depth look at the original TFDS code about why the keys and hash were used in the first place. In my opinion, the only use that the `hash(key)` serves is that it allows us to shuffle the examples in a deterministic order (as each example will always yield the same key and thus, the same hash on every system) so that the same dataset is generated for each user, irrespective of the order the examples are yielded by the dataset builder on different user systems. Otherwise, if we are not shuffling, then while yielding and writing the data, after getting the key and hashing it for an example, I can't quite see the use of the hash or the key. The hash will simply be generated for each example but not actually used anywhere? @lhoestq @thomwolf It would be great if you could explain a bit more about the usage of keys. Thanks!
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
160
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
In `datasets` the keys are currently ignored. For shuffling we don't use the keys. Instead we shuffle an array of indices. Since both the original order of the dataset and the indices shuffling are deterministic, then `dataset.shuffle` is deterministic as well. We can use it to: 1. detect duplicates 2. verify that the generation order is indeed deterministic 3. maybe more ?
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
62
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2230
Keys yielded while generating dataset are not being checked
Thanks a lot @lhoestq. I think I understand what we need to do now. The keys can indeed be used for detecting duplicates in generated examples as well as ensuring the order. > Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch, I think that checking for duplicates in every batch independently would be sufficient as the probability of collisions using something like `MD5` is very low. I would be opening a draft PR soon. It would be great to have your guidance. Thanks!
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not. Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Even after having a tuple as key, the dataset is generated without any warning. Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example): ``` >>> import datasets >>> nik = datasets.load_dataset('anli') Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299... 0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''} 2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll 1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''} 1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''} 1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''} 1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 – 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''} ``` Here also, the dataset was generated successfuly even hough it had same keys without any warning. The reason appears to stem from here: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988 Here, although it has access to every key, but it is not being checked and the example is written directly: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992 I would like to take this issue if you allow me. Thank You!
119
Keys yielded while generating dataset are not being checked
[ -0.1256667822599411, -0.06296440958976746, -0.11585979163646698, 0.38518911600112915, -0.11084683984518051, -0.07211996614933014, 0.3056899309158325, 0.19498470425605774, 0.21306118369102478, 0.2613305449485779, 0.27346476912498474, 0.4315505921840668, 0.02947787009179592, 0.15484611690044403, -0.11908455193042755, 0.5382537841796875, 0.11612368375062943, 0.1809188574552536, -0.2848122715950012, -0.27270153164863586, -0.3888428807258606, 0.025660132989287376, -0.2980858087539673, -0.06404419243335724, -0.2613520622253418, -0.003929224330931902, 0.010457424446940422, 0.0009259411599487066, -0.2130301594734192, -0.2028525173664093, -0.0390130989253521, 0.3531571626663208, -0.43850794434547424, 0.28718817234039307, -0.00010908846888924018, -0.07243546843528748, 0.1717437505722046, -0.20294485986232758, -0.44531717896461487, 0.31589069962501526, -0.2922302484512329, 0.006625889800488949, -0.2094271332025528, -0.4568980634212494, -0.13085894286632538, -0.32543978095054626, -0.14753203094005585, -0.2847001552581787, 0.08837012201547623, 0.02136695757508278, 0.2796315848827362, 0.1125425472855568, 0.2384558767080307, 0.03821242228150368, 0.0602470338344574, 0.20103304088115692, -0.053237203508615494, -0.19087082147598267, -0.01979011856019497, 0.055586814880371094, 0.07681620121002197, 0.19280488789081573, 0.21066156029701233, 0.0012968152295798063, 0.14996926486492157, 0.14880163967609406, 0.04636850580573082, -0.35316142439842224, 0.344005823135376, 0.013406582176685333, 0.2778816819190979, -0.0329345241189003, -0.2636025846004486, -0.30072540044784546, 0.07455500215291977, 0.12821577489376068, 0.22058817744255066, 0.252137690782547, -0.2782400846481323, -0.05399001017212868, -0.16466951370239258, -0.004891374614089727, 0.01862858422100544, -0.13552390038967133, 0.2112760692834854, 0.05275342985987663, -0.08492355793714523, 0.03952683508396149, 0.044291239231824875, 0.0027624478098005056, -0.03631141036748886, -0.6905626058578491, -0.07970433682203293, 0.13987915217876434, 0.10097742080688477, -0.16491298377513885, 0.31032267212867737, 0.2432917356491089, 0.31268906593322754, -0.01283514779061079, -0.01968209445476532, 0.22419075667858124, 0.0655163824558258, -0.14537319540977478, -0.010929485782980919, -0.04880334809422493, 0.24996906518936157, 0.1743306666612625, 0.30198073387145996, -0.034849122166633606, -0.2982969582080841, 0.0343719944357872, 0.09764482825994492, 0.06560292840003967, 0.6378436088562012, 0.25501126050949097, 0.12748408317565918, -0.07740497589111328, -0.03283483162522316, 0.12934136390686035, -0.020293211564421654, -0.36452075839042664, 0.17158156633377075, 0.32497841119766235, -0.03362703323364258, -0.15011365711688995, -0.18189124763011932, 0.10677192360162735, -0.24358531832695007, -0.14018046855926514, -0.3501887321472168, -0.10831356793642044, -0.09504551440477371, -0.23422513902187347, 0.26030266284942627, -0.1484706997871399, 0.21092815697193146, -0.01863902248442173, -0.00527983857318759, -0.4102822244167328, 0.023824132978916168, -0.06789716333150864, 0.5235640406608582, 0.18316729366779327, -0.22805717587471008, -0.01870250143110752, 0.19811442494392395, -0.2260117530822754, -0.0324087031185627, 0.21323959529399872, -0.11745229363441467, 0.09063057601451874, 0.4319119453430176, 0.28409266471862793, -0.15476998686790466, 0.12164947390556335, 0.10707596689462662, 0.11520152539014816, 0.2539827525615692, 0.2002619504928589, 0.04481327161192894, 0.033837467432022095, 0.12084852904081345, -0.24457819759845734, 0.29352864623069763, 0.6113747358322144, -0.28586438298225403, 0.15497712790966034, 0.012984657660126686, -0.06546453386545181, 0.17867189645767212, 0.001483751693740487, -0.15772075951099396, 0.4394659399986267, -0.3075251579284668, 0.2261759340763092, 0.32955682277679443, 0.10157995671033859, -0.4511696398258209, -0.07508446276187897, 0.010275361128151417, -0.09643145650625229, 0.3464083671569824, -0.028668992221355438, 0.0851149633526802, 0.023731688037514687, 0.09454979002475739, -0.4020003378391266, -0.024234529584646225, 0.025482695549726486, -0.15581081807613373, 0.04796111583709717, -0.04359574615955353, -0.25189971923828125, 0.1912752091884613, 0.32894280552864075, 0.23020660877227783, 0.0383128859102726, -0.007957875728607178, -0.18990600109100342, 0.03677283227443695, 0.09330528974533081, 0.16792821884155273, -0.38931897282600403, -0.06105326861143112, 0.4203331470489502, -0.28638872504234314, 0.16049069166183472, -0.06903347373008728, 0.07308711856603622, -0.40092113614082336, -0.06798636168241501, -0.20095476508140564, 0.2457147091627121, -0.2659813463687897, 0.008483674377202988, 0.2368614375591278, 0.2922742962837219, 0.27063101530075073, 0.2774939239025116, -0.04470525681972504, -0.08927296102046967, -0.06497841328382492, -0.10686225444078445, -0.16855406761169434, 0.14410296082496643, -0.09494248777627945, -0.09999367594718933, 0.06099279969930649, 0.1943248063325882, 0.11264876276254654, -0.08458865433931351, -0.017027810215950012, 0.10188444703817368, 0.07024551182985306, -0.03696688637137413, 0.220493346452713, 0.03531372547149658, 0.12394493073225021, 0.0716007649898529, 0.08233370631933212, -0.09953313320875168, 0.3354782462120056, 0.0723237544298172, 0.010033021681010723, 0.5702229142189026, -0.07150416821241379, -0.06814483553171158, -0.006372562609612942, -0.267497181892395, 0.0029839002527296543, -0.1364310383796692, 0.0884857177734375, -0.3857947885990143, -0.19737976789474487, -0.22870920598506927, -0.1695394217967987, 0.2029169201850891, -0.17471098899841309, 0.4687061905860901, 0.8112377524375916, 0.04271391034126282, 0.2522848844528198, -0.13941428065299988, 0.08666958659887314, -0.19838128983974457, -0.10272815078496933, 0.3702690303325653, 0.3243257403373718, 0.3293236196041107, 0.30775848031044006, -0.1858494132757187, -0.042594581842422485, -0.14035436511039734, -0.01082699652761221, -0.09080857038497925, -0.19280646741390228, 0.4309304654598236, -0.18164269626140594, -0.3594953417778015, -0.4430294632911682, 0.47413569688796997, 0.3036978840827942, 0.16751639544963837, -0.2264348715543747, -0.04982871934771538, -0.276872843503952, 0.0895533338189125, -0.04983546957373619, 0.30433058738708496, 0.17883262038230896, -0.4798729419708252, 0.2576327919960022, 0.14473792910575867, 0.017445391044020653, 0.14979515969753265, -0.17490804195404053, -0.09823738783597946, 0.18495410680770874, -0.1794215887784958, -0.3163420855998993, -0.17026956379413605, -0.2063254565000534, 0.09612671285867691, 0.055459026247262955, -0.14097437262535095, 0.41986796259880066, -0.0730065256357193, 0.0804566890001297, -0.36952829360961914, -0.07166872173547745, 0.1323453187942505, -0.14213445782661438, 0.026566563174128532, -0.14152169227600098, 0.01949363760650158, -0.15197181701660156, -0.17078649997711182, 0.27500343322753906, -0.20322203636169434, -0.5579351186752319, 0.11435147374868393, 0.15298667550086975, -0.19747978448867798, -0.17400741577148438, -0.598800778388977, 0.13951382040977478, 0.10915868729352951, -0.13487209379673004, -0.044677022844552994, 0.025904856622219086, 0.061212632805109024, 0.1633453518152237, -0.16174186766147614, -0.04253126308321953, -0.05237875133752823, -0.5321544408798218, -0.21360337734222412, 0.4129624366760254, -0.10863747447729111, -0.3941420912742615, 0.030010860413312912, -0.3780168294906616, 0.08660852164030075, 0.13070547580718994, -0.18060991168022156, 0.05486968159675598, -0.1841283142566681, 0.3403094410896301, 0.13484638929367065, 0.2954083979129791, 0.24700865149497986, 0.01067524403333664, -0.3103944659233093, -0.42559394240379333, 0.1656981259584427, 0.5232206583023071, -0.14412827789783478, 0.32404568791389465, -0.0815892145037651, 0.23940113186836243, -0.37487053871154785, 0.561174750328064, 0.2000727504491806, -0.14221590757369995, 0.3628472089767456, -0.10117031633853912, 0.3838801980018616, -0.05260246619582176, -0.25187134742736816, -0.18551596999168396, 0.23430141806602478, 0.26591554284095764, 0.20199263095855713, -0.1648647040128708, -0.08873547613620758, -0.05564677342772484, 0.2917650640010834, -0.6990416646003723, -0.37923628091812134, -0.20884814858436584, -0.2817752957344055, 0.30757787823677063, 0.25680604577064514, 0.3954395651817322, -0.15643608570098877, -0.029466142877936363, -0.17186744511127472, -0.18580922484397888, 0.41178423166275024, -0.3250613510608673, -0.42913591861724854, -0.10033733397722244, -0.4984418749809265, 0.10651744157075882, -0.12735284864902496, 0.23966901004314423, -0.09385988861322403, -0.30624622106552124, 0.22352828085422516, -0.14974774420261383, 0.5354039072990417, -0.5045824646949768, 0.1757832169532776, -0.006974055431783199, -0.016671620309352875, 0.10720108449459076, 0.05559328570961952, -0.2942934036254883, 0.11506552994251251, -0.3113434612751007, 0.343813419342041, -0.5483576655387878, -0.06750988215208054, -0.05037713423371315, 0.05078122764825821, -0.26078304648399353, -0.05565481632947922, -0.4308713674545288, -0.17100170254707336, -0.26174890995025635, 0.13877961039543152, -0.01109715923666954, 0.27367931604385376, -0.25189822912216187, -0.10855813324451447, -0.14650100469589233, 0.17119485139846802, 0.17549148201942444, 0.3222980797290802, 0.3520066738128662, 0.3064885437488556, 0.2983090281486511, 0.10920999199151993, 0.21127012372016907, 0.24058854579925537, 0.24139119684696198, -0.008837206289172173, 0.11944650113582611, 0.13369180262088776, -0.48578310012817383, 0.03778679668903351, 0.1863802671432495, -0.29810798168182373, 0.21247495710849762, 0.07179619371891022, -0.017062637954950333, -0.2894273102283478, -0.2217327505350113, 0.21470333635807037, 0.09906994551420212, -0.2058078795671463, -0.26201486587524414, -0.034233998507261276, -0.34439826011657715, -0.15762759745121002, 0.009561529383063316, 0.12474466115236282, -0.13958072662353516, 0.09872569143772125, 0.3496030569076538, 0.5948976278305054, -0.3241969347000122, -0.20128393173217773, -0.023550694808363914, -0.08398203551769257, 0.308811753988266, -0.2043524831533432, 0.15762938559055328, -0.4984978139400482, -0.059523630887269974, 0.022652434185147285, -0.18758581578731537, -0.0029042158275842667, 0.2644546926021576, -0.2050708532333374, -0.027510875836014748, 0.061234526336193085, 0.011787166818976402, -0.07889457046985626, 0.21868140995502472, 0.023985011503100395, -0.04529968276619911, 0.021618356928229332, 0.21964724361896515, 0.21400287747383118, 0.45074954628944397, -0.08526413887739182, -0.046129196882247925, -0.292306125164032, -0.28637295961380005, 0.07484614849090576, 0.1385640650987625, 0.00015130158863030374, 0.1524130403995514, 0.09938520938158035, -0.4313402473926544, -0.14759989082813263, 0.18988996744155884, 0.50477534532547, 0.3325839340686798, 0.05238538980484009, 0.0390341579914093, 0.0757230594754219, 0.12116307765245438, -0.1261885017156601, -0.02447410114109516, 0.1100911870598793, 0.060523733496665955, -0.5227978825569153, -0.05099816247820854, 0.05416085198521614, -0.2766057848930359, -0.13871486485004425, -0.05013665184378624, -0.16845807433128357, -0.24423472583293915, 0.21828125417232513, -0.01591712050139904, -0.25635573267936707, -0.17668025195598602, 0.18020406365394592, 0.10282817482948303, 0.011500345543026924, 0.47542762756347656, 0.09245677292346954, -0.2659621238708496, -0.13556739687919617, 0.461879163980484, 0.0646815225481987, 0.47018977999687195, 0.6486764550209045, -0.27574726939201355, -0.0606142058968544, -0.47637781500816345, 0.10428977757692337, 0.08442723751068115, -0.35377344489097595, 0.09765367209911346, 0.1421203762292862, 0.06518248468637466, 0.032075636088848114, 0.30841517448425293, 0.052417732775211334, 0.24819301068782806, -0.10069464147090912, -0.21237561106681824, -0.4416695237159729, 0.0592651441693306, 0.024943064898252487, -0.004342427011579275, -0.0820508673787117, -0.07351991534233093, 0.1546390801668167, 0.027838479727506638, -0.4305548667907715, -0.2944205403327942, -0.26670584082603455, -0.03841647133231163, 0.1644732505083084, -0.09116240590810776, 0.024156911298632622, -0.08486533164978027, 0.32399025559425354, -0.06630663573741913, -0.1252557933330536, -0.29960769414901733, 0.13979575037956238, 0.08287488669157028, -0.12073531746864319, 0.24200068414211273, -0.30102524161338806, -0.21923048794269562, -0.2616749703884125, -0.07199753075838089, 0.05564550682902336, -0.11553486436605453, -0.0018899294082075357, 0.33808434009552, -0.024739226326346397, 0.12007497996091843, -0.09715025126934052, -0.09690297394990921, -0.11365287750959396, 0.1125333234667778, -0.2243977040052414, -0.05360136181116104, 0.1230815201997757, -0.11558066308498383, -0.18194140493869781, 0.13858313858509064, -0.30122584104537964, 0.07046955078840256, 0.2675771415233612, -0.18773424625396729, 0.14959385991096497, 0.20982787013053894, 0.032425232231616974, 0.11184696108102798, 0.17629104852676392, -0.15680500864982605, 0.10474786907434464, 0.2653876543045044, -0.2335379272699356, -0.1706114262342453, 0.07087412476539612, 0.10820606350898743, 0.28050369024276733, 0.36449187994003296, 0.06638728082180023, -0.0812145248055458, 0.07858987897634506, -0.07900288701057434, -0.10083997249603271, -0.09793367981910706, -0.09778639674186707, 0.7770146131515503, 0.1573888659477234, 0.19966959953308105, 0.5119929909706116, 0.11757085472345352, -0.3293934464454651, 0.22545044124126434, 0.3660670220851898, 0.2123519331216812, 0.023756107315421104, 0.30885595083236694, -0.17099732160568237, -0.27817100286483765, 0.4121246933937073, 0.0014715150464326143, 0.024989426136016846, 0.11452344805002213, 0.029776569455862045, -0.06926462799310684, 0.06969417631626129, 0.05228659510612488, -0.400658518075943, 0.20989130437374115, -0.25432825088500977, -0.1063658595085144, -0.297965943813324, -0.4329097270965576, 0.08169597387313843, 0.04117942973971367, 0.2338448464870453, 0.19346009194850922, -0.055809516459703445, -0.1767244040966034, -0.036059871315956116, 0.06031453236937523, 0.3395082950592041, -0.010242888703942299, 0.25582295656204224, -0.22322864830493927, -0.016427716240286827, 0.05385833978652954, 0.30323922634124756, 0.19351902604103088, 0.38631197810173035, 0.033543460071086884, -0.03163826838135719, -0.056848689913749695, 0.14105185866355896, 0.1721421480178833, -0.31387102603912354, -0.29965877532958984, 0.6231550574302673, 0.2530311942100525, -0.00029950481257401407, 0.3022986650466919, 0.20542992651462555, -0.20667025446891785, -0.1577044427394867, 0.2843024730682373, -0.06989158689975739, 0.28001394867897034, 0.08117664605379105, 0.0720255970954895, -0.2865990102291107, 0.015786604955792427, 0.006438264157623053, -0.10120205581188202, -0.25566619634628296, 0.07784584164619446, 0.006736611947417259, 0.1852521449327469, -0.34584879875183105, 0.16068454086780548, -0.2538464665412903, 0.5718218684196472, 0.0830409824848175, -0.13646747171878815, -0.18375112116336823, -0.10401555895805359, -0.5614560842514038, 0.03679418936371803, -0.043689388781785965, -0.32225728034973145, -0.273351788520813, 0.4061674177646637, 0.2836979627609253, -0.007464124355465174, 0.19129003584384918, -0.3224029541015625, -0.017846761271357536, 0.45494773983955383, -0.24360968172550201, -0.22611533105373383, -0.05708666518330574, -0.14142270386219025, -0.09020983427762985, -0.249901682138443, 0.3857753872871399, -0.06833238899707794, 0.19146350026130676, 0.11111316829919815, 0.1664952039718628, -0.15850161015987396, 0.049898676574230194, 0.2466627061367035, 0.29508310556411743, 0.6333222985267639, -0.09597853571176529, 0.20181220769882202, 0.06333648413419724, 0.09847885370254517, 0.11166854947805405, 0.3148973286151886, 0.14766348898410797, 0.21853435039520264, 0.22485974431037903, -0.02337402105331421, -0.1455133706331253, 0.07482431828975677, 0.36152178049087524, -0.1382465958595276, 0.015719357877969742, 0.11244270205497742, 0.07413333654403687, -0.37182873487472534, 0.17318302392959595, 0.21626949310302734, 0.020969819277524948, 0.003969539422541857, -0.10089380294084549, -0.07747762650251389, 0.06928648799657822, -0.12726879119873047, -0.25331923365592957, -0.319853812456131, 0.23445254564285278, 0.08780835568904877, -0.30430635809898376, -0.05423200502991676, 0.11656594276428223, 0.3803558647632599, -0.28652819991111755, -0.02986782230436802, 0.02250087633728981, -0.1151256412267685, 0.19746941328048706, 0.048067186027765274, 0.30641475319862366, -0.10495101660490036, 0.03203641250729561, 0.03455055132508278, 0.00642782635986805 ]
https://github.com/huggingface/datasets/issues/2229
`xnli` dataset creating a tuple key while yielding instead of `str` or `int`
Hi ! Sure sounds good. Also if you find other datasets that use tuples instead of str/int, you can also fix them ! thanks :)
When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset. I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple.
25
`xnli` dataset creating a tuple key while yielding instead of `str` or `int`
[ 0.07638384401798248, 0.13094505667686462, -0.09791149199008942, 0.1231720969080925, 0.2765970230102539, -0.20516985654830933, 0.12868349254131317, 0.21775270998477936, 0.374170184135437, 0.331971138715744, -0.012692376971244812, 0.6220595240592957, 0.1210949495434761, 0.23425450921058655, -0.0659574344754219, 0.32023462653160095, -0.0026233517564833164, 0.3215292990207672, -0.05494331568479538, -0.24731041491031647, -0.5098756551742554, 0.06284554302692413, -0.017865819856524467, 0.11212851852178574, -0.27066996693611145, -0.048260629177093506, 0.27572232484817505, 0.11478624492883682, -0.47723332047462463, -0.33293861150741577, 0.16657663881778717, -0.14802144467830658, -0.13130366802215576, -0.24719442427158356, -0.00011497069499455392, -0.1941230595111847, 0.07270818948745728, -0.06196838617324829, -0.6109541654586792, 0.1865479052066803, -0.3741278648376465, 0.2896970212459564, 0.12800222635269165, -0.43871504068374634, -0.08022045344114304, -0.028294796124100685, -0.06870733946561813, -0.29179757833480835, -0.05833752080798149, 0.3648311495780945, 0.19303278625011444, 0.3798041045665741, -0.02732756733894348, -0.043199773877859116, 0.3360358476638794, 0.1750936359167099, -0.08498011529445648, -0.13736890256404877, 0.32322487235069275, 0.20154045522212982, -0.2658628523349762, 0.13720275461673737, 0.17810946702957153, -0.16739614307880402, -0.11868833750486374, 0.374618798494339, 0.09927117079496384, 0.10613536834716797, 0.11238454282283783, -0.09785189479589462, -0.12781614065170288, -0.1658724546432495, -0.02943607047200203, 0.13421770930290222, -0.08804300427436829, -0.2103542685508728, -0.021895311772823334, 0.02499706670641899, -0.43335622549057007, 0.107172891497612, 0.25144559144973755, 0.08656702190637589, -0.10721325874328613, 0.0834842324256897, -0.33236590027809143, 0.5325063467025757, 0.0010407066438347101, 0.08480095863342285, -0.026824289932847023, -0.43289077281951904, -0.2489001452922821, 0.03519635647535324, 0.14464165270328522, -0.021487701684236526, -0.14420324563980103, 0.041255492717027664, 0.35227614641189575, 0.0293760783970356, 0.3081311285495758, -0.08815685659646988, 0.19056683778762817, 0.22278214991092682, -0.25679388642311096, -0.1179986447095871, -0.01879882998764515, 0.21111734211444855, 0.10740098357200623, -0.15026044845581055, 0.2281331568956375, -0.36180463433265686, 0.053490083664655685, 0.013026237487792969, 0.19654418528079987, 0.44465529918670654, 0.05784821882843971, -0.028562387451529503, 0.21301135420799255, 0.056023530662059784, -0.2699415683746338, 0.13304372131824493, 0.14285913109779358, 0.11273467540740967, -0.01599767617881298, 0.1001364141702652, 0.15469303727149963, 0.26673927903175354, -0.10155381262302399, 0.11634137481451035, -0.14840450882911682, -0.4731595516204834, -0.17807427048683167, -0.0002570307406131178, -0.12895068526268005, -0.32675501704216003, 0.23536716401576996, -0.21256627142429352, -0.04915156215429306, 0.3080693483352661, 0.049338486045598984, 0.0667431578040123, -0.1323585957288742, -0.02406001091003418, 0.4282545745372772, 0.033847659826278687, -0.04783536493778229, 0.1251058578491211, 0.08517014235258102, -0.6577123999595642, -0.018159152939915657, 0.3052939772605896, -0.21508747339248657, -0.12227536737918854, -0.042530957609415054, 0.21455693244934082, 0.08868225663900375, -0.07737429440021515, 0.2558740973472595, -0.101697638630867, 0.07725557684898376, 0.1775500774383545, -0.13681714236736298, -0.36613401770591736, 0.25708240270614624, -0.34576964378356934, 0.12989675998687744, 0.15531522035598755, -0.3487379550933838, 0.12407995760440826, -0.15547163784503937, -0.11433354765176773, 0.37516069412231445, 0.47990256547927856, 0.1537439525127411, 0.0813574269413948, -0.28598326444625854, 0.5190460085868835, 0.393772155046463, -0.10512744635343552, -0.4949489235877991, 0.25434720516204834, -0.23844873905181885, -0.18854758143424988, 0.24023164808750153, 0.3423837721347809, 0.09458412975072861, 0.10477674752473831, 0.22592806816101074, 0.11057455092668533, -0.12992866337299347, 0.09499026834964752, -0.17328038811683655, 0.012311359867453575, 0.08598483353853226, 0.1833440214395523, -0.038437530398368835, 0.3656567633152008, 0.12093535810709, 0.13248828053474426, 0.2959422767162323, -0.3894009292125702, 0.1822931468486786, -0.40981000661849976, 0.38917970657348633, -0.2527085542678833, -0.02972530387341976, 0.07970589399337769, -0.38272711634635925, -0.04407008737325668, -0.024016058072447777, 0.3646303117275238, -0.33968812227249146, -0.07230465114116669, -0.23979079723358154, 0.37977737188339233, -0.21052555739879608, 0.17425008118152618, 0.13536609709262848, 0.15769127011299133, -0.02306332439184189, 0.08863320201635361, -0.021946093067526817, -0.11310619115829468, -0.11214777082204819, -0.0029506366699934006, -0.5407965779304504, -0.17092131078243256, 0.059631556272506714, -0.19242076575756073, -0.18016183376312256, 0.3506695330142975, -0.14355555176734924, 0.014219051226973534, -0.029023511335253716, 0.022183498367667198, 0.17683377861976624, -0.15164843201637268, -0.046528805047273636, 0.1431886851787567, 0.2124418020248413, -0.05619311332702637, 0.025632508099079132, 0.5210697054862976, 0.24794012308120728, -0.08458247035741806, -0.19842752814292908, 0.5364325642585754, -0.08287261426448822, -0.03313709422945976, 0.001526641775853932, 0.3296312391757965, 0.413469135761261, -0.07633275538682938, -0.18316780030727386, -0.6234392523765564, -0.07141561806201935, 0.2590268850326538, 0.09213894605636597, 0.1792021542787552, -0.6066085696220398, 0.3281586170196533, 0.6434566378593445, -0.003140171291306615, 0.2291181981563568, 0.10816261917352676, 0.033422697335481644, 0.06405583769083023, -0.26386284828186035, 0.44545620679855347, 0.2564730644226074, 0.09704471379518509, 0.1440749615430832, -0.11010105907917023, -0.2862713634967804, -0.4048800468444824, -0.0060939667746424675, -0.31338369846343994, -0.41726335883140564, 0.31198742985725403, 0.17108209431171417, -0.42341387271881104, -0.19389799237251282, 0.13299134373664856, -0.059276510030031204, 0.0783020630478859, -0.2792241871356964, -0.16452692449092865, -0.4010131061077118, -0.7524681091308594, -0.2091289609670639, -0.1826925277709961, 0.3175837993621826, -0.41705963015556335, 0.1554315835237503, -0.11256876587867737, -0.046723224222660065, -0.0592457540333271, -0.043059300631284714, 0.2584151029586792, 0.245522141456604, -0.09957031160593033, -0.02395698055624962, -0.2613375782966614, -0.23953261971473694, 0.12062986195087433, -0.19978167116641998, -0.07514428347349167, 0.23481830954551697, -0.20885436236858368, 0.2968868613243103, -0.4366547167301178, -0.34623953700065613, 0.15853047370910645, -0.029944658279418945, -0.07663912326097488, 0.3762783408164978, 0.029013963416218758, 0.014193419367074966, -0.18878930807113647, 0.2860899567604065, -0.11439087986946106, -0.2770397961139679, 0.304906964302063, -0.24903611838817596, -0.1017497330904007, -0.39649829268455505, -0.46963462233543396, 0.07173521816730499, -0.06168799102306366, 0.19956640899181366, 0.2300702929496765, 0.22480085492134094, 0.013802747242152691, -0.09297524392604828, -0.11803199350833893, 0.24358761310577393, -0.4622616469860077, -0.3622768819332123, 0.00786063726991415, 0.2838989198207855, -0.1920778453350067, -0.3750331699848175, -0.15972676873207092, -0.11306194961071014, 0.24018937349319458, 0.3610885441303253, -0.06620350480079651, 0.24082233011722565, -0.1740562468767166, 0.6829136610031128, 0.1573825478553772, 0.10984304547309875, 0.00976039469242096, 0.10641945898532867, -0.09771911054849625, -0.19542181491851807, 0.12411612272262573, 0.525028645992279, 0.16597633063793182, 0.16257193684577942, 0.44225090742111206, 0.19473735988140106, -0.032757241278886795, -0.024447806179523468, 0.07736653834581375, -0.08181382715702057, 0.223881334066391, -0.3031880855560303, 0.05187124386429787, -0.17436593770980835, 0.07945667952299118, -0.11262167245149612, 0.08569110929965973, -0.012564885430037975, -0.019832231104373932, 0.054641664028167725, 0.26118502020835876, 0.12344525754451752, 0.5808526277542114, 0.030817950144410133, -0.3673023283481598, 0.30368316173553467, -0.04930269345641136, 0.02232956513762474, 0.04004267603158951, 0.14501234889030457, -0.22755871713161469, -0.05984079837799072, -0.23708587884902954, -0.2918863594532013, -0.04749053344130516, -0.12063158303499222, -0.3172507584095001, 0.046732496470212936, -0.6369260549545288, 0.018345333635807037, 0.03596363216638565, 0.3979024291038513, 0.032371822744607925, -0.27106773853302, 0.17060911655426025, 0.16911111772060394, 0.12295904755592346, 0.04290109500288963, 0.19538871943950653, 0.027297185733914375, -0.08629271388053894, -0.35901838541030884, 0.22607745230197906, -0.4702232778072357, -0.16980622708797455, 0.2734163999557495, 0.5218188762664795, -0.22739961743354797, -0.007683716714382172, -0.14814652502536774, 0.091848224401474, -0.2748326063156128, -0.023835517466068268, 0.0013711389619857073, -0.301337331533432, 0.008563486859202385, -0.23142458498477936, 0.08356116712093353, 0.035495463758707047, 0.05459783226251602, -0.044529907405376434, -0.2943267524242401, 0.011356892995536327, 0.09063489735126495, 0.0652804747223854, 0.39157363772392273, -0.03328666836023331, -0.16944918036460876, -0.26068103313446045, 0.28892868757247925, -0.21591563522815704, 0.30022358894348145, 0.12708602845668793, 0.042277369648218155, 0.1381673514842987, -0.5281814932823181, 0.03189519792795181, -0.00013194518396630883, -0.18379980325698853, 0.2637060284614563, -0.33226531744003296, 0.08139453083276749, -0.25295111536979675, 0.05375116690993309, 0.10069967061281204, -0.02870986796915531, -0.029916608706116676, -0.1027066707611084, 0.19548475742340088, -0.03492370992898941, -0.11147622019052505, 0.21937131881713867, -0.0489201620221138, -0.22531262040138245, 0.3362385630607605, 0.6064173579216003, 0.6232045292854309, -0.02907020039856434, 0.1828603595495224, 0.5670695900917053, 0.16677434742450714, 0.4876303970813751, 0.1518387794494629, 0.050510238856077194, -0.4579890966415405, 0.053032997995615005, -0.056451089680194855, -0.06892697513103485, -0.4167809784412384, 0.021510805934667587, -0.1808265596628189, -0.017398374155163765, -0.13035409152507782, -0.1458994597196579, 0.1934300661087036, 0.15512573719024658, -0.10949664562940598, -0.25319623947143555, -0.010874786414206028, 0.12775351107120514, -0.06215758994221687, -0.033680617809295654, 0.028431521728634834, -0.05974803864955902, -0.2098883092403412, -0.21442992985248566, -0.020798753947019577, 0.13396170735359192, 0.2114117592573166, 0.3033483922481537, 0.07962250709533691, -0.2620077133178711, -0.31738609075546265, 0.2771356403827667, 0.3493192195892334, -0.09463240206241608, 0.07272499054670334, -0.1320260912179947, 0.11724702268838882, 0.3431077003479004, 0.16097794473171234, 0.21000365912914276, 0.22048543393611908, 0.01136719062924385, -0.034955091774463654, 0.02488158456981182, 0.10281863063573837, -0.06789863854646683, -0.46674972772598267, -0.018196549266576767, -0.5847474336624146, -0.18648143112659454, -0.053038861602544785, -0.17635442316532135, -0.07328029721975327, -0.06272782385349274, 0.05681569501757622, -0.03086789883673191, 0.18037326633930206, 0.2544538080692291, 0.1185971051454544, -0.36063677072525024, -0.04185236617922783, -0.03762409836053848, 0.32764536142349243, 0.26747560501098633, 0.33163508772850037, 0.10162647068500519, 0.06604043394327164, -0.27664700150489807, 0.005605713929980993, 0.16776743531227112, -0.32332363724708557, 0.18146178126335144, -0.3405882716178894, -0.06185390055179596, 0.14089159667491913, 0.39011502265930176, 0.10962701588869095, 0.34977155923843384, -0.366418719291687, -0.1478019803762436, -0.4435623586177826, -0.019054193049669266, -0.03791268542408943, 0.08017099648714066, -0.26581448316574097, 0.3942685127258301, 0.023501543328166008, -0.24217309057712555, -0.31741127371788025, -0.0967627465724945, -0.08056768774986267, 0.06732995808124542, 0.4458777606487274, 0.08046671748161316, -0.12856009602546692, 0.2684859335422516, 0.17229528725147247, 0.02056768722832203, -0.11892291903495789, -0.16272413730621338, -0.16118261218070984, 0.09568758308887482, 0.10925471037626266, -0.042165860533714294, 0.008805980905890465, 0.13047510385513306, -0.007416914217174053, 0.03214157745242119, 0.15286755561828613, 0.12172470986843109, -0.18599329888820648, 0.5245703458786011, -0.2720281183719635, 0.1495053768157959, 0.2079744189977646, 0.01831403188407421, 0.16030927002429962, 0.17109555006027222, 0.024032657966017723, 0.1962519884109497, -0.24309806525707245, -0.09432843327522278, -0.4139498770236969, 0.25523126125335693, -0.04299873113632202, -0.0010824947385117412, 0.033820200711488724, -0.16104529798030853, 0.13611914217472076, -0.017871936783194542, 0.11940658092498779, 0.19078481197357178, -0.12918131053447723, -0.16994307935237885, -0.00200147507712245, 0.24375736713409424, -0.10655320435762405, -0.1884492039680481, -0.07215113937854767, 0.10517677664756775, 0.04315860569477081, 0.47558748722076416, 0.04053489491343498, -0.19423317909240723, -0.02899716980755329, -0.3676401376724243, 0.08637181669473648, -0.35204681754112244, -0.23891772329807281, 0.7613301277160645, 0.023850761353969574, 0.008644720539450645, 0.11733497679233551, 0.06724382936954498, -0.13342984020709991, 0.648842990398407, -0.08637912571430206, 0.36219343543052673, 0.21534065902233124, 0.13682125508785248, 0.06269780546426773, -0.007766676135361195, 0.013585617765784264, 0.4316067099571228, -0.5124402642250061, 0.11931146681308746, 0.5990042686462402, 0.29013052582740784, -0.03611312061548233, -0.03603795915842056, -0.29414787888526917, 0.036710504442453384, -0.361343115568161, -0.17488108575344086, -0.4060094952583313, -0.35852372646331787, -0.17938661575317383, -0.007702798582613468, -0.22606971859931946, 0.4934242069721222, 0.22947688400745392, 0.04755021259188652, 0.06286350637674332, -0.5291509628295898, 0.011516238562762737, 0.02942514605820179, -0.030627192929387093, -0.209863543510437, 0.19028261303901672, 0.249075248837471, 0.198797807097435, 0.26302528381347656, 0.06480734050273895, 0.3384038209915161, 0.4261661767959595, 0.21443375945091248, 0.2501347064971924, -0.2880350351333618, -0.2603057026863098, -0.1472408026456833, 0.14414313435554504, 0.3587411046028137, 0.03269721195101738, 0.5105248093605042, 0.12885572016239166, -0.10003222525119781, -0.1393430083990097, 0.40889835357666016, 0.12760905921459198, 0.15610207617282867, 0.15722498297691345, 0.13995762169361115, -0.25954487919807434, 0.13098900020122528, 0.01876199245452881, -0.360952228307724, 0.04711998999118805, -0.0296343844383955, 0.14545577764511108, 0.3416229486465454, -0.10902411490678787, 0.11427737772464752, -0.03478103503584862, 0.461412638425827, -0.07713761925697327, 0.07789159566164017, -0.07117351144552231, -0.5758304595947266, -0.5814415812492371, 0.22240352630615234, 0.13945963978767395, -0.3654164671897888, -0.11860047280788422, 0.23648110032081604, 0.021956350654363632, 0.020040445029735565, -0.27346861362457275, -0.09320180118083954, -0.05281645059585571, 0.11882396787405014, -0.19543591141700745, -0.009368150494992733, 0.51866215467453, -0.04421066492795944, -0.2891598343849182, -0.23469087481498718, 0.17323598265647888, 0.16901414096355438, 0.21150517463684082, -0.2514520585536957, 0.30022379755973816, -0.09603168815374374, 0.20800673961639404, 0.06465330719947815, 0.4600294232368469, 0.3189530670642853, -0.14414046704769135, -0.11403504759073257, -0.11092963814735413, 0.0815771296620369, -0.12114765495061874, 0.008737128227949142, 0.16603858768939972, 0.18709075450897217, 0.23781155049800873, 0.19466078281402588, -0.2306351363658905, 0.07230241596698761, 0.23419909179210663, -0.1266861855983734, -0.3647172451019287, 0.5056630969047546, -0.2934834063053131, -0.25189703702926636, 0.08749981224536896, 0.46476438641548157, 0.1273108869791031, 0.17191387712955475, 0.12916599214076996, -0.4005323052406311, -0.21386469900608063, 0.010682374238967896, -0.2693234384059906, -0.06783919781446457, 0.09093025326728821, -0.1896207481622696, -0.12740640342235565, -0.05532929301261902, 0.044102925807237625, 0.1103762686252594, -0.34861236810684204, -0.2560056149959564, 0.07714853435754776, 0.06624183058738708, 0.06778179854154587, -0.2548977732658386, 0.2396199107170105, 0.3379988372325897, -0.14675283432006836, 0.2379942685365677, -0.2729785144329071 ]
https://github.com/huggingface/datasets/issues/2229
`xnli` dataset creating a tuple key while yielding instead of `str` or `int`
@lhoestq I have sent a PR for fixing the issue. Would be great if you could have a look! Thanks!
When using `ds = datasets.load_dataset('xnli', 'ar')`, the dataset generation script uses the following section of code in the egging, which yields a tuple key instead of the specified `str` or `int` key: https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196 Since, community datasets in Tensorflow Datasets also use HF datasets, this causes a Tuple key error while loading HF's `xnli` dataset. I'm up for sending a fix for this, I think we can simply use `file_idx + "_" + row_idx` as a unique key instead of a tuple.
20
`xnli` dataset creating a tuple key while yielding instead of `str` or `int`
[ 0.07638384401798248, 0.13094505667686462, -0.09791149199008942, 0.1231720969080925, 0.2765970230102539, -0.20516985654830933, 0.12868349254131317, 0.21775270998477936, 0.374170184135437, 0.331971138715744, -0.012692376971244812, 0.6220595240592957, 0.1210949495434761, 0.23425450921058655, -0.0659574344754219, 0.32023462653160095, -0.0026233517564833164, 0.3215292990207672, -0.05494331568479538, -0.24731041491031647, -0.5098756551742554, 0.06284554302692413, -0.017865819856524467, 0.11212851852178574, -0.27066996693611145, -0.048260629177093506, 0.27572232484817505, 0.11478624492883682, -0.47723332047462463, -0.33293861150741577, 0.16657663881778717, -0.14802144467830658, -0.13130366802215576, -0.24719442427158356, -0.00011497069499455392, -0.1941230595111847, 0.07270818948745728, -0.06196838617324829, -0.6109541654586792, 0.1865479052066803, -0.3741278648376465, 0.2896970212459564, 0.12800222635269165, -0.43871504068374634, -0.08022045344114304, -0.028294796124100685, -0.06870733946561813, -0.29179757833480835, -0.05833752080798149, 0.3648311495780945, 0.19303278625011444, 0.3798041045665741, -0.02732756733894348, -0.043199773877859116, 0.3360358476638794, 0.1750936359167099, -0.08498011529445648, -0.13736890256404877, 0.32322487235069275, 0.20154045522212982, -0.2658628523349762, 0.13720275461673737, 0.17810946702957153, -0.16739614307880402, -0.11868833750486374, 0.374618798494339, 0.09927117079496384, 0.10613536834716797, 0.11238454282283783, -0.09785189479589462, -0.12781614065170288, -0.1658724546432495, -0.02943607047200203, 0.13421770930290222, -0.08804300427436829, -0.2103542685508728, -0.021895311772823334, 0.02499706670641899, -0.43335622549057007, 0.107172891497612, 0.25144559144973755, 0.08656702190637589, -0.10721325874328613, 0.0834842324256897, -0.33236590027809143, 0.5325063467025757, 0.0010407066438347101, 0.08480095863342285, -0.026824289932847023, -0.43289077281951904, -0.2489001452922821, 0.03519635647535324, 0.14464165270328522, -0.021487701684236526, -0.14420324563980103, 0.041255492717027664, 0.35227614641189575, 0.0293760783970356, 0.3081311285495758, -0.08815685659646988, 0.19056683778762817, 0.22278214991092682, -0.25679388642311096, -0.1179986447095871, -0.01879882998764515, 0.21111734211444855, 0.10740098357200623, -0.15026044845581055, 0.2281331568956375, -0.36180463433265686, 0.053490083664655685, 0.013026237487792969, 0.19654418528079987, 0.44465529918670654, 0.05784821882843971, -0.028562387451529503, 0.21301135420799255, 0.056023530662059784, -0.2699415683746338, 0.13304372131824493, 0.14285913109779358, 0.11273467540740967, -0.01599767617881298, 0.1001364141702652, 0.15469303727149963, 0.26673927903175354, -0.10155381262302399, 0.11634137481451035, -0.14840450882911682, -0.4731595516204834, -0.17807427048683167, -0.0002570307406131178, -0.12895068526268005, -0.32675501704216003, 0.23536716401576996, -0.21256627142429352, -0.04915156215429306, 0.3080693483352661, 0.049338486045598984, 0.0667431578040123, -0.1323585957288742, -0.02406001091003418, 0.4282545745372772, 0.033847659826278687, -0.04783536493778229, 0.1251058578491211, 0.08517014235258102, -0.6577123999595642, -0.018159152939915657, 0.3052939772605896, -0.21508747339248657, -0.12227536737918854, -0.042530957609415054, 0.21455693244934082, 0.08868225663900375, -0.07737429440021515, 0.2558740973472595, -0.101697638630867, 0.07725557684898376, 0.1775500774383545, -0.13681714236736298, -0.36613401770591736, 0.25708240270614624, -0.34576964378356934, 0.12989675998687744, 0.15531522035598755, -0.3487379550933838, 0.12407995760440826, -0.15547163784503937, -0.11433354765176773, 0.37516069412231445, 0.47990256547927856, 0.1537439525127411, 0.0813574269413948, -0.28598326444625854, 0.5190460085868835, 0.393772155046463, -0.10512744635343552, -0.4949489235877991, 0.25434720516204834, -0.23844873905181885, -0.18854758143424988, 0.24023164808750153, 0.3423837721347809, 0.09458412975072861, 0.10477674752473831, 0.22592806816101074, 0.11057455092668533, -0.12992866337299347, 0.09499026834964752, -0.17328038811683655, 0.012311359867453575, 0.08598483353853226, 0.1833440214395523, -0.038437530398368835, 0.3656567633152008, 0.12093535810709, 0.13248828053474426, 0.2959422767162323, -0.3894009292125702, 0.1822931468486786, -0.40981000661849976, 0.38917970657348633, -0.2527085542678833, -0.02972530387341976, 0.07970589399337769, -0.38272711634635925, -0.04407008737325668, -0.024016058072447777, 0.3646303117275238, -0.33968812227249146, -0.07230465114116669, -0.23979079723358154, 0.37977737188339233, -0.21052555739879608, 0.17425008118152618, 0.13536609709262848, 0.15769127011299133, -0.02306332439184189, 0.08863320201635361, -0.021946093067526817, -0.11310619115829468, -0.11214777082204819, -0.0029506366699934006, -0.5407965779304504, -0.17092131078243256, 0.059631556272506714, -0.19242076575756073, -0.18016183376312256, 0.3506695330142975, -0.14355555176734924, 0.014219051226973534, -0.029023511335253716, 0.022183498367667198, 0.17683377861976624, -0.15164843201637268, -0.046528805047273636, 0.1431886851787567, 0.2124418020248413, -0.05619311332702637, 0.025632508099079132, 0.5210697054862976, 0.24794012308120728, -0.08458247035741806, -0.19842752814292908, 0.5364325642585754, -0.08287261426448822, -0.03313709422945976, 0.001526641775853932, 0.3296312391757965, 0.413469135761261, -0.07633275538682938, -0.18316780030727386, -0.6234392523765564, -0.07141561806201935, 0.2590268850326538, 0.09213894605636597, 0.1792021542787552, -0.6066085696220398, 0.3281586170196533, 0.6434566378593445, -0.003140171291306615, 0.2291181981563568, 0.10816261917352676, 0.033422697335481644, 0.06405583769083023, -0.26386284828186035, 0.44545620679855347, 0.2564730644226074, 0.09704471379518509, 0.1440749615430832, -0.11010105907917023, -0.2862713634967804, -0.4048800468444824, -0.0060939667746424675, -0.31338369846343994, -0.41726335883140564, 0.31198742985725403, 0.17108209431171417, -0.42341387271881104, -0.19389799237251282, 0.13299134373664856, -0.059276510030031204, 0.0783020630478859, -0.2792241871356964, -0.16452692449092865, -0.4010131061077118, -0.7524681091308594, -0.2091289609670639, -0.1826925277709961, 0.3175837993621826, -0.41705963015556335, 0.1554315835237503, -0.11256876587867737, -0.046723224222660065, -0.0592457540333271, -0.043059300631284714, 0.2584151029586792, 0.245522141456604, -0.09957031160593033, -0.02395698055624962, -0.2613375782966614, -0.23953261971473694, 0.12062986195087433, -0.19978167116641998, -0.07514428347349167, 0.23481830954551697, -0.20885436236858368, 0.2968868613243103, -0.4366547167301178, -0.34623953700065613, 0.15853047370910645, -0.029944658279418945, -0.07663912326097488, 0.3762783408164978, 0.029013963416218758, 0.014193419367074966, -0.18878930807113647, 0.2860899567604065, -0.11439087986946106, -0.2770397961139679, 0.304906964302063, -0.24903611838817596, -0.1017497330904007, -0.39649829268455505, -0.46963462233543396, 0.07173521816730499, -0.06168799102306366, 0.19956640899181366, 0.2300702929496765, 0.22480085492134094, 0.013802747242152691, -0.09297524392604828, -0.11803199350833893, 0.24358761310577393, -0.4622616469860077, -0.3622768819332123, 0.00786063726991415, 0.2838989198207855, -0.1920778453350067, -0.3750331699848175, -0.15972676873207092, -0.11306194961071014, 0.24018937349319458, 0.3610885441303253, -0.06620350480079651, 0.24082233011722565, -0.1740562468767166, 0.6829136610031128, 0.1573825478553772, 0.10984304547309875, 0.00976039469242096, 0.10641945898532867, -0.09771911054849625, -0.19542181491851807, 0.12411612272262573, 0.525028645992279, 0.16597633063793182, 0.16257193684577942, 0.44225090742111206, 0.19473735988140106, -0.032757241278886795, -0.024447806179523468, 0.07736653834581375, -0.08181382715702057, 0.223881334066391, -0.3031880855560303, 0.05187124386429787, -0.17436593770980835, 0.07945667952299118, -0.11262167245149612, 0.08569110929965973, -0.012564885430037975, -0.019832231104373932, 0.054641664028167725, 0.26118502020835876, 0.12344525754451752, 0.5808526277542114, 0.030817950144410133, -0.3673023283481598, 0.30368316173553467, -0.04930269345641136, 0.02232956513762474, 0.04004267603158951, 0.14501234889030457, -0.22755871713161469, -0.05984079837799072, -0.23708587884902954, -0.2918863594532013, -0.04749053344130516, -0.12063158303499222, -0.3172507584095001, 0.046732496470212936, -0.6369260549545288, 0.018345333635807037, 0.03596363216638565, 0.3979024291038513, 0.032371822744607925, -0.27106773853302, 0.17060911655426025, 0.16911111772060394, 0.12295904755592346, 0.04290109500288963, 0.19538871943950653, 0.027297185733914375, -0.08629271388053894, -0.35901838541030884, 0.22607745230197906, -0.4702232778072357, -0.16980622708797455, 0.2734163999557495, 0.5218188762664795, -0.22739961743354797, -0.007683716714382172, -0.14814652502536774, 0.091848224401474, -0.2748326063156128, -0.023835517466068268, 0.0013711389619857073, -0.301337331533432, 0.008563486859202385, -0.23142458498477936, 0.08356116712093353, 0.035495463758707047, 0.05459783226251602, -0.044529907405376434, -0.2943267524242401, 0.011356892995536327, 0.09063489735126495, 0.0652804747223854, 0.39157363772392273, -0.03328666836023331, -0.16944918036460876, -0.26068103313446045, 0.28892868757247925, -0.21591563522815704, 0.30022358894348145, 0.12708602845668793, 0.042277369648218155, 0.1381673514842987, -0.5281814932823181, 0.03189519792795181, -0.00013194518396630883, -0.18379980325698853, 0.2637060284614563, -0.33226531744003296, 0.08139453083276749, -0.25295111536979675, 0.05375116690993309, 0.10069967061281204, -0.02870986796915531, -0.029916608706116676, -0.1027066707611084, 0.19548475742340088, -0.03492370992898941, -0.11147622019052505, 0.21937131881713867, -0.0489201620221138, -0.22531262040138245, 0.3362385630607605, 0.6064173579216003, 0.6232045292854309, -0.02907020039856434, 0.1828603595495224, 0.5670695900917053, 0.16677434742450714, 0.4876303970813751, 0.1518387794494629, 0.050510238856077194, -0.4579890966415405, 0.053032997995615005, -0.056451089680194855, -0.06892697513103485, -0.4167809784412384, 0.021510805934667587, -0.1808265596628189, -0.017398374155163765, -0.13035409152507782, -0.1458994597196579, 0.1934300661087036, 0.15512573719024658, -0.10949664562940598, -0.25319623947143555, -0.010874786414206028, 0.12775351107120514, -0.06215758994221687, -0.033680617809295654, 0.028431521728634834, -0.05974803864955902, -0.2098883092403412, -0.21442992985248566, -0.020798753947019577, 0.13396170735359192, 0.2114117592573166, 0.3033483922481537, 0.07962250709533691, -0.2620077133178711, -0.31738609075546265, 0.2771356403827667, 0.3493192195892334, -0.09463240206241608, 0.07272499054670334, -0.1320260912179947, 0.11724702268838882, 0.3431077003479004, 0.16097794473171234, 0.21000365912914276, 0.22048543393611908, 0.01136719062924385, -0.034955091774463654, 0.02488158456981182, 0.10281863063573837, -0.06789863854646683, -0.46674972772598267, -0.018196549266576767, -0.5847474336624146, -0.18648143112659454, -0.053038861602544785, -0.17635442316532135, -0.07328029721975327, -0.06272782385349274, 0.05681569501757622, -0.03086789883673191, 0.18037326633930206, 0.2544538080692291, 0.1185971051454544, -0.36063677072525024, -0.04185236617922783, -0.03762409836053848, 0.32764536142349243, 0.26747560501098633, 0.33163508772850037, 0.10162647068500519, 0.06604043394327164, -0.27664700150489807, 0.005605713929980993, 0.16776743531227112, -0.32332363724708557, 0.18146178126335144, -0.3405882716178894, -0.06185390055179596, 0.14089159667491913, 0.39011502265930176, 0.10962701588869095, 0.34977155923843384, -0.366418719291687, -0.1478019803762436, -0.4435623586177826, -0.019054193049669266, -0.03791268542408943, 0.08017099648714066, -0.26581448316574097, 0.3942685127258301, 0.023501543328166008, -0.24217309057712555, -0.31741127371788025, -0.0967627465724945, -0.08056768774986267, 0.06732995808124542, 0.4458777606487274, 0.08046671748161316, -0.12856009602546692, 0.2684859335422516, 0.17229528725147247, 0.02056768722832203, -0.11892291903495789, -0.16272413730621338, -0.16118261218070984, 0.09568758308887482, 0.10925471037626266, -0.042165860533714294, 0.008805980905890465, 0.13047510385513306, -0.007416914217174053, 0.03214157745242119, 0.15286755561828613, 0.12172470986843109, -0.18599329888820648, 0.5245703458786011, -0.2720281183719635, 0.1495053768157959, 0.2079744189977646, 0.01831403188407421, 0.16030927002429962, 0.17109555006027222, 0.024032657966017723, 0.1962519884109497, -0.24309806525707245, -0.09432843327522278, -0.4139498770236969, 0.25523126125335693, -0.04299873113632202, -0.0010824947385117412, 0.033820200711488724, -0.16104529798030853, 0.13611914217472076, -0.017871936783194542, 0.11940658092498779, 0.19078481197357178, -0.12918131053447723, -0.16994307935237885, -0.00200147507712245, 0.24375736713409424, -0.10655320435762405, -0.1884492039680481, -0.07215113937854767, 0.10517677664756775, 0.04315860569477081, 0.47558748722076416, 0.04053489491343498, -0.19423317909240723, -0.02899716980755329, -0.3676401376724243, 0.08637181669473648, -0.35204681754112244, -0.23891772329807281, 0.7613301277160645, 0.023850761353969574, 0.008644720539450645, 0.11733497679233551, 0.06724382936954498, -0.13342984020709991, 0.648842990398407, -0.08637912571430206, 0.36219343543052673, 0.21534065902233124, 0.13682125508785248, 0.06269780546426773, -0.007766676135361195, 0.013585617765784264, 0.4316067099571228, -0.5124402642250061, 0.11931146681308746, 0.5990042686462402, 0.29013052582740784, -0.03611312061548233, -0.03603795915842056, -0.29414787888526917, 0.036710504442453384, -0.361343115568161, -0.17488108575344086, -0.4060094952583313, -0.35852372646331787, -0.17938661575317383, -0.007702798582613468, -0.22606971859931946, 0.4934242069721222, 0.22947688400745392, 0.04755021259188652, 0.06286350637674332, -0.5291509628295898, 0.011516238562762737, 0.02942514605820179, -0.030627192929387093, -0.209863543510437, 0.19028261303901672, 0.249075248837471, 0.198797807097435, 0.26302528381347656, 0.06480734050273895, 0.3384038209915161, 0.4261661767959595, 0.21443375945091248, 0.2501347064971924, -0.2880350351333618, -0.2603057026863098, -0.1472408026456833, 0.14414313435554504, 0.3587411046028137, 0.03269721195101738, 0.5105248093605042, 0.12885572016239166, -0.10003222525119781, -0.1393430083990097, 0.40889835357666016, 0.12760905921459198, 0.15610207617282867, 0.15722498297691345, 0.13995762169361115, -0.25954487919807434, 0.13098900020122528, 0.01876199245452881, -0.360952228307724, 0.04711998999118805, -0.0296343844383955, 0.14545577764511108, 0.3416229486465454, -0.10902411490678787, 0.11427737772464752, -0.03478103503584862, 0.461412638425827, -0.07713761925697327, 0.07789159566164017, -0.07117351144552231, -0.5758304595947266, -0.5814415812492371, 0.22240352630615234, 0.13945963978767395, -0.3654164671897888, -0.11860047280788422, 0.23648110032081604, 0.021956350654363632, 0.020040445029735565, -0.27346861362457275, -0.09320180118083954, -0.05281645059585571, 0.11882396787405014, -0.19543591141700745, -0.009368150494992733, 0.51866215467453, -0.04421066492795944, -0.2891598343849182, -0.23469087481498718, 0.17323598265647888, 0.16901414096355438, 0.21150517463684082, -0.2514520585536957, 0.30022379755973816, -0.09603168815374374, 0.20800673961639404, 0.06465330719947815, 0.4600294232368469, 0.3189530670642853, -0.14414046704769135, -0.11403504759073257, -0.11092963814735413, 0.0815771296620369, -0.12114765495061874, 0.008737128227949142, 0.16603858768939972, 0.18709075450897217, 0.23781155049800873, 0.19466078281402588, -0.2306351363658905, 0.07230241596698761, 0.23419909179210663, -0.1266861855983734, -0.3647172451019287, 0.5056630969047546, -0.2934834063053131, -0.25189703702926636, 0.08749981224536896, 0.46476438641548157, 0.1273108869791031, 0.17191387712955475, 0.12916599214076996, -0.4005323052406311, -0.21386469900608063, 0.010682374238967896, -0.2693234384059906, -0.06783919781446457, 0.09093025326728821, -0.1896207481622696, -0.12740640342235565, -0.05532929301261902, 0.044102925807237625, 0.1103762686252594, -0.34861236810684204, -0.2560056149959564, 0.07714853435754776, 0.06624183058738708, 0.06778179854154587, -0.2548977732658386, 0.2396199107170105, 0.3379988372325897, -0.14675283432006836, 0.2379942685365677, -0.2729785144329071 ]
https://github.com/huggingface/datasets/issues/2226
Batched map fails when removing all columns
I found the problem. I called `set_format` on some columns before. This makes it crash. Here is a complete example to reproduce: ```python from datasets import load_dataset sst = load_dataset("sst") sst.set_format("torch", columns=["label"], output_all_columns=True) ds = sst["train"] # crashes ds.map( lambda x: {"a": list(range(20))}, remove_columns=ds.column_names, load_from_cache_file=False, num_proc=1, batched=True, ) ```
Hi @lhoestq , I'm hijacking this issue, because I'm currently trying to do the approach you recommend: > Currently the optimal setup for single-column computations is probably to do something like > > ```python > result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names) > ``` Here is my code: (see edit, in which I added a simplified version ``` This is the error: ```bash pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000 ``` I wonder why this error occurs, when I delete every column? Can you give me a hint? ### Edit: I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the complete dataset and print every sample before calling map. There seems to be no other problem with the dataset. I tried to simplify the code that crashes: ```python # works log.debug(dataset.column_names) log.debug(dataset) for i, sample in enumerate(dataset): log.debug(i, sample) # crashes counted_dataset = dataset.map( lambda x: {"a": list(range(20))}, input_columns=column, remove_columns=dataset.column_names, load_from_cache_file=False, num_proc=num_workers, batched=True, ) ``` ``` pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000 ``` Edit2: May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error: ```python # crashes counted_dataset = dataset.map( lambda x: {"a": list(range(20))}, input_columns=column, remove_columns=dataset.column_names, load_from_cache_file=False, num_proc=num_workers, batched=True, features=datasets.Features( { "a": datasets.Sequence(datasets.Value("int32")) } ) ) ``` ``` File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single writer.write_batch(batch) File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch col_type = schema.field(col).type if schema is not None else None File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field KeyError: 'Column tokens does not exist in schema' ``` _Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
49
Batched map fails when removing all columns
[ -0.04013077914714813, -0.01597319170832634, -0.1879514753818512, -0.014094525948166847, 0.030442023649811745, 0.19726498425006866, 0.636069118976593, 0.4093400537967682, 0.5403695702552795, 0.48492369055747986, 0.03661354258656502, 0.192635640501976, -0.08836747705936432, -0.07440903782844543, -0.5208898782730103, -0.0638766661286354, 0.09946175664663315, 0.4666292369365692, -0.4505564570426941, -0.1240697056055069, -0.2943461537361145, 0.09264954179525375, -0.4863501191139221, -0.0822102352976799, 0.15585972368717194, -0.15244916081428528, -0.18428975343704224, -0.08296998590230942, 0.14172731339931488, 0.005584465805441141, -0.30665522813796997, -0.021809237077832222, -0.1418199986219406, 0.43799588084220886, -0.00010417530575068668, 0.1016523465514183, -0.16543827950954437, 0.07300779968500137, -0.014402450062334538, 0.3451859951019287, -0.25810080766677856, 0.040305573493242264, -0.2665236294269562, -0.2510388195514679, 0.13410936295986176, 0.11421898752450943, -0.1555379331111908, -0.1718599498271942, 0.2598841190338135, 0.05345795303583145, 0.3115439713001251, 0.17824454605579376, -0.21231921017169952, 0.0683218315243721, 0.1868063062429428, -0.09137213975191116, -0.06049804016947746, -0.14477762579917908, 0.16091232001781464, -0.33556029200553894, -0.09384306520223618, 0.4850069284439087, -0.340511679649353, 0.044185832142829895, -0.10746167600154877, -0.057708628475666046, 0.5344809293746948, -0.2271285206079483, 0.47176340222358704, -0.07478924840688705, 0.028912723064422607, -0.007308431901037693, 0.21751797199249268, -0.04610137641429901, -0.2251586765050888, -0.16498269140720367, -0.08142077177762985, 0.02464827336370945, -0.12041009217500687, -0.002801499329507351, -0.3049473762512207, 0.10506822913885117, 0.017618170008063316, -0.07035131752490997, -0.04740513488650322, 0.20708803832530975, 0.07161365449428558, 0.19645929336547852, -0.001966119511052966, -0.0221265722066164, -0.20381179451942444, -0.07233872264623642, -0.21418501436710358, 0.3232026696205139, -0.219086691737175, -0.10409924387931824, 0.13929574191570282, 0.00035013831802643836, 0.04147585853934288, -0.347150981426239, 0.2148565649986267, 0.1613176167011261, 0.5573211312294006, 0.13039900362491608, 0.2938767373561859, 0.23604144155979156, 0.11554787307977676, 0.08618580549955368, -0.08568178862333298, -0.019824953749775887, -0.1356143057346344, 0.19080014526844025, 0.464304119348526, -0.1355893313884735, 0.07600858062505722, 0.09285256266593933, -0.06214689463376999, 0.0628165602684021, -0.17959636449813843, -0.003744977992027998, -0.007668063044548035, 0.10553396493196487, -0.18442170321941376, 0.12391171604394913, 0.33212602138519287, -0.10963654518127441, -0.14789438247680664, 0.16515319049358368, -0.0807064101099968, 0.14744746685028076, -0.2918154299259186, 0.13681679964065552, -0.27435198426246643, -0.3260009288787842, 0.19154439866542816, 0.1905512511730194, 0.10109186917543411, -0.11358325183391571, -0.2623540461063385, -0.07054631412029266, -0.3505537211894989, -0.08200141787528992, 0.45261532068252563, 0.08234097063541412, 0.04306687414646149, 0.15089595317840576, 0.179420605301857, 0.11089371889829636, 0.15764395892620087, 0.16333314776420593, -0.07747738808393478, 0.044207632541656494, 0.09492177516222, 0.285916805267334, 0.2680731415748596, 0.2715637981891632, -0.04763370007276535, -0.13146619498729706, 0.2191029042005539, 0.04464781656861305, -0.0039243195205926895, -0.11610966175794601, 0.1379215121269226, -0.1608346402645111, -0.13400626182556152, 0.4450277090072632, -0.24684855341911316, 0.07163167744874954, 0.23480606079101562, -0.006171066779643297, 0.30023741722106934, 0.27068355679512024, 0.15850257873535156, 0.1346702128648758, -0.14657466113567352, 0.12690438330173492, -0.08941943198442459, 0.025902891531586647, -0.03077005222439766, 0.5420806407928467, -0.2627883553504944, -0.05126550793647766, -0.08765968680381775, -0.3184928297996521, 0.25446817278862, -0.2281498908996582, 0.1399906724691391, -0.11448505520820618, -0.1994927078485489, 0.09291350841522217, -0.1312902569770813, -0.10438863188028336, -0.12883085012435913, -0.13953682780265808, 0.28061050176620483, 0.39329269528388977, 0.3564973771572113, -0.31940820813179016, 0.15041276812553406, -0.1553937941789627, 0.37424591183662415, 0.43759027123451233, -0.009012079797685146, -0.11939556151628494, 0.006248110439628363, 0.0438675656914711, -0.4535785913467407, 0.1481994092464447, 0.004160712473094463, -0.05133173614740372, -0.010236154310405254, -0.003908546641469002, -0.13490483164787292, -0.05417685583233833, 0.04752504080533981, 0.20452165603637695, 0.2409595400094986, -0.060130175203084946, -0.029142918065190315, -0.19012387096881866, -0.1373133659362793, -0.24058321118354797, 0.004083496052771807, 0.011377950198948383, -0.14594916999340057, -0.3556024730205536, -0.23907577991485596, -0.21355809271335602, 0.08871552348136902, 0.2786223590373993, 0.23323072493076324, -0.2880933880805969, 0.03477005660533905, 0.21577011048793793, -0.2188127636909485, -0.015210343524813652, -0.21591851115226746, -0.0867452397942543, -0.24418285489082336, 0.2612948417663574, -0.002845186972990632, -0.08114373683929443, 0.06689657270908356, -0.12896384298801422, -0.21473444998264313, -0.02127246931195259, -0.13190560042858124, 0.2655678987503052, -0.07711312174797058, 0.008139576762914658, -0.04536432400345802, -0.13749592006206512, 0.11716338247060776, -0.5879120230674744, -0.1108921617269516, 0.1760704219341278, -0.27451950311660767, -0.05521080270409584, 0.09118252247571945, -0.1113416776061058, 0.10598067194223404, 0.06784656643867493, -0.002615187084302306, -0.0698077380657196, -0.007093503605574369, 0.05557139217853546, 0.18997050821781158, 0.04386846348643303, 0.24116146564483643, 0.21401122212409973, 0.2539518475532532, -0.05963866412639618, 0.30515342950820923, -0.13251739740371704, 0.09341586381196976, -0.035072967410087585, 0.0383136086165905, 0.21756142377853394, 0.19500896334648132, -0.024865353479981422, -0.35248109698295593, -0.18648077547550201, 0.0631103441119194, 0.2688046395778656, -0.00002050368675554637, -0.11697357892990112, 0.007653767243027687, -0.13401278853416443, 0.14370635151863098, 0.12171880900859833, 0.16107277572155, -0.35573235154151917, 0.12698255479335785, 0.10566942393779755, -0.512539267539978, 0.2623095214366913, -0.047027114778757095, 0.012562819756567478, 0.18678970634937286, 0.067911297082901, -0.08822648972272873, -0.1902301162481308, -0.048120055347681046, 0.16667303442955017, -0.04581504687666893, -0.15330250561237335, 0.05839579924941063, 0.06244273483753204, -0.37092065811157227, -0.11884946376085281, 0.013314282521605492, 0.08870071917772293, -0.5545303821563721, -0.2380121797323227, 0.31488853693008423, 0.40356528759002686, -0.3430364727973938, -0.17145682871341705, 0.18216311931610107, -0.31316623091697693, -0.01869201473891735, 0.1411890983581543, 0.2306944727897644, -0.19678696990013123, -0.34382322430610657, 0.016189923509955406, 0.2579008638858795, -0.3152981400489807, 0.018672704696655273, -0.09084844589233398, 0.37365931272506714, 0.028471175581216812, 0.3435741662979126, -0.31490659713745117, -0.19855168461799622, -0.29780399799346924, -0.09428583830595016, -0.04125352203845978, -0.1184077262878418, 0.06113781780004501, -0.08296601474285126, 0.056326791644096375, 0.13640910387039185, 0.09776618331670761, 0.22987505793571472, -0.08703435957431793, 0.045755792409181595, -0.025982391089200974, 0.005807064939290285, 0.04745318740606308, 0.2374623864889145, 0.30487850308418274, 0.09240272641181946, -0.32265040278434753, -0.12683886289596558, 0.03395137935876846, 0.12433616071939468, 0.08977998048067093, -0.11481215804815292, -0.013403411023318768, 0.3086468279361725, 0.03929833695292473, 0.3446860611438751, -0.034401923418045044, -0.04538543149828911, 0.1899118721485138, -0.020785994827747345, 0.3093317449092865, -0.15207596123218536, -0.3961303234100342, 0.1381215751171112, 0.06070629879832268, -0.0914100855588913, 0.28293687105178833, -0.2412215769290924, -0.49214041233062744, 0.054499153047800064, 0.3460961580276489, -0.23185403645038605, -0.2583545446395874, 0.1947029083967209, -0.07906650751829147, 0.15868805348873138, 0.21796512603759766, 0.11425618827342987, -0.20820219814777374, -0.031042013317346573, 0.26084426045417786, -0.39668434858322144, 0.24719737470149994, -0.28646042943000793, -0.3529946506023407, -0.02401040866971016, -0.604509711265564, 0.40549662709236145, -0.07475309073925018, 0.31786563992500305, -0.19599974155426025, -0.27101895213127136, -0.08592139929533005, 0.0741659477353096, 0.4556993246078491, -0.29803016781806946, 0.007259024772793055, 0.05807056650519371, 0.20226356387138367, -0.23294013738632202, -0.06340768188238144, -0.20935389399528503, 0.11484888941049576, 0.3684001564979553, 0.6094897985458374, -0.2621525228023529, -0.14260037243366241, 0.2796861231327057, 0.057903289794921875, 0.07181563973426819, -0.050063684582710266, -0.2282976359128952, -0.19380590319633484, -0.23520313203334808, 0.06932703405618668, 0.16712024807929993, 0.1249968484044075, 0.18212224543094635, -0.2017490416765213, 0.2958412170410156, -0.16321226954460144, 0.0982799306511879, -0.07456201314926147, 0.026611998677253723, 0.2247549146413803, 0.022417603060603142, -0.14572139084339142, 0.1909777820110321, -0.09747803956270218, 0.07110574841499329, -0.4111908972263336, 0.3311418890953064, 0.28594499826431274, -0.3652261793613434, 0.3745962679386139, 0.3474961221218109, 0.1698964536190033, 0.15847623348236084, -0.21322570741176605, 0.16816599667072296, 0.06513641029596329, -0.3030061423778534, 0.24430440366268158, -0.058162614703178406, -0.03541975095868111, 0.16393207013607025, -0.1610526293516159, -0.03235957399010658, -0.20336811244487762, 0.39800095558166504, -0.14270125329494476, -0.2544827163219452, 0.674101710319519, -0.06751091778278351, 0.5660524368286133, -0.054507963359355927, -0.05192043259739876, 0.15100567042827606, 0.2030213475227356, 0.0689382329583168, 0.26980677247047424, 0.4078131914138794, -0.21990086138248444, 0.03080332651734352, -0.0010668730828911066, 0.04642220214009285, 0.12411291897296906, 0.44856324791908264, 0.19431617856025696, 0.22156161069869995, -0.17755483090877533, 0.7825794219970703, -0.0953756645321846, -0.4372595548629761, 0.12759113311767578, -0.1909426748752594, -0.08276759833097458, 0.10716531425714493, 0.1728883683681488, -0.003164617344737053, -0.14152871072292328, 0.007148579228669405, 0.2009628266096115, -0.35952407121658325, 0.24799275398254395, 0.07221174240112305, -0.0847601518034935, 0.16220813989639282, -0.08478789031505585, 0.02532249689102173, -0.386329710483551, -0.010306786745786667, -0.0669977217912674, 0.010162262246012688, 0.20267483592033386, -0.08995489031076431, 0.5557500720024109, 0.08621634542942047, -0.1396806538105011, 0.13549114763736725, -0.28858858346939087, 0.0077672977931797504, -0.0255235955119133, 0.16112174093723297, -0.2878192365169525, -0.24527466297149658, -0.47833895683288574, 0.38052260875701904, 0.07043852657079697, -0.4177239239215851, -0.2730839252471924, -0.15526677668094635, -0.10367970913648605, -0.20620857179164886, 0.18795600533485413, -0.20744813978672028, -0.08830954134464264, 0.7247418761253357, -0.20917756855487823, -0.27954789996147156, -0.0916016697883606, 0.2454252392053604, -0.030996588990092278, -0.018663305789232254, 0.5413089990615845, -0.08295061439275742, -0.15189358592033386, -0.40180742740631104, -0.28074347972869873, 0.13478407263755798, -0.2248435914516449, 0.23090684413909912, -0.4044424593448639, -0.14184144139289856, 0.34857746958732605, 0.31726545095443726, -0.07797936350107193, 0.0702117532491684, 0.03569294512271881, -0.03504204377532005, -0.22808274626731873, 0.08098345249891281, 0.18283849954605103, 0.1343393474817276, 0.13059332966804504, 0.15161919593811035, -0.18160836398601532, 0.13643468916416168, -0.41316306591033936, 0.006234034430235624, -0.008835691027343273, 0.38351207971572876, 0.28980928659439087, 0.16112427413463593, -0.03767423704266548, 0.043893635272979736, 0.2727305293083191, 0.296010285615921, 0.13726703822612762, -0.3543025553226471, 0.1387079656124115, 0.05688325688242912, -0.03738339990377426, 0.006320264656096697, 0.09544096887111664, -0.15060855448246002, -0.20298205316066742, -0.1668466478586197, 0.320976197719574, 0.04025281220674515, -0.12575925886631012, -0.040243059396743774, 0.1746550351381302, 0.11101130396127701, 0.19477540254592896, -0.09505275636911392, -0.1775071918964386, -0.06595973670482635, 0.10958132147789001, -0.020940657705068588, -0.0787140354514122, -0.10206477344036102, 0.10338543355464935, 0.016657670959830284, -0.016323518007993698, 0.08746600151062012, 0.24678070843219757, -0.24636225402355194, -0.17345388233661652, 0.10629886388778687, 0.21306611597537994, -0.17253059148788452, -0.08152446150779724, -0.4258835017681122, 0.04173679277300835, 0.33950620889663696, -0.17445360124111176, -0.05749388039112091, 0.33500269055366516, 0.11756177991628647, 0.28523147106170654, 0.33536961674690247, 0.11901978403329849, -0.5898568034172058, 0.018888035789132118, 0.18080948293209076, 0.32698485255241394, -0.29952746629714966, -0.32894107699394226, 0.5127062201499939, 0.04141310229897499, 0.007662503980100155, 0.2602902352809906, 0.10656852275133133, 0.12688897550106049, 0.3043857216835022, 0.2572588324546814, 0.10322961956262589, 0.128236323595047, 0.15292973816394806, -0.3812371492385864, -0.6438072919845581, 0.27281925082206726, 0.29503709077835083, 0.12211468070745468, 0.31201064586639404, 0.239572674036026, -0.06464262306690216, -0.23429961502552032, -0.20686142146587372, 0.11495457589626312, 0.3746166229248047, -0.38695845007896423, -0.07111577689647675, -0.44408902525901794, -0.1830899864435196, 0.3627059757709503, -0.06637820601463318, 0.10240455716848373, 0.16760151088237762, 0.6062601208686829, -0.16486625373363495, -0.014847409911453724, -0.02298109233379364, -0.3319789469242096, -0.23955672979354858, 0.24328656494617462, -0.18064847588539124, 0.05873917415738106, -0.20693695545196533, 0.033775463700294495, -0.010978895239531994, 0.03381097689270973, 0.1379666030406952, 0.09481882303953171, 0.18204104900360107, -0.09991263598203659, -0.07214731723070145, -0.2900979816913605, -0.287812739610672, 0.2695864737033844, 0.11586672812700272, 0.14432668685913086, 0.22151535749435425, 0.16247154772281647, -0.266771525144577, -0.1103883683681488, 0.43279534578323364, 0.11465328931808472, 0.3195900022983551, -0.07680005580186844, 0.15657459199428558, -0.4619992971420288, 0.002803903305903077, -0.18721528351306915, -0.04879290983080864, -0.14755301177501678, 0.015275063924491405, -0.14101943373680115, 0.22572758793830872, 0.12575849890708923, 0.1826208233833313, 0.050295185297727585, 0.12648113071918488, 0.32484108209609985, -0.37954631447792053, -0.5817651748657227, -0.18486571311950684, -0.30760231614112854, -0.10533230751752853, -0.435899019241333, 0.07136482000350952, 0.10091497749090195, 0.2504142224788666, 0.36180952191352844, -0.19320529699325562, 0.025705279782414436, 0.015263491310179234, -0.14403431117534637, 0.31889185309410095, -0.2956172823905945, 0.14146624505519867, -0.0681743174791336, 0.005594075191766024, 0.13546441495418549, -0.46723029017448425, 0.4003046751022339, 0.30377140641212463, 0.26530078053474426, -0.11570415645837784, 0.05661466345191002, -0.019400309771299362, -0.11069580912590027, 0.028393320739269257, 0.009022478945553303, -0.1758878231048584, -0.13309630751609802, -0.3292858898639679, -0.2976793646812439, 0.041711192578077316, -0.03334684297442436, -0.2163822054862976, 0.38297852873802185, 0.19383849203586578, -0.057032860815525055, 0.09285201132297516, -0.00999058224260807, 0.1568847894668579, 0.1519244760274887, 0.3009350895881653, -0.1289568543434143, 0.2094227373600006, 0.12469117343425751, 0.1637854278087616, 0.07533327490091324, 0.265268474817276, 0.1338891237974167, 0.12676085531711578, -0.36825019121170044, -0.4157409369945526, 0.41225191950798035, -0.5325069427490234, -0.7680293321609497, -0.010934942401945591, 0.2625085711479187, -0.14808036386966705, -0.18320123851299286, -0.0021347126457840204, -0.00009323058475274593, 0.03973400592803955, -0.20001652836799622, -0.1515328586101532, 0.0760934054851532, -0.3926730155944824, -0.014174317009747028, 0.20435960590839386, -0.061189234256744385, 0.3098514974117279, -0.12720292806625366, -0.206631600856781, -0.1201808899641037 ]