html_url
stringlengths
48
51
title
stringlengths
5
280
comments
stringlengths
63
51.8k
body
stringlengths
0
36.2k
comment_length
int64
16
1.52k
text
stringlengths
159
54.1k
embeddings
listlengths
768
768
https://github.com/huggingface/datasets/issues/2522
Documentation Mistakes in Dataset: emotion
@GDGauravDutta the dataset author replied in their issue: https://github.com/dair-ai/emotion_dataset/issues/2 > The dataset released is a preprocessed six emotion variant released for educational and research purposes. @albertovilla the dataset card was fixed with 6 emotions.
As per documentation, Dataset: emotion Homepage: https://github.com/dair-ai/emotion_dataset Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper. But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust.
34
Documentation Mistakes in Dataset: emotion As per documentation, Dataset: emotion Homepage: https://github.com/dair-ai/emotion_dataset Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper. But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust. @GDGauravDutta the dataset author replied in their issue: https://github.com/dair-ai/emotion_dataset/issues/2 > The dataset released is a preprocessed six emotion variant released for educational and research purposes. @albertovilla the dataset card was fixed with 6 emotions.
[ 0.16476677358150482, -0.36794936656951904, -0.14471958577632904, 0.5058469772338867, 0.20540285110473633, 0.10941148549318314, 0.2985420525074005, 0.09094993770122528, -0.07220064103603363, 0.18671059608459473, -0.11138284206390381, 0.05344624072313309, -0.1911199539899826, -0.10717710852622986, -0.09989190846681595, -0.15354864299297333, 0.012167207896709442, -0.02332340180873871, 0.28164902329444885, -0.13203227519989014, -0.03610171005129814, 0.2207885980606079, -0.027737241238355637, 0.17230136692523956, -0.4536609351634979, -0.10878448933362961, -0.2705228328704834, 0.02150232344865799, -0.1615610271692276, -0.4297904968261719, 0.09136520326137543, -0.0614544115960598, 0.0038094129413366318, 0.27133750915527344, -0.00010977697820635512, -0.11019878089427948, 0.28225648403167725, 0.07692405581474304, 0.04818885400891304, -0.24266959726810455, 0.21474477648735046, -0.27424266934394836, 0.3212473690509796, -0.07560182362794876, 0.002988230437040329, -0.49005603790283203, 0.047043606638908386, -0.025029554963111877, 0.5247897505760193, 0.5413994193077087, 0.21475215256214142, 0.15568315982818604, 0.19803525507450104, 0.19361278414726257, 0.34738463163375854, 0.4803885221481323, -0.03693000599741936, 0.05341698229312897, -0.09173369407653809, -0.038376033306121826, -0.21837803721427917, 0.3498418927192688, 0.17950452864170074, 0.10892908275127411, 0.08837339282035828, -0.19338580965995789, 0.2816515266895294, -0.6071292161941528, 0.1776895821094513, 0.1270306259393692, 0.3518331050872803, 0.02279149740934372, -0.3296763598918915, -0.06053375452756882, 0.07317507266998291, -0.16796627640724182, 0.2513711452484131, 0.27145513892173767, -0.07023289799690247, 0.05973641946911812, 0.11162255704402924, 0.14884501695632935, -0.13994967937469482, 0.3270232081413269, 0.040622279047966, 0.18592879176139832, -0.3207654356956482, -0.013189934194087982, -0.00301462784409523, -0.24890469014644623, 0.08129455894231796, 0.20813044905662537, -0.059932660311460495, 0.17745715379714966, -0.21567966043949127, 0.2181951403617859, -0.00345640629529953, -0.0013847053050994873, -0.029395006597042084, -0.27384644746780396, -0.030089441686868668, 0.19607654213905334, -0.06198522448539734, -0.1313922107219696, 0.5492396354675293, 0.06227762624621391, 0.12873870134353638, 0.12914150953292847, 0.19930876791477203, 0.1409301608800888, -0.007718969136476517, 0.0601310059428215, -0.10581299662590027, 0.02394237369298935, -0.027720129117369652, -0.35874778032302856, -0.05776805430650711, 0.13968314230442047, -0.4271254241466522, -0.00841860193759203, -0.1838187277317047, -0.34030380845069885, -0.1355898082256317, 0.35342806577682495, 0.0734194815158844, 0.31858405470848083, -0.13659413158893585, 0.09646447002887726, -0.001966673880815506, -0.451760858297348, -0.21595680713653564, 0.009070541709661484, -0.32293155789375305, -0.04333975166082382, 0.08848582208156586, -0.16919444501399994, 0.6907275319099426, 0.1554320603609085, -0.2348097413778305, -0.3460322618484497, 0.10874906182289124, -0.2076377123594284, 0.3264756202697754, 0.16222213208675385, -0.05567245930433273, 0.20507025718688965, 0.25935694575309753, -0.016445785760879517, 0.07051260024309158, 0.06726668775081635, -0.08845330029726028, -0.08800038695335388, -0.5279799103736877, 0.17853212356567383, -0.15662844479084015, 0.03773098066449165, 0.022252298891544342, 0.6001619696617126, 0.07895273715257645, 0.10854218900203705, 0.2061239778995514, -0.16493014991283417, 0.038271065801382065, -0.2369202971458435, 0.3179004192352295, 0.27443617582321167, -0.29623180627822876, -0.3708559572696686, -0.28686806559562683, -0.028599925339221954, 0.2118796706199646, 0.4225177764892578, -0.31658369302749634, 0.052298080176115036, -0.32227036356925964, 0.27258408069610596, 0.19800518453121185, -0.14308913052082062, -0.29133862257003784, 0.07406637072563171, 0.3124801516532898, 0.10126159340143204, -0.04985404759645462, 0.22763201594352722, 0.18473932147026062, 0.23147642612457275, 0.17678001523017883, -0.21775174140930176, 0.2815013527870178, 0.012638980522751808, -0.3833119869232178, -0.2242613285779953, 0.17830893397331238, 0.06770488619804382, -0.02738543227314949, -0.06374246627092361, 0.2792207896709442, -0.23583416640758514, 0.6401111483573914, -0.012751948088407516, -0.050072893500328064, 0.1854182928800583, 0.13788577914237976, 0.37808626890182495, 0.13126695156097412, -0.022439926862716675, -0.14882516860961914, -0.09448926150798798, 0.0331081748008728, 0.4570068120956421, 0.2935234308242798, -0.07801538705825806, -0.32043492794036865, -0.15148186683654785, -0.21632106602191925, -0.5002462863922119, 0.1960897594690323, 0.19523227214813232, -0.3085622489452362, 0.08261421322822571, -0.42415720224380493, 0.22840948402881622, -0.26997798681259155, 0.08362159132957458, -0.20773077011108398, 0.12594972550868988, -0.22499535977840424, -0.015354265458881855, 0.17937904596328735, 0.042992785573005676, 0.030217496678233147, 0.033508576452732086, -0.06400712579488754, 0.24158123135566711, 0.10914696753025055, 0.09645270556211472, 0.01311354711651802, -0.02452494204044342, 0.2954126000404358, -0.37897488474845886, 0.02849636599421501, 0.1388201266527176, -0.15591058135032654, 0.19759303331375122, -0.09924127906560898, 0.2950983941555023, 0.21329927444458008, -0.062411271035671234, 0.04943881183862686, 0.09956683218479156, 0.37189781665802, 0.30522575974464417, -0.4382876753807068, -0.4143752157688141, 0.10243596136569977, -0.2820507884025574, 0.1292818784713745, 0.056049104779958725, -0.23709648847579956, 0.24008551239967346, 0.26701828837394714, 0.13511039316654205, 0.1375502049922943, 0.23185297846794128, -0.4606667160987854, -0.4582909941673279, 0.03828524053096771, 0.0635225921869278, 0.20478135347366333, 0.25175219774246216, -0.12180662155151367, -0.14451085031032562, 0.019170816987752914, -0.1463753581047058, 0.24530351161956787, 0.1638977825641632, 0.14988401532173157, 0.01905807852745056, 0.17580054700374603, 0.11095427721738815, -0.37792813777923584, 0.08865900337696075, -0.0953231155872345, 0.3103252053260803, -0.48079097270965576, -0.2167295217514038, -0.12177855521440506, -0.3337767422199249, 0.14467959105968475, -0.07957744598388672, -0.10691878199577332, -0.24295058846473694, -0.0043404437601566315, -0.4194072186946869, -0.1776023805141449, 0.04801151156425476, -0.1794174760580063, 0.07230646908283234, -0.004228480160236359, 0.5217584371566772, -0.22132599353790283, -0.000788884237408638, -0.20421472191810608, 0.09840166568756104, -0.11404720693826675, 0.13152167201042175, 0.11368505656719208, -0.2527333199977875, -0.29535138607025146, -0.2201971709728241, -0.5232831239700317, 0.2921110987663269, -0.24490053951740265, 0.32137197256088257, 0.12462951242923737, -0.01943286508321762, -0.3357838988304138, -0.11720497906208038, 0.21395842730998993, -0.30254873633384705, -0.21415995061397552, -0.14020147919654846, -0.1298133283853531, 0.05674314126372337, 0.07187128067016602, -0.5632008910179138, -0.16724959015846252, -0.13941602408885956, 0.33472102880477905, -0.005826443433761597, 0.22451654076576233, 0.21394354104995728, 0.1233004778623581, 0.14651647210121155, -0.36610397696495056, -0.02696479670703411, -0.4076734483242035, -0.21659326553344727, 0.26229530572891235, -0.370273232460022, -0.4778643548488617, 0.16688857972621918, 0.0018523037433624268, 0.24006251990795135, -0.17738230526447296, -0.5895131826400757, -0.021516170352697372, -0.24960578978061676, 0.10539606213569641, 0.014961961656808853, 0.2280183881521225, -0.11444486677646637, -0.041682738810777664, -0.23631975054740906, 0.06514375656843185, -0.27113106846809387, -0.008951373398303986, -0.21590134501457214, 0.3984265923500061, -0.31091833114624023, 0.1145620346069336, 0.05329408124089241, 0.2724277973175049, 0.4330475628376007, -0.1788269430398941, 0.13317614793777466, -0.2642364501953125, 0.38892677426338196, 0.14764302968978882, -0.25294697284698486, 0.2497880458831787, -0.0717858374118805, 0.24380923807621002, 0.401783287525177, 0.005161501467227936, 0.02105008438229561, 0.0186736062169075, -0.07712075114250183, -0.38392046093940735, -0.2409314215183258, -0.014104673638939857, -0.3368172347545624, 0.3071633279323578, 0.12825912237167358, -0.13725368678569794, -0.030090821906924248, -0.11066959798336029, -0.03111596591770649, 0.19367311894893646, -0.004854284226894379, 0.11323440074920654, -0.18716272711753845, 0.2114461362361908, -0.36112430691719055, 0.10554216057062149, -0.07544975727796555, 0.2973490059375763, 0.05075736716389656, 0.06637852638959885, -0.043945491313934326, 0.21243546903133392, 0.40904468297958374, -0.021669866517186165, -0.12145847082138062, 0.11416015028953552, 0.22727763652801514, -0.6147844791412354, 0.024164211004972458, -0.19451357424259186, 0.19970199465751648, 0.3826295733451843, 0.47063034772872925, -0.04899676516652107, -0.06732253730297089, 0.2420165240764618, -0.08696681261062622, -0.07414752244949341, -0.17850394546985626, -0.38673490285873413, -0.32057109475135803, -0.12923400104045868, -0.26965299248695374, 0.19985155761241913, -0.16886650025844574, -0.14847350120544434, -0.0675690770149231, -0.012975657358765602, 0.010942570865154266, 0.09931345283985138, 0.0650845319032669, 0.2496296465396881, -0.03835628181695938, 0.03255518898367882, 0.4679737687110901, 0.356356680393219, -0.008970949798822403, 0.4335005581378937, 0.018193161115050316, -0.5911470651626587, 0.09680546820163727, -0.26218026876449585, -0.07942239195108414, 0.1598697006702423, -0.10789315402507782, -0.09807870537042618, 0.12111948430538177, 0.16606244444847107, 0.05963381379842758, 0.19437342882156372, 0.6158115267753601, 0.038751497864723206, 0.0764845535159111, -0.38942569494247437, 0.2399633526802063, -0.02335660718381405, 0.046071767807006836, -0.053247757256031036, 0.6361292600631714, -0.07576359808444977, 0.2728346586227417, 0.24393609166145325, 0.8155564665794373, 0.07772335410118103, 0.1565251648426056, 0.3102867305278778, 0.014608211815357208, 0.5044809579849243, -0.08351631462574005, 0.041275471448898315, -0.33219480514526367, 0.2352243959903717, -0.012329574674367905, 0.07126250863075256, -0.09757623821496964, 0.28734755516052246, -0.1946905255317688, 0.06577418744564056, 0.030890613794326782, 0.003231894224882126, 0.14344100654125214, 0.18326541781425476, -0.21307282149791718, 0.10026633739471436, -0.3256221413612366, 0.2002389281988144, -0.0676521435379982, 0.23776915669441223, 0.11242201179265976, 0.03174659609794617, -0.08577167242765427, -0.1584986448287964, -0.49644309282302856, -0.22959506511688232, -0.7076804637908936, -0.03510585427284241, -0.24951478838920593, 0.04843686521053314, 0.29697293043136597, 0.4461647868156433, 0.47869592905044556, -0.16685225069522858, 0.03174944967031479, 0.07873117923736572, 0.013201229274272919, -0.28835415840148926, 0.04704046621918678, 0.006522615440189838, 0.22293721139431, -0.09654077887535095, -0.4257071614265442, 0.22731724381446838, -0.0717618465423584, 0.14401575922966003, -0.3009514808654785, -0.03338690102100372, -0.19406430423259735, -0.21453002095222473, 0.1322401612997055, -0.12943170964717865, -0.26584264636039734, -0.21713727712631226, 0.15785640478134155, 0.12102578580379486, 0.03983396291732788, 0.06730268150568008, 0.03423571586608887, -0.14874815940856934, -0.17746374011039734, 0.047309014946222305, -0.1683550477027893, -0.4146466553211212, 0.4862731397151947, 0.23963432013988495, -0.1496405303478241, -0.2563997507095337, 0.09046710282564163, 0.25173425674438477, -0.5073631405830383, 0.09900316596031189, -0.12319987267255783, -0.09450343251228333, -0.11907355487346649, 0.3524787127971649, 0.10028006136417389, 0.20487862825393677, -0.08343978226184845, -0.2516370415687561, -0.31190064549446106, 0.35049527883529663, -0.008531209081411362, 0.07479950785636902, -0.08708244562149048, -0.2303745299577713, 0.18272894620895386, 0.17410467565059662, -0.33818379044532776, 0.03543393313884735, 0.0863991230726242, -0.05902298539876938, 0.05690630525350571, -0.09726030379533768, 0.20677511394023895, -0.030287737026810646, 0.1228141337633133, 0.033372148871421814, 0.2432125210762024, -0.21925312280654907, -0.0983906090259552, 0.14091801643371582, 0.07399880141019821, -0.1287214756011963, 0.006596031598746777, -0.07759895920753479, -0.09794139862060547, -0.11487863957881927, 0.15936964750289917, 0.3731018900871277, 0.08880317211151123, 0.4175449013710022, -0.38926026225090027, 0.004442624747753143, 0.2823025584220886, -0.19870539009571075, 0.2333296686410904, 0.3954308032989502, 0.32510504126548767, 0.08453337103128433, 0.19254715740680695, -0.09568391740322113, -0.02643236517906189, 0.1082538589835167, -0.08734196424484253, 0.2747921347618103, 0.015185210853815079, -0.4097124934196472, -0.0073607973754405975, -0.1780249923467636, 0.2897806763648987, 0.2426617443561554, -0.3028166592121124, 0.08083600550889969, 0.0464712493121624, 0.25299471616744995, -0.39333605766296387, 0.054802194237709045, -0.34999656677246094, -0.19759787619113922, 0.17402133345603943, 0.06218654662370682, 0.1404094249010086, 0.12121829390525818, -0.14780734479427338, -0.040145739912986755, 0.23243851959705353, -0.2989344000816345, 0.23246155679225922, -0.029847409576177597, -0.3575129508972168, -0.033747125416994095, 0.2893884778022766, 0.13729019463062286, 0.1137201264500618, 0.34375298023223877, 0.1386912614107132, 0.3608751893043518, 0.1220332607626915, 0.20632460713386536, 0.28273478150367737, 0.00598304346203804, 0.2125455141067505, 0.1457844078540802, -0.36583805084228516, 0.2127377688884735, -0.0731324702501297, 0.5998339653015137, 0.08232980966567993, 0.02762223780155182, -0.05765918642282486, -0.10478833317756653, -0.0006708018481731415, 0.01341169886291027, -0.05959213897585869, -0.26079827547073364, -0.3715828061103821, -0.1484513133764267, -0.2076490819454193, -0.22158430516719818, -0.1317521035671234, 0.21407550573349, -0.4027059078216553, -0.5093278288841248, 0.16435569524765015, 0.3390510380268097, 0.4244065284729004, -0.06309425830841064, 0.2057841569185257, 0.42464280128479004, -0.11630572378635406, 0.02818065881729126, 0.38404956459999084, 0.5711355805397034, 0.28529784083366394, 0.12222222983837128, 0.06023610383272171, -0.10903942584991455, -0.19008533656597137, 0.014566522091627121, 0.07164379954338074, 0.32939672470092773, -0.3029434382915497, -0.054547782987356186, 0.11674222350120544, -0.23320971429347992, 0.03743205592036247, 0.08161748945713043, 0.5861098766326904, -0.13781991600990295, 0.2668667733669281, -0.6251012086868286, -0.18252816796302795, -0.1321401745080948, -0.04558809846639633, -0.42679959535598755, 0.09899625182151794, 0.3559408187866211, 0.08189112693071365, 0.09046530723571777, -0.24293914437294006, 0.13151496648788452, -0.26857009530067444, 0.3121400475502014, 0.3404007852077484, 0.02017039805650711, -0.04911603778600693, -0.1619987189769745, -0.5919830203056335, 0.06200170889496803, 0.14590854942798615, -0.20655125379562378, -0.015593774616718292, 0.2979433536529541, 0.11144106835126877, 0.06730028986930847, 0.3821972608566284, -0.11609631776809692, 0.2099066823720932, 0.08347702026367188, -0.0021616965532302856, 0.028760835528373718, -0.07660813629627228, 0.554458737373352, 0.15050552785396576, 0.12418440729379654, 0.13906894624233246, 0.18352389335632324, -0.034912921488285065, -0.19705837965011597, 0.09847605228424072, 0.10284323990345001, -0.22638928890228271, 0.03287636116147041, 0.32652679085731506, 0.15539182722568512, -0.11545117199420929, -0.32912465929985046, -0.4306444823741913, -0.1153961718082428, -0.10912362486124039, 0.35497811436653137, 0.16780996322631836, 0.44379499554634094, -0.04551442712545395, -0.3659142255783081, -0.32306209206581116, -0.1459966003894806, 0.006168227642774582, -0.2894366383552551, -0.2113899290561676, 0.1445336490869522, 0.300121933221817, -0.15958599746227264, 0.05800012871623039, 0.2298315167427063, -0.14026334881782532, -0.08734236657619476, -0.321481317281723, -0.3622071444988251, 0.27006983757019043, -0.41270577907562256, 0.09549593925476074, -0.08036670833826065, 0.29468297958374023, 0.5033182501792908, -0.14246629178524017, -0.8076491951942444, 0.06741424649953842, 0.4288129508495331, 0.13591209053993225, -0.24236337840557098, -0.019600383937358856, -0.028289400041103363, 0.13596321642398834, 0.0094991996884346, 0.43463265895843506, 0.30447956919670105, 0.018557636067271233, 0.027559857815504074, -0.09252499043941498 ]
https://github.com/huggingface/datasets/issues/2520
Datasets with tricky task templates
The `task_templates` API is deprecated in favor of the `train-eval-index` YAML field, so I'm closing this issue.
I'm collecting a list of datasets here that don't follow the "standard" taxonomy and require further investigation to implement task templates for. ## Text classification * [hatexplain](https://huggingface.co/datasets/hatexplain): ostensibly a form of text classification, but not in the standard `(text, target)` format and each sample appears to be tokenized. * [muchocine](https://huggingface.co/datasets/muchocine): contains two candidate text columns (long-form and summary) which in principle requires two `TextClassification` templates which is not currently supported
17
Datasets with tricky task templates I'm collecting a list of datasets here that don't follow the "standard" taxonomy and require further investigation to implement task templates for. ## Text classification * [hatexplain](https://huggingface.co/datasets/hatexplain): ostensibly a form of text classification, but not in the standard `(text, target)` format and each sample appears to be tokenized. * [muchocine](https://huggingface.co/datasets/muchocine): contains two candidate text columns (long-form and summary) which in principle requires two `TextClassification` templates which is not currently supported The `task_templates` API is deprecated in favor of the `train-eval-index` YAML field, so I'm closing this issue.
[ -0.03939235210418701, -0.32445311546325684, -0.03652850538492203, 0.1113019585609436, -0.03561592102050781, 0.13298708200454712, 0.28443896770477295, 0.11379304528236389, 0.08774793148040771, -0.21078746020793915, 0.11740934103727341, 0.2974025309085846, -0.30085912346839905, 0.2331097275018692, 0.040300022810697556, -0.17447195947170258, 0.1557386815547943, -0.2585572302341461, 0.17751266062259674, 0.03215654939413071, -0.10243262350559235, 0.014322012662887573, -0.05834772437810898, 0.17261426150798798, -0.24217548966407776, -0.23058387637138367, -0.23423324525356293, -0.011343061923980713, -0.012044336646795273, 0.1762828826904297, 0.38445091247558594, 0.12234541773796082, 0.09208857268095016, 0.4282182455062866, -0.00010313488019164652, -0.1379213035106659, -0.15897081792354584, -0.10181874781847, -0.15609310567378998, -0.23429618775844574, -0.1320374608039856, -0.34685927629470825, -0.08490460366010666, -0.08276800811290741, -0.1978527009487152, -0.12281908839941025, 0.2184334099292755, 0.11100161075592041, 0.4850718379020691, 0.124597929418087, 0.2697490453720093, 0.00985771231353283, -0.4725976586341858, -0.3238905966281891, 0.08552780747413635, 0.5295366644859314, -0.45290952920913696, -0.09049667418003082, 0.660618782043457, -0.16756531596183777, 0.036965299397706985, 0.29318925738334656, -0.14730364084243774, -0.08965162932872772, 0.23502740263938904, -0.08949903398752213, 0.06988327205181122, -0.3887174129486084, -0.04437938332557678, 0.40297019481658936, 0.38989168405532837, -0.12537270784378052, -0.302914559841156, -0.4451311230659485, -0.17104659974575043, 0.0816776379942894, -0.10236050933599472, 0.11149869114160538, -0.05581606179475784, 0.16855964064598083, 0.18081283569335938, -0.13808417320251465, -0.011426042765378952, -0.17391842603683472, -0.04571632295846939, 0.02633281797170639, -0.03381572663784027, -0.2163510024547577, -0.09363508224487305, -0.2742041349411011, 0.08777308464050293, -0.3191855847835541, 0.1489911526441574, 0.27985718846321106, -0.2144085019826889, -0.2808743119239807, 0.03432084992527962, -0.22538337111473083, 0.09199173748493195, 0.22365674376487732, 0.29036933183670044, 0.06525718420743942, 0.01613854616880417, 0.19195827841758728, 0.08727496862411499, 0.015316342934966087, 0.04312239587306976, -0.030755847692489624, 0.09173611551523209, -0.15101167559623718, 0.07392965257167816, 0.038697727024555206, -0.46013614535331726, 0.03781286999583244, 0.10977068543434143, -0.03951207920908928, 0.014133945107460022, -0.09739840775728226, -0.3799070119857788, -0.008349386043846607, -0.0044275932013988495, 0.16779272258281708, 0.1362677961587906, 0.07591544836759567, -0.11215982586145401, -0.07355541735887527, -0.3121402859687805, 0.13029177486896515, -0.13538551330566406, 0.08102921396493912, -0.13781815767288208, 0.014792711474001408, -0.1857225000858307, -0.09660162031650543, 0.4174259603023529, -0.12593205273151398, 0.07207776606082916, 0.13198435306549072, 0.13972750306129456, 0.1848786473274231, 0.12495896220207214, -0.06705335527658463, 0.07838205993175507, 0.09354899823665619, -0.23508445918560028, 0.09019060432910919, -0.04298374429345131, 0.06650735437870026, -0.2092227041721344, 0.11929117143154144, -0.2650405764579773, -0.2650570571422577, 0.4556410312652588, 0.2486833781003952, -0.23776912689208984, -0.1787712723016739, -0.450460284948349, 0.49705103039741516, 0.012729033827781677, 0.4342745840549469, -0.0519619956612587, -0.21132975816726685, 0.22861257195472717, -0.03647969663143158, -0.04172782972455025, 0.14664609730243683, -0.025603996589779854, -0.2418525665998459, -0.08137299865484238, 0.07030405104160309, -0.021779656410217285, 0.42076534032821655, 0.18112163245677948, 0.18272602558135986, -0.0776028037071228, 0.31978410482406616, 0.24627205729484558, -0.2676599323749542, 0.1701173633337021, 0.17877723276615143, -0.11091668903827667, 0.24584101140499115, 0.15375201404094696, -0.08004014194011688, 0.2592211067676544, -0.4623726010322571, 0.06671842187643051, 0.24470345675945282, -0.1316743642091751, -0.19247528910636902, -0.14128926396369934, 0.03198479861021042, 0.2778102159500122, 0.22968949377536774, 0.34504246711730957, -0.17986750602722168, -0.28874486684799194, 0.22508227825164795, -0.10405140370130539, -0.10615980625152588, -0.16291305422782898, -0.09664468467235565, 0.1598634570837021, 0.023470822721719742, 0.19677600264549255, -0.28588953614234924, -0.4419846534729004, 0.04025191813707352, 0.22165629267692566, 0.1549845039844513, 0.2906823754310608, -0.10352461040019989, -0.26982831954956055, -0.10560713708400726, -0.03559071198105812, -0.08332054316997528, 0.12573057413101196, -0.18370625376701355, -0.0743730366230011, -0.39187362790107727, -0.1622651070356369, 0.12551400065422058, -0.4628082811832428, 0.16514866054058075, 0.26395100355148315, -0.043462954461574554, 0.16326077282428741, -0.043349385261535645, 0.034160956740379333, 0.29531529545783997, 0.0012717768549919128, -0.22530199587345123, 0.40141692757606506, -0.04033642262220383, 0.13558831810951233, -0.11210373044013977, -0.08093581348657608, 0.48529279232025146, -0.04536024481058121, -0.2906663417816162, -0.038124166429042816, 0.052425283938646317, 0.030430741608142853, -0.2564953863620758, -0.3060060143470764, 0.21933269500732422, 0.04205504432320595, 0.4422096014022827, 0.03243023902177811, 0.03638844192028046, 0.279615581035614, -0.036760054528713226, -0.25742650032043457, 0.248611718416214, 0.5038420557975769, -0.11955100297927856, 0.0009924732148647308, -0.1274290680885315, -0.577774703502655, 0.1876266598701477, 0.13286131620407104, -0.058199115097522736, 0.22374755144119263, 0.09624546021223068, -0.13686221837997437, 0.11564651876688004, -0.12780055403709412, -0.2349054515361786, -0.030117467045783997, 0.249330073595047, 0.042783960700035095, 0.010352001525461674, -0.4101501703262329, -0.3560880124568939, 0.10511931777000427, 0.05781331658363342, -0.10750234872102737, -0.028934471309185028, 0.37475118041038513, -0.0039617521688342094, -0.11645899713039398, -0.22761043906211853, 0.0741751492023468, -0.1270490288734436, -0.27376097440719604, 0.2192968875169754, -0.053912192583084106, -0.33580029010772705, -0.2331315129995346, 0.06623577326536179, 0.027800876647233963, -0.3760918974876404, 0.44788414239883423, -0.01294298842549324, -0.16410182416439056, 0.3481159210205078, 0.16443529725074768, 0.49838101863861084, -0.5667555928230286, 0.06051710993051529, -0.22758032381534576, -0.398075670003891, -0.14388921856880188, 0.2861132025718689, 0.18102993071079254, -0.1261734515428543, 0.5239199995994568, -0.4314751923084259, 0.1856343299150467, -0.14123868942260742, -0.5652658939361572, 0.22607575356960297, -0.06434284150600433, 0.46695461869239807, -0.1222698837518692, 0.12891776859760284, -0.22183775901794434, 0.04689839482307434, -0.00024883344303816557, 0.06580625474452972, -0.036535583436489105, -0.0023873522877693176, -0.08524299412965775, 0.057500023394823074, -0.177526593208313, -0.4770534336566925, -0.21752530336380005, -0.12094990909099579, 0.25271356105804443, -0.007679648697376251, 0.06668931245803833, 0.714540958404541, -0.1602281928062439, 0.027943577617406845, 0.12190832942724228, 0.10625865310430527, -0.14544127881526947, -0.08262410014867783, 0.3712427318096161, -0.24091117084026337, -0.19835203886032104, -0.026415660977363586, -0.10535334795713425, -0.02603139355778694, 0.4689108729362488, 0.07202352583408356, 0.1320030689239502, 0.14136409759521484, -0.07437136769294739, 0.1695459485054016, -0.22757472097873688, 0.12913724780082703, 0.0013518144842237234, -0.035664159804582596, -0.1432054042816162, 0.13711874186992645, 0.16517500579357147, -0.06467392295598984, 0.14202803373336792, -0.14229252934455872, 0.052011094987392426, 0.18137748539447784, 0.6927947998046875, -0.13263273239135742, 0.06544242054224014, -0.02143048495054245, 0.19343547523021698, 0.10654708743095398, -0.024811848998069763, -0.3026883900165558, 0.05964593216776848, 0.0018577128648757935, 0.0064951032400131226, 0.1856888234615326, 0.3031419515609741, 0.030044429004192352, 0.06888924539089203, 0.05019969865679741, -0.008394729346036911, -0.08078660070896149, 0.3106343448162079, -0.11207030713558197, 0.36894941329956055, 0.21898072957992554, 0.12420477718114853, -0.27507609128952026, -0.20604494214057922, -0.05609967187047005, 0.5866355895996094, 0.1861964464187622, 0.0692480057477951, -0.21835337579250336, 0.2551271617412567, -0.3234398365020752, 0.027574285864830017, -0.0010442378697916865, 0.11186348646879196, -0.2916892468929291, 0.007005415856838226, -0.15571440756320953, 0.042334191501140594, 0.23862367868423462, -0.3042658269405365, 0.07186979800462723, 0.39397165179252625, -0.14012888073921204, -0.1719294637441635, -0.3067567050457001, -0.5044865608215332, 0.14374937117099762, 0.3855201005935669, 0.6121475100517273, -0.1767514944076538, -0.22347888350486755, -0.2650289237499237, 0.0400085411965847, -0.10485516488552094, -0.0992233008146286, 0.1017659604549408, -0.3145694434642792, 0.1470727175474167, 0.31553423404693604, 0.5555502772331238, 0.04984862729907036, -0.01627351902425289, 0.11883078515529633, -0.441726416349411, 0.09352923929691315, 0.564868688583374, 0.11408892273902893, -0.24846085906028748, -0.06006825342774391, 0.2675737738609314, -0.048572055995464325, 0.20790046453475952, 0.17181842029094696, 0.08303545415401459, -0.23243379592895508, -0.2530956268310547, 0.1151459664106369, -0.26451945304870605, 0.494000107049942, 0.23461638391017914, 0.070135697722435, 0.2342289686203003, -0.343425989151001, -0.20949618518352509, -0.4545235335826874, 0.39022985100746155, 0.14912202954292297, 0.05424177646636963, -0.5995537042617798, -0.6053001880645752, 0.23896139860153198, 0.5953745245933533, -0.35193055868148804, 0.22373095154762268, -0.2648359537124634, -0.29835113883018494, 0.02908749133348465, 0.1480044424533844, 0.8215356469154358, -0.08409665524959564, 0.06589879095554352, 0.04262536019086838, -0.16575448215007782, 0.3681989908218384, -0.34163975715637207, 0.20223549008369446, -0.16281895339488983, -0.23448488116264343, 0.038885362446308136, -0.2076394110918045, 0.08953925967216492, 0.5580699443817139, 0.06344491243362427, 0.39265093207359314, -0.0761064812541008, 0.46864429116249084, -0.04733327031135559, 0.04610539972782135, -0.04530789703130722, -0.3458501696586609, -0.3351021111011505, 0.22574499249458313, 0.16595834493637085, 0.0738508477807045, -0.2762579619884491, 0.0724792629480362, -0.008593060076236725, -0.01914362423121929, -0.3921582102775574, -0.05143974721431732, 0.24723251163959503, -0.14703378081321716, 0.24458777904510498, -0.47602206468582153, 0.48829910159111023, -0.397178590297699, 0.23407787084579468, -0.0008404850959777832, -0.2201116979122162, 0.009198466315865517, -0.27495792508125305, 0.00038907930138520896, -0.020805181935429573, -0.2375887930393219, 0.5383689403533936, 0.016918689012527466, 0.2677842080593109, -0.11097491532564163, 0.07958107441663742, 0.3579971194267273, -0.47274941205978394, -0.2546957731246948, 0.10064826160669327, -0.2116485983133316, 0.18252910673618317, -0.0974591076374054, 0.16962163150310516, -0.13164275884628296, 0.2024088054895401, -0.008222386240959167, 0.2828471064567566, 0.18398769199848175, 0.12983666360378265, 0.20982632040977478, -0.1670253425836563, -0.1862480342388153, 0.16383090615272522, -0.17245033383369446, 0.32715699076652527, 0.3908103108406067, -0.10144423693418503, -0.4565765857696533, 0.20122084021568298, 0.3963988721370697, -0.309976726770401, 0.28435784578323364, -0.10656378418207169, -0.4294164180755615, 0.08884920179843903, 0.579524576663971, 0.3035131096839905, -0.4145009219646454, -0.024289755150675774, -0.3431161940097809, -0.04186214879155159, 0.2510016858577728, -0.04493580386042595, 0.015811055898666382, -0.1907970905303955, 0.15483810007572174, 0.13611279428005219, 0.019524551928043365, -0.43354636430740356, -0.002284377347677946, -0.08922000974416733, 0.12019230425357819, -0.08732640743255615, 0.16974888741970062, 0.1500931829214096, -0.006737301591783762, 0.011947983875870705, 0.16542761027812958, -0.1529771387577057, -0.28532832860946655, -0.2882345914840698, 0.09813151508569717, 0.016491474583745003, 0.07064612954854965, 0.20947539806365967, 0.19185344874858856, -0.0413391999900341, -0.1794055551290512, -0.21267415583133698, 0.03864794969558716, 0.10480228066444397, 0.16260424256324768, 0.03504103422164917, 0.3231772780418396, 0.04045183211565018, -0.03628259897232056, -0.011395551264286041, 0.18436920642852783, 0.10432073473930359, -0.12784941494464874, 0.19363656640052795, 0.05911870300769806, -0.14990802109241486, 0.21774685382843018, 0.3629131317138672, -0.09647589176893234, 0.07634106278419495, 0.11779722571372986, 0.20503538846969604, 0.21149174869060516, -0.05093447118997574, 0.22527001798152924, 0.11703211814165115, -0.10529167950153351, 0.3915500342845917, 0.27842360734939575, -0.20138908922672272, 0.029939740896224976, 0.19018395245075226, 0.21424511075019836, -0.07277397811412811, 0.3328627049922943, 0.1352945864200592, 0.11845926940441132, -0.09850175678730011, 0.03447047248482704, 0.49345341324806213, -0.06537915766239166, 0.2673260569572449, 0.07031311839818954, 0.24966444075107574, 0.16790799796581268, 0.2646404206752777, -0.12230266630649567, 0.1455337107181549, -0.014486320316791534, 0.17715024948120117, 0.28920331597328186, 0.09135600924491882, 0.13981600105762482, 0.30618536472320557, -0.09939120709896088, -0.11621107161045074, 0.21934626996517181, 0.4300021529197693, 0.2780430018901825, -0.10711455345153809, 0.3221331238746643, 0.010026978328824043, 0.06485584378242493, -0.19238370656967163, 0.14813880622386932, -0.295631468296051, -0.21760332584381104, 0.0004381798207759857, -0.39561909437179565, 0.026020459830760956, -0.23702754080295563, -0.228257954120636, -0.17832601070404053, 0.3768042027950287, -0.35559242963790894, 0.21478064358234406, -0.03847756236791611, 0.13898766040802002, 0.1888846457004547, 0.2443864345550537, -0.07712645828723907, -0.002203458920121193, -0.08184446394443512, -0.17465746402740479, 0.2129242867231369, 0.3639461398124695, 0.15914106369018555, 0.05431104078888893, -0.11683270335197449, -0.11624447256326675, -0.44086703658103943, -0.12297225743532181, -0.017510203644633293, 0.4641147553920746, -0.1551055610179901, -0.12287051975727081, 0.19435234367847443, 0.14000050723552704, -0.15601609647274017, 0.11049675941467285, 0.16563402116298676, -0.3643892705440521, -0.3001976013183594, 0.44536933302879333, 0.025664616376161575, -0.14008347690105438, 0.18784211575984955, 0.0652410089969635, 0.06456539779901505, -0.0882091298699379, 0.35796234011650085, 0.22176073491573334, 0.08120199292898178, -0.02530013769865036, 0.1424894630908966, 0.09467558562755585, 0.634014904499054, 0.0710565447807312, -0.08355294913053513, -0.10142010450363159, 0.03270581364631653, -0.3061399459838867, 0.05454553663730621, -0.37345126271247864, -0.1493096500635147, 0.06829378753900528, -0.15021081268787384, 0.2817203998565674, 0.30419492721557617, -0.27355748414993286, 0.3994786739349365, -0.01671389676630497, 0.06936652958393097, -0.5785657167434692, -0.07928293943405151, 0.20647846162319183, 0.05220656096935272, 0.16075365245342255, 0.018643222749233246, -0.11740157008171082, 0.11671143770217896, 0.0923151895403862, -0.27299219369888306, -0.2059551626443863, 0.161544531583786, 0.03641410171985626, 0.3615743815898895, 0.12152328342199326, 0.15811358392238617, 0.06299389153718948, -0.19503691792488098, -0.0539482943713665, -0.22504864633083344, -0.16371159255504608, 0.3861229121685028, -0.16573737561702728, -0.11732425540685654, -0.30055761337280273, -0.12049272656440735, 0.14900316298007965, -0.22911962866783142, -0.05688788369297981, -0.0705290287733078, -0.36858245730400085, 0.1879827082157135, -0.2624967694282532, -0.06349068880081177, -0.003959146328270435, 0.30519983172416687, -0.09098654985427856, -0.16268758475780487, -0.03305970877408981, -0.46697676181793213, 0.15665607154369354, -0.3420223295688629, -0.32232049107551575, -0.321248859167099, 0.11305961012840271, 0.26408445835113525, 0.28184837102890015, -0.6002398133277893, -0.23301973938941956, 0.28396329283714294, -0.014115884900093079, 0.14639919996261597, 0.020546533167362213, 0.14630717039108276, -0.29500460624694824, -0.28119394183158875, 0.12024993449449539, -0.12183300405740738, -0.21116699278354645, -0.12588398158550262, -0.3319486379623413 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call. Why do you change an attribute of your tokenizer when `__getstate__` is called ?
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
46
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call. Why do you change an attribute of your tokenizer when `__getstate__` is called ?
[ -0.22488713264465332, 0.19312027096748352, 0.11275309324264526, 0.028775177896022797, 0.0341956727206707, -0.3237704038619995, 0.13853615522384644, 0.1950846165418625, 0.3468085527420044, -0.10001799464225769, 0.1921815425157547, 0.7253848910331726, -0.1929599940776825, 0.20866984128952026, -0.001619015820324421, 0.05957880616188049, 0.07051892578601837, -0.03540760278701782, -0.005137868225574493, -0.06401272863149643, -0.21730102598667145, 0.05091632530093193, -0.3579757809638977, 0.1536131352186203, -0.27659493684768677, -0.1768151819705963, 0.025939466431736946, 0.11868840456008911, -0.029984423890709877, -0.27113622426986694, 0.2045455276966095, -0.07879392802715302, -0.02770550549030304, 0.24116593599319458, -0.00012316943320911378, -0.08011488616466522, 0.016193952411413193, -0.08638330549001694, -0.004162696190178394, -0.21759964525699615, -0.2230958342552185, -0.12397699058055878, -0.12354379892349243, -0.22941333055496216, 0.07815740257501602, 0.0024629193358123302, -0.296572744846344, -0.381381094455719, 0.634201169013977, 0.43187248706817627, 0.1199069619178772, 0.3648693859577179, -0.06786841154098511, -0.03467929735779762, -0.13554930686950684, 0.3100193738937378, 0.05284782499074936, 0.22330258786678314, 0.12532669305801392, -0.3918122947216034, -0.0012148618698120117, 0.09562961757183075, -0.1981256902217865, -0.21600982546806335, 0.15275095403194427, 0.059106867760419846, 0.18381036818027496, 0.010621657595038414, -0.00867847353219986, 0.09299489855766296, 0.21699771285057068, -0.3573750853538513, -0.21202927827835083, -0.3761960566043854, -0.05751432850956917, -0.15050067007541656, 0.3402036428451538, -0.21683929860591888, 0.13164900243282318, 0.1427592635154724, -0.04848417267203331, -0.10448584705591202, 0.22394061088562012, 0.3518484830856323, -0.03908190131187439, 0.2571777403354645, -0.016609180718660355, 0.39841291308403015, -0.053679075092077255, -0.10632318258285522, -0.18072612583637238, -0.10334429144859314, 0.10165417194366455, 0.45161744952201843, -0.011211026459932327, -0.23849086463451385, 0.21055102348327637, -0.21233049035072327, -0.02430841512978077, 0.21151110529899597, -0.1638643592596054, 0.12254857271909714, -0.36412835121154785, 0.26401758193969727, 0.4708406627178192, 0.221218079328537, 0.12371267378330231, 0.6363039612770081, 0.19857078790664673, -0.16029226779937744, -0.300045371055603, 0.0745258629322052, 0.31024879217147827, -0.10113582015037537, -0.03733978047966957, 0.17564761638641357, -0.10271654278039932, -0.12865214049816132, -0.07385320961475372, 0.27302226424217224, -0.7321613430976868, 0.008305802941322327, 0.18209140002727509, 0.12161961197853088, -0.0009520143503323197, -0.22241070866584778, -0.08313730359077454, 0.07775574922561646, -0.21585707366466522, 0.11480893939733505, -0.11857537925243378, 0.12424914538860321, -0.34277763962745667, 0.11042297631502151, -0.043260108679533005, 0.05694539099931717, 0.31752410531044006, 0.12566952407360077, -0.16883859038352966, -0.059651099145412445, 0.15125079452991486, -0.22944840788841248, 0.40169721841812134, -0.019703704863786697, -0.23601506650447845, 0.04248565435409546, 0.3069401979446411, -0.44203174114227295, -0.2555749714374542, -0.05922709405422211, -0.15265679359436035, -0.14126364886760712, -0.03863443434238434, 0.03472519665956497, -0.23729652166366577, -0.004718184471130371, -0.30469033122062683, 0.10288913547992706, 0.3713425397872925, -0.2058529555797577, 0.09886627644300461, -0.5015785694122314, -0.35631099343299866, -0.20766372978687286, 0.008802365511655807, 0.17747828364372253, -0.4386507272720337, -0.24340401589870453, -0.0980323776602745, 0.15207865834236145, 0.33570683002471924, 0.12456782162189484, -0.2613389790058136, 0.6007260680198669, -0.4962502419948578, 0.8756878972053528, 0.28696486353874207, -0.14862662553787231, -0.40101107954978943, 0.03295411169528961, -0.17289479076862335, 0.2320755571126938, -0.6788747906684875, -0.10385710000991821, 0.16501542925834656, -0.0797584280371666, 0.11381682008504868, 0.33886420726776123, 0.1549207717180252, -0.09533248841762543, -0.12822023034095764, 0.06443098932504654, 0.32686543464660645, -0.2837596833705902, 0.07034898549318314, -0.009695656597614288, 0.16244396567344666, -0.21676307916641235, 0.2174031138420105, 0.034307435154914856, 0.18434275686740875, -0.1125897467136383, 0.4559538960456848, 0.17644348740577698, -0.12051013857126236, -0.31562530994415283, -0.1837683618068695, 0.3253227174282074, -0.028087375685572624, -0.02687976509332657, -0.11929529905319214, -0.08291018009185791, -0.1131267175078392, 0.05602207034826279, -0.33992552757263184, -0.24335622787475586, 0.029902484267950058, 0.02431396394968033, 0.23357683420181274, 0.17532914876937866, -0.08356530964374542, -0.24794542789459229, -0.050614647567272186, 0.060971543192863464, -0.055893149226903915, 0.056883424520492554, 0.12517838180065155, -0.26861512660980225, -0.3178900182247162, 0.16740426421165466, 0.40873536467552185, -0.09793613106012344, -0.18483799695968628, 0.276186466217041, 0.5985629558563232, -0.2991654872894287, -0.39626002311706543, -0.18160812556743622, -0.10411582142114639, 0.1290629804134369, -0.23568862676620483, 0.1717510223388672, -0.002784447744488716, -0.2309010624885559, -0.02569672465324402, 0.5132233500480652, 0.24769341945648193, 0.3112371265888214, -0.4027116894721985, 0.25161805748939514, -0.012304926291108131, -0.08680543303489685, -0.14821769297122955, -0.33737656474113464, -0.26279139518737793, 0.03733229637145996, 0.3305850625038147, -0.13446249067783356, -0.036491602659225464, 0.04074431210756302, 0.3557881712913513, -0.07353569567203522, 0.32570719718933105, -0.06443044543266296, -0.19810616970062256, -0.19068068265914917, 0.29802316427230835, 0.3740842938423157, 0.5166625380516052, -0.10923230648040771, -0.057224374264478683, 0.08503767848014832, -0.04589064046740532, -0.04900103062391281, 0.016840867698192596, -0.17222784459590912, -0.03786509111523628, 0.19884783029556274, 0.048589352518320084, -0.0998985543847084, -0.1812920868396759, 0.009794287383556366, 0.05627928674221039, 0.2922278940677643, -0.2386675626039505, 0.09624142944812775, -0.5637152791023254, 0.07098772376775742, -0.2885974049568176, -0.13038377463817596, 0.007215343415737152, -0.44396114349365234, -0.21197105944156647, 0.0941518098115921, -0.2360060214996338, 0.21823422610759735, -0.16105017066001892, -0.15978236496448517, -0.1504625827074051, -0.28893688321113586, 0.0986512154340744, -0.234613299369812, -0.22342288494110107, -0.08644011616706848, 0.12882214784622192, 0.12238115072250366, 0.22562816739082336, 0.35768455266952515, -0.42776942253112793, -0.34537556767463684, -0.2861612141132355, 0.36421096324920654, -0.16716064512729645, 0.12165573239326477, 0.3645743429660797, -0.21086321771144867, -0.07228486239910126, 0.15103384852409363, 0.3195462226867676, -0.10602478682994843, -0.11920332163572311, -0.15033607184886932, 0.27737563848495483, 0.0240007434040308, -0.028316382318735123, 0.014470770955085754, -0.1706431657075882, -0.05764825642108917, 0.3715693950653076, -0.15956465899944305, 0.08714565634727478, 0.16744168102741241, 0.04409058764576912, 0.2306472659111023, -0.10440967977046967, -0.26062777638435364, -0.4392026960849762, -0.09853178262710571, 0.16474327445030212, -0.19629700481891632, -0.12573964893817902, -0.03666495531797409, -0.10954625904560089, 0.16133469343185425, 0.04170415922999382, -0.23590220510959625, 0.08997966349124908, -0.004337172955274582, 0.3883192539215088, -0.20898598432540894, 0.11808416247367859, 0.3752021789550781, 0.16850705444812775, 0.05962440371513367, -0.1573241502046585, -0.20618516206741333, 0.18140126764774323, 0.38659417629241943, 0.21564295887947083, 0.18958210945129395, 0.2443961501121521, 0.15978771448135376, 0.8500343561172485, 0.31932997703552246, -0.4346616268157959, 0.12059749662876129, -0.058093830943107605, -0.06442436575889587, -0.07623691111803055, -0.31377890706062317, -0.06624941527843475, -0.2433529794216156, -0.12011346220970154, -0.1252264827489853, -0.21281352639198303, 0.12244535237550735, 0.1718873679637909, 0.07384593784809113, -0.02322244457900524, -0.4763818085193634, 0.18449853360652924, -0.25369513034820557, 0.14348551630973816, 0.15853972733020782, 0.3790481984615326, -0.19344665110111237, 0.31325799226760864, 0.2337401956319809, -0.09904003143310547, 0.40597209334373474, 0.09167960286140442, -0.5711539387702942, -0.20064345002174377, -0.34278544783592224, 0.44404882192611694, 0.25476017594337463, 0.17552664875984192, -0.09011706709861755, -0.08576277643442154, -0.14311569929122925, 0.1859128624200821, 0.3545988202095032, -0.44384074211120605, -0.031231015920639038, 0.30809149146080017, -0.16998621821403503, -0.17829041182994843, -0.08582243323326111, 0.20333445072174072, 0.6135460138320923, 0.060684043914079666, 0.5777102112770081, -0.13267262279987335, -0.0017201460432261229, -0.1848401427268982, 0.09971871227025986, -0.09730782359838486, -0.18139144778251648, -0.04163624346256256, 0.044316813349723816, -0.2571534812450409, 0.13071459531784058, 0.17882360517978668, -0.03114706091582775, 0.25152188539505005, 0.03757261112332344, -0.11305516958236694, -0.24862951040267944, -0.06708380579948425, 0.02045392617583275, 0.22220665216445923, 0.0019848200026899576, 0.15636776387691498, 0.2334228903055191, -0.03322277218103409, 0.2050066739320755, 0.3170374631881714, -0.15541788935661316, 0.019160732626914978, -0.20104718208312988, 0.02379235252737999, 0.3575342893600464, 0.07553595304489136, -0.05679481476545334, 0.30185389518737793, -0.01349792629480362, -0.1000860184431076, -0.2922608256340027, 0.2588852345943451, 0.1977364867925644, 0.0974985733628273, -0.1309501677751541, -0.5797991752624512, 0.06107085198163986, 0.09864334762096405, -0.1772267371416092, 0.36087146401405334, 0.04270927235484123, -0.2918623685836792, 0.2905968427658081, 0.1774497777223587, 0.8005264401435852, 0.16540585458278656, 0.014834724366664886, 0.33652377128601074, 0.18082329630851746, 0.36992210149765015, 0.23551879823207855, -0.06569377332925797, -0.342785507440567, 0.35711461305618286, -0.18385036289691925, -0.2929322421550751, 0.002491358667612076, 0.005259685218334198, -0.19129016995429993, 0.24985642731189728, -0.013108931481838226, 0.15577617287635803, -0.1824072152376175, 0.14643068611621857, 0.3141554594039917, -0.21153458952903748, -0.03458434343338013, 0.15031296014785767, -0.07391834259033203, 0.2885684669017792, -0.035755306482315063, 0.13449284434318542, -0.14748211205005646, -0.007898006588220596, -0.24406175315380096, 0.14441347122192383, -0.5116114616394043, 0.39741092920303345, 0.08362816274166107, -0.08395256102085114, 0.2956172525882721, 0.08216807246208191, -0.07009652256965637, 0.16538134217262268, -0.05454336106777191, 0.12420116364955902, 0.2346411645412445, 0.20128847658634186, 0.12402099370956421, -0.3333583176136017, 0.2635718286037445, 0.22540882229804993, -0.10462000966072083, -0.0038392767310142517, -0.15546825528144836, -0.22562924027442932, -0.17735429108142853, 0.21047744154930115, 0.22592036426067352, -0.35650405287742615, -0.23085534572601318, -0.03488729149103165, 0.09603165090084076, -0.1957099586725235, 0.02037416212260723, 0.12065380811691284, 0.13061918318271637, 0.2372598648071289, -0.3842770457267761, -0.1575084924697876, 0.0443064346909523, 0.46375930309295654, -0.2750539779663086, 0.21326041221618652, 0.42850732803344727, -0.005432862788438797, -0.04312985762953758, -0.12088283896446228, 0.1267637014389038, 0.04375794529914856, 0.21061977744102478, 0.16236649453639984, -0.3165006637573242, -0.06293672323226929, -0.268012136220932, 0.3825357258319855, -0.04196007549762726, -0.2074611485004425, -0.0652521401643753, -0.22407381236553192, -0.46791017055511475, -0.054444730281829834, 0.24773018062114716, 0.14027397334575653, 0.09236691147089005, 0.576877236366272, -0.35869479179382324, 0.18367180228233337, -0.18211637437343597, 0.09477333724498749, 0.029332147911190987, 0.0852857381105423, 0.08981329947710037, 0.03728445619344711, -0.022229943424463272, -0.2665499150753021, -0.08721073716878891, 0.45016610622406006, 0.009886075742542744, -0.09261651337146759, -0.4276527166366577, 0.17318445444107056, 0.5592161417007446, -0.18240711092948914, 0.07406467944383621, -0.21702085435390472, -0.0007078256458044052, -0.35931551456451416, -0.02517954260110855, 0.2778584659099579, 0.030726052820682526, 0.27333739399909973, 0.18936383724212646, 0.11630548536777496, 0.004188500344753265, -0.015499874949455261, -0.096745565533638, -0.06437040865421295, 0.017632082104682922, 0.05479048192501068, 0.034339696168899536, -0.07344303280115128, -0.08076423406600952, 0.2219373881816864, 0.29702115058898926, 0.20848378539085388, 0.2401295006275177, -0.045540615916252136, -0.2281159609556198, -0.13362331688404083, 0.3515208959579468, 0.3570409417152405, -0.2013128250837326, -0.24378573894500732, 0.5111563205718994, 0.08368029445409775, -0.09427815675735474, 0.13512618839740753, 0.2759709656238556, 0.03471550717949867, 0.2394305169582367, 0.17323733866214752, -0.232628732919693, 0.2811649441719055, -0.46636825799942017, -0.08754269033670425, 0.2715708017349243, -0.046773843467235565, 0.04084209352731705, 0.08094322681427002, -0.18053694069385529, 0.2933397591114044, 0.2770444452762604, 0.1332239955663681, 0.33002299070358276, 0.23037122189998627, 0.0932229533791542, 0.1252530813217163, 0.1260303556919098, 0.0945228636264801, 0.1989383101463318, -0.4628060460090637, 0.32196226716041565, 0.24264150857925415, -0.005586355924606323, 0.19447144865989685, 0.15458160638809204, 0.485310822725296, -0.525039792060852, -0.2774401009082794, 0.23163777589797974, 0.4182739853858948, -0.20757141709327698, -0.0414237305521965, -0.4448895752429962, 0.06417713314294815, -0.023277994245290756, -0.019185204058885574, -0.08467313647270203, 0.00404912605881691, 0.17936715483665466, -0.141014963388443, -0.06083358824253082, -0.20407883822917938, -0.4670405983924866, -0.11982127279043198, 0.30511948466300964, -0.2399478405714035, -0.10561112314462662, -0.1089061051607132, 0.058518532663583755, -0.2150147557258606, -0.1264316290616989, 0.2644937336444855, 0.20696787536144257, -0.3826080560684204, -0.10495495051145554, 0.012840546667575836, 0.11485382914543152, -0.12204870581626892, 0.23087744414806366, -0.28409066796302795, -0.3314359486103058, 0.3611927032470703, -0.02685205265879631, -0.09760918468236923, -0.15022531151771545, 0.19640789926052094, 0.6410110592842102, 0.00015137158334255219, 0.23104757070541382, -0.025150921195745468, -0.034595787525177, -0.13897296786308289, 0.05277165770530701, 0.0753152146935463, 0.16618886590003967, 0.15701408684253693, 0.14772169291973114, 0.40052250027656555, 0.004388160537928343, 0.05007658153772354, 0.09972880780696869, 0.2572559416294098, 0.35555243492126465, -0.3640001714229584, -0.5150120258331299, 0.05073194205760956, -0.5516372919082642, 0.17806649208068848, -0.28019338846206665, -0.37626156210899353, -0.1620282232761383, -0.08286862820386887, 0.3111833930015564, 0.032231926918029785, -0.0938536524772644, 0.15670664608478546, 0.11198585480451584, 0.18790417909622192, 0.12259262800216675, -0.24370111525058746, -0.46946024894714355, -0.30194759368896484, 0.3355240225791931, -0.290115088224411, 0.2659894824028015, 0.29043981432914734, -0.016332749277353287, -0.07166309654712677, -0.3088711202144623, -0.06867741048336029, 0.07463080435991287, 0.696888267993927, 0.31985440850257874, 0.18662744760513306, -0.094004325568676, 0.09945768117904663, -0.0232539139688015, 0.2076234072446823, -0.2597787380218506, 0.17135635018348694, -0.4841797649860382, 0.3901786804199219, 0.00034647993743419647, 0.263250470161438, -0.6178391575813293, 0.006223293021321297, 0.16857385635375977, -0.062083493918180466, -0.5151699185371399, 0.26846614480018616, -0.17149265110492706, 0.14055556058883667, -0.15226086974143982, 0.506000816822052, -0.16236987709999084, 0.5561699867248535, -0.2420712113380432, -0.17256376147270203, 0.606984555721283, -0.5967270731925964, -0.2871374785900116, 0.08811969310045242, -0.02044619619846344, -0.047814153134822845, -0.3517231047153473, -0.40750211477279663, -0.25453752279281616, 0.31830498576164246, -0.10058220475912094, -0.27558910846710205, -0.12727349996566772, 0.03814448416233063, 0.1181812435388565, -0.0827641636133194, 0.7448389530181885, 0.08606348931789398, -0.0579104870557785, 0.36634910106658936, -0.00875793769955635 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
@lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get > Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like: def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = self.__dict__.copy() logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out def __setstate__(self, d): """ Reinstates pre_tokenizer """ logger.debug("Reattaching pre_tokenizer") self.__dict__ = d self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() If this is the case can you think of another way of avoiding my issue?
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
121
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples @lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get > Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like: def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = self.__dict__.copy() logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out def __setstate__(self, d): """ Reinstates pre_tokenizer """ logger.debug("Reattaching pre_tokenizer") self.__dict__ = d self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() If this is the case can you think of another way of avoiding my issue?
[ -0.22488713264465332, 0.19312027096748352, 0.11275309324264526, 0.028775177896022797, 0.0341956727206707, -0.3237704038619995, 0.13853615522384644, 0.1950846165418625, 0.3468085527420044, -0.10001799464225769, 0.1921815425157547, 0.7253848910331726, -0.1929599940776825, 0.20866984128952026, -0.001619015820324421, 0.05957880616188049, 0.07051892578601837, -0.03540760278701782, -0.005137868225574493, -0.06401272863149643, -0.21730102598667145, 0.05091632530093193, -0.3579757809638977, 0.1536131352186203, -0.27659493684768677, -0.1768151819705963, 0.025939466431736946, 0.11868840456008911, -0.029984423890709877, -0.27113622426986694, 0.2045455276966095, -0.07879392802715302, -0.02770550549030304, 0.24116593599319458, -0.00012316943320911378, -0.08011488616466522, 0.016193952411413193, -0.08638330549001694, -0.004162696190178394, -0.21759964525699615, -0.2230958342552185, -0.12397699058055878, -0.12354379892349243, -0.22941333055496216, 0.07815740257501602, 0.0024629193358123302, -0.296572744846344, -0.381381094455719, 0.634201169013977, 0.43187248706817627, 0.1199069619178772, 0.3648693859577179, -0.06786841154098511, -0.03467929735779762, -0.13554930686950684, 0.3100193738937378, 0.05284782499074936, 0.22330258786678314, 0.12532669305801392, -0.3918122947216034, -0.0012148618698120117, 0.09562961757183075, -0.1981256902217865, -0.21600982546806335, 0.15275095403194427, 0.059106867760419846, 0.18381036818027496, 0.010621657595038414, -0.00867847353219986, 0.09299489855766296, 0.21699771285057068, -0.3573750853538513, -0.21202927827835083, -0.3761960566043854, -0.05751432850956917, -0.15050067007541656, 0.3402036428451538, -0.21683929860591888, 0.13164900243282318, 0.1427592635154724, -0.04848417267203331, -0.10448584705591202, 0.22394061088562012, 0.3518484830856323, -0.03908190131187439, 0.2571777403354645, -0.016609180718660355, 0.39841291308403015, -0.053679075092077255, -0.10632318258285522, -0.18072612583637238, -0.10334429144859314, 0.10165417194366455, 0.45161744952201843, -0.011211026459932327, -0.23849086463451385, 0.21055102348327637, -0.21233049035072327, -0.02430841512978077, 0.21151110529899597, -0.1638643592596054, 0.12254857271909714, -0.36412835121154785, 0.26401758193969727, 0.4708406627178192, 0.221218079328537, 0.12371267378330231, 0.6363039612770081, 0.19857078790664673, -0.16029226779937744, -0.300045371055603, 0.0745258629322052, 0.31024879217147827, -0.10113582015037537, -0.03733978047966957, 0.17564761638641357, -0.10271654278039932, -0.12865214049816132, -0.07385320961475372, 0.27302226424217224, -0.7321613430976868, 0.008305802941322327, 0.18209140002727509, 0.12161961197853088, -0.0009520143503323197, -0.22241070866584778, -0.08313730359077454, 0.07775574922561646, -0.21585707366466522, 0.11480893939733505, -0.11857537925243378, 0.12424914538860321, -0.34277763962745667, 0.11042297631502151, -0.043260108679533005, 0.05694539099931717, 0.31752410531044006, 0.12566952407360077, -0.16883859038352966, -0.059651099145412445, 0.15125079452991486, -0.22944840788841248, 0.40169721841812134, -0.019703704863786697, -0.23601506650447845, 0.04248565435409546, 0.3069401979446411, -0.44203174114227295, -0.2555749714374542, -0.05922709405422211, -0.15265679359436035, -0.14126364886760712, -0.03863443434238434, 0.03472519665956497, -0.23729652166366577, -0.004718184471130371, -0.30469033122062683, 0.10288913547992706, 0.3713425397872925, -0.2058529555797577, 0.09886627644300461, -0.5015785694122314, -0.35631099343299866, -0.20766372978687286, 0.008802365511655807, 0.17747828364372253, -0.4386507272720337, -0.24340401589870453, -0.0980323776602745, 0.15207865834236145, 0.33570683002471924, 0.12456782162189484, -0.2613389790058136, 0.6007260680198669, -0.4962502419948578, 0.8756878972053528, 0.28696486353874207, -0.14862662553787231, -0.40101107954978943, 0.03295411169528961, -0.17289479076862335, 0.2320755571126938, -0.6788747906684875, -0.10385710000991821, 0.16501542925834656, -0.0797584280371666, 0.11381682008504868, 0.33886420726776123, 0.1549207717180252, -0.09533248841762543, -0.12822023034095764, 0.06443098932504654, 0.32686543464660645, -0.2837596833705902, 0.07034898549318314, -0.009695656597614288, 0.16244396567344666, -0.21676307916641235, 0.2174031138420105, 0.034307435154914856, 0.18434275686740875, -0.1125897467136383, 0.4559538960456848, 0.17644348740577698, -0.12051013857126236, -0.31562530994415283, -0.1837683618068695, 0.3253227174282074, -0.028087375685572624, -0.02687976509332657, -0.11929529905319214, -0.08291018009185791, -0.1131267175078392, 0.05602207034826279, -0.33992552757263184, -0.24335622787475586, 0.029902484267950058, 0.02431396394968033, 0.23357683420181274, 0.17532914876937866, -0.08356530964374542, -0.24794542789459229, -0.050614647567272186, 0.060971543192863464, -0.055893149226903915, 0.056883424520492554, 0.12517838180065155, -0.26861512660980225, -0.3178900182247162, 0.16740426421165466, 0.40873536467552185, -0.09793613106012344, -0.18483799695968628, 0.276186466217041, 0.5985629558563232, -0.2991654872894287, -0.39626002311706543, -0.18160812556743622, -0.10411582142114639, 0.1290629804134369, -0.23568862676620483, 0.1717510223388672, -0.002784447744488716, -0.2309010624885559, -0.02569672465324402, 0.5132233500480652, 0.24769341945648193, 0.3112371265888214, -0.4027116894721985, 0.25161805748939514, -0.012304926291108131, -0.08680543303489685, -0.14821769297122955, -0.33737656474113464, -0.26279139518737793, 0.03733229637145996, 0.3305850625038147, -0.13446249067783356, -0.036491602659225464, 0.04074431210756302, 0.3557881712913513, -0.07353569567203522, 0.32570719718933105, -0.06443044543266296, -0.19810616970062256, -0.19068068265914917, 0.29802316427230835, 0.3740842938423157, 0.5166625380516052, -0.10923230648040771, -0.057224374264478683, 0.08503767848014832, -0.04589064046740532, -0.04900103062391281, 0.016840867698192596, -0.17222784459590912, -0.03786509111523628, 0.19884783029556274, 0.048589352518320084, -0.0998985543847084, -0.1812920868396759, 0.009794287383556366, 0.05627928674221039, 0.2922278940677643, -0.2386675626039505, 0.09624142944812775, -0.5637152791023254, 0.07098772376775742, -0.2885974049568176, -0.13038377463817596, 0.007215343415737152, -0.44396114349365234, -0.21197105944156647, 0.0941518098115921, -0.2360060214996338, 0.21823422610759735, -0.16105017066001892, -0.15978236496448517, -0.1504625827074051, -0.28893688321113586, 0.0986512154340744, -0.234613299369812, -0.22342288494110107, -0.08644011616706848, 0.12882214784622192, 0.12238115072250366, 0.22562816739082336, 0.35768455266952515, -0.42776942253112793, -0.34537556767463684, -0.2861612141132355, 0.36421096324920654, -0.16716064512729645, 0.12165573239326477, 0.3645743429660797, -0.21086321771144867, -0.07228486239910126, 0.15103384852409363, 0.3195462226867676, -0.10602478682994843, -0.11920332163572311, -0.15033607184886932, 0.27737563848495483, 0.0240007434040308, -0.028316382318735123, 0.014470770955085754, -0.1706431657075882, -0.05764825642108917, 0.3715693950653076, -0.15956465899944305, 0.08714565634727478, 0.16744168102741241, 0.04409058764576912, 0.2306472659111023, -0.10440967977046967, -0.26062777638435364, -0.4392026960849762, -0.09853178262710571, 0.16474327445030212, -0.19629700481891632, -0.12573964893817902, -0.03666495531797409, -0.10954625904560089, 0.16133469343185425, 0.04170415922999382, -0.23590220510959625, 0.08997966349124908, -0.004337172955274582, 0.3883192539215088, -0.20898598432540894, 0.11808416247367859, 0.3752021789550781, 0.16850705444812775, 0.05962440371513367, -0.1573241502046585, -0.20618516206741333, 0.18140126764774323, 0.38659417629241943, 0.21564295887947083, 0.18958210945129395, 0.2443961501121521, 0.15978771448135376, 0.8500343561172485, 0.31932997703552246, -0.4346616268157959, 0.12059749662876129, -0.058093830943107605, -0.06442436575889587, -0.07623691111803055, -0.31377890706062317, -0.06624941527843475, -0.2433529794216156, -0.12011346220970154, -0.1252264827489853, -0.21281352639198303, 0.12244535237550735, 0.1718873679637909, 0.07384593784809113, -0.02322244457900524, -0.4763818085193634, 0.18449853360652924, -0.25369513034820557, 0.14348551630973816, 0.15853972733020782, 0.3790481984615326, -0.19344665110111237, 0.31325799226760864, 0.2337401956319809, -0.09904003143310547, 0.40597209334373474, 0.09167960286140442, -0.5711539387702942, -0.20064345002174377, -0.34278544783592224, 0.44404882192611694, 0.25476017594337463, 0.17552664875984192, -0.09011706709861755, -0.08576277643442154, -0.14311569929122925, 0.1859128624200821, 0.3545988202095032, -0.44384074211120605, -0.031231015920639038, 0.30809149146080017, -0.16998621821403503, -0.17829041182994843, -0.08582243323326111, 0.20333445072174072, 0.6135460138320923, 0.060684043914079666, 0.5777102112770081, -0.13267262279987335, -0.0017201460432261229, -0.1848401427268982, 0.09971871227025986, -0.09730782359838486, -0.18139144778251648, -0.04163624346256256, 0.044316813349723816, -0.2571534812450409, 0.13071459531784058, 0.17882360517978668, -0.03114706091582775, 0.25152188539505005, 0.03757261112332344, -0.11305516958236694, -0.24862951040267944, -0.06708380579948425, 0.02045392617583275, 0.22220665216445923, 0.0019848200026899576, 0.15636776387691498, 0.2334228903055191, -0.03322277218103409, 0.2050066739320755, 0.3170374631881714, -0.15541788935661316, 0.019160732626914978, -0.20104718208312988, 0.02379235252737999, 0.3575342893600464, 0.07553595304489136, -0.05679481476545334, 0.30185389518737793, -0.01349792629480362, -0.1000860184431076, -0.2922608256340027, 0.2588852345943451, 0.1977364867925644, 0.0974985733628273, -0.1309501677751541, -0.5797991752624512, 0.06107085198163986, 0.09864334762096405, -0.1772267371416092, 0.36087146401405334, 0.04270927235484123, -0.2918623685836792, 0.2905968427658081, 0.1774497777223587, 0.8005264401435852, 0.16540585458278656, 0.014834724366664886, 0.33652377128601074, 0.18082329630851746, 0.36992210149765015, 0.23551879823207855, -0.06569377332925797, -0.342785507440567, 0.35711461305618286, -0.18385036289691925, -0.2929322421550751, 0.002491358667612076, 0.005259685218334198, -0.19129016995429993, 0.24985642731189728, -0.013108931481838226, 0.15577617287635803, -0.1824072152376175, 0.14643068611621857, 0.3141554594039917, -0.21153458952903748, -0.03458434343338013, 0.15031296014785767, -0.07391834259033203, 0.2885684669017792, -0.035755306482315063, 0.13449284434318542, -0.14748211205005646, -0.007898006588220596, -0.24406175315380096, 0.14441347122192383, -0.5116114616394043, 0.39741092920303345, 0.08362816274166107, -0.08395256102085114, 0.2956172525882721, 0.08216807246208191, -0.07009652256965637, 0.16538134217262268, -0.05454336106777191, 0.12420116364955902, 0.2346411645412445, 0.20128847658634186, 0.12402099370956421, -0.3333583176136017, 0.2635718286037445, 0.22540882229804993, -0.10462000966072083, -0.0038392767310142517, -0.15546825528144836, -0.22562924027442932, -0.17735429108142853, 0.21047744154930115, 0.22592036426067352, -0.35650405287742615, -0.23085534572601318, -0.03488729149103165, 0.09603165090084076, -0.1957099586725235, 0.02037416212260723, 0.12065380811691284, 0.13061918318271637, 0.2372598648071289, -0.3842770457267761, -0.1575084924697876, 0.0443064346909523, 0.46375930309295654, -0.2750539779663086, 0.21326041221618652, 0.42850732803344727, -0.005432862788438797, -0.04312985762953758, -0.12088283896446228, 0.1267637014389038, 0.04375794529914856, 0.21061977744102478, 0.16236649453639984, -0.3165006637573242, -0.06293672323226929, -0.268012136220932, 0.3825357258319855, -0.04196007549762726, -0.2074611485004425, -0.0652521401643753, -0.22407381236553192, -0.46791017055511475, -0.054444730281829834, 0.24773018062114716, 0.14027397334575653, 0.09236691147089005, 0.576877236366272, -0.35869479179382324, 0.18367180228233337, -0.18211637437343597, 0.09477333724498749, 0.029332147911190987, 0.0852857381105423, 0.08981329947710037, 0.03728445619344711, -0.022229943424463272, -0.2665499150753021, -0.08721073716878891, 0.45016610622406006, 0.009886075742542744, -0.09261651337146759, -0.4276527166366577, 0.17318445444107056, 0.5592161417007446, -0.18240711092948914, 0.07406467944383621, -0.21702085435390472, -0.0007078256458044052, -0.35931551456451416, -0.02517954260110855, 0.2778584659099579, 0.030726052820682526, 0.27333739399909973, 0.18936383724212646, 0.11630548536777496, 0.004188500344753265, -0.015499874949455261, -0.096745565533638, -0.06437040865421295, 0.017632082104682922, 0.05479048192501068, 0.034339696168899536, -0.07344303280115128, -0.08076423406600952, 0.2219373881816864, 0.29702115058898926, 0.20848378539085388, 0.2401295006275177, -0.045540615916252136, -0.2281159609556198, -0.13362331688404083, 0.3515208959579468, 0.3570409417152405, -0.2013128250837326, -0.24378573894500732, 0.5111563205718994, 0.08368029445409775, -0.09427815675735474, 0.13512618839740753, 0.2759709656238556, 0.03471550717949867, 0.2394305169582367, 0.17323733866214752, -0.232628732919693, 0.2811649441719055, -0.46636825799942017, -0.08754269033670425, 0.2715708017349243, -0.046773843467235565, 0.04084209352731705, 0.08094322681427002, -0.18053694069385529, 0.2933397591114044, 0.2770444452762604, 0.1332239955663681, 0.33002299070358276, 0.23037122189998627, 0.0932229533791542, 0.1252530813217163, 0.1260303556919098, 0.0945228636264801, 0.1989383101463318, -0.4628060460090637, 0.32196226716041565, 0.24264150857925415, -0.005586355924606323, 0.19447144865989685, 0.15458160638809204, 0.485310822725296, -0.525039792060852, -0.2774401009082794, 0.23163777589797974, 0.4182739853858948, -0.20757141709327698, -0.0414237305521965, -0.4448895752429962, 0.06417713314294815, -0.023277994245290756, -0.019185204058885574, -0.08467313647270203, 0.00404912605881691, 0.17936715483665466, -0.141014963388443, -0.06083358824253082, -0.20407883822917938, -0.4670405983924866, -0.11982127279043198, 0.30511948466300964, -0.2399478405714035, -0.10561112314462662, -0.1089061051607132, 0.058518532663583755, -0.2150147557258606, -0.1264316290616989, 0.2644937336444855, 0.20696787536144257, -0.3826080560684204, -0.10495495051145554, 0.012840546667575836, 0.11485382914543152, -0.12204870581626892, 0.23087744414806366, -0.28409066796302795, -0.3314359486103058, 0.3611927032470703, -0.02685205265879631, -0.09760918468236923, -0.15022531151771545, 0.19640789926052094, 0.6410110592842102, 0.00015137158334255219, 0.23104757070541382, -0.025150921195745468, -0.034595787525177, -0.13897296786308289, 0.05277165770530701, 0.0753152146935463, 0.16618886590003967, 0.15701408684253693, 0.14772169291973114, 0.40052250027656555, 0.004388160537928343, 0.05007658153772354, 0.09972880780696869, 0.2572559416294098, 0.35555243492126465, -0.3640001714229584, -0.5150120258331299, 0.05073194205760956, -0.5516372919082642, 0.17806649208068848, -0.28019338846206665, -0.37626156210899353, -0.1620282232761383, -0.08286862820386887, 0.3111833930015564, 0.032231926918029785, -0.0938536524772644, 0.15670664608478546, 0.11198585480451584, 0.18790417909622192, 0.12259262800216675, -0.24370111525058746, -0.46946024894714355, -0.30194759368896484, 0.3355240225791931, -0.290115088224411, 0.2659894824028015, 0.29043981432914734, -0.016332749277353287, -0.07166309654712677, -0.3088711202144623, -0.06867741048336029, 0.07463080435991287, 0.696888267993927, 0.31985440850257874, 0.18662744760513306, -0.094004325568676, 0.09945768117904663, -0.0232539139688015, 0.2076234072446823, -0.2597787380218506, 0.17135635018348694, -0.4841797649860382, 0.3901786804199219, 0.00034647993743419647, 0.263250470161438, -0.6178391575813293, 0.006223293021321297, 0.16857385635375977, -0.062083493918180466, -0.5151699185371399, 0.26846614480018616, -0.17149265110492706, 0.14055556058883667, -0.15226086974143982, 0.506000816822052, -0.16236987709999084, 0.5561699867248535, -0.2420712113380432, -0.17256376147270203, 0.606984555721283, -0.5967270731925964, -0.2871374785900116, 0.08811969310045242, -0.02044619619846344, -0.047814153134822845, -0.3517231047153473, -0.40750211477279663, -0.25453752279281616, 0.31830498576164246, -0.10058220475912094, -0.27558910846710205, -0.12727349996566772, 0.03814448416233063, 0.1181812435388565, -0.0827641636133194, 0.7448389530181885, 0.08606348931789398, -0.0579104870557785, 0.36634910106658936, -0.00875793769955635 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend.
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
29
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend.
[ -0.22488713264465332, 0.19312027096748352, 0.11275309324264526, 0.028775177896022797, 0.0341956727206707, -0.3237704038619995, 0.13853615522384644, 0.1950846165418625, 0.3468085527420044, -0.10001799464225769, 0.1921815425157547, 0.7253848910331726, -0.1929599940776825, 0.20866984128952026, -0.001619015820324421, 0.05957880616188049, 0.07051892578601837, -0.03540760278701782, -0.005137868225574493, -0.06401272863149643, -0.21730102598667145, 0.05091632530093193, -0.3579757809638977, 0.1536131352186203, -0.27659493684768677, -0.1768151819705963, 0.025939466431736946, 0.11868840456008911, -0.029984423890709877, -0.27113622426986694, 0.2045455276966095, -0.07879392802715302, -0.02770550549030304, 0.24116593599319458, -0.00012316943320911378, -0.08011488616466522, 0.016193952411413193, -0.08638330549001694, -0.004162696190178394, -0.21759964525699615, -0.2230958342552185, -0.12397699058055878, -0.12354379892349243, -0.22941333055496216, 0.07815740257501602, 0.0024629193358123302, -0.296572744846344, -0.381381094455719, 0.634201169013977, 0.43187248706817627, 0.1199069619178772, 0.3648693859577179, -0.06786841154098511, -0.03467929735779762, -0.13554930686950684, 0.3100193738937378, 0.05284782499074936, 0.22330258786678314, 0.12532669305801392, -0.3918122947216034, -0.0012148618698120117, 0.09562961757183075, -0.1981256902217865, -0.21600982546806335, 0.15275095403194427, 0.059106867760419846, 0.18381036818027496, 0.010621657595038414, -0.00867847353219986, 0.09299489855766296, 0.21699771285057068, -0.3573750853538513, -0.21202927827835083, -0.3761960566043854, -0.05751432850956917, -0.15050067007541656, 0.3402036428451538, -0.21683929860591888, 0.13164900243282318, 0.1427592635154724, -0.04848417267203331, -0.10448584705591202, 0.22394061088562012, 0.3518484830856323, -0.03908190131187439, 0.2571777403354645, -0.016609180718660355, 0.39841291308403015, -0.053679075092077255, -0.10632318258285522, -0.18072612583637238, -0.10334429144859314, 0.10165417194366455, 0.45161744952201843, -0.011211026459932327, -0.23849086463451385, 0.21055102348327637, -0.21233049035072327, -0.02430841512978077, 0.21151110529899597, -0.1638643592596054, 0.12254857271909714, -0.36412835121154785, 0.26401758193969727, 0.4708406627178192, 0.221218079328537, 0.12371267378330231, 0.6363039612770081, 0.19857078790664673, -0.16029226779937744, -0.300045371055603, 0.0745258629322052, 0.31024879217147827, -0.10113582015037537, -0.03733978047966957, 0.17564761638641357, -0.10271654278039932, -0.12865214049816132, -0.07385320961475372, 0.27302226424217224, -0.7321613430976868, 0.008305802941322327, 0.18209140002727509, 0.12161961197853088, -0.0009520143503323197, -0.22241070866584778, -0.08313730359077454, 0.07775574922561646, -0.21585707366466522, 0.11480893939733505, -0.11857537925243378, 0.12424914538860321, -0.34277763962745667, 0.11042297631502151, -0.043260108679533005, 0.05694539099931717, 0.31752410531044006, 0.12566952407360077, -0.16883859038352966, -0.059651099145412445, 0.15125079452991486, -0.22944840788841248, 0.40169721841812134, -0.019703704863786697, -0.23601506650447845, 0.04248565435409546, 0.3069401979446411, -0.44203174114227295, -0.2555749714374542, -0.05922709405422211, -0.15265679359436035, -0.14126364886760712, -0.03863443434238434, 0.03472519665956497, -0.23729652166366577, -0.004718184471130371, -0.30469033122062683, 0.10288913547992706, 0.3713425397872925, -0.2058529555797577, 0.09886627644300461, -0.5015785694122314, -0.35631099343299866, -0.20766372978687286, 0.008802365511655807, 0.17747828364372253, -0.4386507272720337, -0.24340401589870453, -0.0980323776602745, 0.15207865834236145, 0.33570683002471924, 0.12456782162189484, -0.2613389790058136, 0.6007260680198669, -0.4962502419948578, 0.8756878972053528, 0.28696486353874207, -0.14862662553787231, -0.40101107954978943, 0.03295411169528961, -0.17289479076862335, 0.2320755571126938, -0.6788747906684875, -0.10385710000991821, 0.16501542925834656, -0.0797584280371666, 0.11381682008504868, 0.33886420726776123, 0.1549207717180252, -0.09533248841762543, -0.12822023034095764, 0.06443098932504654, 0.32686543464660645, -0.2837596833705902, 0.07034898549318314, -0.009695656597614288, 0.16244396567344666, -0.21676307916641235, 0.2174031138420105, 0.034307435154914856, 0.18434275686740875, -0.1125897467136383, 0.4559538960456848, 0.17644348740577698, -0.12051013857126236, -0.31562530994415283, -0.1837683618068695, 0.3253227174282074, -0.028087375685572624, -0.02687976509332657, -0.11929529905319214, -0.08291018009185791, -0.1131267175078392, 0.05602207034826279, -0.33992552757263184, -0.24335622787475586, 0.029902484267950058, 0.02431396394968033, 0.23357683420181274, 0.17532914876937866, -0.08356530964374542, -0.24794542789459229, -0.050614647567272186, 0.060971543192863464, -0.055893149226903915, 0.056883424520492554, 0.12517838180065155, -0.26861512660980225, -0.3178900182247162, 0.16740426421165466, 0.40873536467552185, -0.09793613106012344, -0.18483799695968628, 0.276186466217041, 0.5985629558563232, -0.2991654872894287, -0.39626002311706543, -0.18160812556743622, -0.10411582142114639, 0.1290629804134369, -0.23568862676620483, 0.1717510223388672, -0.002784447744488716, -0.2309010624885559, -0.02569672465324402, 0.5132233500480652, 0.24769341945648193, 0.3112371265888214, -0.4027116894721985, 0.25161805748939514, -0.012304926291108131, -0.08680543303489685, -0.14821769297122955, -0.33737656474113464, -0.26279139518737793, 0.03733229637145996, 0.3305850625038147, -0.13446249067783356, -0.036491602659225464, 0.04074431210756302, 0.3557881712913513, -0.07353569567203522, 0.32570719718933105, -0.06443044543266296, -0.19810616970062256, -0.19068068265914917, 0.29802316427230835, 0.3740842938423157, 0.5166625380516052, -0.10923230648040771, -0.057224374264478683, 0.08503767848014832, -0.04589064046740532, -0.04900103062391281, 0.016840867698192596, -0.17222784459590912, -0.03786509111523628, 0.19884783029556274, 0.048589352518320084, -0.0998985543847084, -0.1812920868396759, 0.009794287383556366, 0.05627928674221039, 0.2922278940677643, -0.2386675626039505, 0.09624142944812775, -0.5637152791023254, 0.07098772376775742, -0.2885974049568176, -0.13038377463817596, 0.007215343415737152, -0.44396114349365234, -0.21197105944156647, 0.0941518098115921, -0.2360060214996338, 0.21823422610759735, -0.16105017066001892, -0.15978236496448517, -0.1504625827074051, -0.28893688321113586, 0.0986512154340744, -0.234613299369812, -0.22342288494110107, -0.08644011616706848, 0.12882214784622192, 0.12238115072250366, 0.22562816739082336, 0.35768455266952515, -0.42776942253112793, -0.34537556767463684, -0.2861612141132355, 0.36421096324920654, -0.16716064512729645, 0.12165573239326477, 0.3645743429660797, -0.21086321771144867, -0.07228486239910126, 0.15103384852409363, 0.3195462226867676, -0.10602478682994843, -0.11920332163572311, -0.15033607184886932, 0.27737563848495483, 0.0240007434040308, -0.028316382318735123, 0.014470770955085754, -0.1706431657075882, -0.05764825642108917, 0.3715693950653076, -0.15956465899944305, 0.08714565634727478, 0.16744168102741241, 0.04409058764576912, 0.2306472659111023, -0.10440967977046967, -0.26062777638435364, -0.4392026960849762, -0.09853178262710571, 0.16474327445030212, -0.19629700481891632, -0.12573964893817902, -0.03666495531797409, -0.10954625904560089, 0.16133469343185425, 0.04170415922999382, -0.23590220510959625, 0.08997966349124908, -0.004337172955274582, 0.3883192539215088, -0.20898598432540894, 0.11808416247367859, 0.3752021789550781, 0.16850705444812775, 0.05962440371513367, -0.1573241502046585, -0.20618516206741333, 0.18140126764774323, 0.38659417629241943, 0.21564295887947083, 0.18958210945129395, 0.2443961501121521, 0.15978771448135376, 0.8500343561172485, 0.31932997703552246, -0.4346616268157959, 0.12059749662876129, -0.058093830943107605, -0.06442436575889587, -0.07623691111803055, -0.31377890706062317, -0.06624941527843475, -0.2433529794216156, -0.12011346220970154, -0.1252264827489853, -0.21281352639198303, 0.12244535237550735, 0.1718873679637909, 0.07384593784809113, -0.02322244457900524, -0.4763818085193634, 0.18449853360652924, -0.25369513034820557, 0.14348551630973816, 0.15853972733020782, 0.3790481984615326, -0.19344665110111237, 0.31325799226760864, 0.2337401956319809, -0.09904003143310547, 0.40597209334373474, 0.09167960286140442, -0.5711539387702942, -0.20064345002174377, -0.34278544783592224, 0.44404882192611694, 0.25476017594337463, 0.17552664875984192, -0.09011706709861755, -0.08576277643442154, -0.14311569929122925, 0.1859128624200821, 0.3545988202095032, -0.44384074211120605, -0.031231015920639038, 0.30809149146080017, -0.16998621821403503, -0.17829041182994843, -0.08582243323326111, 0.20333445072174072, 0.6135460138320923, 0.060684043914079666, 0.5777102112770081, -0.13267262279987335, -0.0017201460432261229, -0.1848401427268982, 0.09971871227025986, -0.09730782359838486, -0.18139144778251648, -0.04163624346256256, 0.044316813349723816, -0.2571534812450409, 0.13071459531784058, 0.17882360517978668, -0.03114706091582775, 0.25152188539505005, 0.03757261112332344, -0.11305516958236694, -0.24862951040267944, -0.06708380579948425, 0.02045392617583275, 0.22220665216445923, 0.0019848200026899576, 0.15636776387691498, 0.2334228903055191, -0.03322277218103409, 0.2050066739320755, 0.3170374631881714, -0.15541788935661316, 0.019160732626914978, -0.20104718208312988, 0.02379235252737999, 0.3575342893600464, 0.07553595304489136, -0.05679481476545334, 0.30185389518737793, -0.01349792629480362, -0.1000860184431076, -0.2922608256340027, 0.2588852345943451, 0.1977364867925644, 0.0974985733628273, -0.1309501677751541, -0.5797991752624512, 0.06107085198163986, 0.09864334762096405, -0.1772267371416092, 0.36087146401405334, 0.04270927235484123, -0.2918623685836792, 0.2905968427658081, 0.1774497777223587, 0.8005264401435852, 0.16540585458278656, 0.014834724366664886, 0.33652377128601074, 0.18082329630851746, 0.36992210149765015, 0.23551879823207855, -0.06569377332925797, -0.342785507440567, 0.35711461305618286, -0.18385036289691925, -0.2929322421550751, 0.002491358667612076, 0.005259685218334198, -0.19129016995429993, 0.24985642731189728, -0.013108931481838226, 0.15577617287635803, -0.1824072152376175, 0.14643068611621857, 0.3141554594039917, -0.21153458952903748, -0.03458434343338013, 0.15031296014785767, -0.07391834259033203, 0.2885684669017792, -0.035755306482315063, 0.13449284434318542, -0.14748211205005646, -0.007898006588220596, -0.24406175315380096, 0.14441347122192383, -0.5116114616394043, 0.39741092920303345, 0.08362816274166107, -0.08395256102085114, 0.2956172525882721, 0.08216807246208191, -0.07009652256965637, 0.16538134217262268, -0.05454336106777191, 0.12420116364955902, 0.2346411645412445, 0.20128847658634186, 0.12402099370956421, -0.3333583176136017, 0.2635718286037445, 0.22540882229804993, -0.10462000966072083, -0.0038392767310142517, -0.15546825528144836, -0.22562924027442932, -0.17735429108142853, 0.21047744154930115, 0.22592036426067352, -0.35650405287742615, -0.23085534572601318, -0.03488729149103165, 0.09603165090084076, -0.1957099586725235, 0.02037416212260723, 0.12065380811691284, 0.13061918318271637, 0.2372598648071289, -0.3842770457267761, -0.1575084924697876, 0.0443064346909523, 0.46375930309295654, -0.2750539779663086, 0.21326041221618652, 0.42850732803344727, -0.005432862788438797, -0.04312985762953758, -0.12088283896446228, 0.1267637014389038, 0.04375794529914856, 0.21061977744102478, 0.16236649453639984, -0.3165006637573242, -0.06293672323226929, -0.268012136220932, 0.3825357258319855, -0.04196007549762726, -0.2074611485004425, -0.0652521401643753, -0.22407381236553192, -0.46791017055511475, -0.054444730281829834, 0.24773018062114716, 0.14027397334575653, 0.09236691147089005, 0.576877236366272, -0.35869479179382324, 0.18367180228233337, -0.18211637437343597, 0.09477333724498749, 0.029332147911190987, 0.0852857381105423, 0.08981329947710037, 0.03728445619344711, -0.022229943424463272, -0.2665499150753021, -0.08721073716878891, 0.45016610622406006, 0.009886075742542744, -0.09261651337146759, -0.4276527166366577, 0.17318445444107056, 0.5592161417007446, -0.18240711092948914, 0.07406467944383621, -0.21702085435390472, -0.0007078256458044052, -0.35931551456451416, -0.02517954260110855, 0.2778584659099579, 0.030726052820682526, 0.27333739399909973, 0.18936383724212646, 0.11630548536777496, 0.004188500344753265, -0.015499874949455261, -0.096745565533638, -0.06437040865421295, 0.017632082104682922, 0.05479048192501068, 0.034339696168899536, -0.07344303280115128, -0.08076423406600952, 0.2219373881816864, 0.29702115058898926, 0.20848378539085388, 0.2401295006275177, -0.045540615916252136, -0.2281159609556198, -0.13362331688404083, 0.3515208959579468, 0.3570409417152405, -0.2013128250837326, -0.24378573894500732, 0.5111563205718994, 0.08368029445409775, -0.09427815675735474, 0.13512618839740753, 0.2759709656238556, 0.03471550717949867, 0.2394305169582367, 0.17323733866214752, -0.232628732919693, 0.2811649441719055, -0.46636825799942017, -0.08754269033670425, 0.2715708017349243, -0.046773843467235565, 0.04084209352731705, 0.08094322681427002, -0.18053694069385529, 0.2933397591114044, 0.2770444452762604, 0.1332239955663681, 0.33002299070358276, 0.23037122189998627, 0.0932229533791542, 0.1252530813217163, 0.1260303556919098, 0.0945228636264801, 0.1989383101463318, -0.4628060460090637, 0.32196226716041565, 0.24264150857925415, -0.005586355924606323, 0.19447144865989685, 0.15458160638809204, 0.485310822725296, -0.525039792060852, -0.2774401009082794, 0.23163777589797974, 0.4182739853858948, -0.20757141709327698, -0.0414237305521965, -0.4448895752429962, 0.06417713314294815, -0.023277994245290756, -0.019185204058885574, -0.08467313647270203, 0.00404912605881691, 0.17936715483665466, -0.141014963388443, -0.06083358824253082, -0.20407883822917938, -0.4670405983924866, -0.11982127279043198, 0.30511948466300964, -0.2399478405714035, -0.10561112314462662, -0.1089061051607132, 0.058518532663583755, -0.2150147557258606, -0.1264316290616989, 0.2644937336444855, 0.20696787536144257, -0.3826080560684204, -0.10495495051145554, 0.012840546667575836, 0.11485382914543152, -0.12204870581626892, 0.23087744414806366, -0.28409066796302795, -0.3314359486103058, 0.3611927032470703, -0.02685205265879631, -0.09760918468236923, -0.15022531151771545, 0.19640789926052094, 0.6410110592842102, 0.00015137158334255219, 0.23104757070541382, -0.025150921195745468, -0.034595787525177, -0.13897296786308289, 0.05277165770530701, 0.0753152146935463, 0.16618886590003967, 0.15701408684253693, 0.14772169291973114, 0.40052250027656555, 0.004388160537928343, 0.05007658153772354, 0.09972880780696869, 0.2572559416294098, 0.35555243492126465, -0.3640001714229584, -0.5150120258331299, 0.05073194205760956, -0.5516372919082642, 0.17806649208068848, -0.28019338846206665, -0.37626156210899353, -0.1620282232761383, -0.08286862820386887, 0.3111833930015564, 0.032231926918029785, -0.0938536524772644, 0.15670664608478546, 0.11198585480451584, 0.18790417909622192, 0.12259262800216675, -0.24370111525058746, -0.46946024894714355, -0.30194759368896484, 0.3355240225791931, -0.290115088224411, 0.2659894824028015, 0.29043981432914734, -0.016332749277353287, -0.07166309654712677, -0.3088711202144623, -0.06867741048336029, 0.07463080435991287, 0.696888267993927, 0.31985440850257874, 0.18662744760513306, -0.094004325568676, 0.09945768117904663, -0.0232539139688015, 0.2076234072446823, -0.2597787380218506, 0.17135635018348694, -0.4841797649860382, 0.3901786804199219, 0.00034647993743419647, 0.263250470161438, -0.6178391575813293, 0.006223293021321297, 0.16857385635375977, -0.062083493918180466, -0.5151699185371399, 0.26846614480018616, -0.17149265110492706, 0.14055556058883667, -0.15226086974143982, 0.506000816822052, -0.16236987709999084, 0.5561699867248535, -0.2420712113380432, -0.17256376147270203, 0.606984555721283, -0.5967270731925964, -0.2871374785900116, 0.08811969310045242, -0.02044619619846344, -0.047814153134822845, -0.3517231047153473, -0.40750211477279663, -0.25453752279281616, 0.31830498576164246, -0.10058220475912094, -0.27558910846710205, -0.12727349996566772, 0.03814448416233063, 0.1181812435388565, -0.0827641636133194, 0.7448389530181885, 0.08606348931789398, -0.0579104870557785, 0.36634910106658936, -0.00875793769955635 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Doing a deep copy results in the warning: > 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = copy.deepcopy(self.__dict__) logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out ```
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
114
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Doing a deep copy results in the warning: > 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = copy.deepcopy(self.__dict__) logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out ```
[ -0.22488713264465332, 0.19312027096748352, 0.11275309324264526, 0.028775177896022797, 0.0341956727206707, -0.3237704038619995, 0.13853615522384644, 0.1950846165418625, 0.3468085527420044, -0.10001799464225769, 0.1921815425157547, 0.7253848910331726, -0.1929599940776825, 0.20866984128952026, -0.001619015820324421, 0.05957880616188049, 0.07051892578601837, -0.03540760278701782, -0.005137868225574493, -0.06401272863149643, -0.21730102598667145, 0.05091632530093193, -0.3579757809638977, 0.1536131352186203, -0.27659493684768677, -0.1768151819705963, 0.025939466431736946, 0.11868840456008911, -0.029984423890709877, -0.27113622426986694, 0.2045455276966095, -0.07879392802715302, -0.02770550549030304, 0.24116593599319458, -0.00012316943320911378, -0.08011488616466522, 0.016193952411413193, -0.08638330549001694, -0.004162696190178394, -0.21759964525699615, -0.2230958342552185, -0.12397699058055878, -0.12354379892349243, -0.22941333055496216, 0.07815740257501602, 0.0024629193358123302, -0.296572744846344, -0.381381094455719, 0.634201169013977, 0.43187248706817627, 0.1199069619178772, 0.3648693859577179, -0.06786841154098511, -0.03467929735779762, -0.13554930686950684, 0.3100193738937378, 0.05284782499074936, 0.22330258786678314, 0.12532669305801392, -0.3918122947216034, -0.0012148618698120117, 0.09562961757183075, -0.1981256902217865, -0.21600982546806335, 0.15275095403194427, 0.059106867760419846, 0.18381036818027496, 0.010621657595038414, -0.00867847353219986, 0.09299489855766296, 0.21699771285057068, -0.3573750853538513, -0.21202927827835083, -0.3761960566043854, -0.05751432850956917, -0.15050067007541656, 0.3402036428451538, -0.21683929860591888, 0.13164900243282318, 0.1427592635154724, -0.04848417267203331, -0.10448584705591202, 0.22394061088562012, 0.3518484830856323, -0.03908190131187439, 0.2571777403354645, -0.016609180718660355, 0.39841291308403015, -0.053679075092077255, -0.10632318258285522, -0.18072612583637238, -0.10334429144859314, 0.10165417194366455, 0.45161744952201843, -0.011211026459932327, -0.23849086463451385, 0.21055102348327637, -0.21233049035072327, -0.02430841512978077, 0.21151110529899597, -0.1638643592596054, 0.12254857271909714, -0.36412835121154785, 0.26401758193969727, 0.4708406627178192, 0.221218079328537, 0.12371267378330231, 0.6363039612770081, 0.19857078790664673, -0.16029226779937744, -0.300045371055603, 0.0745258629322052, 0.31024879217147827, -0.10113582015037537, -0.03733978047966957, 0.17564761638641357, -0.10271654278039932, -0.12865214049816132, -0.07385320961475372, 0.27302226424217224, -0.7321613430976868, 0.008305802941322327, 0.18209140002727509, 0.12161961197853088, -0.0009520143503323197, -0.22241070866584778, -0.08313730359077454, 0.07775574922561646, -0.21585707366466522, 0.11480893939733505, -0.11857537925243378, 0.12424914538860321, -0.34277763962745667, 0.11042297631502151, -0.043260108679533005, 0.05694539099931717, 0.31752410531044006, 0.12566952407360077, -0.16883859038352966, -0.059651099145412445, 0.15125079452991486, -0.22944840788841248, 0.40169721841812134, -0.019703704863786697, -0.23601506650447845, 0.04248565435409546, 0.3069401979446411, -0.44203174114227295, -0.2555749714374542, -0.05922709405422211, -0.15265679359436035, -0.14126364886760712, -0.03863443434238434, 0.03472519665956497, -0.23729652166366577, -0.004718184471130371, -0.30469033122062683, 0.10288913547992706, 0.3713425397872925, -0.2058529555797577, 0.09886627644300461, -0.5015785694122314, -0.35631099343299866, -0.20766372978687286, 0.008802365511655807, 0.17747828364372253, -0.4386507272720337, -0.24340401589870453, -0.0980323776602745, 0.15207865834236145, 0.33570683002471924, 0.12456782162189484, -0.2613389790058136, 0.6007260680198669, -0.4962502419948578, 0.8756878972053528, 0.28696486353874207, -0.14862662553787231, -0.40101107954978943, 0.03295411169528961, -0.17289479076862335, 0.2320755571126938, -0.6788747906684875, -0.10385710000991821, 0.16501542925834656, -0.0797584280371666, 0.11381682008504868, 0.33886420726776123, 0.1549207717180252, -0.09533248841762543, -0.12822023034095764, 0.06443098932504654, 0.32686543464660645, -0.2837596833705902, 0.07034898549318314, -0.009695656597614288, 0.16244396567344666, -0.21676307916641235, 0.2174031138420105, 0.034307435154914856, 0.18434275686740875, -0.1125897467136383, 0.4559538960456848, 0.17644348740577698, -0.12051013857126236, -0.31562530994415283, -0.1837683618068695, 0.3253227174282074, -0.028087375685572624, -0.02687976509332657, -0.11929529905319214, -0.08291018009185791, -0.1131267175078392, 0.05602207034826279, -0.33992552757263184, -0.24335622787475586, 0.029902484267950058, 0.02431396394968033, 0.23357683420181274, 0.17532914876937866, -0.08356530964374542, -0.24794542789459229, -0.050614647567272186, 0.060971543192863464, -0.055893149226903915, 0.056883424520492554, 0.12517838180065155, -0.26861512660980225, -0.3178900182247162, 0.16740426421165466, 0.40873536467552185, -0.09793613106012344, -0.18483799695968628, 0.276186466217041, 0.5985629558563232, -0.2991654872894287, -0.39626002311706543, -0.18160812556743622, -0.10411582142114639, 0.1290629804134369, -0.23568862676620483, 0.1717510223388672, -0.002784447744488716, -0.2309010624885559, -0.02569672465324402, 0.5132233500480652, 0.24769341945648193, 0.3112371265888214, -0.4027116894721985, 0.25161805748939514, -0.012304926291108131, -0.08680543303489685, -0.14821769297122955, -0.33737656474113464, -0.26279139518737793, 0.03733229637145996, 0.3305850625038147, -0.13446249067783356, -0.036491602659225464, 0.04074431210756302, 0.3557881712913513, -0.07353569567203522, 0.32570719718933105, -0.06443044543266296, -0.19810616970062256, -0.19068068265914917, 0.29802316427230835, 0.3740842938423157, 0.5166625380516052, -0.10923230648040771, -0.057224374264478683, 0.08503767848014832, -0.04589064046740532, -0.04900103062391281, 0.016840867698192596, -0.17222784459590912, -0.03786509111523628, 0.19884783029556274, 0.048589352518320084, -0.0998985543847084, -0.1812920868396759, 0.009794287383556366, 0.05627928674221039, 0.2922278940677643, -0.2386675626039505, 0.09624142944812775, -0.5637152791023254, 0.07098772376775742, -0.2885974049568176, -0.13038377463817596, 0.007215343415737152, -0.44396114349365234, -0.21197105944156647, 0.0941518098115921, -0.2360060214996338, 0.21823422610759735, -0.16105017066001892, -0.15978236496448517, -0.1504625827074051, -0.28893688321113586, 0.0986512154340744, -0.234613299369812, -0.22342288494110107, -0.08644011616706848, 0.12882214784622192, 0.12238115072250366, 0.22562816739082336, 0.35768455266952515, -0.42776942253112793, -0.34537556767463684, -0.2861612141132355, 0.36421096324920654, -0.16716064512729645, 0.12165573239326477, 0.3645743429660797, -0.21086321771144867, -0.07228486239910126, 0.15103384852409363, 0.3195462226867676, -0.10602478682994843, -0.11920332163572311, -0.15033607184886932, 0.27737563848495483, 0.0240007434040308, -0.028316382318735123, 0.014470770955085754, -0.1706431657075882, -0.05764825642108917, 0.3715693950653076, -0.15956465899944305, 0.08714565634727478, 0.16744168102741241, 0.04409058764576912, 0.2306472659111023, -0.10440967977046967, -0.26062777638435364, -0.4392026960849762, -0.09853178262710571, 0.16474327445030212, -0.19629700481891632, -0.12573964893817902, -0.03666495531797409, -0.10954625904560089, 0.16133469343185425, 0.04170415922999382, -0.23590220510959625, 0.08997966349124908, -0.004337172955274582, 0.3883192539215088, -0.20898598432540894, 0.11808416247367859, 0.3752021789550781, 0.16850705444812775, 0.05962440371513367, -0.1573241502046585, -0.20618516206741333, 0.18140126764774323, 0.38659417629241943, 0.21564295887947083, 0.18958210945129395, 0.2443961501121521, 0.15978771448135376, 0.8500343561172485, 0.31932997703552246, -0.4346616268157959, 0.12059749662876129, -0.058093830943107605, -0.06442436575889587, -0.07623691111803055, -0.31377890706062317, -0.06624941527843475, -0.2433529794216156, -0.12011346220970154, -0.1252264827489853, -0.21281352639198303, 0.12244535237550735, 0.1718873679637909, 0.07384593784809113, -0.02322244457900524, -0.4763818085193634, 0.18449853360652924, -0.25369513034820557, 0.14348551630973816, 0.15853972733020782, 0.3790481984615326, -0.19344665110111237, 0.31325799226760864, 0.2337401956319809, -0.09904003143310547, 0.40597209334373474, 0.09167960286140442, -0.5711539387702942, -0.20064345002174377, -0.34278544783592224, 0.44404882192611694, 0.25476017594337463, 0.17552664875984192, -0.09011706709861755, -0.08576277643442154, -0.14311569929122925, 0.1859128624200821, 0.3545988202095032, -0.44384074211120605, -0.031231015920639038, 0.30809149146080017, -0.16998621821403503, -0.17829041182994843, -0.08582243323326111, 0.20333445072174072, 0.6135460138320923, 0.060684043914079666, 0.5777102112770081, -0.13267262279987335, -0.0017201460432261229, -0.1848401427268982, 0.09971871227025986, -0.09730782359838486, -0.18139144778251648, -0.04163624346256256, 0.044316813349723816, -0.2571534812450409, 0.13071459531784058, 0.17882360517978668, -0.03114706091582775, 0.25152188539505005, 0.03757261112332344, -0.11305516958236694, -0.24862951040267944, -0.06708380579948425, 0.02045392617583275, 0.22220665216445923, 0.0019848200026899576, 0.15636776387691498, 0.2334228903055191, -0.03322277218103409, 0.2050066739320755, 0.3170374631881714, -0.15541788935661316, 0.019160732626914978, -0.20104718208312988, 0.02379235252737999, 0.3575342893600464, 0.07553595304489136, -0.05679481476545334, 0.30185389518737793, -0.01349792629480362, -0.1000860184431076, -0.2922608256340027, 0.2588852345943451, 0.1977364867925644, 0.0974985733628273, -0.1309501677751541, -0.5797991752624512, 0.06107085198163986, 0.09864334762096405, -0.1772267371416092, 0.36087146401405334, 0.04270927235484123, -0.2918623685836792, 0.2905968427658081, 0.1774497777223587, 0.8005264401435852, 0.16540585458278656, 0.014834724366664886, 0.33652377128601074, 0.18082329630851746, 0.36992210149765015, 0.23551879823207855, -0.06569377332925797, -0.342785507440567, 0.35711461305618286, -0.18385036289691925, -0.2929322421550751, 0.002491358667612076, 0.005259685218334198, -0.19129016995429993, 0.24985642731189728, -0.013108931481838226, 0.15577617287635803, -0.1824072152376175, 0.14643068611621857, 0.3141554594039917, -0.21153458952903748, -0.03458434343338013, 0.15031296014785767, -0.07391834259033203, 0.2885684669017792, -0.035755306482315063, 0.13449284434318542, -0.14748211205005646, -0.007898006588220596, -0.24406175315380096, 0.14441347122192383, -0.5116114616394043, 0.39741092920303345, 0.08362816274166107, -0.08395256102085114, 0.2956172525882721, 0.08216807246208191, -0.07009652256965637, 0.16538134217262268, -0.05454336106777191, 0.12420116364955902, 0.2346411645412445, 0.20128847658634186, 0.12402099370956421, -0.3333583176136017, 0.2635718286037445, 0.22540882229804993, -0.10462000966072083, -0.0038392767310142517, -0.15546825528144836, -0.22562924027442932, -0.17735429108142853, 0.21047744154930115, 0.22592036426067352, -0.35650405287742615, -0.23085534572601318, -0.03488729149103165, 0.09603165090084076, -0.1957099586725235, 0.02037416212260723, 0.12065380811691284, 0.13061918318271637, 0.2372598648071289, -0.3842770457267761, -0.1575084924697876, 0.0443064346909523, 0.46375930309295654, -0.2750539779663086, 0.21326041221618652, 0.42850732803344727, -0.005432862788438797, -0.04312985762953758, -0.12088283896446228, 0.1267637014389038, 0.04375794529914856, 0.21061977744102478, 0.16236649453639984, -0.3165006637573242, -0.06293672323226929, -0.268012136220932, 0.3825357258319855, -0.04196007549762726, -0.2074611485004425, -0.0652521401643753, -0.22407381236553192, -0.46791017055511475, -0.054444730281829834, 0.24773018062114716, 0.14027397334575653, 0.09236691147089005, 0.576877236366272, -0.35869479179382324, 0.18367180228233337, -0.18211637437343597, 0.09477333724498749, 0.029332147911190987, 0.0852857381105423, 0.08981329947710037, 0.03728445619344711, -0.022229943424463272, -0.2665499150753021, -0.08721073716878891, 0.45016610622406006, 0.009886075742542744, -0.09261651337146759, -0.4276527166366577, 0.17318445444107056, 0.5592161417007446, -0.18240711092948914, 0.07406467944383621, -0.21702085435390472, -0.0007078256458044052, -0.35931551456451416, -0.02517954260110855, 0.2778584659099579, 0.030726052820682526, 0.27333739399909973, 0.18936383724212646, 0.11630548536777496, 0.004188500344753265, -0.015499874949455261, -0.096745565533638, -0.06437040865421295, 0.017632082104682922, 0.05479048192501068, 0.034339696168899536, -0.07344303280115128, -0.08076423406600952, 0.2219373881816864, 0.29702115058898926, 0.20848378539085388, 0.2401295006275177, -0.045540615916252136, -0.2281159609556198, -0.13362331688404083, 0.3515208959579468, 0.3570409417152405, -0.2013128250837326, -0.24378573894500732, 0.5111563205718994, 0.08368029445409775, -0.09427815675735474, 0.13512618839740753, 0.2759709656238556, 0.03471550717949867, 0.2394305169582367, 0.17323733866214752, -0.232628732919693, 0.2811649441719055, -0.46636825799942017, -0.08754269033670425, 0.2715708017349243, -0.046773843467235565, 0.04084209352731705, 0.08094322681427002, -0.18053694069385529, 0.2933397591114044, 0.2770444452762604, 0.1332239955663681, 0.33002299070358276, 0.23037122189998627, 0.0932229533791542, 0.1252530813217163, 0.1260303556919098, 0.0945228636264801, 0.1989383101463318, -0.4628060460090637, 0.32196226716041565, 0.24264150857925415, -0.005586355924606323, 0.19447144865989685, 0.15458160638809204, 0.485310822725296, -0.525039792060852, -0.2774401009082794, 0.23163777589797974, 0.4182739853858948, -0.20757141709327698, -0.0414237305521965, -0.4448895752429962, 0.06417713314294815, -0.023277994245290756, -0.019185204058885574, -0.08467313647270203, 0.00404912605881691, 0.17936715483665466, -0.141014963388443, -0.06083358824253082, -0.20407883822917938, -0.4670405983924866, -0.11982127279043198, 0.30511948466300964, -0.2399478405714035, -0.10561112314462662, -0.1089061051607132, 0.058518532663583755, -0.2150147557258606, -0.1264316290616989, 0.2644937336444855, 0.20696787536144257, -0.3826080560684204, -0.10495495051145554, 0.012840546667575836, 0.11485382914543152, -0.12204870581626892, 0.23087744414806366, -0.28409066796302795, -0.3314359486103058, 0.3611927032470703, -0.02685205265879631, -0.09760918468236923, -0.15022531151771545, 0.19640789926052094, 0.6410110592842102, 0.00015137158334255219, 0.23104757070541382, -0.025150921195745468, -0.034595787525177, -0.13897296786308289, 0.05277165770530701, 0.0753152146935463, 0.16618886590003967, 0.15701408684253693, 0.14772169291973114, 0.40052250027656555, 0.004388160537928343, 0.05007658153772354, 0.09972880780696869, 0.2572559416294098, 0.35555243492126465, -0.3640001714229584, -0.5150120258331299, 0.05073194205760956, -0.5516372919082642, 0.17806649208068848, -0.28019338846206665, -0.37626156210899353, -0.1620282232761383, -0.08286862820386887, 0.3111833930015564, 0.032231926918029785, -0.0938536524772644, 0.15670664608478546, 0.11198585480451584, 0.18790417909622192, 0.12259262800216675, -0.24370111525058746, -0.46946024894714355, -0.30194759368896484, 0.3355240225791931, -0.290115088224411, 0.2659894824028015, 0.29043981432914734, -0.016332749277353287, -0.07166309654712677, -0.3088711202144623, -0.06867741048336029, 0.07463080435991287, 0.696888267993927, 0.31985440850257874, 0.18662744760513306, -0.094004325568676, 0.09945768117904663, -0.0232539139688015, 0.2076234072446823, -0.2597787380218506, 0.17135635018348694, -0.4841797649860382, 0.3901786804199219, 0.00034647993743419647, 0.263250470161438, -0.6178391575813293, 0.006223293021321297, 0.16857385635375977, -0.062083493918180466, -0.5151699185371399, 0.26846614480018616, -0.17149265110492706, 0.14055556058883667, -0.15226086974143982, 0.506000816822052, -0.16236987709999084, 0.5561699867248535, -0.2420712113380432, -0.17256376147270203, 0.606984555721283, -0.5967270731925964, -0.2871374785900116, 0.08811969310045242, -0.02044619619846344, -0.047814153134822845, -0.3517231047153473, -0.40750211477279663, -0.25453752279281616, 0.31830498576164246, -0.10058220475912094, -0.27558910846710205, -0.12727349996566772, 0.03814448416233063, 0.1181812435388565, -0.0827641636133194, 0.7448389530181885, 0.08606348931789398, -0.0579104870557785, 0.36634910106658936, -0.00875793769955635 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Looks like there is still an object that is not pickable in your `tokenize_function` function. You can test if an object can be pickled and hashed by using ```python from datasets.fingerprint import Hasher Hasher.hash(my_object) ``` Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable.
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
52
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Looks like there is still an object that is not pickable in your `tokenize_function` function. You can test if an object can be pickled and hashed by using ```python from datasets.fingerprint import Hasher Hasher.hash(my_object) ``` Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable.
[ -0.22488713264465332, 0.19312027096748352, 0.11275309324264526, 0.028775177896022797, 0.0341956727206707, -0.3237704038619995, 0.13853615522384644, 0.1950846165418625, 0.3468085527420044, -0.10001799464225769, 0.1921815425157547, 0.7253848910331726, -0.1929599940776825, 0.20866984128952026, -0.001619015820324421, 0.05957880616188049, 0.07051892578601837, -0.03540760278701782, -0.005137868225574493, -0.06401272863149643, -0.21730102598667145, 0.05091632530093193, -0.3579757809638977, 0.1536131352186203, -0.27659493684768677, -0.1768151819705963, 0.025939466431736946, 0.11868840456008911, -0.029984423890709877, -0.27113622426986694, 0.2045455276966095, -0.07879392802715302, -0.02770550549030304, 0.24116593599319458, -0.00012316943320911378, -0.08011488616466522, 0.016193952411413193, -0.08638330549001694, -0.004162696190178394, -0.21759964525699615, -0.2230958342552185, -0.12397699058055878, -0.12354379892349243, -0.22941333055496216, 0.07815740257501602, 0.0024629193358123302, -0.296572744846344, -0.381381094455719, 0.634201169013977, 0.43187248706817627, 0.1199069619178772, 0.3648693859577179, -0.06786841154098511, -0.03467929735779762, -0.13554930686950684, 0.3100193738937378, 0.05284782499074936, 0.22330258786678314, 0.12532669305801392, -0.3918122947216034, -0.0012148618698120117, 0.09562961757183075, -0.1981256902217865, -0.21600982546806335, 0.15275095403194427, 0.059106867760419846, 0.18381036818027496, 0.010621657595038414, -0.00867847353219986, 0.09299489855766296, 0.21699771285057068, -0.3573750853538513, -0.21202927827835083, -0.3761960566043854, -0.05751432850956917, -0.15050067007541656, 0.3402036428451538, -0.21683929860591888, 0.13164900243282318, 0.1427592635154724, -0.04848417267203331, -0.10448584705591202, 0.22394061088562012, 0.3518484830856323, -0.03908190131187439, 0.2571777403354645, -0.016609180718660355, 0.39841291308403015, -0.053679075092077255, -0.10632318258285522, -0.18072612583637238, -0.10334429144859314, 0.10165417194366455, 0.45161744952201843, -0.011211026459932327, -0.23849086463451385, 0.21055102348327637, -0.21233049035072327, -0.02430841512978077, 0.21151110529899597, -0.1638643592596054, 0.12254857271909714, -0.36412835121154785, 0.26401758193969727, 0.4708406627178192, 0.221218079328537, 0.12371267378330231, 0.6363039612770081, 0.19857078790664673, -0.16029226779937744, -0.300045371055603, 0.0745258629322052, 0.31024879217147827, -0.10113582015037537, -0.03733978047966957, 0.17564761638641357, -0.10271654278039932, -0.12865214049816132, -0.07385320961475372, 0.27302226424217224, -0.7321613430976868, 0.008305802941322327, 0.18209140002727509, 0.12161961197853088, -0.0009520143503323197, -0.22241070866584778, -0.08313730359077454, 0.07775574922561646, -0.21585707366466522, 0.11480893939733505, -0.11857537925243378, 0.12424914538860321, -0.34277763962745667, 0.11042297631502151, -0.043260108679533005, 0.05694539099931717, 0.31752410531044006, 0.12566952407360077, -0.16883859038352966, -0.059651099145412445, 0.15125079452991486, -0.22944840788841248, 0.40169721841812134, -0.019703704863786697, -0.23601506650447845, 0.04248565435409546, 0.3069401979446411, -0.44203174114227295, -0.2555749714374542, -0.05922709405422211, -0.15265679359436035, -0.14126364886760712, -0.03863443434238434, 0.03472519665956497, -0.23729652166366577, -0.004718184471130371, -0.30469033122062683, 0.10288913547992706, 0.3713425397872925, -0.2058529555797577, 0.09886627644300461, -0.5015785694122314, -0.35631099343299866, -0.20766372978687286, 0.008802365511655807, 0.17747828364372253, -0.4386507272720337, -0.24340401589870453, -0.0980323776602745, 0.15207865834236145, 0.33570683002471924, 0.12456782162189484, -0.2613389790058136, 0.6007260680198669, -0.4962502419948578, 0.8756878972053528, 0.28696486353874207, -0.14862662553787231, -0.40101107954978943, 0.03295411169528961, -0.17289479076862335, 0.2320755571126938, -0.6788747906684875, -0.10385710000991821, 0.16501542925834656, -0.0797584280371666, 0.11381682008504868, 0.33886420726776123, 0.1549207717180252, -0.09533248841762543, -0.12822023034095764, 0.06443098932504654, 0.32686543464660645, -0.2837596833705902, 0.07034898549318314, -0.009695656597614288, 0.16244396567344666, -0.21676307916641235, 0.2174031138420105, 0.034307435154914856, 0.18434275686740875, -0.1125897467136383, 0.4559538960456848, 0.17644348740577698, -0.12051013857126236, -0.31562530994415283, -0.1837683618068695, 0.3253227174282074, -0.028087375685572624, -0.02687976509332657, -0.11929529905319214, -0.08291018009185791, -0.1131267175078392, 0.05602207034826279, -0.33992552757263184, -0.24335622787475586, 0.029902484267950058, 0.02431396394968033, 0.23357683420181274, 0.17532914876937866, -0.08356530964374542, -0.24794542789459229, -0.050614647567272186, 0.060971543192863464, -0.055893149226903915, 0.056883424520492554, 0.12517838180065155, -0.26861512660980225, -0.3178900182247162, 0.16740426421165466, 0.40873536467552185, -0.09793613106012344, -0.18483799695968628, 0.276186466217041, 0.5985629558563232, -0.2991654872894287, -0.39626002311706543, -0.18160812556743622, -0.10411582142114639, 0.1290629804134369, -0.23568862676620483, 0.1717510223388672, -0.002784447744488716, -0.2309010624885559, -0.02569672465324402, 0.5132233500480652, 0.24769341945648193, 0.3112371265888214, -0.4027116894721985, 0.25161805748939514, -0.012304926291108131, -0.08680543303489685, -0.14821769297122955, -0.33737656474113464, -0.26279139518737793, 0.03733229637145996, 0.3305850625038147, -0.13446249067783356, -0.036491602659225464, 0.04074431210756302, 0.3557881712913513, -0.07353569567203522, 0.32570719718933105, -0.06443044543266296, -0.19810616970062256, -0.19068068265914917, 0.29802316427230835, 0.3740842938423157, 0.5166625380516052, -0.10923230648040771, -0.057224374264478683, 0.08503767848014832, -0.04589064046740532, -0.04900103062391281, 0.016840867698192596, -0.17222784459590912, -0.03786509111523628, 0.19884783029556274, 0.048589352518320084, -0.0998985543847084, -0.1812920868396759, 0.009794287383556366, 0.05627928674221039, 0.2922278940677643, -0.2386675626039505, 0.09624142944812775, -0.5637152791023254, 0.07098772376775742, -0.2885974049568176, -0.13038377463817596, 0.007215343415737152, -0.44396114349365234, -0.21197105944156647, 0.0941518098115921, -0.2360060214996338, 0.21823422610759735, -0.16105017066001892, -0.15978236496448517, -0.1504625827074051, -0.28893688321113586, 0.0986512154340744, -0.234613299369812, -0.22342288494110107, -0.08644011616706848, 0.12882214784622192, 0.12238115072250366, 0.22562816739082336, 0.35768455266952515, -0.42776942253112793, -0.34537556767463684, -0.2861612141132355, 0.36421096324920654, -0.16716064512729645, 0.12165573239326477, 0.3645743429660797, -0.21086321771144867, -0.07228486239910126, 0.15103384852409363, 0.3195462226867676, -0.10602478682994843, -0.11920332163572311, -0.15033607184886932, 0.27737563848495483, 0.0240007434040308, -0.028316382318735123, 0.014470770955085754, -0.1706431657075882, -0.05764825642108917, 0.3715693950653076, -0.15956465899944305, 0.08714565634727478, 0.16744168102741241, 0.04409058764576912, 0.2306472659111023, -0.10440967977046967, -0.26062777638435364, -0.4392026960849762, -0.09853178262710571, 0.16474327445030212, -0.19629700481891632, -0.12573964893817902, -0.03666495531797409, -0.10954625904560089, 0.16133469343185425, 0.04170415922999382, -0.23590220510959625, 0.08997966349124908, -0.004337172955274582, 0.3883192539215088, -0.20898598432540894, 0.11808416247367859, 0.3752021789550781, 0.16850705444812775, 0.05962440371513367, -0.1573241502046585, -0.20618516206741333, 0.18140126764774323, 0.38659417629241943, 0.21564295887947083, 0.18958210945129395, 0.2443961501121521, 0.15978771448135376, 0.8500343561172485, 0.31932997703552246, -0.4346616268157959, 0.12059749662876129, -0.058093830943107605, -0.06442436575889587, -0.07623691111803055, -0.31377890706062317, -0.06624941527843475, -0.2433529794216156, -0.12011346220970154, -0.1252264827489853, -0.21281352639198303, 0.12244535237550735, 0.1718873679637909, 0.07384593784809113, -0.02322244457900524, -0.4763818085193634, 0.18449853360652924, -0.25369513034820557, 0.14348551630973816, 0.15853972733020782, 0.3790481984615326, -0.19344665110111237, 0.31325799226760864, 0.2337401956319809, -0.09904003143310547, 0.40597209334373474, 0.09167960286140442, -0.5711539387702942, -0.20064345002174377, -0.34278544783592224, 0.44404882192611694, 0.25476017594337463, 0.17552664875984192, -0.09011706709861755, -0.08576277643442154, -0.14311569929122925, 0.1859128624200821, 0.3545988202095032, -0.44384074211120605, -0.031231015920639038, 0.30809149146080017, -0.16998621821403503, -0.17829041182994843, -0.08582243323326111, 0.20333445072174072, 0.6135460138320923, 0.060684043914079666, 0.5777102112770081, -0.13267262279987335, -0.0017201460432261229, -0.1848401427268982, 0.09971871227025986, -0.09730782359838486, -0.18139144778251648, -0.04163624346256256, 0.044316813349723816, -0.2571534812450409, 0.13071459531784058, 0.17882360517978668, -0.03114706091582775, 0.25152188539505005, 0.03757261112332344, -0.11305516958236694, -0.24862951040267944, -0.06708380579948425, 0.02045392617583275, 0.22220665216445923, 0.0019848200026899576, 0.15636776387691498, 0.2334228903055191, -0.03322277218103409, 0.2050066739320755, 0.3170374631881714, -0.15541788935661316, 0.019160732626914978, -0.20104718208312988, 0.02379235252737999, 0.3575342893600464, 0.07553595304489136, -0.05679481476545334, 0.30185389518737793, -0.01349792629480362, -0.1000860184431076, -0.2922608256340027, 0.2588852345943451, 0.1977364867925644, 0.0974985733628273, -0.1309501677751541, -0.5797991752624512, 0.06107085198163986, 0.09864334762096405, -0.1772267371416092, 0.36087146401405334, 0.04270927235484123, -0.2918623685836792, 0.2905968427658081, 0.1774497777223587, 0.8005264401435852, 0.16540585458278656, 0.014834724366664886, 0.33652377128601074, 0.18082329630851746, 0.36992210149765015, 0.23551879823207855, -0.06569377332925797, -0.342785507440567, 0.35711461305618286, -0.18385036289691925, -0.2929322421550751, 0.002491358667612076, 0.005259685218334198, -0.19129016995429993, 0.24985642731189728, -0.013108931481838226, 0.15577617287635803, -0.1824072152376175, 0.14643068611621857, 0.3141554594039917, -0.21153458952903748, -0.03458434343338013, 0.15031296014785767, -0.07391834259033203, 0.2885684669017792, -0.035755306482315063, 0.13449284434318542, -0.14748211205005646, -0.007898006588220596, -0.24406175315380096, 0.14441347122192383, -0.5116114616394043, 0.39741092920303345, 0.08362816274166107, -0.08395256102085114, 0.2956172525882721, 0.08216807246208191, -0.07009652256965637, 0.16538134217262268, -0.05454336106777191, 0.12420116364955902, 0.2346411645412445, 0.20128847658634186, 0.12402099370956421, -0.3333583176136017, 0.2635718286037445, 0.22540882229804993, -0.10462000966072083, -0.0038392767310142517, -0.15546825528144836, -0.22562924027442932, -0.17735429108142853, 0.21047744154930115, 0.22592036426067352, -0.35650405287742615, -0.23085534572601318, -0.03488729149103165, 0.09603165090084076, -0.1957099586725235, 0.02037416212260723, 0.12065380811691284, 0.13061918318271637, 0.2372598648071289, -0.3842770457267761, -0.1575084924697876, 0.0443064346909523, 0.46375930309295654, -0.2750539779663086, 0.21326041221618652, 0.42850732803344727, -0.005432862788438797, -0.04312985762953758, -0.12088283896446228, 0.1267637014389038, 0.04375794529914856, 0.21061977744102478, 0.16236649453639984, -0.3165006637573242, -0.06293672323226929, -0.268012136220932, 0.3825357258319855, -0.04196007549762726, -0.2074611485004425, -0.0652521401643753, -0.22407381236553192, -0.46791017055511475, -0.054444730281829834, 0.24773018062114716, 0.14027397334575653, 0.09236691147089005, 0.576877236366272, -0.35869479179382324, 0.18367180228233337, -0.18211637437343597, 0.09477333724498749, 0.029332147911190987, 0.0852857381105423, 0.08981329947710037, 0.03728445619344711, -0.022229943424463272, -0.2665499150753021, -0.08721073716878891, 0.45016610622406006, 0.009886075742542744, -0.09261651337146759, -0.4276527166366577, 0.17318445444107056, 0.5592161417007446, -0.18240711092948914, 0.07406467944383621, -0.21702085435390472, -0.0007078256458044052, -0.35931551456451416, -0.02517954260110855, 0.2778584659099579, 0.030726052820682526, 0.27333739399909973, 0.18936383724212646, 0.11630548536777496, 0.004188500344753265, -0.015499874949455261, -0.096745565533638, -0.06437040865421295, 0.017632082104682922, 0.05479048192501068, 0.034339696168899536, -0.07344303280115128, -0.08076423406600952, 0.2219373881816864, 0.29702115058898926, 0.20848378539085388, 0.2401295006275177, -0.045540615916252136, -0.2281159609556198, -0.13362331688404083, 0.3515208959579468, 0.3570409417152405, -0.2013128250837326, -0.24378573894500732, 0.5111563205718994, 0.08368029445409775, -0.09427815675735474, 0.13512618839740753, 0.2759709656238556, 0.03471550717949867, 0.2394305169582367, 0.17323733866214752, -0.232628732919693, 0.2811649441719055, -0.46636825799942017, -0.08754269033670425, 0.2715708017349243, -0.046773843467235565, 0.04084209352731705, 0.08094322681427002, -0.18053694069385529, 0.2933397591114044, 0.2770444452762604, 0.1332239955663681, 0.33002299070358276, 0.23037122189998627, 0.0932229533791542, 0.1252530813217163, 0.1260303556919098, 0.0945228636264801, 0.1989383101463318, -0.4628060460090637, 0.32196226716041565, 0.24264150857925415, -0.005586355924606323, 0.19447144865989685, 0.15458160638809204, 0.485310822725296, -0.525039792060852, -0.2774401009082794, 0.23163777589797974, 0.4182739853858948, -0.20757141709327698, -0.0414237305521965, -0.4448895752429962, 0.06417713314294815, -0.023277994245290756, -0.019185204058885574, -0.08467313647270203, 0.00404912605881691, 0.17936715483665466, -0.141014963388443, -0.06083358824253082, -0.20407883822917938, -0.4670405983924866, -0.11982127279043198, 0.30511948466300964, -0.2399478405714035, -0.10561112314462662, -0.1089061051607132, 0.058518532663583755, -0.2150147557258606, -0.1264316290616989, 0.2644937336444855, 0.20696787536144257, -0.3826080560684204, -0.10495495051145554, 0.012840546667575836, 0.11485382914543152, -0.12204870581626892, 0.23087744414806366, -0.28409066796302795, -0.3314359486103058, 0.3611927032470703, -0.02685205265879631, -0.09760918468236923, -0.15022531151771545, 0.19640789926052094, 0.6410110592842102, 0.00015137158334255219, 0.23104757070541382, -0.025150921195745468, -0.034595787525177, -0.13897296786308289, 0.05277165770530701, 0.0753152146935463, 0.16618886590003967, 0.15701408684253693, 0.14772169291973114, 0.40052250027656555, 0.004388160537928343, 0.05007658153772354, 0.09972880780696869, 0.2572559416294098, 0.35555243492126465, -0.3640001714229584, -0.5150120258331299, 0.05073194205760956, -0.5516372919082642, 0.17806649208068848, -0.28019338846206665, -0.37626156210899353, -0.1620282232761383, -0.08286862820386887, 0.3111833930015564, 0.032231926918029785, -0.0938536524772644, 0.15670664608478546, 0.11198585480451584, 0.18790417909622192, 0.12259262800216675, -0.24370111525058746, -0.46946024894714355, -0.30194759368896484, 0.3355240225791931, -0.290115088224411, 0.2659894824028015, 0.29043981432914734, -0.016332749277353287, -0.07166309654712677, -0.3088711202144623, -0.06867741048336029, 0.07463080435991287, 0.696888267993927, 0.31985440850257874, 0.18662744760513306, -0.094004325568676, 0.09945768117904663, -0.0232539139688015, 0.2076234072446823, -0.2597787380218506, 0.17135635018348694, -0.4841797649860382, 0.3901786804199219, 0.00034647993743419647, 0.263250470161438, -0.6178391575813293, 0.006223293021321297, 0.16857385635375977, -0.062083493918180466, -0.5151699185371399, 0.26846614480018616, -0.17149265110492706, 0.14055556058883667, -0.15226086974143982, 0.506000816822052, -0.16236987709999084, 0.5561699867248535, -0.2420712113380432, -0.17256376147270203, 0.606984555721283, -0.5967270731925964, -0.2871374785900116, 0.08811969310045242, -0.02044619619846344, -0.047814153134822845, -0.3517231047153473, -0.40750211477279663, -0.25453752279281616, 0.31830498576164246, -0.10058220475912094, -0.27558910846710205, -0.12727349996566772, 0.03814448416233063, 0.1181812435388565, -0.0827641636133194, 0.7448389530181885, 0.08606348931789398, -0.0579104870557785, 0.36634910106658936, -0.00875793769955635 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error. I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it. It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) out = copy.deepcopy(self.__dict__) #self.__dict__.copy() self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() return out ```
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
126
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error. I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it. It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) out = copy.deepcopy(self.__dict__) #self.__dict__.copy() self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() return out ```
[ -0.22488713264465332, 0.19312027096748352, 0.11275309324264526, 0.028775177896022797, 0.0341956727206707, -0.3237704038619995, 0.13853615522384644, 0.1950846165418625, 0.3468085527420044, -0.10001799464225769, 0.1921815425157547, 0.7253848910331726, -0.1929599940776825, 0.20866984128952026, -0.001619015820324421, 0.05957880616188049, 0.07051892578601837, -0.03540760278701782, -0.005137868225574493, -0.06401272863149643, -0.21730102598667145, 0.05091632530093193, -0.3579757809638977, 0.1536131352186203, -0.27659493684768677, -0.1768151819705963, 0.025939466431736946, 0.11868840456008911, -0.029984423890709877, -0.27113622426986694, 0.2045455276966095, -0.07879392802715302, -0.02770550549030304, 0.24116593599319458, -0.00012316943320911378, -0.08011488616466522, 0.016193952411413193, -0.08638330549001694, -0.004162696190178394, -0.21759964525699615, -0.2230958342552185, -0.12397699058055878, -0.12354379892349243, -0.22941333055496216, 0.07815740257501602, 0.0024629193358123302, -0.296572744846344, -0.381381094455719, 0.634201169013977, 0.43187248706817627, 0.1199069619178772, 0.3648693859577179, -0.06786841154098511, -0.03467929735779762, -0.13554930686950684, 0.3100193738937378, 0.05284782499074936, 0.22330258786678314, 0.12532669305801392, -0.3918122947216034, -0.0012148618698120117, 0.09562961757183075, -0.1981256902217865, -0.21600982546806335, 0.15275095403194427, 0.059106867760419846, 0.18381036818027496, 0.010621657595038414, -0.00867847353219986, 0.09299489855766296, 0.21699771285057068, -0.3573750853538513, -0.21202927827835083, -0.3761960566043854, -0.05751432850956917, -0.15050067007541656, 0.3402036428451538, -0.21683929860591888, 0.13164900243282318, 0.1427592635154724, -0.04848417267203331, -0.10448584705591202, 0.22394061088562012, 0.3518484830856323, -0.03908190131187439, 0.2571777403354645, -0.016609180718660355, 0.39841291308403015, -0.053679075092077255, -0.10632318258285522, -0.18072612583637238, -0.10334429144859314, 0.10165417194366455, 0.45161744952201843, -0.011211026459932327, -0.23849086463451385, 0.21055102348327637, -0.21233049035072327, -0.02430841512978077, 0.21151110529899597, -0.1638643592596054, 0.12254857271909714, -0.36412835121154785, 0.26401758193969727, 0.4708406627178192, 0.221218079328537, 0.12371267378330231, 0.6363039612770081, 0.19857078790664673, -0.16029226779937744, -0.300045371055603, 0.0745258629322052, 0.31024879217147827, -0.10113582015037537, -0.03733978047966957, 0.17564761638641357, -0.10271654278039932, -0.12865214049816132, -0.07385320961475372, 0.27302226424217224, -0.7321613430976868, 0.008305802941322327, 0.18209140002727509, 0.12161961197853088, -0.0009520143503323197, -0.22241070866584778, -0.08313730359077454, 0.07775574922561646, -0.21585707366466522, 0.11480893939733505, -0.11857537925243378, 0.12424914538860321, -0.34277763962745667, 0.11042297631502151, -0.043260108679533005, 0.05694539099931717, 0.31752410531044006, 0.12566952407360077, -0.16883859038352966, -0.059651099145412445, 0.15125079452991486, -0.22944840788841248, 0.40169721841812134, -0.019703704863786697, -0.23601506650447845, 0.04248565435409546, 0.3069401979446411, -0.44203174114227295, -0.2555749714374542, -0.05922709405422211, -0.15265679359436035, -0.14126364886760712, -0.03863443434238434, 0.03472519665956497, -0.23729652166366577, -0.004718184471130371, -0.30469033122062683, 0.10288913547992706, 0.3713425397872925, -0.2058529555797577, 0.09886627644300461, -0.5015785694122314, -0.35631099343299866, -0.20766372978687286, 0.008802365511655807, 0.17747828364372253, -0.4386507272720337, -0.24340401589870453, -0.0980323776602745, 0.15207865834236145, 0.33570683002471924, 0.12456782162189484, -0.2613389790058136, 0.6007260680198669, -0.4962502419948578, 0.8756878972053528, 0.28696486353874207, -0.14862662553787231, -0.40101107954978943, 0.03295411169528961, -0.17289479076862335, 0.2320755571126938, -0.6788747906684875, -0.10385710000991821, 0.16501542925834656, -0.0797584280371666, 0.11381682008504868, 0.33886420726776123, 0.1549207717180252, -0.09533248841762543, -0.12822023034095764, 0.06443098932504654, 0.32686543464660645, -0.2837596833705902, 0.07034898549318314, -0.009695656597614288, 0.16244396567344666, -0.21676307916641235, 0.2174031138420105, 0.034307435154914856, 0.18434275686740875, -0.1125897467136383, 0.4559538960456848, 0.17644348740577698, -0.12051013857126236, -0.31562530994415283, -0.1837683618068695, 0.3253227174282074, -0.028087375685572624, -0.02687976509332657, -0.11929529905319214, -0.08291018009185791, -0.1131267175078392, 0.05602207034826279, -0.33992552757263184, -0.24335622787475586, 0.029902484267950058, 0.02431396394968033, 0.23357683420181274, 0.17532914876937866, -0.08356530964374542, -0.24794542789459229, -0.050614647567272186, 0.060971543192863464, -0.055893149226903915, 0.056883424520492554, 0.12517838180065155, -0.26861512660980225, -0.3178900182247162, 0.16740426421165466, 0.40873536467552185, -0.09793613106012344, -0.18483799695968628, 0.276186466217041, 0.5985629558563232, -0.2991654872894287, -0.39626002311706543, -0.18160812556743622, -0.10411582142114639, 0.1290629804134369, -0.23568862676620483, 0.1717510223388672, -0.002784447744488716, -0.2309010624885559, -0.02569672465324402, 0.5132233500480652, 0.24769341945648193, 0.3112371265888214, -0.4027116894721985, 0.25161805748939514, -0.012304926291108131, -0.08680543303489685, -0.14821769297122955, -0.33737656474113464, -0.26279139518737793, 0.03733229637145996, 0.3305850625038147, -0.13446249067783356, -0.036491602659225464, 0.04074431210756302, 0.3557881712913513, -0.07353569567203522, 0.32570719718933105, -0.06443044543266296, -0.19810616970062256, -0.19068068265914917, 0.29802316427230835, 0.3740842938423157, 0.5166625380516052, -0.10923230648040771, -0.057224374264478683, 0.08503767848014832, -0.04589064046740532, -0.04900103062391281, 0.016840867698192596, -0.17222784459590912, -0.03786509111523628, 0.19884783029556274, 0.048589352518320084, -0.0998985543847084, -0.1812920868396759, 0.009794287383556366, 0.05627928674221039, 0.2922278940677643, -0.2386675626039505, 0.09624142944812775, -0.5637152791023254, 0.07098772376775742, -0.2885974049568176, -0.13038377463817596, 0.007215343415737152, -0.44396114349365234, -0.21197105944156647, 0.0941518098115921, -0.2360060214996338, 0.21823422610759735, -0.16105017066001892, -0.15978236496448517, -0.1504625827074051, -0.28893688321113586, 0.0986512154340744, -0.234613299369812, -0.22342288494110107, -0.08644011616706848, 0.12882214784622192, 0.12238115072250366, 0.22562816739082336, 0.35768455266952515, -0.42776942253112793, -0.34537556767463684, -0.2861612141132355, 0.36421096324920654, -0.16716064512729645, 0.12165573239326477, 0.3645743429660797, -0.21086321771144867, -0.07228486239910126, 0.15103384852409363, 0.3195462226867676, -0.10602478682994843, -0.11920332163572311, -0.15033607184886932, 0.27737563848495483, 0.0240007434040308, -0.028316382318735123, 0.014470770955085754, -0.1706431657075882, -0.05764825642108917, 0.3715693950653076, -0.15956465899944305, 0.08714565634727478, 0.16744168102741241, 0.04409058764576912, 0.2306472659111023, -0.10440967977046967, -0.26062777638435364, -0.4392026960849762, -0.09853178262710571, 0.16474327445030212, -0.19629700481891632, -0.12573964893817902, -0.03666495531797409, -0.10954625904560089, 0.16133469343185425, 0.04170415922999382, -0.23590220510959625, 0.08997966349124908, -0.004337172955274582, 0.3883192539215088, -0.20898598432540894, 0.11808416247367859, 0.3752021789550781, 0.16850705444812775, 0.05962440371513367, -0.1573241502046585, -0.20618516206741333, 0.18140126764774323, 0.38659417629241943, 0.21564295887947083, 0.18958210945129395, 0.2443961501121521, 0.15978771448135376, 0.8500343561172485, 0.31932997703552246, -0.4346616268157959, 0.12059749662876129, -0.058093830943107605, -0.06442436575889587, -0.07623691111803055, -0.31377890706062317, -0.06624941527843475, -0.2433529794216156, -0.12011346220970154, -0.1252264827489853, -0.21281352639198303, 0.12244535237550735, 0.1718873679637909, 0.07384593784809113, -0.02322244457900524, -0.4763818085193634, 0.18449853360652924, -0.25369513034820557, 0.14348551630973816, 0.15853972733020782, 0.3790481984615326, -0.19344665110111237, 0.31325799226760864, 0.2337401956319809, -0.09904003143310547, 0.40597209334373474, 0.09167960286140442, -0.5711539387702942, -0.20064345002174377, -0.34278544783592224, 0.44404882192611694, 0.25476017594337463, 0.17552664875984192, -0.09011706709861755, -0.08576277643442154, -0.14311569929122925, 0.1859128624200821, 0.3545988202095032, -0.44384074211120605, -0.031231015920639038, 0.30809149146080017, -0.16998621821403503, -0.17829041182994843, -0.08582243323326111, 0.20333445072174072, 0.6135460138320923, 0.060684043914079666, 0.5777102112770081, -0.13267262279987335, -0.0017201460432261229, -0.1848401427268982, 0.09971871227025986, -0.09730782359838486, -0.18139144778251648, -0.04163624346256256, 0.044316813349723816, -0.2571534812450409, 0.13071459531784058, 0.17882360517978668, -0.03114706091582775, 0.25152188539505005, 0.03757261112332344, -0.11305516958236694, -0.24862951040267944, -0.06708380579948425, 0.02045392617583275, 0.22220665216445923, 0.0019848200026899576, 0.15636776387691498, 0.2334228903055191, -0.03322277218103409, 0.2050066739320755, 0.3170374631881714, -0.15541788935661316, 0.019160732626914978, -0.20104718208312988, 0.02379235252737999, 0.3575342893600464, 0.07553595304489136, -0.05679481476545334, 0.30185389518737793, -0.01349792629480362, -0.1000860184431076, -0.2922608256340027, 0.2588852345943451, 0.1977364867925644, 0.0974985733628273, -0.1309501677751541, -0.5797991752624512, 0.06107085198163986, 0.09864334762096405, -0.1772267371416092, 0.36087146401405334, 0.04270927235484123, -0.2918623685836792, 0.2905968427658081, 0.1774497777223587, 0.8005264401435852, 0.16540585458278656, 0.014834724366664886, 0.33652377128601074, 0.18082329630851746, 0.36992210149765015, 0.23551879823207855, -0.06569377332925797, -0.342785507440567, 0.35711461305618286, -0.18385036289691925, -0.2929322421550751, 0.002491358667612076, 0.005259685218334198, -0.19129016995429993, 0.24985642731189728, -0.013108931481838226, 0.15577617287635803, -0.1824072152376175, 0.14643068611621857, 0.3141554594039917, -0.21153458952903748, -0.03458434343338013, 0.15031296014785767, -0.07391834259033203, 0.2885684669017792, -0.035755306482315063, 0.13449284434318542, -0.14748211205005646, -0.007898006588220596, -0.24406175315380096, 0.14441347122192383, -0.5116114616394043, 0.39741092920303345, 0.08362816274166107, -0.08395256102085114, 0.2956172525882721, 0.08216807246208191, -0.07009652256965637, 0.16538134217262268, -0.05454336106777191, 0.12420116364955902, 0.2346411645412445, 0.20128847658634186, 0.12402099370956421, -0.3333583176136017, 0.2635718286037445, 0.22540882229804993, -0.10462000966072083, -0.0038392767310142517, -0.15546825528144836, -0.22562924027442932, -0.17735429108142853, 0.21047744154930115, 0.22592036426067352, -0.35650405287742615, -0.23085534572601318, -0.03488729149103165, 0.09603165090084076, -0.1957099586725235, 0.02037416212260723, 0.12065380811691284, 0.13061918318271637, 0.2372598648071289, -0.3842770457267761, -0.1575084924697876, 0.0443064346909523, 0.46375930309295654, -0.2750539779663086, 0.21326041221618652, 0.42850732803344727, -0.005432862788438797, -0.04312985762953758, -0.12088283896446228, 0.1267637014389038, 0.04375794529914856, 0.21061977744102478, 0.16236649453639984, -0.3165006637573242, -0.06293672323226929, -0.268012136220932, 0.3825357258319855, -0.04196007549762726, -0.2074611485004425, -0.0652521401643753, -0.22407381236553192, -0.46791017055511475, -0.054444730281829834, 0.24773018062114716, 0.14027397334575653, 0.09236691147089005, 0.576877236366272, -0.35869479179382324, 0.18367180228233337, -0.18211637437343597, 0.09477333724498749, 0.029332147911190987, 0.0852857381105423, 0.08981329947710037, 0.03728445619344711, -0.022229943424463272, -0.2665499150753021, -0.08721073716878891, 0.45016610622406006, 0.009886075742542744, -0.09261651337146759, -0.4276527166366577, 0.17318445444107056, 0.5592161417007446, -0.18240711092948914, 0.07406467944383621, -0.21702085435390472, -0.0007078256458044052, -0.35931551456451416, -0.02517954260110855, 0.2778584659099579, 0.030726052820682526, 0.27333739399909973, 0.18936383724212646, 0.11630548536777496, 0.004188500344753265, -0.015499874949455261, -0.096745565533638, -0.06437040865421295, 0.017632082104682922, 0.05479048192501068, 0.034339696168899536, -0.07344303280115128, -0.08076423406600952, 0.2219373881816864, 0.29702115058898926, 0.20848378539085388, 0.2401295006275177, -0.045540615916252136, -0.2281159609556198, -0.13362331688404083, 0.3515208959579468, 0.3570409417152405, -0.2013128250837326, -0.24378573894500732, 0.5111563205718994, 0.08368029445409775, -0.09427815675735474, 0.13512618839740753, 0.2759709656238556, 0.03471550717949867, 0.2394305169582367, 0.17323733866214752, -0.232628732919693, 0.2811649441719055, -0.46636825799942017, -0.08754269033670425, 0.2715708017349243, -0.046773843467235565, 0.04084209352731705, 0.08094322681427002, -0.18053694069385529, 0.2933397591114044, 0.2770444452762604, 0.1332239955663681, 0.33002299070358276, 0.23037122189998627, 0.0932229533791542, 0.1252530813217163, 0.1260303556919098, 0.0945228636264801, 0.1989383101463318, -0.4628060460090637, 0.32196226716041565, 0.24264150857925415, -0.005586355924606323, 0.19447144865989685, 0.15458160638809204, 0.485310822725296, -0.525039792060852, -0.2774401009082794, 0.23163777589797974, 0.4182739853858948, -0.20757141709327698, -0.0414237305521965, -0.4448895752429962, 0.06417713314294815, -0.023277994245290756, -0.019185204058885574, -0.08467313647270203, 0.00404912605881691, 0.17936715483665466, -0.141014963388443, -0.06083358824253082, -0.20407883822917938, -0.4670405983924866, -0.11982127279043198, 0.30511948466300964, -0.2399478405714035, -0.10561112314462662, -0.1089061051607132, 0.058518532663583755, -0.2150147557258606, -0.1264316290616989, 0.2644937336444855, 0.20696787536144257, -0.3826080560684204, -0.10495495051145554, 0.012840546667575836, 0.11485382914543152, -0.12204870581626892, 0.23087744414806366, -0.28409066796302795, -0.3314359486103058, 0.3611927032470703, -0.02685205265879631, -0.09760918468236923, -0.15022531151771545, 0.19640789926052094, 0.6410110592842102, 0.00015137158334255219, 0.23104757070541382, -0.025150921195745468, -0.034595787525177, -0.13897296786308289, 0.05277165770530701, 0.0753152146935463, 0.16618886590003967, 0.15701408684253693, 0.14772169291973114, 0.40052250027656555, 0.004388160537928343, 0.05007658153772354, 0.09972880780696869, 0.2572559416294098, 0.35555243492126465, -0.3640001714229584, -0.5150120258331299, 0.05073194205760956, -0.5516372919082642, 0.17806649208068848, -0.28019338846206665, -0.37626156210899353, -0.1620282232761383, -0.08286862820386887, 0.3111833930015564, 0.032231926918029785, -0.0938536524772644, 0.15670664608478546, 0.11198585480451584, 0.18790417909622192, 0.12259262800216675, -0.24370111525058746, -0.46946024894714355, -0.30194759368896484, 0.3355240225791931, -0.290115088224411, 0.2659894824028015, 0.29043981432914734, -0.016332749277353287, -0.07166309654712677, -0.3088711202144623, -0.06867741048336029, 0.07463080435991287, 0.696888267993927, 0.31985440850257874, 0.18662744760513306, -0.094004325568676, 0.09945768117904663, -0.0232539139688015, 0.2076234072446823, -0.2597787380218506, 0.17135635018348694, -0.4841797649860382, 0.3901786804199219, 0.00034647993743419647, 0.263250470161438, -0.6178391575813293, 0.006223293021321297, 0.16857385635375977, -0.062083493918180466, -0.5151699185371399, 0.26846614480018616, -0.17149265110492706, 0.14055556058883667, -0.15226086974143982, 0.506000816822052, -0.16236987709999084, 0.5561699867248535, -0.2420712113380432, -0.17256376147270203, 0.606984555721283, -0.5967270731925964, -0.2871374785900116, 0.08811969310045242, -0.02044619619846344, -0.047814153134822845, -0.3517231047153473, -0.40750211477279663, -0.25453752279281616, 0.31830498576164246, -0.10058220475912094, -0.27558910846710205, -0.12727349996566772, 0.03814448416233063, 0.1181812435388565, -0.0827641636133194, 0.7448389530181885, 0.08606348931789398, -0.0579104870557785, 0.36634910106658936, -0.00875793769955635 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
I'm glad you figured something out :) Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly.
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
61
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/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, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples I'm glad you figured something out :) Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly.
[ -0.22488713264465332, 0.19312027096748352, 0.11275309324264526, 0.028775177896022797, 0.0341956727206707, -0.3237704038619995, 0.13853615522384644, 0.1950846165418625, 0.3468085527420044, -0.10001799464225769, 0.1921815425157547, 0.7253848910331726, -0.1929599940776825, 0.20866984128952026, -0.001619015820324421, 0.05957880616188049, 0.07051892578601837, -0.03540760278701782, -0.005137868225574493, -0.06401272863149643, -0.21730102598667145, 0.05091632530093193, -0.3579757809638977, 0.1536131352186203, -0.27659493684768677, -0.1768151819705963, 0.025939466431736946, 0.11868840456008911, -0.029984423890709877, -0.27113622426986694, 0.2045455276966095, -0.07879392802715302, -0.02770550549030304, 0.24116593599319458, -0.00012316943320911378, -0.08011488616466522, 0.016193952411413193, -0.08638330549001694, -0.004162696190178394, -0.21759964525699615, -0.2230958342552185, -0.12397699058055878, -0.12354379892349243, -0.22941333055496216, 0.07815740257501602, 0.0024629193358123302, -0.296572744846344, -0.381381094455719, 0.634201169013977, 0.43187248706817627, 0.1199069619178772, 0.3648693859577179, -0.06786841154098511, -0.03467929735779762, -0.13554930686950684, 0.3100193738937378, 0.05284782499074936, 0.22330258786678314, 0.12532669305801392, -0.3918122947216034, -0.0012148618698120117, 0.09562961757183075, -0.1981256902217865, -0.21600982546806335, 0.15275095403194427, 0.059106867760419846, 0.18381036818027496, 0.010621657595038414, -0.00867847353219986, 0.09299489855766296, 0.21699771285057068, -0.3573750853538513, -0.21202927827835083, -0.3761960566043854, -0.05751432850956917, -0.15050067007541656, 0.3402036428451538, -0.21683929860591888, 0.13164900243282318, 0.1427592635154724, -0.04848417267203331, -0.10448584705591202, 0.22394061088562012, 0.3518484830856323, -0.03908190131187439, 0.2571777403354645, -0.016609180718660355, 0.39841291308403015, -0.053679075092077255, -0.10632318258285522, -0.18072612583637238, -0.10334429144859314, 0.10165417194366455, 0.45161744952201843, -0.011211026459932327, -0.23849086463451385, 0.21055102348327637, -0.21233049035072327, -0.02430841512978077, 0.21151110529899597, -0.1638643592596054, 0.12254857271909714, -0.36412835121154785, 0.26401758193969727, 0.4708406627178192, 0.221218079328537, 0.12371267378330231, 0.6363039612770081, 0.19857078790664673, -0.16029226779937744, -0.300045371055603, 0.0745258629322052, 0.31024879217147827, -0.10113582015037537, -0.03733978047966957, 0.17564761638641357, -0.10271654278039932, -0.12865214049816132, -0.07385320961475372, 0.27302226424217224, -0.7321613430976868, 0.008305802941322327, 0.18209140002727509, 0.12161961197853088, -0.0009520143503323197, -0.22241070866584778, -0.08313730359077454, 0.07775574922561646, -0.21585707366466522, 0.11480893939733505, -0.11857537925243378, 0.12424914538860321, -0.34277763962745667, 0.11042297631502151, -0.043260108679533005, 0.05694539099931717, 0.31752410531044006, 0.12566952407360077, -0.16883859038352966, -0.059651099145412445, 0.15125079452991486, -0.22944840788841248, 0.40169721841812134, -0.019703704863786697, -0.23601506650447845, 0.04248565435409546, 0.3069401979446411, -0.44203174114227295, -0.2555749714374542, -0.05922709405422211, -0.15265679359436035, -0.14126364886760712, -0.03863443434238434, 0.03472519665956497, -0.23729652166366577, -0.004718184471130371, -0.30469033122062683, 0.10288913547992706, 0.3713425397872925, -0.2058529555797577, 0.09886627644300461, -0.5015785694122314, -0.35631099343299866, -0.20766372978687286, 0.008802365511655807, 0.17747828364372253, -0.4386507272720337, -0.24340401589870453, -0.0980323776602745, 0.15207865834236145, 0.33570683002471924, 0.12456782162189484, -0.2613389790058136, 0.6007260680198669, -0.4962502419948578, 0.8756878972053528, 0.28696486353874207, -0.14862662553787231, -0.40101107954978943, 0.03295411169528961, -0.17289479076862335, 0.2320755571126938, -0.6788747906684875, -0.10385710000991821, 0.16501542925834656, -0.0797584280371666, 0.11381682008504868, 0.33886420726776123, 0.1549207717180252, -0.09533248841762543, -0.12822023034095764, 0.06443098932504654, 0.32686543464660645, -0.2837596833705902, 0.07034898549318314, -0.009695656597614288, 0.16244396567344666, -0.21676307916641235, 0.2174031138420105, 0.034307435154914856, 0.18434275686740875, -0.1125897467136383, 0.4559538960456848, 0.17644348740577698, -0.12051013857126236, -0.31562530994415283, -0.1837683618068695, 0.3253227174282074, -0.028087375685572624, -0.02687976509332657, -0.11929529905319214, -0.08291018009185791, -0.1131267175078392, 0.05602207034826279, -0.33992552757263184, -0.24335622787475586, 0.029902484267950058, 0.02431396394968033, 0.23357683420181274, 0.17532914876937866, -0.08356530964374542, -0.24794542789459229, -0.050614647567272186, 0.060971543192863464, -0.055893149226903915, 0.056883424520492554, 0.12517838180065155, -0.26861512660980225, -0.3178900182247162, 0.16740426421165466, 0.40873536467552185, -0.09793613106012344, -0.18483799695968628, 0.276186466217041, 0.5985629558563232, -0.2991654872894287, -0.39626002311706543, -0.18160812556743622, -0.10411582142114639, 0.1290629804134369, -0.23568862676620483, 0.1717510223388672, -0.002784447744488716, -0.2309010624885559, -0.02569672465324402, 0.5132233500480652, 0.24769341945648193, 0.3112371265888214, -0.4027116894721985, 0.25161805748939514, -0.012304926291108131, -0.08680543303489685, -0.14821769297122955, -0.33737656474113464, -0.26279139518737793, 0.03733229637145996, 0.3305850625038147, -0.13446249067783356, -0.036491602659225464, 0.04074431210756302, 0.3557881712913513, -0.07353569567203522, 0.32570719718933105, -0.06443044543266296, -0.19810616970062256, -0.19068068265914917, 0.29802316427230835, 0.3740842938423157, 0.5166625380516052, -0.10923230648040771, -0.057224374264478683, 0.08503767848014832, -0.04589064046740532, -0.04900103062391281, 0.016840867698192596, -0.17222784459590912, -0.03786509111523628, 0.19884783029556274, 0.048589352518320084, -0.0998985543847084, -0.1812920868396759, 0.009794287383556366, 0.05627928674221039, 0.2922278940677643, -0.2386675626039505, 0.09624142944812775, -0.5637152791023254, 0.07098772376775742, -0.2885974049568176, -0.13038377463817596, 0.007215343415737152, -0.44396114349365234, -0.21197105944156647, 0.0941518098115921, -0.2360060214996338, 0.21823422610759735, -0.16105017066001892, -0.15978236496448517, -0.1504625827074051, -0.28893688321113586, 0.0986512154340744, -0.234613299369812, -0.22342288494110107, -0.08644011616706848, 0.12882214784622192, 0.12238115072250366, 0.22562816739082336, 0.35768455266952515, -0.42776942253112793, -0.34537556767463684, -0.2861612141132355, 0.36421096324920654, -0.16716064512729645, 0.12165573239326477, 0.3645743429660797, -0.21086321771144867, -0.07228486239910126, 0.15103384852409363, 0.3195462226867676, -0.10602478682994843, -0.11920332163572311, -0.15033607184886932, 0.27737563848495483, 0.0240007434040308, -0.028316382318735123, 0.014470770955085754, -0.1706431657075882, -0.05764825642108917, 0.3715693950653076, -0.15956465899944305, 0.08714565634727478, 0.16744168102741241, 0.04409058764576912, 0.2306472659111023, -0.10440967977046967, -0.26062777638435364, -0.4392026960849762, -0.09853178262710571, 0.16474327445030212, -0.19629700481891632, -0.12573964893817902, -0.03666495531797409, -0.10954625904560089, 0.16133469343185425, 0.04170415922999382, -0.23590220510959625, 0.08997966349124908, -0.004337172955274582, 0.3883192539215088, -0.20898598432540894, 0.11808416247367859, 0.3752021789550781, 0.16850705444812775, 0.05962440371513367, -0.1573241502046585, -0.20618516206741333, 0.18140126764774323, 0.38659417629241943, 0.21564295887947083, 0.18958210945129395, 0.2443961501121521, 0.15978771448135376, 0.8500343561172485, 0.31932997703552246, -0.4346616268157959, 0.12059749662876129, -0.058093830943107605, -0.06442436575889587, -0.07623691111803055, -0.31377890706062317, -0.06624941527843475, -0.2433529794216156, -0.12011346220970154, -0.1252264827489853, -0.21281352639198303, 0.12244535237550735, 0.1718873679637909, 0.07384593784809113, -0.02322244457900524, -0.4763818085193634, 0.18449853360652924, -0.25369513034820557, 0.14348551630973816, 0.15853972733020782, 0.3790481984615326, -0.19344665110111237, 0.31325799226760864, 0.2337401956319809, -0.09904003143310547, 0.40597209334373474, 0.09167960286140442, -0.5711539387702942, -0.20064345002174377, -0.34278544783592224, 0.44404882192611694, 0.25476017594337463, 0.17552664875984192, -0.09011706709861755, -0.08576277643442154, -0.14311569929122925, 0.1859128624200821, 0.3545988202095032, -0.44384074211120605, -0.031231015920639038, 0.30809149146080017, -0.16998621821403503, -0.17829041182994843, -0.08582243323326111, 0.20333445072174072, 0.6135460138320923, 0.060684043914079666, 0.5777102112770081, -0.13267262279987335, -0.0017201460432261229, -0.1848401427268982, 0.09971871227025986, -0.09730782359838486, -0.18139144778251648, -0.04163624346256256, 0.044316813349723816, -0.2571534812450409, 0.13071459531784058, 0.17882360517978668, -0.03114706091582775, 0.25152188539505005, 0.03757261112332344, -0.11305516958236694, -0.24862951040267944, -0.06708380579948425, 0.02045392617583275, 0.22220665216445923, 0.0019848200026899576, 0.15636776387691498, 0.2334228903055191, -0.03322277218103409, 0.2050066739320755, 0.3170374631881714, -0.15541788935661316, 0.019160732626914978, -0.20104718208312988, 0.02379235252737999, 0.3575342893600464, 0.07553595304489136, -0.05679481476545334, 0.30185389518737793, -0.01349792629480362, -0.1000860184431076, -0.2922608256340027, 0.2588852345943451, 0.1977364867925644, 0.0974985733628273, -0.1309501677751541, -0.5797991752624512, 0.06107085198163986, 0.09864334762096405, -0.1772267371416092, 0.36087146401405334, 0.04270927235484123, -0.2918623685836792, 0.2905968427658081, 0.1774497777223587, 0.8005264401435852, 0.16540585458278656, 0.014834724366664886, 0.33652377128601074, 0.18082329630851746, 0.36992210149765015, 0.23551879823207855, -0.06569377332925797, -0.342785507440567, 0.35711461305618286, -0.18385036289691925, -0.2929322421550751, 0.002491358667612076, 0.005259685218334198, -0.19129016995429993, 0.24985642731189728, -0.013108931481838226, 0.15577617287635803, -0.1824072152376175, 0.14643068611621857, 0.3141554594039917, -0.21153458952903748, -0.03458434343338013, 0.15031296014785767, -0.07391834259033203, 0.2885684669017792, -0.035755306482315063, 0.13449284434318542, -0.14748211205005646, -0.007898006588220596, -0.24406175315380096, 0.14441347122192383, -0.5116114616394043, 0.39741092920303345, 0.08362816274166107, -0.08395256102085114, 0.2956172525882721, 0.08216807246208191, -0.07009652256965637, 0.16538134217262268, -0.05454336106777191, 0.12420116364955902, 0.2346411645412445, 0.20128847658634186, 0.12402099370956421, -0.3333583176136017, 0.2635718286037445, 0.22540882229804993, -0.10462000966072083, -0.0038392767310142517, -0.15546825528144836, -0.22562924027442932, -0.17735429108142853, 0.21047744154930115, 0.22592036426067352, -0.35650405287742615, -0.23085534572601318, -0.03488729149103165, 0.09603165090084076, -0.1957099586725235, 0.02037416212260723, 0.12065380811691284, 0.13061918318271637, 0.2372598648071289, -0.3842770457267761, -0.1575084924697876, 0.0443064346909523, 0.46375930309295654, -0.2750539779663086, 0.21326041221618652, 0.42850732803344727, -0.005432862788438797, -0.04312985762953758, -0.12088283896446228, 0.1267637014389038, 0.04375794529914856, 0.21061977744102478, 0.16236649453639984, -0.3165006637573242, -0.06293672323226929, -0.268012136220932, 0.3825357258319855, -0.04196007549762726, -0.2074611485004425, -0.0652521401643753, -0.22407381236553192, -0.46791017055511475, -0.054444730281829834, 0.24773018062114716, 0.14027397334575653, 0.09236691147089005, 0.576877236366272, -0.35869479179382324, 0.18367180228233337, -0.18211637437343597, 0.09477333724498749, 0.029332147911190987, 0.0852857381105423, 0.08981329947710037, 0.03728445619344711, -0.022229943424463272, -0.2665499150753021, -0.08721073716878891, 0.45016610622406006, 0.009886075742542744, -0.09261651337146759, -0.4276527166366577, 0.17318445444107056, 0.5592161417007446, -0.18240711092948914, 0.07406467944383621, -0.21702085435390472, -0.0007078256458044052, -0.35931551456451416, -0.02517954260110855, 0.2778584659099579, 0.030726052820682526, 0.27333739399909973, 0.18936383724212646, 0.11630548536777496, 0.004188500344753265, -0.015499874949455261, -0.096745565533638, -0.06437040865421295, 0.017632082104682922, 0.05479048192501068, 0.034339696168899536, -0.07344303280115128, -0.08076423406600952, 0.2219373881816864, 0.29702115058898926, 0.20848378539085388, 0.2401295006275177, -0.045540615916252136, -0.2281159609556198, -0.13362331688404083, 0.3515208959579468, 0.3570409417152405, -0.2013128250837326, -0.24378573894500732, 0.5111563205718994, 0.08368029445409775, -0.09427815675735474, 0.13512618839740753, 0.2759709656238556, 0.03471550717949867, 0.2394305169582367, 0.17323733866214752, -0.232628732919693, 0.2811649441719055, -0.46636825799942017, -0.08754269033670425, 0.2715708017349243, -0.046773843467235565, 0.04084209352731705, 0.08094322681427002, -0.18053694069385529, 0.2933397591114044, 0.2770444452762604, 0.1332239955663681, 0.33002299070358276, 0.23037122189998627, 0.0932229533791542, 0.1252530813217163, 0.1260303556919098, 0.0945228636264801, 0.1989383101463318, -0.4628060460090637, 0.32196226716041565, 0.24264150857925415, -0.005586355924606323, 0.19447144865989685, 0.15458160638809204, 0.485310822725296, -0.525039792060852, -0.2774401009082794, 0.23163777589797974, 0.4182739853858948, -0.20757141709327698, -0.0414237305521965, -0.4448895752429962, 0.06417713314294815, -0.023277994245290756, -0.019185204058885574, -0.08467313647270203, 0.00404912605881691, 0.17936715483665466, -0.141014963388443, -0.06083358824253082, -0.20407883822917938, -0.4670405983924866, -0.11982127279043198, 0.30511948466300964, -0.2399478405714035, -0.10561112314462662, -0.1089061051607132, 0.058518532663583755, -0.2150147557258606, -0.1264316290616989, 0.2644937336444855, 0.20696787536144257, -0.3826080560684204, -0.10495495051145554, 0.012840546667575836, 0.11485382914543152, -0.12204870581626892, 0.23087744414806366, -0.28409066796302795, -0.3314359486103058, 0.3611927032470703, -0.02685205265879631, -0.09760918468236923, -0.15022531151771545, 0.19640789926052094, 0.6410110592842102, 0.00015137158334255219, 0.23104757070541382, -0.025150921195745468, -0.034595787525177, -0.13897296786308289, 0.05277165770530701, 0.0753152146935463, 0.16618886590003967, 0.15701408684253693, 0.14772169291973114, 0.40052250027656555, 0.004388160537928343, 0.05007658153772354, 0.09972880780696869, 0.2572559416294098, 0.35555243492126465, -0.3640001714229584, -0.5150120258331299, 0.05073194205760956, -0.5516372919082642, 0.17806649208068848, -0.28019338846206665, -0.37626156210899353, -0.1620282232761383, -0.08286862820386887, 0.3111833930015564, 0.032231926918029785, -0.0938536524772644, 0.15670664608478546, 0.11198585480451584, 0.18790417909622192, 0.12259262800216675, -0.24370111525058746, -0.46946024894714355, -0.30194759368896484, 0.3355240225791931, -0.290115088224411, 0.2659894824028015, 0.29043981432914734, -0.016332749277353287, -0.07166309654712677, -0.3088711202144623, -0.06867741048336029, 0.07463080435991287, 0.696888267993927, 0.31985440850257874, 0.18662744760513306, -0.094004325568676, 0.09945768117904663, -0.0232539139688015, 0.2076234072446823, -0.2597787380218506, 0.17135635018348694, -0.4841797649860382, 0.3901786804199219, 0.00034647993743419647, 0.263250470161438, -0.6178391575813293, 0.006223293021321297, 0.16857385635375977, -0.062083493918180466, -0.5151699185371399, 0.26846614480018616, -0.17149265110492706, 0.14055556058883667, -0.15226086974143982, 0.506000816822052, -0.16236987709999084, 0.5561699867248535, -0.2420712113380432, -0.17256376147270203, 0.606984555721283, -0.5967270731925964, -0.2871374785900116, 0.08811969310045242, -0.02044619619846344, -0.047814153134822845, -0.3517231047153473, -0.40750211477279663, -0.25453752279281616, 0.31830498576164246, -0.10058220475912094, -0.27558910846710205, -0.12727349996566772, 0.03814448416233063, 0.1181812435388565, -0.0827641636133194, 0.7448389530181885, 0.08606348931789398, -0.0579104870557785, 0.36634910106658936, -0.00875793769955635 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Hi ! For now this is probably the best option. We might add a feature like this in the feature as well. Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
63
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no Hi ! For now this is probably the best option. We might add a feature like this in the feature as well. Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
[ 0.140685573220253, -0.16548225283622742, -0.16508828103542328, 0.154004767537117, 0.048943281173706055, 0.23949071764945984, 0.2769090533256531, 0.06343904882669449, -0.33765149116516113, 0.019204802811145782, -0.03411008417606354, 0.23469780385494232, 0.11909029632806778, 0.20621457695960999, -0.08168388903141022, 0.010252159088850021, 0.09784095734357834, 0.1727186143398285, -0.0850970447063446, 0.03569101542234421, -0.07406969368457794, -0.24486590921878815, -0.23722364008426666, -0.14013759791851044, -0.488383024930954, -0.07013212144374847, -0.379318505525589, -0.052384860813617706, -0.18778285384178162, -0.05633240565657616, 0.1769873946905136, 0.5257623195648193, -0.0159226655960083, 0.3108598589897156, -0.00010153790935873985, -0.3572311997413635, 0.022831246256828308, 0.15965397655963898, -0.3186166286468506, 0.16422410309314728, -0.3713805079460144, -0.07322614639997482, 0.04189475625753403, -0.025724321603775024, 0.025640450417995453, -0.2802482545375824, -0.2648802101612091, -0.22341378033161163, 0.1587846279144287, 0.0940888449549675, 0.28886404633522034, -0.02775835245847702, -0.248173326253891, -0.01616726629436016, 0.02973126247525215, 0.493516206741333, -0.1404058039188385, 0.25179392099380493, 0.4525960385799408, -0.09404981136322021, 0.15952083468437195, 0.10836140811443329, -0.022484082728624344, 0.23510408401489258, 0.1676221638917923, -0.17023073136806488, -0.20573532581329346, -0.19091469049453735, 0.2019747793674469, 0.305592805147171, 0.7380339503288269, -0.4114801585674286, -0.3087230324745178, -0.24452278017997742, 0.4246826469898224, -0.012592020444571972, -0.0807775929570198, 0.03839700669050217, -0.018863163888454437, 0.0967520922422409, -0.35414087772369385, -0.5405524969100952, -0.10781574249267578, -0.20755837857723236, -0.028379999101161957, -0.5066345930099487, 0.07460862398147583, -0.11458892375230789, 0.07823668420314789, -0.025959618389606476, 0.42613813281059265, -0.14968882501125336, 0.20138044655323029, 0.394400417804718, -0.38748031854629517, -0.31271806359291077, -0.19661164283752441, -0.08395608514547348, 0.28267261385917664, 0.12052581459283829, 0.35873943567276, -0.03939545899629593, -0.10546787828207016, 0.251682311296463, 0.3106618821620941, 0.0013536904007196426, -0.13744601607322693, 0.03650574013590813, 0.05274223908782005, -0.20879164338111877, -0.2718607485294342, -0.10243505984544754, 0.015587796457111835, 0.23373258113861084, 0.31215426325798035, -0.07341158390045166, 0.21978478133678436, -0.3145796060562134, -0.36961475014686584, 0.039502594619989395, -0.2582021951675415, -0.13382835686206818, -0.15591785311698914, -0.11586958914995193, 0.10433550924062729, -0.07423920184373856, -0.13985547423362732, -0.056256189942359924, -0.268582820892334, -0.35360151529312134, -0.052464809268713, 0.09230183064937592, -0.19245176017284393, 0.027381036430597305, 0.3380941152572632, -0.16899104416370392, -0.045946747064590454, 0.23781512677669525, 0.17351961135864258, -0.1429387927055359, 0.3021448254585266, -0.26838913559913635, 0.05805978551506996, -0.12682241201400757, -0.19463060796260834, -0.25990474224090576, -0.17692574858665466, 0.1686662882566452, -0.06779675930738449, 0.42032259702682495, 0.12228217720985413, -0.08900874853134155, -0.02607526071369648, 0.30756857991218567, 0.03802311792969704, -0.17207765579223633, -0.26573997735977173, 0.2884059548377991, -0.1524934470653534, 0.1331704705953598, 0.07652134448289871, 0.034010324627161026, -0.01293567568063736, -0.2317594587802887, -0.06721806526184082, 0.17379586398601532, -0.43737465143203735, -0.007802397012710571, -0.19611261785030365, -0.32697218656539917, -0.11530343443155289, 0.3891497254371643, -0.007586991880089045, 0.16047236323356628, 0.014076011255383492, -0.04537074267864227, 0.046333037316799164, 0.09083907306194305, -0.1502964198589325, 0.25020667910575867, -0.02824563905596733, 0.24786968529224396, -0.13194459676742554, 0.36400601267814636, 0.36632052063941956, -0.012433288618922234, 0.14156107604503632, 0.0014438163489103317, -0.2778802812099457, -0.37649646401405334, -0.21612036228179932, -0.4165988862514496, 0.11947406083345413, 0.10595975816249847, 0.14780835807323456, 0.05976255238056183, 0.16662776470184326, -0.17105405032634735, 0.15538114309310913, -0.06318038702011108, -0.11823458969593048, -0.05650809407234192, 0.44241735339164734, 0.10029962658882141, 0.1001492366194725, -0.3835814297199249, -0.41974517703056335, 0.1171436682343483, -0.18400327861309052, -0.11749871075153351, 0.24601846933364868, -0.6625518798828125, 0.0903075709939003, -0.08961105346679688, -0.07946473360061646, 0.1624143421649933, 0.23748555779457092, -0.34663864970207214, 0.031168952584266663, -0.2786118686199188, -0.2357187271118164, 0.3210318088531494, -0.28573498129844666, 0.029597533866763115, -0.10311424732208252, 0.3592185974121094, 0.15913546085357666, -0.010829727165400982, 0.19670799374580383, 0.3669460713863373, -0.01544499397277832, 0.12015161663293839, 0.004044250585138798, 0.10936227440834045, 0.11138971894979477, 0.04682748019695282, 0.2053041160106659, 0.19677096605300903, 0.16372770071029663, -0.024981830269098282, -0.032892629504203796, 0.3001328408718109, 0.0941673219203949, 0.00906393676996231, -0.4436192810535431, 0.18905285000801086, -0.39687982201576233, -0.1433708667755127, 0.07153551280498505, -0.07113989442586899, 0.035045504570007324, -0.18692916631698608, 0.13682213425636292, -0.25678497552871704, 0.12416635453701019, 0.17115452885627747, -0.1705223023891449, 0.3658866882324219, -0.4551766812801361, 0.15498855710029602, -0.14463284611701965, -0.12763220071792603, 0.10364359617233276, -0.02789899706840515, -0.021337859332561493, -0.13374203443527222, 0.28787124156951904, 0.3261112868785858, 0.35454124212265015, 0.24291342496871948, 0.2274249792098999, 0.2056378424167633, 0.23145194351673126, 0.1031549870967865, 0.08541752398014069, -0.12050949037075043, 0.023635582998394966, -0.18025952577590942, -0.09628571569919586, 0.16692645847797394, -0.326592355966568, 0.10674989223480225, 0.2158191055059433, 0.17357799410820007, -0.0868750512599945, -0.3450116813182831, -0.5039244890213013, -0.5576463937759399, -0.06957479566335678, 0.27950435876846313, -0.09232908487319946, 0.03390484303236008, 0.4795560836791992, 0.11935168504714966, 0.0990648865699768, -0.04229123145341873, -0.24149461090564728, 0.6234962344169617, -0.2915300726890564, 0.014295059256255627, -0.01684095337986946, -0.1014137864112854, -0.02812037616968155, 0.3210752308368683, 0.13915300369262695, 0.3040894865989685, 0.7592905163764954, 0.15774770081043243, 0.07966037839651108, -0.6362704634666443, -0.19322353601455688, -0.07858134806156158, 0.09074342250823975, 0.1842637062072754, 0.0044844746589660645, 0.053058598190546036, -0.1311347484588623, 0.12339293956756592, -0.16170349717140198, -0.01672235131263733, -0.19757789373397827, -0.25562718510627747, 0.2330767959356308, 0.1756502091884613, -0.06810520589351654, -0.27428334951400757, 0.04579072818160057, -0.19809433817863464, 0.26952141523361206, -0.2622250020503998, 0.0951305627822876, -0.37550342082977295, -0.06818392872810364, -0.11750147491693497, 0.12130939960479736, 0.052800342440605164, -0.3482723832130432, -0.2078993320465088, -0.08308282494544983, 0.03974751755595207, -0.16916924715042114, -0.1180497258901596, 0.28182029724121094, -0.06226353719830513, 0.39093267917633057, -0.1327950358390808, -0.22125956416130066, 0.027615081518888474, 0.15580052137374878, 0.016326984390616417, -0.05226389318704605, 0.2613498270511627, 0.2835831642150879, -0.1511325240135193, 0.04057515412569046, -0.0436750203371048, -0.12154888361692429, 0.07416507601737976, -0.026868529617786407, 0.17402777075767517, 0.22423702478408813, 0.22912633419036865, 0.39199304580688477, 0.45721858739852905, 0.012055348604917526, 0.10447053611278534, 0.10642190277576447, 0.1943875551223755, 0.015188463032245636, -0.3934972286224365, -0.06315702944993973, -0.25282323360443115, 0.15169976651668549, 0.42562127113342285, 0.1379580795764923, -0.2058083713054657, 0.029468826949596405, -0.3817220628261566, -0.23878508806228638, -0.23246566951274872, -0.08450298756361008, -0.48790794610977173, 0.34772148728370667, -0.001710871234536171, -0.2861219644546509, 0.044184356927871704, -0.0023836903274059296, -0.09176938235759735, -0.08109213411808014, 0.28631192445755005, -0.2717475891113281, -0.27900177240371704, -0.23901055753231049, -0.17837241291999817, 0.24779479205608368, 0.1335836797952652, 0.17355063557624817, 0.03092164173722267, 0.26059427857398987, 0.1744631975889206, 0.14753197133541107, 0.4469805955886841, -0.22093240916728973, -0.2941134572029114, -0.07699397206306458, -0.1500929594039917, 0.15284477174282074, 0.18823127448558807, -0.05957695096731186, 0.1963178813457489, -0.007738269865512848, -0.007837153971195221, -0.12919999659061432, -0.23211699724197388, 0.3821357190608978, 0.3925139904022217, -0.22308628261089325, -0.308624804019928, 0.20069076120853424, -0.1509433537721634, -0.30831095576286316, 0.11827385425567627, 0.08332958072423935, -0.20344673097133636, -0.035264983773231506, -0.2010384500026703, -0.18890759348869324, -0.05746098607778549, 0.5008254647254944, -0.19319301843643188, -0.06771194189786911, -0.058532219380140305, 0.39804965257644653, 0.012943191453814507, -0.06582717597484589, 0.5238154530525208, 0.47036057710647583, -0.2744762599468231, -0.2046436369419098, -0.43852195143699646, -0.47621625661849976, 0.41859620809555054, 0.10514822602272034, 0.057538777589797974, 0.49064794182777405, -0.17691820859909058, -0.09645524621009827, -0.26031795144081116, -0.327820748090744, 0.16100725531578064, -0.07713228464126587, -0.2866963744163513, -0.4126426875591278, 0.15691959857940674, 0.2747706174850464, -0.16965852677822113, 0.31885212659835815, 0.2740941345691681, -0.2063530832529068, 0.008220449090003967, 0.060280829668045044, 0.7813097238540649, -0.057261787354946136, -0.015208650380373001, -0.4095436632633209, -0.2641252875328064, 0.2027222216129303, 0.10191899538040161, 0.046051159501075745, 0.02123596891760826, -0.3808656632900238, -0.08666859567165375, 0.10766351222991943, 0.2176419496536255, 0.3884305953979492, 0.039284270256757736, 0.2841060161590576, -0.0924639031291008, -0.000543598085641861, 0.29436203837394714, 0.37501755356788635, 0.07313510030508041, 0.13935308158397675, 0.09926295280456543, 0.1993832290172577, 0.12667429447174072, -0.420712411403656, -0.14138999581336975, 0.1719733029603958, 0.4786085784435272, 0.055830322206020355, -0.06383779644966125, -0.35292237997055054, -0.11266443133354187, 0.25130975246429443, -0.24624311923980713, -0.16112348437309265, 0.20352061092853546, -0.19796136021614075, 0.11112555861473083, 0.06543181836605072, -0.043431930243968964, -0.037482235580682755, 0.42850881814956665, 0.33419832587242126, -0.10325442999601364, -0.104806087911129, 0.28203219175338745, -0.013926418498158455, -0.18669457733631134, 0.017701182514429092, 0.2604142427444458, -0.32781827449798584, -0.29370957612991333, 0.11157811433076859, -0.2877519726753235, -0.19489164650440216, -0.07119862735271454, -0.03620000183582306, -0.1690891683101654, -0.2639676332473755, 0.22274330258369446, 0.23211102187633514, -0.08865775913000107, 0.5801398158073425, 0.09657299518585205, 0.11455459892749786, -0.2845461368560791, 0.05146593600511551, 0.6038421988487244, -0.29426318407058716, 0.020312046632170677, -0.04504259675741196, -0.346679151058197, -0.3113832175731659, 0.04952888935804367, -0.043997880071401596, -0.12769261002540588, 0.2685384452342987, -0.2381168007850647, 0.265286922454834, 0.235550194978714, -0.2999511957168579, -0.10056672990322113, 0.0460507906973362, -0.09218424558639526, 0.04750183969736099, -0.20610135793685913, 0.1462438553571701, 0.22922417521476746, 0.41247135400772095, 0.07089606672525406, -0.046870868653059006, -0.12855540215969086, 0.28883442282676697, -0.4000200033187866, 0.3993600606918335, 0.09455931931734085, 0.17676383256912231, 0.08244680613279343, 0.1948525309562683, -0.2577293813228607, -0.21602849662303925, 0.14037734270095825, -0.01781555265188217, 0.37046512961387634, -0.327823668718338, -0.022553034126758575, 0.06001042574644089, -0.1476689577102661, 0.20924308896064758, 0.10082653909921646, -0.06615348160266876, -0.09863713383674622, -0.06516732275485992, 0.15381166338920593, 0.0807400569319725, 0.07218824326992035, 0.013037887401878834, 0.39847055077552795, -0.4098280370235443, -0.3508968949317932, 0.21211795508861542, 0.11712580919265747, 0.015338309109210968, 0.20298463106155396, -0.053828299045562744, 0.04072200134396553, 0.03476285934448242, -0.21133489906787872, 0.08224086463451385, 0.2176876813173294, -0.39763614535331726, 0.1352211833000183, 0.09039737284183502, -0.00651279091835022, 0.02806035242974758, 0.31318649649620056, 0.023754969239234924, -0.09548605233430862, -0.07358316332101822, 0.10230302065610886, 0.2557309865951538, -0.4735102653503418, -0.051835328340530396, 0.3816911578178406, -0.2694064676761627, 0.1285037249326706, 0.32369905710220337, 0.10774524509906769, 0.3082873225212097, 0.0759880319237709, -0.14866188168525696, 0.09524671733379364, -0.307705283164978, 0.24546995759010315, 0.14323726296424866, 0.37049612402915955, -0.2405252307653427, 0.12771789729595184, 0.14597588777542114, -0.07622358947992325, 0.20743173360824585, 0.049704428762197495, 0.2443203330039978, 0.21038106083869934, 0.08278508484363556, 0.3224075436592102, 0.0005855485796928406, 0.1528162807226181, 0.42862531542778015, -0.1078517884016037, 0.044177986681461334, 0.27975794672966003, -0.12470834702253342, 0.19383974373340607, -0.13526585698127747, -0.11237583309412003, 0.14744581282138824, -0.08933950960636139, 0.1584051549434662, 0.1259026974439621, -0.2418939471244812, -0.12805600464344025, -0.023635655641555786, -0.06018177047371864, -0.09718027710914612, 0.2889660596847534, -0.07416170835494995, 0.053100358694791794, -0.197866752743721, 0.5029250979423523, 0.0863770842552185, 0.2710227370262146, -0.15008169412612915, -0.3748132288455963, 0.015113577246665955, 0.06258591264486313, 0.13715173304080963, 0.5981581807136536, 0.05852918699383736, 0.03407330811023712, -0.0815235823392868, 0.01447473093867302, -0.21620158851146698, 0.028584813699126244, 0.046749770641326904, 0.20415568351745605, -0.15096957981586456, -0.10522811114788055, -0.011582355946302414, 0.17152227461338043, -0.04473700374364853, 0.03869663178920746, 0.19641518592834473, -0.14362840354442596, -0.792493462562561, 0.3506559133529663, 0.23319527506828308, -0.3567834794521332, 0.10864830017089844, -0.00576433539390564, -0.02469264715909958, -0.06359415501356125, 0.5445173978805542, -0.08590435981750488, -0.11506157368421555, -0.01853112503886223, 0.15198960900306702, -0.14418058097362518, 0.18150486052036285, 0.3420637249946594, 0.1265689730644226, -0.15131360292434692, -0.04637995734810829, -0.5696833729743958, -0.10186941176652908, -0.2204759120941162, 0.10269619524478912, 0.4844156801700592, 0.04412732273340225, -0.06743260473012924, 0.1358659416437149, 0.007042713463306427, -0.2546026408672333, -0.013201499357819557, 0.21338586509227753, -0.3235014081001282, -0.022795867174863815, -0.006838157773017883, -0.1383010596036911, -0.10809332132339478, -0.3611946403980255, 0.15888087451457977, -0.15540072321891785, -0.00893336534500122, -0.034031420946121216, 0.04694300889968872, 0.3325404226779938, 0.15857605636119843, 0.08708012849092484, 0.07021055370569229, 0.288036584854126, 0.18091359734535217, 0.07114925980567932, 0.1565505862236023, 0.25940069556236267, -0.21205447614192963, 0.3363725244998932, 0.3618616759777069, -0.12245334684848785, -0.185834139585495, -0.1522151231765747, 0.26152950525283813, 0.22563178837299347, -0.10410505533218384, 0.0013003163039684296, -0.20957286655902863, -0.10426708310842514, 0.06741420179605484, 0.08194246143102646, 0.08230766654014587, 0.26224857568740845, -0.2664482295513153, 0.135075643658638, -0.21091607213020325, -0.1355094313621521, 0.13313522934913635, -0.07221506536006927, -0.0630253255367279, -0.3058522641658783, 0.26320546865463257, 0.09857384860515594, -0.23455825448036194, -0.3781543970108032, -0.14967882633209229, 0.4653114080429077, -0.16931045055389404, 0.1591649353504181, 0.5180371403694153, 0.07630017399787903, -0.00000856444239616394, -0.13898470997810364, -0.006004244089126587, 0.017211075872182846, 0.09253989160060883, 0.2196027934551239, -0.25799888372421265 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex. In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense.
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
80
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex. In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense.
[ 0.10441076755523682, 0.01838912069797516, -0.13539119064807892, 0.09495428949594498, 0.03313519060611725, 0.1407129168510437, 0.34504762291908264, 0.25363555550575256, -0.6958326101303101, 0.0018978044390678406, -0.09365180134773254, 0.37214258313179016, 0.03419329598546028, 0.16504321992397308, 0.19424179196357727, 0.028631901368498802, 0.12868288159370422, 0.2465856522321701, -0.11249606311321259, 0.11629293859004974, -0.18959081172943115, -0.22310975193977356, -0.3207569122314453, 0.03510238602757454, -0.34037333726882935, 0.013471011072397232, -0.3700188994407654, -0.04736226052045822, -0.2080126851797104, -0.22084654867649078, 0.2427171915769577, 0.5297170877456665, 0.018326599150896072, 0.21035993099212646, -0.00010626095172483474, -0.2848934531211853, 0.018051911145448685, 0.16285721957683563, -0.30099132657051086, 0.012217991054058075, -0.09742940962314606, -0.12365345656871796, 0.15035755932331085, -0.07113666832447052, 0.03992651402950287, -0.48896583914756775, -0.2355795055627823, 0.12846021354198456, 0.19143038988113403, 0.122223399579525, 0.25421881675720215, 0.21708330512046814, -0.07217217236757278, 0.1295599788427353, 0.2810858190059662, 0.32511985301971436, -0.19848401844501495, 0.44078320264816284, 0.44953277707099915, -0.14977191388607025, 0.3157265782356262, 0.06263205409049988, -0.16246335208415985, 0.14533723890781403, 0.13733521103858948, 0.0009988164529204369, -0.1338927447795868, -0.08359265327453613, 0.039932090789079666, 0.2834545969963074, 0.5527540445327759, -0.6672782301902771, -0.34177452325820923, -0.35003384947776794, 0.42914968729019165, -0.2890269458293915, -0.0532083734869957, 0.07050926238298416, -0.062389668077230453, 0.1691337674856186, -0.42755886912345886, -0.2888961434364319, -0.11356837302446365, -0.055303461849689484, -0.08598454296588898, -0.24371349811553955, 0.21261146664619446, 0.0046142227947711945, 0.15120846033096313, -0.022320888936519623, 0.4632267653942108, -0.07443197816610336, 0.22059465944766998, 0.44487571716308594, -0.4444239139556885, -0.2212745100259781, -0.10276823490858078, 0.1373487114906311, 0.33106449246406555, 0.1832379847764969, 0.27578163146972656, 0.034804847091436386, 0.05367516353726387, 0.21141767501831055, 0.22532236576080322, -0.0003011375665664673, -0.07162613421678543, 0.10724752396345139, -0.04848196357488632, -0.17148293554782867, -0.1903427392244339, 0.10945677757263184, 0.06881719827651978, 0.12452121824026108, 0.4225834608078003, -0.09730447828769684, 0.25605309009552, -0.17237180471420288, -0.3565199077129364, 0.03750652074813843, -0.5191219449043274, -0.2063179463148117, -0.06850302219390869, -0.13727226853370667, 0.10913600027561188, -0.25228020548820496, -0.12792780995368958, 0.0959537923336029, -0.33022579550743103, -0.26667314767837524, -0.028225935995578766, 0.0720549076795578, -0.18644653260707855, -0.016029544174671173, 0.3545640707015991, -0.26531001925468445, -0.11582742631435394, 0.2977137267589569, 0.16642987728118896, 0.05287730693817139, 0.28046154975891113, -0.07711689174175262, -0.0925082340836525, 0.002487167716026306, -0.1493973582983017, -0.23664291203022003, -0.1870190054178238, 0.06219640374183655, -0.1377647966146469, 0.5223925709724426, 0.12370382249355316, -0.09236417710781097, -0.12272985279560089, 0.28125590085983276, -0.14917176961898804, -0.18536411225795746, -0.15116095542907715, 0.15681485831737518, -0.09475988894701004, 0.008655145764350891, 0.12227176129817963, -0.14310231804847717, 0.07373128831386566, -0.3464639186859131, -0.11264900863170624, 0.06481291353702545, -0.4670020341873169, -0.056297481060028076, -0.06849085539579391, -0.2799331545829773, -0.17428264021873474, 0.32571467757225037, -0.057980138808488846, 0.19043591618537903, 0.1309429556131363, 0.09745767712593079, 0.009213477373123169, 0.09784866869449615, -0.2693905830383301, 0.030833307653665543, 0.004631400108337402, 0.24817822873592377, -0.14552462100982666, 0.2779868245124817, 0.334544837474823, -0.04854734241962433, 0.006109453737735748, 0.020880883559584618, -0.22293421626091003, -0.40153491497039795, -0.17545878887176514, -0.3120458722114563, 0.24020664393901825, 0.23273853957653046, 0.011830739676952362, -0.12964513897895813, 0.13283458352088928, -0.36759868264198303, 0.31190741062164307, -0.14831078052520752, -0.13854064047336578, -0.19387440383434296, 0.4634327292442322, 0.08241511881351471, 0.13292571902275085, -0.33474475145339966, -0.4417126774787903, 0.1908191740512848, -0.329641193151474, -0.062499433755874634, -0.06730978190898895, -0.6913442015647888, 0.04008449986577034, 0.044521264731884, -0.11228746175765991, 0.20887868106365204, 0.1710992306470871, -0.46519705653190613, 0.10419900715351105, -0.2003914713859558, -0.3963650166988373, 0.15346352756023407, -0.22867494821548462, 0.21428678929805756, -0.08424341678619385, 0.4892992377281189, 0.036602623760700226, -0.17648479342460632, 0.06901819258928299, 0.4056183397769928, 0.04764685779809952, 0.06492641568183899, 0.19949200749397278, 0.20822152495384216, -0.10046486556529999, -0.0953540951013565, -0.031193114817142487, 0.23002934455871582, 0.14096638560295105, 0.005699794739484787, -0.057959891855716705, 0.17896492779254913, 0.026816751807928085, 0.06310493499040604, -0.3733070492744446, 0.4113073945045471, -0.3832024931907654, -0.1537826657295227, 0.01860252022743225, -0.12283763289451599, -0.07437223941087723, -0.1507577747106552, 0.1481105238199234, -0.14343982934951782, 0.15852263569831848, 0.3084123134613037, -0.10173429548740387, 0.374765545129776, -0.35401198267936707, 0.26074230670928955, -0.1475556343793869, -0.27789291739463806, 0.12605887651443481, 0.007866133004426956, 0.06482282280921936, -0.045608505606651306, 0.22051239013671875, 0.19373942911624908, 0.29556727409362793, 0.23320724070072174, 0.1198238730430603, 0.2788228392601013, 0.040063563734292984, 0.09928781539201736, 0.08584433048963547, -0.11987374722957611, 0.009249461814761162, -0.18137669563293457, 0.02221583016216755, 0.2317916601896286, -0.36268940567970276, 0.14370085299015045, 0.2026197761297226, 0.27735888957977295, -0.2206280380487442, -0.19106802344322205, -0.5655435919761658, -0.45315733551979065, -0.07620210200548172, 0.04535993933677673, -0.17805546522140503, 0.09151700139045715, 0.5150852799415588, 0.10386034101247787, 0.013791926205158234, 0.11036255955696106, -0.07464239001274109, 0.39414846897125244, -0.2792815566062927, -0.03947442024946213, -0.13176363706588745, -0.1765993982553482, 0.020345618948340416, 0.27727118134498596, 0.11957065761089325, 0.10935597121715546, 0.5857256054878235, 0.0744350254535675, 0.06959595531225204, -0.610953688621521, -0.2983679175376892, -0.031136170029640198, 0.037267204374074936, 0.14954189956188202, 0.08542255312204361, -0.02706068754196167, -0.30438560247421265, 0.03254985436797142, -0.0417548343539238, -0.09850481897592545, -0.19365669786930084, -0.10428610444068909, 0.13570421934127808, 0.26692312955856323, -0.13132883608341217, -0.24558451771736145, -0.11220387369394302, -0.005250582471489906, 0.33675599098205566, -0.113664910197258, 0.16266390681266785, -0.30239346623420715, 0.016721244901418686, -0.13215255737304688, -0.0836811363697052, -0.12810088694095612, -0.21231433749198914, -0.2869139313697815, 0.021360591053962708, 0.01625567115843296, -0.14658352732658386, -0.15331241488456726, 0.1851411759853363, -0.20053589344024658, 0.40181583166122437, 0.011475466191768646, -0.3118758499622345, 0.15340884029865265, 0.507643461227417, 0.04891490563750267, 0.0520675852894783, 0.3560236692428589, 0.35353177785873413, -0.07410117238759995, 0.024650782346725464, 0.031023140996694565, -0.1591763198375702, 0.163394033908844, 0.002598486840724945, 0.07697642594575882, 0.13820190727710724, 0.2860572934150696, 0.4721869230270386, 0.20668837428092957, -0.09520262479782104, 0.12651076912879944, -0.06937336176633835, 0.21815429627895355, 0.04555770754814148, -0.3102402985095978, -0.16626989841461182, -0.3074207901954651, 0.18747934699058533, 0.4478251338005066, 0.1748807728290558, -0.23377449810504913, 0.14410509169101715, -0.2332105189561844, -0.5569915771484375, -0.21964116394519806, -0.00793810561299324, -0.16780249774456024, 0.32602402567863464, 0.08460372686386108, -0.36320751905441284, 0.009063385426998138, -0.14979156851768494, -0.0940442830324173, -0.1068413257598877, 0.2615230679512024, -0.2522053122520447, -0.15102043747901917, -0.4240186810493469, -0.12470369786024094, 0.2552509009838104, 0.19491539895534515, -0.07510781288146973, 0.200888529419899, 0.182667076587677, 0.25195449590682983, 0.0984332486987114, 0.6468614935874939, -0.14923369884490967, -0.21072198450565338, -0.0603853240609169, 0.01093832403421402, -0.05721334367990494, 0.06342147290706635, -0.07636992633342743, 0.06608475744724274, -0.09499138593673706, -0.11924508213996887, -0.1999770700931549, -0.08218586444854736, 0.5210838317871094, 0.39125385880470276, -0.15931585431098938, -0.3596799373626709, 0.03580367937684059, -0.3132452368736267, -0.2835782468318939, 0.11391682922840118, 0.021758193150162697, -0.05577714741230011, -0.0976582020521164, 0.05255071446299553, -0.016430610790848732, 0.030041445046663284, 0.3727795481681824, -0.08675695955753326, -0.005588117055594921, -0.09234650433063507, 0.2851482629776001, 0.050465408712625504, -0.23624470829963684, 0.5697202682495117, 0.498710036277771, -0.15595707297325134, -0.2272205650806427, -0.5975424647331238, -0.4074413776397705, 0.40836822986602783, 0.05448576807975769, 0.011114517226815224, 0.48163387179374695, -0.29282164573669434, -0.06112349033355713, 0.018556179478764534, -0.491501122713089, 0.19854596257209778, -0.1483786553144455, -0.21212145686149597, -0.28901153802871704, 0.2951415777206421, 0.2490934580564499, -0.1999499499797821, 0.07021981477737427, 0.262296199798584, -0.17592063546180725, 0.10313740372657776, 0.026872780174016953, 0.8997114896774292, -0.15378627181053162, 0.03913933038711548, -0.1291898787021637, -0.27648478746414185, 0.3032199442386627, -0.05982675403356552, 0.045457709580659866, -0.18901637196540833, -0.2673984467983246, -0.07786437124013901, 0.0925765186548233, 0.24588701128959656, 0.4782506227493286, 0.11299774050712585, 0.15431095659732819, -0.13175389170646667, 0.14197298884391785, 0.3370566964149475, 0.21298429369926453, 0.03252728655934334, 0.162369504570961, -0.16970664262771606, 0.14793409407138824, 0.1216154545545578, -0.44523558020591736, -0.18772011995315552, 0.1676516830921173, 0.3555830717086792, -0.06666283309459686, 0.044527649879455566, -0.31741535663604736, -0.03476094827055931, 0.24463482201099396, -0.007186923176050186, -0.3055078387260437, -0.017084594815969467, -0.08739958703517914, 0.023243766278028488, -0.14316445589065552, 0.03865649923682213, -0.022484779357910156, 0.420598566532135, 0.40713292360305786, 0.029816143214702606, -0.08484606444835663, 0.2570123076438904, 0.00945281982421875, -0.2883402705192566, 0.09977415204048157, 0.3497154712677002, -0.3559150695800781, -0.21471862494945526, 0.1591344177722931, -0.21842242777347565, -0.18049630522727966, 0.15517203509807587, -0.07124049961566925, -0.05805889517068863, -0.33165785670280457, 0.170431986451149, 0.1180439442396164, -0.09968641400337219, 0.6222676038742065, -0.145157128572464, 0.07753852009773254, -0.2983396351337433, 0.03247961401939392, 0.5118436217308044, -0.20315460860729218, -0.001720581203699112, 0.11073818802833557, -0.31599926948547363, -0.1827515959739685, 0.2060249149799347, -0.0038199129048734903, -0.34404873847961426, 0.11511974781751633, -0.08653166145086288, 0.42956238985061646, 0.23922957479953766, -0.22747617959976196, -0.09827399253845215, 0.011308956891298294, -0.07163574546575546, 0.01873084157705307, -0.11991535872220993, 0.1719377636909485, 0.49264997243881226, 0.2791408598423004, 0.1893620789051056, 0.22549095749855042, -0.010536386631429195, 0.1215110495686531, -0.3703797459602356, 0.44814208149909973, 0.10958009213209152, 0.3079473674297333, -0.08327306807041168, 0.15839117765426636, -0.29541438817977905, -0.34570324420928955, 0.15497197210788727, 0.020154548808932304, 0.33340826630592346, -0.33548781275749207, -0.11860987544059753, 0.07781817764043808, -0.11219789832830429, 0.16481779515743256, 0.121189184486866, 0.07086353749036789, 0.03102446347475052, -0.006448027677834034, 0.14501647651195526, 0.19542008638381958, 0.15163278579711914, 0.021990567445755005, 0.6954901218414307, -0.36849021911621094, -0.3162462115287781, 0.04670888930559158, -0.10046091675758362, -0.008543863892555237, 0.23051171004772186, 0.00727299228310585, -0.0876680389046669, 0.12528376281261444, 0.05932272970676422, -0.029662996530532837, 0.16545036435127258, -0.4229680895805359, 0.24783062934875488, -0.06880329549312592, -0.12744595110416412, -0.1567019522190094, 0.531028151512146, -0.019213087856769562, -0.13775667548179626, -0.13618986308574677, 0.18653538823127747, 0.2113356739282608, -0.5376397371292114, -0.07724302262067795, 0.3420599699020386, -0.16565540432929993, 0.04846188798546791, 0.30493247509002686, 0.03207587078213692, 0.21976396441459656, -0.018464304506778717, -0.08354499191045761, 0.2788000702857971, -0.14966052770614624, 0.13791945576667786, 0.24001315236091614, 0.28256213665008545, -0.2172234207391739, 0.2884019613265991, 0.04955647140741348, -0.0538606271147728, 0.13684651255607605, -0.11090492457151413, 0.16205765306949615, 0.05653907731175423, 0.012982990592718124, 0.27990269660949707, 0.01693366840481758, 0.061624690890312195, 0.24465565383434296, 0.0434483103454113, -0.09717636555433273, 0.3055139482021332, 0.1565425843000412, 0.34163904190063477, -0.026482664048671722, 0.0217283945530653, 0.2720404267311096, 0.06253531575202942, 0.15408656001091003, -0.07408049702644348, -0.21361973881721497, -0.0782182514667511, -0.06460366398096085, -0.18904715776443481, -0.31066322326660156, 0.39777669310569763, 0.10654966533184052, 0.12598150968551636, -0.38964414596557617, 0.3826606273651123, -0.07355466485023499, 0.2179979681968689, -0.08608050644397736, -0.35784101486206055, 0.19430440664291382, -0.032457850873470306, 0.08803874999284744, 0.42622140049934387, 0.24880008399486542, -0.043927617371082306, -0.20692694187164307, 0.04922783374786377, -0.4595753848552704, 0.12204614281654358, 0.07603615522384644, 0.13181060552597046, -0.07490922510623932, -0.017443623393774033, -0.12944789230823517, 0.16880196332931519, -0.07436715066432953, 0.10674811899662018, 0.22906766831874847, -0.10148043930530548, -0.7163112163543701, 0.19474968314170837, 0.21688491106033325, -0.43720540404319763, 0.21042625606060028, -0.06657884269952774, -0.06752999871969223, -0.003752940334379673, 0.4337998032569885, 0.14056898653507233, -0.15212205052375793, -0.05159613490104675, 0.10710650682449341, -0.01796192303299904, 0.20524288713932037, 0.37791818380355835, 0.18355676531791687, -0.21553289890289307, 0.01328982412815094, -0.5778459310531616, -0.06912899762392044, -0.4158002436161041, 0.029587792232632637, 0.565252423286438, -0.04844765365123749, -0.04846823960542679, 0.3098567724227905, 0.07990793883800507, 0.013832565397024155, -0.15347452461719513, 0.266659677028656, -0.30080002546310425, -0.029029827564954758, -0.06547828018665314, -0.13260221481323242, -0.21077483892440796, -0.2510817348957062, 0.1813971847295761, -0.3836818337440491, -0.017537269741296768, -0.24161536991596222, -0.056613489985466, 0.4530104100704193, 0.14865949749946594, 0.2132159173488617, 0.034244317561388016, 0.40561872720718384, 0.26094549894332886, 0.06366536766290665, 0.1852465271949768, 0.17117716372013092, -0.2430463284254074, 0.4706927537918091, 0.1666077971458435, -0.17853054404258728, -0.0617743581533432, -0.3375508487224579, 0.24450507760047913, 0.2603076994419098, -0.11949704587459564, 0.06886420398950577, -0.11944056302309036, -0.13587534427642822, 0.11321761459112167, 0.08880726993083954, -0.15498273074626923, 0.16147494316101074, -0.24819692969322205, 0.3061465322971344, -0.22630254924297333, -0.30503877997398376, 0.23268267512321472, -0.2734929025173187, -0.03490116447210312, -0.26244673132896423, 0.1766582578420639, -0.06430060416460037, -0.23010721802711487, -0.3650239109992981, -0.10188069194555283, 0.47841545939445496, -0.07846090197563171, 0.12061086297035217, 0.46083328127861023, 0.03311402350664139, -0.039920561015605927, -0.09325149655342102, -0.053702935576438904, -0.03451048582792282, 0.1175372302532196, 0.1016300767660141, -0.35632026195526123 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
> Hi ! For now this is probably the best option. > We might add a feature like this in the feature as well. > > Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? > Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases Great if this is can be done. Thanks!! Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..)
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
119
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no > Hi ! For now this is probably the best option. > We might add a feature like this in the feature as well. > > Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? > Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases Great if this is can be done. Thanks!! Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..)
[ 0.10129821300506592, -0.1910531371831894, -0.13927049934864044, 0.2864696979522705, 0.07518839836120605, 0.20366159081459045, 0.2715581953525543, 0.0986698716878891, -0.33350053429603577, -0.01633429527282715, -0.0008101267740130424, 0.2826296389102936, 0.04018661007285118, 0.19777144491672516, -0.02494654431939125, -0.029798485338687897, 0.10263393074274063, 0.13065262138843536, -0.10367240011692047, 0.05012586712837219, -0.025658804923295975, -0.14656980335712433, -0.27049946784973145, -0.17821313440799713, -0.4471103250980377, -0.061712272465229034, -0.48296552896499634, -0.058831796050071716, -0.15877924859523773, 0.018624164164066315, 0.24961717426776886, 0.5069915652275085, 0.008140778169035912, 0.34496864676475525, -0.00010656909580575302, -0.40291470289230347, -0.0071390122175216675, 0.1132889986038208, -0.19676807522773743, 0.05770593136548996, -0.2064550518989563, -0.03783608227968216, 0.08111376315355301, -0.09239163994789124, 0.04554350674152374, -0.2710399627685547, -0.30923518538475037, -0.2610732913017273, 0.15355835855007172, 0.07555045187473297, 0.25749263167381287, -0.06424008309841156, -0.2274298369884491, 0.04275435209274292, 0.19631074368953705, 0.5021438002586365, -0.14078664779663086, 0.29885032773017883, 0.5304870009422302, -0.04459492862224579, 0.14335399866104126, 0.06729927659034729, -0.11134883761405945, 0.1386648267507553, 0.2907048463821411, -0.19523200392723083, -0.2926011383533478, -0.1928342580795288, 0.20410794019699097, 0.32462888956069946, 0.8173856139183044, -0.4910629689693451, -0.2823203504085541, -0.15881405770778656, 0.4048905372619629, 0.039211198687553406, -0.0883469507098198, 0.0993427261710167, -0.008549666032195091, 0.06957449018955231, -0.3532000184059143, -0.5799793004989624, -0.16400106251239777, -0.1828121393918991, 0.07339368760585785, -0.4417578876018524, 0.09955170005559921, -0.04482272267341614, 0.18412195146083832, -0.07819237560033798, 0.3813769519329071, -0.16325144469738007, 0.1593034267425537, 0.4425399601459503, -0.4141800105571747, -0.36200183629989624, -0.20039796829223633, -0.0943409875035286, 0.32966917753219604, 0.1987355798482895, 0.346675843000412, -0.06758435815572739, -0.11328636109828949, 0.2721816897392273, 0.3223304748535156, 0.01959671825170517, -0.15583977103233337, 0.011317155323922634, 0.1128343939781189, -0.19933731853961945, -0.26044926047325134, -0.04154602438211441, -0.030045166611671448, 0.22800768911838531, 0.30021169781684875, -0.07549338787794113, 0.07759235054254532, -0.3900252878665924, -0.2964450716972351, 0.09314899891614914, -0.298660546541214, -0.14956505596637726, -0.09941559284925461, -0.12950125336647034, 0.08681448549032211, -0.14457106590270996, -0.0661545842885971, -0.15513339638710022, -0.29720768332481384, -0.2271496206521988, -0.02563025802373886, 0.15973064303398132, -0.2235034555196762, -0.006686277687549591, 0.32621660828590393, -0.2521715462207794, -0.0575285404920578, 0.2420901507139206, 0.1999291032552719, -0.13018590211868286, 0.34195345640182495, -0.28482726216316223, 0.08347516506910324, -0.09065647423267365, -0.2567925751209259, -0.25230368971824646, -0.2064599245786667, 0.14171308279037476, -0.09167707711458206, 0.48548105359077454, 0.1296810507774353, -0.09322720766067505, -0.147578626871109, 0.25906243920326233, -0.04670959711074829, -0.10655248165130615, -0.2730351984500885, 0.24720101058483124, -0.13629040122032166, 0.014916501939296722, 0.11130403727293015, -0.009250577539205551, 0.1134478896856308, -0.29674944281578064, -0.048233259469270706, 0.20494747161865234, -0.5000971555709839, 0.042992815375328064, -0.17765764892101288, -0.29424259066581726, -0.09860946983098984, 0.4649653434753418, -0.05013713240623474, 0.056443631649017334, 0.013820866122841835, -0.0734153762459755, 0.08005084097385406, 0.07238689064979553, -0.16464316844940186, 0.3385244309902191, 0.01675470918416977, 0.19235913455486298, -0.1407322883605957, 0.4406462013721466, 0.3836033046245575, -0.031212501227855682, 0.10317718237638474, 0.01567705161869526, -0.24982291460037231, -0.3883446455001831, -0.23448428511619568, -0.46165990829467773, 0.21573705971240997, 0.09393958747386932, 0.14876748621463776, -0.03236620873212814, 0.19577568769454956, -0.09638667106628418, 0.18393662571907043, -0.06874005496501923, -0.09467191249132156, -0.0008341036736965179, 0.4486302435398102, 0.1039019450545311, 0.17510747909545898, -0.39729881286621094, -0.37107497453689575, 0.08085224777460098, -0.1925426870584488, -0.10537309944629669, 0.25088149309158325, -0.6575385332107544, 0.17105349898338318, -0.11750819534063339, -0.022081393748521805, 0.12457607686519623, 0.12925879657268524, -0.4144192636013031, 0.034793559461832047, -0.30781570076942444, -0.28133296966552734, 0.22985140979290009, -0.3113637864589691, 0.032475706189870834, -0.22534897923469543, 0.4157765209674835, 0.17452166974544525, -0.017905689775943756, 0.19032807648181915, 0.36612072587013245, -0.034599751234054565, 0.0753779411315918, -0.009381536394357681, 0.10280334204435349, 0.1476316899061203, -0.0036964714527130127, 0.18747082352638245, 0.23731033504009247, 0.2151126265525818, -0.07311630249023438, 0.011031040921807289, 0.33124738931655884, 0.1400051862001419, -0.02283398061990738, -0.47822561860084534, 0.1685674786567688, -0.5081926584243774, -0.14619508385658264, 0.046240344643592834, -0.08865529298782349, 0.02018658258020878, -0.16400346159934998, 0.17152413725852966, -0.1282510608434677, 0.19045065343379974, 0.16972720623016357, -0.1296025812625885, 0.3815738558769226, -0.4475434720516205, 0.06418213248252869, -0.1406337469816208, -0.11855433881282806, 0.0377797856926918, 0.0418274849653244, -0.018564507365226746, -0.11509973555803299, 0.38800498843193054, 0.31940415501594543, 0.38597917556762695, 0.2076178789138794, 0.16284708678722382, 0.21416935324668884, 0.3135334253311157, 0.09563545882701874, 0.10160884261131287, -0.10035106539726257, 0.007190968841314316, -0.18432173132896423, -0.1023382917046547, 0.21576520800590515, -0.3473793864250183, 0.01118636503815651, 0.2527466118335724, 0.20585842430591583, -0.046260811388492584, -0.2968865931034088, -0.5272920727729797, -0.6229701042175293, -0.10584908723831177, 0.2558298707008362, -0.17891360819339752, 0.1530618816614151, 0.42575520277023315, 0.12202955782413483, 0.1268966794013977, -0.04637998342514038, -0.11357630789279938, 0.6114587187767029, -0.2947303354740143, -0.11774858087301254, -0.057832252234220505, -0.06512752175331116, -0.019414659589529037, 0.27633723616600037, 0.18984709680080414, 0.32418200373649597, 0.731089174747467, 0.2817600965499878, 0.10691632330417633, -0.6828421950340271, -0.31009888648986816, -0.15484140813350677, 0.022071124985814095, 0.21221695840358734, 0.10460842400789261, 0.007359176874160767, -0.1370040476322174, 0.0865822285413742, -0.18913863599300385, -0.03571575880050659, -0.14735543727874756, -0.2665335237979889, 0.20265714824199677, 0.18014083802700043, -0.1981700211763382, -0.27604940533638, -0.006243335083127022, -0.22331687808036804, 0.34530770778656006, -0.21871241927146912, 0.1618301123380661, -0.4644887149333954, -0.08773143589496613, -0.07009289413690567, 0.17997296154499054, 0.013425696641206741, -0.2804412543773651, -0.27592727541923523, -0.03749629482626915, 0.05908152833580971, -0.2052406221628189, -0.09427866339683533, 0.290641725063324, -0.016599036753177643, 0.3591824173927307, -0.25019586086273193, -0.21545180678367615, 0.0508950874209404, 0.14913176000118256, 0.057443223893642426, -0.006402561441063881, 0.24118103086948395, 0.22586515545845032, -0.0641687661409378, 0.04767424613237381, -0.1351563185453415, -0.10798835009336472, 0.07968489080667496, 0.09205886721611023, 0.2104487419128418, 0.23469746112823486, 0.18688678741455078, 0.3986667990684509, 0.4363938570022583, -0.030467327684164047, 0.10083285719156265, 0.13416779041290283, 0.13138195872306824, -0.0042361244559288025, -0.39509114623069763, -0.024060236290097237, -0.2811248004436493, 0.07781088352203369, 0.4160494804382324, 0.1726764738559723, -0.2761062979698181, 0.010827835649251938, -0.43553632497787476, -0.17434242367744446, -0.20665760338306427, -0.08302610367536545, -0.5281806588172913, 0.2518494129180908, -0.058476973325014114, -0.26593446731567383, 0.021899618208408356, -0.06754469871520996, -0.09276272356510162, 0.015309341251850128, 0.3267204761505127, -0.23188041150569916, -0.1968444287776947, -0.3175489008426666, -0.18941032886505127, 0.24901793897151947, 0.1273404061794281, 0.12606769800186157, 0.06455434858798981, 0.28629010915756226, 0.2849060893058777, 0.09445361793041229, 0.5072615742683411, -0.15503719449043274, -0.3747444152832031, -0.029763665050268173, -0.1918332278728485, 0.14236019551753998, 0.1936912089586258, -0.034542545676231384, 0.15906298160552979, 0.04623100906610489, 0.010421782732009888, -0.226963073015213, -0.224612295627594, 0.37405189871788025, 0.422304630279541, -0.20488058030605316, -0.3847653567790985, 0.23030467331409454, -0.20997673273086548, -0.38562485575675964, 0.11693131923675537, -0.0015922635793685913, -0.18183784186840057, -0.054512858390808105, -0.23089349269866943, -0.0752631202340126, -0.05349365621805191, 0.5534109473228455, -0.24944739043712616, -0.04523799940943718, -0.16187582910060883, 0.41267824172973633, -0.04619111120700836, -0.06477249413728714, 0.5135986804962158, 0.4399627149105072, -0.23407936096191406, -0.09550651907920837, -0.33270740509033203, -0.4687211811542511, 0.4154409170150757, 0.06325974315404892, -0.010544701479375362, 0.6419352293014526, -0.20695513486862183, -0.10504601895809174, -0.19515463709831238, -0.3630766272544861, 0.14634743332862854, -0.06161960959434509, -0.2987644672393799, -0.49163588881492615, 0.17424875497817993, 0.25449034571647644, -0.15447506308555603, 0.40540578961372375, 0.20267561078071594, -0.13840121030807495, 0.06830605119466782, 0.06263546645641327, 0.8880201578140259, -0.13154493272304535, -0.02106480672955513, -0.5048201084136963, -0.2182023525238037, 0.32032978534698486, 0.11012361943721771, 0.036901675164699554, -0.1533002257347107, -0.34026506543159485, -0.09734940528869629, 0.08671073615550995, 0.24989581108093262, 0.32948654890060425, 0.03193505480885506, 0.27884528040885925, -0.06345687806606293, -0.017054501920938492, 0.20266301929950714, 0.44781312346458435, 0.042032640427351, 0.11843107640743256, 0.02729807049036026, 0.15201175212860107, 0.0843285471200943, -0.3738183081150055, -0.15543127059936523, 0.11787886172533035, 0.49241170287132263, -0.014302397146821022, -0.16165409982204437, -0.3362327516078949, -0.06611156463623047, 0.3038231134414673, -0.19714805483818054, -0.1846030056476593, 0.29875048995018005, -0.17567132413387299, 0.02829299122095108, 0.18602107465267181, -0.04973670095205307, -0.033815693110227585, 0.374271422624588, 0.3428649604320526, -0.044887833297252655, -0.0347159244120121, 0.31550705432891846, -0.024044960737228394, -0.17757338285446167, 0.03288597986102104, 0.2792312204837799, -0.4303011894226074, -0.20209553837776184, 0.10699547082185745, -0.14548584818840027, -0.150575652718544, -0.08169908821582794, 0.0012093186378479004, -0.275604248046875, -0.2018072009086609, 0.16827824711799622, 0.3091477155685425, -0.0842486023902893, 0.6608367562294006, 0.06790108233690262, 0.08439421653747559, -0.3240249454975128, 0.080181784927845, 0.6168257594108582, -0.3480924963951111, -0.015845928341150284, 0.07646805047988892, -0.3589729070663452, -0.2794744372367859, 0.04171329736709595, -0.15069928765296936, -0.21339154243469238, 0.2705877423286438, -0.26121488213539124, 0.2985776662826538, 0.2992025911808014, -0.3048183023929596, -0.06826726347208023, 0.11923470348119736, -0.08297640085220337, 0.045265793800354004, -0.3097728490829468, 0.11524476110935211, 0.16272196173667908, 0.4415408968925476, 0.13041746616363525, -0.09596765041351318, -0.11385856568813324, 0.30056992173194885, -0.34384989738464355, 0.47146692872047424, 0.06884828954935074, 0.19049328565597534, 0.0782984048128128, 0.23681163787841797, -0.32141968607902527, -0.18110491335391998, 0.06663881987333298, 0.07949228584766388, 0.38104549050331116, -0.2554199695587158, -0.07925843447446823, 0.0959276556968689, -0.1776943802833557, 0.1848972588777542, 0.06978686898946762, -0.1565333753824234, -0.1252882033586502, -0.04966912046074867, 0.23262247443199158, 0.04284884035587311, 0.0793863981962204, -0.06354676187038422, 0.41344714164733887, -0.45363345742225647, -0.43654465675354004, 0.25880569219589233, 0.11934375762939453, 0.031615614891052246, 0.20708602666854858, -0.05431848019361496, 0.09824785590171814, -0.02732532098889351, -0.27769750356674194, 0.07227128744125366, 0.21296244859695435, -0.4306276738643646, 0.21429353952407837, 0.1544845551252365, -0.02564205788075924, -0.002988716121762991, 0.3490709364414215, 0.055706560611724854, -0.016367821022868156, -0.0679791197180748, 0.13780954480171204, 0.17613404989242554, -0.4282856285572052, -0.07417354732751846, 0.31660759449005127, -0.1787230521440506, 0.012356866151094437, 0.296784371137619, 0.09645944833755493, 0.337755024433136, 0.004239015281200409, -0.15605342388153076, 0.1886490285396576, -0.2589980959892273, 0.22076861560344696, 0.1989775002002716, 0.2766292691230774, -0.2398596554994583, 0.17411988973617554, 0.14630696177482605, -0.042025499045848846, 0.23557952046394348, 0.041593343019485474, 0.2633998394012451, 0.30267947912216187, 0.045210860669612885, 0.3227911591529846, -0.03493313491344452, 0.07398547977209091, 0.4428251087665558, 0.06829170882701874, 0.05804052948951721, 0.2874361276626587, -0.06833914667367935, 0.2384698987007141, -0.1309802234172821, -0.0871749147772789, 0.2352369874715805, -0.05650869011878967, 0.19072797894477844, 0.14858652651309967, -0.2084192931652069, -0.15046367049217224, -0.00808088481426239, -0.13951382040977478, -0.055951811373233795, 0.3512401282787323, -0.01563410460948944, 0.10960045456886292, -0.21977755427360535, 0.5052934885025024, 0.026691073551774025, 0.2342054843902588, -0.18776437640190125, -0.3179319202899933, 0.07193714380264282, 0.07764994353055954, 0.11119940876960754, 0.4749698340892792, 0.06329323351383209, 0.0271709356456995, -0.05707322433590889, -0.03319631516933441, -0.2760201096534729, 0.1277463734149933, 0.10487155616283417, 0.3314168155193329, -0.10794518887996674, -0.001826021820306778, 0.03006800264120102, 0.09674090147018433, -0.00534362718462944, 0.0893903523683548, 0.18316030502319336, -0.09310339391231537, -0.7865315079689026, 0.34935814142227173, 0.2298716902732849, -0.3472643494606018, 0.02252170443534851, 0.0056211575865745544, -0.05175774544477463, -0.10727405548095703, 0.5509375929832458, -0.0814044326543808, -0.1437779664993286, -0.05134643241763115, 0.1184336245059967, -0.20147103071212769, 0.24285519123077393, 0.3888443112373352, 0.15311184525489807, -0.1822667121887207, -0.07707374542951584, -0.6075679659843445, -0.10028491169214249, -0.14852562546730042, 0.20649828016757965, 0.4242291748523712, 0.06867023557424545, -0.01604798436164856, 0.10100873559713364, -0.03902822732925415, -0.24887101352214813, 0.002046213485300541, 0.21559679508209229, -0.33441558480262756, 0.02159031666815281, -0.12293890118598938, -0.13795699179172516, -0.12297774106264114, -0.34168195724487305, 0.12835204601287842, -0.2221682071685791, -0.07324007153511047, -0.10795439779758453, -0.02767135202884674, 0.3466142416000366, 0.14213597774505615, 0.11507502943277359, 0.03564820438623428, 0.38481876254081726, 0.20090442895889282, 0.06435766071081161, 0.21485556662082672, 0.25237393379211426, -0.14051811397075653, 0.31379562616348267, 0.3568800091743469, -0.07430113852024078, -0.1540360003709793, -0.0668986588716507, 0.23393620550632477, 0.30836576223373413, -0.2212507426738739, 0.03824954479932785, -0.2708307206630707, -0.18472930788993835, 0.008430294692516327, 0.05942169204354286, 0.08633141964673996, 0.3143296241760254, -0.24902614951133728, 0.13054557144641876, -0.22273369133472443, -0.06133507937192917, 0.21621669828891754, -0.14438490569591522, -0.03993954882025719, -0.3423175513744354, 0.20463941991329193, 0.12017757445573807, -0.22636762261390686, -0.438642293214798, -0.15852321684360504, 0.44439083337783813, -0.1324951946735382, 0.13830776512622833, 0.4938347637653351, 0.00984545424580574, 0.05609728768467903, -0.16181951761245728, -0.10149352252483368, 0.037148717790842056, 0.09188637882471085, 0.281892329454422, -0.3022617697715759 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Hello, I'm also interested in this feature. Has there been progress on this issue? Could we use a similar trick as above, but with a better hashing algorithm like SHA? We could also use a [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter), should we care a lot about collision in this case?
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
47
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no Hello, I'm also interested in this feature. Has there been progress on this issue? Could we use a similar trick as above, but with a better hashing algorithm like SHA? We could also use a [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter), should we care a lot about collision in this case?
[ 0.20651362836360931, -0.06045927852392197, -0.14436279237270355, 0.16920089721679688, 0.034545741975307465, 0.20407798886299133, 0.4904039800167084, 0.17265839874744415, -0.39083394408226013, -0.07263347506523132, 0.012869736179709435, 0.17522688210010529, -0.00616361852735281, 0.2583807110786438, 0.018352456390857697, -0.000996757298707962, 0.1563223898410797, 0.09408421814441681, -0.0934305191040039, 0.025056853890419006, -0.0426727831363678, -0.2978339195251465, -0.24027273058891296, -0.10658514499664307, -0.47313839197158813, -0.12197161465883255, -0.3555925786495209, -0.03177352994680405, -0.15212267637252808, 0.003946381621062756, 0.30434340238571167, 0.5049340128898621, -0.0538761131465435, 0.319162517786026, -0.00010662074782885611, -0.34187108278274536, -0.03281647711992264, 0.18206898868083954, -0.1844579130411148, 0.026944883167743683, -0.45610061287879944, -0.05773944407701492, -0.028090275824069977, -0.037320345640182495, -0.03631588816642761, -0.2660595178604126, -0.28252366185188293, -0.22318315505981445, 0.15436521172523499, -0.07666277140378952, 0.2257813811302185, -0.09479053318500519, -0.24370017647743225, 0.13324375450611115, 0.010757148265838623, 0.4024772047996521, -0.14960211515426636, 0.29967573285102844, 0.34741976857185364, -0.10560043156147003, 0.25332123041152954, 0.13991154730319977, -0.12422391772270203, 0.12649200856685638, 0.15029937028884888, -0.06318791955709457, -0.19133976101875305, -0.06222502887248993, 0.1746138632297516, 0.3579918146133423, 0.5682196021080017, -0.47045889496803284, -0.36371275782585144, -0.3230298161506653, 0.45202305912971497, -0.05118934437632561, -0.017416052520275116, 0.02565085142850876, -0.022229241207242012, 0.18474315106868744, -0.4934328496456146, -0.5180094242095947, 0.016191013157367706, -0.13206513226032257, 0.053662002086639404, -0.39637643098831177, 0.10578962415456772, -0.06829670816659927, 0.12071540951728821, 0.006148334592580795, 0.5104398131370544, -0.31019580364227295, 0.2540767788887024, 0.39587515592575073, -0.38383549451828003, -0.21495193243026733, -0.3079603910446167, 0.10852144658565521, 0.2052270770072937, 0.14574217796325684, 0.397182822227478, -0.032285720109939575, -0.10276099294424057, 0.21166449785232544, 0.267777681350708, -0.06513567268848419, 0.00424116849899292, 0.2050209939479828, -0.14384165406227112, -0.08777043223381042, -0.23406516015529633, 0.10028721392154694, 0.1266772300004959, 0.14564570784568787, 0.32130175828933716, -0.009839195758104324, 0.1660926789045334, -0.19382750988006592, -0.30815795063972473, 0.04230894893407822, -0.5144188404083252, -0.24322012066841125, -0.07960034906864166, -0.31265416741371155, 0.15672555565834045, -0.2224811315536499, -0.1406427025794983, -0.037353672087192535, -0.19331607222557068, -0.3009187579154968, -0.07496316730976105, 0.14247427880764008, -0.11411614716053009, 0.042453110218048096, 0.3519868552684784, -0.33233344554901123, -0.14072296023368835, 0.237430602312088, 0.07453683018684387, -0.06738259643316269, 0.24549084901809692, -0.060870617628097534, 0.014106392860412598, -0.19566379487514496, -0.17902246117591858, -0.16755248606204987, -0.08765415847301483, 0.08221036195755005, -0.04203847050666809, 0.44912731647491455, 0.052859678864479065, 0.09069579839706421, -0.021874649450182915, 0.24422705173492432, -0.04965457320213318, -0.17489054799079895, -0.23406603932380676, 0.18667779862880707, -0.04688792675733566, -0.019677244126796722, 0.09389826655387878, -0.017066556960344315, -0.04430802911520004, -0.2496252954006195, -0.042878732085227966, 0.16538608074188232, -0.5340396165847778, -0.04358673468232155, -0.09424377232789993, -0.23587897419929504, -0.2524646520614624, 0.41569486260414124, -0.031099971383810043, 0.11085997521877289, 0.03808118402957916, -0.09719161689281464, -0.06967978924512863, 0.09268838167190552, -0.27170470356941223, 0.2223876267671585, -0.009740859270095825, 0.43394801020622253, -0.11540579050779343, 0.35470402240753174, 0.3031974732875824, -0.05564286559820175, 0.08448262512683868, -0.03651101142168045, -0.26404404640197754, -0.490212082862854, -0.20476774871349335, -0.4165010452270508, 0.24545052647590637, 0.013446703553199768, 0.12745022773742676, 0.01951659470796585, 0.22830718755722046, -0.14152906835079193, 0.24347293376922607, -0.055642884224653244, 0.0009484060574322939, -0.12231370806694031, 0.4151906669139862, -0.04482986778020859, 0.10170366615056992, -0.348613440990448, -0.4857514500617981, 0.12132283300161362, -0.1329611837863922, -0.21634581685066223, 0.0744009017944336, -0.6134030222892761, 0.14371958374977112, -0.18266630172729492, -0.08871307969093323, 0.23781877756118774, 0.15015283226966858, -0.46843668818473816, -0.07208003103733063, -0.3250093162059784, -0.3250425457954407, 0.4046476483345032, -0.38079357147216797, 0.0945335403084755, -0.2009517252445221, 0.4904160499572754, 0.15141989290714264, 0.05788695067167282, 0.01700781285762787, 0.3668973445892334, -0.05048251152038574, 0.019266175106167793, 0.09725385904312134, 0.09436831623315811, -0.0882701724767685, -0.038398995995521545, 0.27651622891426086, 0.3258327841758728, 0.13032153248786926, -0.03654307872056961, -0.020737146958708763, 0.20171388983726501, 0.03988979384303093, -0.03418248891830444, -0.44040611386299133, 0.3525175452232361, -0.549606204032898, -0.1252143681049347, -0.05248146504163742, -0.13222545385360718, 0.018008505925536156, -0.12411358952522278, 0.058628447353839874, -0.2993602752685547, 0.07932113111019135, 0.16148701310157776, -0.24582447111606598, 0.40409523248672485, -0.34627071022987366, 0.15610823035240173, -0.26318609714508057, -0.12314575910568237, 0.09540750086307526, -0.017293766140937805, 0.14021030068397522, -0.07387636601924896, 0.16788500547409058, 0.48717865347862244, 0.2949672341346741, 0.15592853724956512, 0.18090735375881195, 0.2629438042640686, 0.20818714797496796, 0.07080980390310287, 0.07074928283691406, -0.09594807028770447, 0.02740158699452877, -0.13523903489112854, -0.1721494197845459, 0.2999957501888275, -0.27222463488578796, 0.1857140064239502, 0.25936925411224365, 0.20856893062591553, -0.1603979915380478, -0.2361842691898346, -0.6041744947433472, -0.47135165333747864, -0.04461134970188141, 0.11394748836755753, -0.18391303718090057, 0.14454232156276703, 0.31613844633102417, 0.10654647648334503, 0.11356575787067413, 0.07708680629730225, -0.2204694002866745, 0.5660648345947266, -0.19127488136291504, 0.01200262550264597, -0.05920255184173584, -0.12326084077358246, 0.121162049472332, 0.30198460817337036, 0.2202589511871338, 0.2443934977054596, 0.5794821381568909, 0.15141814947128296, 0.08356250077486038, -0.6868173480033875, -0.22914159297943115, -0.1460302174091339, 0.0246770940721035, 0.220731720328331, 0.03003080189228058, 0.050881076604127884, -0.4628034234046936, 0.11352192610502243, -0.1640302538871765, 0.046606481075286865, -0.17774194478988647, -0.30966779589653015, 0.18345977365970612, 0.21565407514572144, -0.03934702277183533, -0.17471817135810852, 0.0186607763171196, -0.032430946826934814, 0.1520141363143921, -0.2667863667011261, 0.07539694011211395, -0.48814645409584045, 0.013523743487894535, -0.19022785127162933, -0.03960752859711647, -0.16854998469352722, -0.285593181848526, -0.49377477169036865, -0.049556490033864975, 0.091402068734169, -0.11948844790458679, -0.044950373470783234, 0.21964131295681, -0.13336288928985596, 0.39755117893218994, -0.06739304214715958, -0.2737579345703125, 0.29742708802223206, 0.19273816049098969, 0.13050225377082825, -0.05970175564289093, 0.22498945891857147, 0.24150565266609192, -0.04375519976019859, 0.0007492601871490479, -0.00291258841753006, -0.101439468562603, 0.019456254318356514, 0.13001100718975067, 0.243943989276886, 0.24323925375938416, 0.41502347588539124, 0.34528517723083496, 0.4811972379684448, -0.07224529981613159, -0.04408533126115799, 0.15054631233215332, 0.2696237862110138, 0.05870828777551651, -0.44300517439842224, -0.09159350395202637, -0.13795852661132812, 0.19415344297885895, 0.35028451681137085, 0.15759482979774475, 0.02029000036418438, 0.10845920443534851, -0.34441038966178894, -0.4248916208744049, -0.19531366229057312, -0.11075153946876526, -0.6037114262580872, 0.37377116084098816, 0.07376380264759064, -0.34599465131759644, 0.07555308938026428, -0.1173444464802742, -0.07197248190641403, 0.010029226541519165, 0.3670092225074768, -0.17358316481113434, -0.22145888209342957, -0.2948487102985382, -0.06361658126115799, 0.32336094975471497, 0.27744290232658386, 0.187400683760643, 0.05719080939888954, 0.4286838173866272, 0.21902118623256683, 0.2783436179161072, 0.5899293422698975, -0.3032058775424957, -0.21515296399593353, -0.15275800228118896, -0.12024407833814621, 0.17132294178009033, 0.20109567046165466, 0.008746638894081116, 0.03910135105252266, -0.04955754801630974, 0.0016101300716400146, -0.08048965036869049, -0.12578924000263214, 0.40188995003700256, 0.37497615814208984, -0.2333621382713318, -0.3498316705226898, 0.2007990926504135, -0.13065212965011597, -0.3132435977458954, 0.16650164127349854, -0.020518586039543152, -0.09156741201877594, -0.022936705499887466, -0.10665583610534668, -0.12443499267101288, -0.030125746503472328, 0.43938082456588745, -0.22283533215522766, -0.08885326981544495, 0.021157734096050262, 0.38151586055755615, 0.139076367020607, -0.08305710554122925, 0.4449608325958252, 0.45058661699295044, -0.23940855264663696, -0.18733495473861694, -0.5686712265014648, -0.5073243379592896, 0.3465907573699951, 0.07127944380044937, -0.0050896150059998035, 0.4516391158103943, -0.014460630714893341, -0.10908934473991394, -0.00036538857966661453, -0.4373847544193268, 0.1591847687959671, -0.018470939248800278, -0.38749051094055176, -0.3933069407939911, 0.09989145398139954, 0.13685567677021027, -0.1844748854637146, 0.26164597272872925, 0.316897988319397, -0.19168275594711304, 0.029578939080238342, 0.03972738981246948, 0.7727963924407959, -0.11237165331840515, -0.026508722454309464, -0.41994717717170715, -0.1926170140504837, 0.2783983051776886, 0.24802298843860626, -0.046074315905570984, -0.03239592909812927, -0.41256269812583923, -0.1428423970937729, 0.12489156424999237, 0.3219241499900818, 0.5623250007629395, 0.21887633204460144, 0.2556007504463196, -0.10549389570951462, 0.03201918303966522, 0.2956347167491913, 0.19446201622486115, 0.27538079023361206, 0.17247919738292694, 0.05720679461956024, 0.14672008156776428, 0.10111171007156372, -0.45274415612220764, -0.10926593840122223, 0.20366565883159637, 0.3817569315433502, 0.0048189423978328705, 0.057692453265190125, -0.3304215669631958, 0.006992429029196501, 0.26847296953201294, -0.03304717317223549, -0.30323654413223267, 0.12418480217456818, -0.1803533434867859, 0.18492642045021057, 0.001118350774049759, 0.03939034417271614, 0.04279355704784393, 0.38894253969192505, 0.3816831111907959, -0.09711182117462158, -0.10729347169399261, 0.28453996777534485, 0.12635907530784607, -0.18994548916816711, -0.012513704597949982, 0.3124978840351105, -0.4732545018196106, -0.282449871301651, 0.13152232766151428, -0.2565000653266907, -0.14854887127876282, -0.029792731627821922, -0.07953625917434692, -0.05296222120523453, -0.2494886964559555, 0.16569159924983978, 0.20628127455711365, -0.040607843548059464, 0.5581803321838379, 0.07842057943344116, 0.10670162737369537, -0.22118891775608063, 0.17605221271514893, 0.5732848048210144, -0.3624701499938965, 0.026435790583491325, 0.024603795260190964, -0.37201178073883057, -0.2127799689769745, 0.17659005522727966, -0.08858463913202286, -0.035484809428453445, 0.13357111811637878, -0.13794520497322083, 0.4728272557258606, 0.31215840578079224, -0.367439866065979, -0.07160758972167969, 0.09688154608011246, 0.004784371703863144, -0.05751669779419899, -0.02655087225139141, 0.23343707621097565, 0.28102758526802063, 0.3276726007461548, 0.1612287163734436, 0.08080293238162994, -0.15257973968982697, 0.2531382441520691, -0.31881117820739746, 0.44866085052490234, 0.22908273339271545, 0.17210859060287476, 0.1384286880493164, 0.2762870788574219, -0.27085819840431213, -0.3341466784477234, 0.09486310184001923, -0.05865532159805298, 0.34997427463531494, -0.29816901683807373, -0.09686176478862762, 0.05886244773864746, -0.049274154007434845, 0.2128124088048935, 0.039628129452466965, -0.040419917553663254, -0.05991141125559807, -0.029037702828645706, 0.09176225960254669, 0.2725799083709717, 0.1361609697341919, 0.00722037348896265, 0.427080899477005, -0.46851155161857605, -0.37490546703338623, 0.08243653178215027, -0.01771187037229538, -0.09120127558708191, 0.1830320507287979, -0.05502945929765701, 0.12371614575386047, 0.16201362013816833, -0.12539412081241608, -0.029421567916870117, 0.1755678355693817, -0.32388195395469666, 0.3137921988964081, 0.020923003554344177, 0.040664900094270706, 0.05603098124265671, 0.4178715646266937, -0.12545271217823029, -0.14993932843208313, -0.14196734130382538, 0.05441754311323166, 0.16408255696296692, -0.4867713451385498, -0.11465127021074295, 0.4065178334712982, -0.05445324629545212, -0.0029755309224128723, 0.23488545417785645, 0.041503552347421646, 0.15757817029953003, -0.10150910913944244, -0.11924401670694351, 0.2546340227127075, -0.4867929220199585, 0.2557257115840912, 0.18456138670444489, 0.34832972288131714, -0.21488024294376373, 0.23262307047843933, 0.09408360719680786, -0.09681206196546555, 0.30252140760421753, -0.0011271536350250244, 0.10000129044055939, 0.20018240809440613, 0.227125883102417, 0.1860053390264511, -0.10512110590934753, 0.12165157496929169, 0.3729459345340729, -0.21304962038993835, -0.05573294311761856, 0.28168392181396484, -0.12948015332221985, 0.20030780136585236, -0.09837018698453903, 0.026413554325699806, 0.16157951951026917, 0.027198733761906624, 0.16615617275238037, -0.06724986433982849, -0.21910768747329712, -0.013884179294109344, -0.05676867067813873, -0.12921291589736938, -0.1251959204673767, 0.3137924075126648, -0.0518350824713707, 0.07239502668380737, -0.2692418098449707, 0.3749825358390808, -0.013574909418821335, 0.17002946138381958, -0.13645316660404205, -0.4337323307991028, -0.029450014233589172, 0.018501345068216324, 0.1797405183315277, 0.4036577343940735, -0.010559070855379105, -0.10352373123168945, 0.1498292237520218, 0.06992217153310776, -0.3283992409706116, 0.08813699334859848, 0.11556403338909149, 0.2420983612537384, -0.08449515700340271, -0.21139004826545715, -0.12429536879062653, 0.16119767725467682, -0.006710627116262913, 0.18510711193084717, 0.2743106484413147, 0.014385626651346684, -0.7102096080780029, 0.2914854884147644, 0.13182273507118225, -0.30804720520973206, 0.18331964313983917, 0.03530415520071983, 0.04028979688882828, -0.13597950339317322, 0.5631431341171265, -0.005858785472810268, -0.10427938401699066, -0.03170943260192871, 0.09869292378425598, -0.06642517447471619, 0.13127605617046356, 0.3975348472595215, -0.05756618082523346, -0.14290864765644073, 0.0578252375125885, -0.5967520475387573, -0.08230530470609665, -0.25355133414268494, 0.22074925899505615, 0.3580996096134186, -0.03548531234264374, -0.011609770357608795, 0.14479121565818787, 0.009650714695453644, -0.19900694489479065, -0.15087585151195526, 0.22907699644565582, -0.21623268723487854, -0.06987325847148895, -0.008441828191280365, -0.06975363194942474, -0.14279749989509583, -0.2828145921230316, 0.20138701796531677, -0.2093900591135025, -0.036313217133283615, 0.00267099030315876, -0.009417485445737839, 0.31094807386398315, 0.03579232841730118, -0.028585895895957947, 0.0678839385509491, 0.36810535192489624, 0.18288230895996094, 0.15020638704299927, 0.11450256407260895, 0.19348162412643433, -0.1952000856399536, 0.6106411218643188, 0.20402377843856812, -0.011571702547371387, -0.1212025135755539, -0.23934467136859894, 0.32909470796585083, 0.19647517800331116, -0.19547466933727264, 0.024352267384529114, -0.30785855650901794, -0.09251551330089569, 0.040067024528980255, 0.1920577436685562, -0.026837537065148354, 0.20165026187896729, -0.23643261194229126, 0.28058522939682007, -0.06705185025930405, -0.19828973710536957, 0.14232750236988068, -0.23401057720184326, 0.01860208809375763, -0.23698735237121582, 0.1483348309993744, 0.06619928032159805, -0.2691143751144409, -0.30327045917510986, -0.17714764177799225, 0.5036662220954895, -0.18593761324882507, 0.239393949508667, 0.4157855808734894, -0.04762060195207596, 0.010603141039609909, -0.08195242285728455, -0.2431245744228363, -0.011447299271821976, 0.08688440173864365, 0.2642895579338074, -0.22836117446422577 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
For reference, we can get a solution fairly easily if we assume that we can hold in memory all unique values. ```python from datasets import Dataset from itertools import cycle from functools import partial memory = set() def is_unique(elem:Any , column: str, memory: set) -> bool: if elem[column] in memory: return False else: memory.add(elem[column]) return True # Example dataset ds = Dataset.from_dict({"col1" : [sent for i, sent in zip(range(10), cycle(["apple", "orange", "pear"]))], "col2": [i % 5 for i in range(10)]}) # Drop duplicates in `ds` on "col1" ds2 = ds.filter(partial(is_unique, column="col1", memory=memory)) ``` Of course, we can improve the API so that we can introduce `Dataset.drop_duplicates`. For the parallel version, we can use a shared memory set.
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
117
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no For reference, we can get a solution fairly easily if we assume that we can hold in memory all unique values. ```python from datasets import Dataset from itertools import cycle from functools import partial memory = set() def is_unique(elem:Any , column: str, memory: set) -> bool: if elem[column] in memory: return False else: memory.add(elem[column]) return True # Example dataset ds = Dataset.from_dict({"col1" : [sent for i, sent in zip(range(10), cycle(["apple", "orange", "pear"]))], "col2": [i % 5 for i in range(10)]}) # Drop duplicates in `ds` on "col1" ds2 = ds.filter(partial(is_unique, column="col1", memory=memory)) ``` Of course, we can improve the API so that we can introduce `Dataset.drop_duplicates`. For the parallel version, we can use a shared memory set.
[ 0.09119148552417755, -0.1682119071483612, -0.11286702752113342, 0.1837809830904007, -0.0014153607189655304, 0.301586389541626, 0.3887409567832947, 0.01794132962822914, -0.3053531050682068, -0.08604416251182556, -0.14281895756721497, 0.2531283497810364, -0.06216944754123688, 0.1245170459151268, -0.10068342089653015, -0.04546520859003067, 0.07534931600093842, 0.06758559495210648, -0.05657698214054108, -0.006948072463274002, -0.16842439770698547, -0.20600855350494385, -0.33738356828689575, -0.18553023040294647, -0.35331717133522034, -0.2360011339187622, -0.3813595473766327, -0.0688508078455925, -0.016210170462727547, -0.2403973788022995, 0.3117789030075073, 0.5185608267784119, 0.002463320270180702, 0.360310435295105, -0.00010497263428987935, -0.3751900792121887, -0.05302530527114868, 0.22982648015022278, -0.3113800287246704, 0.030989959836006165, -0.21275770664215088, -0.08911818265914917, 0.0210011787712574, -0.14301148056983948, 0.0038246959447860718, -0.42876115441322327, -0.3294435739517212, -0.42959368228912354, 0.2638533413410187, 0.017685312777757645, 0.2306699901819229, 0.11672909557819366, -0.2128419578075409, 0.11096185445785522, -0.14542585611343384, 0.3235098123550415, -0.16032561659812927, 0.27339720726013184, 0.3343096077442169, -0.22853319346904755, 0.41602686047554016, 0.09440086781978607, -0.2081497311592102, 0.3241717219352722, 0.10499554872512817, -0.06489633768796921, -0.22487574815750122, -0.15628831088542938, 0.13062390685081482, 0.3524954319000244, 0.5146641135215759, -0.5161417722702026, -0.37958744168281555, -0.38435351848602295, 0.4330209493637085, -0.05139714106917381, -0.10569395869970322, 0.10297543555498123, -0.07323053479194641, 0.13711105287075043, -0.4561517536640167, -0.35718271136283875, 0.046999551355838776, -0.11449098587036133, 0.030619733035564423, -0.27829450368881226, 0.16906368732452393, -0.05065314471721649, 0.22802287340164185, -0.028101999312639236, 0.548345685005188, -0.3314676284790039, 0.31385451555252075, 0.5791295766830444, -0.4894527196884155, -0.2284928411245346, -0.2911750376224518, -0.08718567341566086, 0.22490769624710083, -0.045666418969631195, 0.3940702974796295, -0.12390334159135818, -0.1018274798989296, 0.22792145609855652, 0.36943134665489197, 0.006818611174821854, -0.18727079033851624, 0.24613545835018158, -0.16047336161136627, -0.1831163614988327, -0.1474992334842682, 0.01621651090681553, 0.021294232457876205, 0.25800201296806335, 0.4538029432296753, -0.10441552847623825, 0.19611749053001404, -0.08265489339828491, -0.4176877439022064, 0.06772640347480774, -0.4730238914489746, -0.14472173154354095, -0.1581415981054306, -0.3352304697036743, 0.09646573662757874, -0.03848011791706085, -0.019177664071321487, -0.06124337017536163, -0.2779666483402252, -0.23067058622837067, -0.07460813969373703, 0.12989570200443268, -0.14701057970523834, -0.021677890792489052, 0.3546828031539917, -0.09772922098636627, -0.14782272279262543, 0.2855297923088074, 0.05825486779212952, -0.060384348034858704, 0.39103931188583374, -0.24110817909240723, 0.026680566370487213, -0.1310797929763794, -0.19899360835552216, -0.08049260824918747, -0.11480644345283508, 0.0821884274482727, -0.07477474957704544, 0.4420889616012573, 0.11753998696804047, 0.09028974175453186, 0.016261231154203415, 0.24512222409248352, -0.04578419402241707, -0.17937691509723663, -0.3640890121459961, 0.20587310194969177, -0.04840698093175888, 0.19051530957221985, 0.09011438488960266, -0.1568412184715271, -0.10658928751945496, -0.26861247420310974, -0.016393806785345078, 0.23460084199905396, -0.4554440975189209, -0.07363057136535645, -0.15042062103748322, -0.23406049609184265, -0.17906281352043152, 0.4602701663970947, 0.06654667854309082, 0.1180996298789978, -0.0010673943907022476, -0.14926671981811523, -0.10676947981119156, -0.11013312637805939, -0.131390780210495, 0.07023229449987411, 0.06070297956466675, 0.5064936280250549, -0.23911896347999573, 0.35713401436805725, 0.3955407738685608, 0.036676689982414246, 0.13188841938972473, 0.08422259241342545, -0.2511241137981415, -0.3656665086746216, -0.16546505689620972, -0.41798028349876404, 0.19695386290550232, 0.11971975862979889, 0.109687939286232, 0.013466864824295044, 0.0764007419347763, -0.1861734390258789, 0.29089534282684326, 0.011368364095687866, -0.050167761743068695, -0.07095184177160263, 0.38375386595726013, 0.17069929838180542, 0.13545817136764526, -0.3218437433242798, -0.5259639024734497, 0.24583983421325684, -0.016395729035139084, -0.2249576449394226, 0.200639545917511, -0.5696119070053101, 0.1997438371181488, -0.05686759948730469, -0.0924769788980484, 0.14558067917823792, 0.17905358970165253, -0.40188056230545044, 0.05213936045765877, -0.266983300447464, -0.35990607738494873, 0.4811311960220337, -0.2819986343383789, 0.0855046883225441, -0.21998780965805054, 0.4052519202232361, 0.21932734549045563, 0.01765410602092743, 0.03287948668003082, 0.39219605922698975, 0.007948938757181168, 0.043082237243652344, 0.0037632673047482967, 0.1405041366815567, 0.04268040508031845, 0.047933779656887054, 0.12596328556537628, 0.27085769176483154, 0.1435801088809967, -0.007555905729532242, -0.025647567585110664, 0.2962680459022522, 0.13187049329280853, -0.024704162031412125, -0.332439124584198, 0.32099899649620056, -0.46904465556144714, -0.02026636153459549, 0.009319256991147995, -0.022248683497309685, 0.00968904234468937, -0.11508110910654068, 0.13847321271896362, -0.18056461215019226, 0.19152292609214783, 0.08941523730754852, -0.06849983334541321, 0.2926357686519623, -0.4473938047885895, 0.16611576080322266, -0.2961394190788269, -0.07611929625272751, 0.05472710728645325, -0.08903221040964127, -0.0005956962704658508, 0.04014166444540024, 0.18557508289813995, 0.5378745198249817, 0.39986300468444824, 0.15448996424674988, 0.20222708582878113, 0.3274262547492981, 0.26377183198928833, 0.1874016374349594, 0.06852173805236816, 0.0015063360333442688, -0.0507003515958786, -0.21272611618041992, -0.13132447004318237, 0.22803042829036713, -0.21914100646972656, 0.12090805172920227, 0.10099867731332779, 0.18354980647563934, -0.07208947837352753, -0.1587194949388504, -0.48475247621536255, -0.3216129243373871, -0.07807750254869461, 0.15187112987041473, 0.0181206576526165, 0.04167623072862625, 0.21773742139339447, 0.16595035791397095, 0.12776392698287964, 0.032600849866867065, -0.13157454133033752, 0.5557669997215271, -0.3164379596710205, -0.05371737480163574, -0.06322121620178223, -0.2023061066865921, 0.09197862446308136, 0.3095940351486206, 0.10606206953525543, 0.2577625811100006, 0.6076247096061707, 0.15162445604801178, -0.000070963054895401, -0.47078293561935425, -0.05334227904677391, -0.13810113072395325, 0.11873485147953033, 0.16309164464473724, 0.030355840921401978, 0.07676467299461365, -0.28258129954338074, 0.23353458940982819, -0.11955612897872925, -0.11954190582036972, -0.07154407352209091, -0.32849404215812683, 0.21923838555812836, 0.13521498441696167, -0.007225235924124718, -0.20576268434524536, -0.23484234511852264, -0.07650589942932129, 0.2360297441482544, -0.26001328229904175, 0.08251841366291046, -0.3238265812397003, 0.03940359130501747, -0.08602897077798843, 0.13045674562454224, -0.07036816328763962, -0.2739114761352539, -0.29573574662208557, -0.0037075765430927277, 0.06615118682384491, -0.08736984431743622, -0.07169628888368607, 0.1583719700574875, -0.04615531489253044, 0.37483644485473633, -0.07429716736078262, -0.16086576879024506, 0.053221579641103745, 0.12305346131324768, 0.008529067039489746, 0.07974743098020554, 0.19011777639389038, 0.2622365653514862, -0.055692654103040695, 0.021204911172389984, 0.006018679589033127, -0.18069866299629211, 0.032931603491306305, -0.035369135439395905, 0.24665841460227966, 0.22448685765266418, 0.2698074281215668, 0.37761998176574707, 0.5410622954368591, -0.09299279749393463, -0.036750249564647675, 0.09209758043289185, 0.20863957703113556, 0.06936021149158478, -0.53969407081604, -0.14689558744430542, -0.16175872087478638, 0.10263749957084656, 0.27834784984588623, 0.12782922387123108, -0.12651747465133667, 0.03536732494831085, -0.17019091546535492, -0.3718703091144562, -0.17505687475204468, -0.16693352162837982, -0.298327773809433, 0.3728937804698944, -0.00033987872302532196, -0.2829461097717285, -0.00036477111279964447, -0.10424228757619858, -0.18016615509986877, -0.03508658707141876, 0.23827651143074036, -0.119244284927845, -0.3092193603515625, -0.23749405145645142, -0.1297573745250702, 0.33192765712738037, 0.1609535962343216, 0.18938887119293213, 0.11433634161949158, 0.3733122944831848, 0.2467973828315735, 0.1918715536594391, 0.5611013770103455, -0.16645167768001556, -0.35976797342300415, -0.10824808478355408, -0.16850616037845612, 0.014539988711476326, 0.09000134468078613, -0.050148848444223404, 0.019686926156282425, -0.04034643992781639, -0.007475182414054871, -0.0781220942735672, -0.22445571422576904, 0.39178016781806946, 0.4766658544540405, -0.24557693302631378, -0.40733709931373596, 0.10043436288833618, -0.20726433396339417, -0.36403149366378784, 0.09124691039323807, 0.028222398832440376, -0.11753988265991211, -0.011511019431054592, -0.1604759842157364, -0.1525072306394577, -0.040902022272348404, 0.4259048104286194, -0.17123417556285858, -0.062206365168094635, -0.0294155552983284, 0.40973082184791565, 0.30085617303848267, -0.3026063144207001, 0.5341014266014099, 0.47771504521369934, -0.26714542508125305, -0.09748171269893646, -0.558283269405365, -0.4037553369998932, 0.24598529934883118, -0.00447961688041687, -0.013929168693721294, 0.37280282378196716, -0.17760342359542847, -0.03486693650484085, -0.2000000774860382, -0.44144824147224426, 0.17384834587574005, 0.03415452316403389, -0.3091994822025299, -0.5730217099189758, 0.07389169931411743, 0.2527529299259186, -0.15129727125167847, 0.29684019088745117, 0.17630180716514587, -0.1805708408355713, -0.00007946882396936417, -0.008582361042499542, 0.7036532163619995, -0.18196941912174225, -0.02864902839064598, -0.3628770112991333, -0.2709289789199829, 0.28872719407081604, 0.10736587643623352, -0.017246685922145844, -0.008122175931930542, -0.25516360998153687, -0.09723599255084991, 0.11232513189315796, 0.3163910508155823, 0.532877504825592, 0.22204220294952393, 0.3115091323852539, -0.08131997287273407, -0.044212985783815384, 0.2580362856388092, 0.2597697079181671, 0.1865955889225006, 0.22051706910133362, 0.07569526135921478, 0.17276416718959808, 0.06012868508696556, -0.33637070655822754, -0.10894003510475159, 0.28562039136886597, 0.4125021994113922, 0.07582954317331314, -0.10932754725217819, -0.3303479254245758, -0.11861276626586914, 0.3457403779029846, 0.009782543405890465, -0.24777524173259735, 0.07908788323402405, -0.0719570517539978, 0.21281184256076813, -0.05529783293604851, 0.0748717412352562, -0.027604151517152786, 0.3963666558265686, 0.3819216787815094, -0.10615164041519165, -0.0811738669872284, 0.22183692455291748, 0.09662803262472153, -0.17370547354221344, 0.07410489767789841, 0.26267683506011963, -0.3475010395050049, -0.3145972490310669, 0.1916571855545044, -0.1527307629585266, -0.12196721136569977, 0.010954141616821289, -0.05808462202548981, -0.07624402642250061, -0.19321972131729126, 0.15842774510383606, 0.11636662483215332, -0.05249723047018051, 0.6675467491149902, -0.11523208022117615, 0.09215687215328217, -0.24394117295742035, 0.04741368442773819, 0.6506294012069702, -0.3051564395427704, 0.1148984357714653, 0.07376788556575775, -0.3287985920906067, -0.2337179183959961, 0.14997398853302002, -0.03178130462765694, 0.0008405745029449463, 0.24226178228855133, -0.1575605869293213, 0.4063681364059448, 0.24413961172103882, -0.31612730026245117, -0.16555914282798767, 0.10666908323764801, 0.02132434770464897, -0.12895767390727997, -0.17139150202274323, 0.1468636393547058, 0.2834077775478363, 0.39484497904777527, 0.23957407474517822, 0.04501162841916084, -0.14758726954460144, 0.18747100234031677, -0.3360569179058075, 0.3796834647655487, 0.1532641500234604, 0.11015765368938446, 0.1536542922258377, 0.21230772137641907, -0.22611495852470398, -0.2739008665084839, 0.11271072924137115, -0.03118307888507843, 0.3339354693889618, -0.29818472266197205, -0.14294669032096863, 0.06813377887010574, -0.07658684253692627, 0.07844467461109161, 0.09398049861192703, -0.10317551344633102, -0.02407754957675934, -0.11387733370065689, 0.1268482506275177, 0.2694591283798218, 0.140742689371109, 0.09992694854736328, 0.44145241379737854, -0.4115452170372009, -0.3898733854293823, 0.24286997318267822, -0.0033122822642326355, -0.15102426707744598, 0.20144997537136078, 0.02130085602402687, 0.1652555912733078, 0.016844339668750763, -0.3301883041858673, -0.10606031864881516, 0.1305122673511505, -0.341534823179245, 0.1649443507194519, -0.023558124899864197, 0.0030022673308849335, 0.031422208994627, 0.3678024411201477, 0.03941522538661957, -0.13865278661251068, -0.09680323302745819, 0.020443430170416832, 0.20413267612457275, -0.4382432699203491, -0.08904743194580078, 0.3765932619571686, -0.0009161857888102531, 0.13067638874053955, 0.35768190026283264, -0.0718892440199852, 0.1942993402481079, -0.14792537689208984, -0.08636742830276489, 0.30549272894859314, -0.4272312521934509, 0.2961655557155609, 0.019782360643148422, 0.36217638850212097, -0.22883589565753937, 0.1406501829624176, 0.09301639348268509, -0.11279667168855667, 0.25612396001815796, -0.09453306347131729, 0.19777968525886536, 0.3608309030532837, 0.08756658434867859, 0.2549423575401306, -0.13051390647888184, 0.06098540872335434, 0.34268918633461, -0.198729008436203, 0.06483639776706696, 0.25336194038391113, -0.12408555299043655, 0.08243073523044586, -0.12002043426036835, -0.02663886360824108, 0.166023850440979, 0.01602528989315033, 0.13001295924186707, 0.09968714416027069, -0.18693113327026367, -0.08362691849470139, -0.07097291201353073, -0.09541988372802734, -0.24973441660404205, 0.39438503980636597, -0.1147213876247406, 0.06182105839252472, -0.28739434480667114, 0.3566626012325287, 0.08373133093118668, 0.1394311487674713, -0.15073509514331818, -0.4791170060634613, 0.08844798058271408, 0.08740095794200897, -0.009025245904922485, 0.5617094039916992, 0.12081995606422424, 0.018900562077760696, -0.032624490559101105, 0.10673943161964417, -0.27928730845451355, 0.0627032145857811, 0.10379361361265182, 0.2209072858095169, -0.23281431198120117, -0.1778089851140976, -0.10689200460910797, 0.15410776436328888, -0.04284365102648735, 0.09985609352588654, 0.19077031314373016, -0.13639822602272034, -0.8822303414344788, 0.34919431805610657, 0.12945356965065002, -0.2587299942970276, 0.15792809426784515, 0.08570067584514618, -0.0669664517045021, -0.023567650467157364, 0.49553823471069336, -0.041767653077840805, -0.12635013461112976, 0.03430613502860069, 0.11469472944736481, -0.159341499209404, 0.1611749678850174, 0.3864813446998596, 0.12232144176959991, -0.19703064858913422, 0.0666799396276474, -0.6347818374633789, -0.1459255814552307, -0.35089731216430664, 0.13290011882781982, 0.3479219079017639, -0.022967452183365822, -0.1298115849494934, 0.271255224943161, 0.04911480098962784, -0.09041008353233337, -0.1504276543855667, 0.3188857436180115, -0.25978514552116394, -0.0787692666053772, -0.025431163609027863, -0.11901633441448212, -0.009271055459976196, -0.3620787560939789, 0.12369340658187866, -0.28413069248199463, -0.025156879797577858, -0.008435472846031189, 0.08852925896644592, 0.3944183588027954, 0.026725981384515762, -0.0010793358087539673, 0.10024415701627731, 0.3894919157028198, 0.2537636458873749, 0.05004836618900299, 0.10676819831132889, 0.19521485269069672, -0.14685988426208496, 0.44804123044013977, 0.2028733640909195, -0.0008722133934497833, -0.20249015092849731, -0.2991847097873688, 0.25000688433647156, 0.1944185495376587, -0.21708904206752777, -0.11618547886610031, -0.1889280378818512, -0.06497340649366379, 0.02147229015827179, 0.31914663314819336, 0.018849745392799377, 0.27028709650039673, -0.19682499766349792, 0.3104805052280426, -0.1807771921157837, -0.1820945143699646, 0.11961133778095245, -0.27290478348731995, 0.017412051558494568, -0.31146591901779175, 0.13353344798088074, 0.07786816358566284, -0.25623220205307007, -0.37723201513290405, -0.09023069590330124, 0.5191929936408997, -0.24341514706611633, 0.1894361525774002, 0.42474880814552307, -0.009172050282359123, -0.026153333485126495, -0.04909471794962883, -0.07892690598964691, -0.036815330386161804, 0.09366221725940704, 0.35199809074401855, -0.20873498916625977 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
An approach that works assuming you can hold the all the unique document hashes in memory: ```python from datasets import load_dataset def get_hash(example): """Get hash of content field.""" return {"hash": hash(example["content"])} # can use any hashing function here def check_uniques(example, uniques): """Check if current hash is still in set of unique hashes and remove if true.""" if example["hash"] in uniques: uniques.remove(example["hash"]) return True else: return False ds = load_dataset("some_dataset") ds = ds.map(get_hash) uniques = set(ds.unique("hash")) ds_filter = ds.filter(check_uniques, fn_kwargs={"uniques": uniques}) ``` If the `uniques` could be stored in arrow then no additional memory would used at all but I don't know if this is possible.
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
105
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no An approach that works assuming you can hold the all the unique document hashes in memory: ```python from datasets import load_dataset def get_hash(example): """Get hash of content field.""" return {"hash": hash(example["content"])} # can use any hashing function here def check_uniques(example, uniques): """Check if current hash is still in set of unique hashes and remove if true.""" if example["hash"] in uniques: uniques.remove(example["hash"]) return True else: return False ds = load_dataset("some_dataset") ds = ds.map(get_hash) uniques = set(ds.unique("hash")) ds_filter = ds.filter(check_uniques, fn_kwargs={"uniques": uniques}) ``` If the `uniques` could be stored in arrow then no additional memory would used at all but I don't know if this is possible.
[ 0.12614496052265167, -0.04981952905654907, -0.10539939999580383, 0.21124933660030365, 0.14171570539474487, 0.3746890425682068, 0.3247414231300354, 0.19652718305587769, -0.2755320966243744, -0.18274502456188202, -0.042025066912174225, 0.3148610293865204, -0.1531115174293518, 0.04847078025341034, 0.0363268107175827, 0.02885926514863968, 0.041252799332141876, 0.03605492413043976, -0.004545219242572784, -0.02760664001107216, -0.19662469625473022, -0.22045770287513733, -0.2598934769630432, -0.27034664154052734, -0.5386345386505127, -0.20579229295253754, -0.45319610834121704, -0.04237126559019089, -0.09521141648292542, -0.16660353541374207, 0.2018260508775711, 0.5265476107597351, 0.019398994743824005, 0.3828200697898865, -0.00010929656855296344, -0.30670952796936035, -0.09475930035114288, 0.1381426751613617, -0.1937684267759323, -0.05486181378364563, -0.3981917202472687, -0.14455319941043854, -0.049995191395282745, -0.12246544659137726, 0.03638940304517746, -0.5011429786682129, -0.25488224625587463, -0.4400997459888458, 0.13946014642715454, 0.10036765784025192, 0.19813039898872375, -0.04503752291202545, -0.1639249175786972, 0.1757764369249344, 0.07634297013282776, 0.2950226366519928, -0.17506542801856995, 0.3187933564186096, 0.20923203229904175, -0.19939254224300385, 0.28457731008529663, 0.2516034245491028, -0.13731643557548523, 0.1364162564277649, 0.21001726388931274, 0.01673794537782669, -0.2134535312652588, -0.13281267881393433, 0.2215416133403778, 0.3434235155582428, 0.5847854614257812, -0.5414522886276245, -0.40346401929855347, -0.3402244448661804, 0.36731451749801636, -0.025855913758277893, -0.11513634771108627, 0.16428691148757935, -0.05292138457298279, 0.0703149065375328, -0.49812349677085876, -0.3805655539035797, 0.0003689602017402649, -0.0809234231710434, 0.06695161759853363, -0.3899593651294708, 0.20639503002166748, -0.09921617060899734, 0.3582886755466461, 0.03538968041539192, 0.3911638855934143, -0.25706812739372253, 0.16141583025455475, 0.5165132284164429, -0.35088562965393066, -0.11846523731946945, -0.2925271689891815, -0.11792262643575668, 0.2304646372795105, -0.015040356665849686, 0.4478667676448822, -0.06821087747812271, -0.030514080077409744, 0.26265373826026917, 0.2951315641403198, 0.05904917046427727, -0.0733582153916359, 0.3498744070529938, -0.15330080687999725, -0.1454317271709442, -0.28692832589149475, -0.02606099843978882, -0.002025967463850975, 0.09106792509555817, 0.5314269661903381, -0.19068071246147156, 0.32840949296951294, -0.0535351000726223, -0.32420483231544495, 0.1682153344154358, -0.5680497884750366, -0.10512255132198334, -0.13212023675441742, -0.17952781915664673, 0.19945108890533447, -0.1247442439198494, 0.061518751084804535, -0.07547425478696823, -0.23395083844661713, -0.06604404747486115, -0.11553976684808731, 0.20525042712688446, -0.20439183712005615, -0.017366943880915642, 0.3584102392196655, -0.3459072709083557, -0.07960572838783264, 0.2204955667257309, 0.025622524321079254, -0.15424607694149017, 0.3456592559814453, -0.19121666252613068, 0.09490031749010086, -0.12107037007808685, -0.21017880737781525, -0.098849356174469, -0.11255122721195221, 0.1043059229850769, -0.0960746556520462, 0.39621466398239136, 0.06865943968296051, 0.025426406413316727, 0.053104303777217865, 0.2110590636730194, 0.13313116133213043, -0.15206611156463623, -0.26772499084472656, 0.23643410205841064, 0.04788155108690262, 0.22672834992408752, 0.19665050506591797, -0.08943889290094376, -0.22044192254543304, -0.2262219488620758, -0.09763897955417633, 0.29360586404800415, -0.2888213098049164, -0.09758127480745316, -0.07762371003627777, -0.10013000667095184, -0.2959307134151459, 0.3554242253303528, 0.05078331381082535, 0.17740222811698914, 0.011362738907337189, 0.0074283406138420105, 0.04704893380403519, -0.3099358379840851, -0.21087266504764557, 0.2002335488796234, 0.1946755200624466, 0.482313334941864, -0.2377375364303589, 0.3267914950847626, 0.33808571100234985, 0.0963771641254425, 0.12926875054836273, -0.10312698036432266, -0.2088990956544876, -0.331668496131897, -0.20338065922260284, -0.37668272852897644, 0.13212384283542633, -0.019010726362466812, 0.2201160490512848, -0.08061533421278, 0.11015880107879639, -0.12283838540315628, 0.2968447804450989, 0.027745133265852928, -0.06959249079227448, 0.0730372965335846, 0.34413206577301025, -0.02734537422657013, 0.2027052789926529, -0.39757704734802246, -0.5348985195159912, 0.2930077314376831, 0.04776871204376221, -0.1512121856212616, 0.14755550026893616, -0.5930725336074829, 0.14140594005584717, -0.07492438703775406, -0.07261961698532104, 0.04702404886484146, 0.1481485664844513, -0.44436314702033997, -0.04754605144262314, -0.29375240206718445, -0.3607994019985199, 0.268745094537735, -0.2815105617046356, 0.19993580877780914, -0.23188632726669312, 0.20756888389587402, 0.22227448225021362, -0.009027796797454357, 0.010013841092586517, 0.33306625485420227, -0.03353509306907654, 0.07467136532068253, 0.03994926065206528, 0.16958782076835632, 0.11363965272903442, 0.06017398089170456, 0.20299559831619263, 0.3996713161468506, 0.09352163970470428, -0.1716488152742386, 0.014159036800265312, 0.300927072763443, 0.12351296842098236, -0.027698524296283722, -0.3993590176105499, 0.31461644172668457, -0.4298526346683502, -0.05750059336423874, 0.016418620944023132, -0.09540972113609314, 0.0018813814967870712, -0.1768520474433899, 0.13807325065135956, -0.30505305528640747, 0.1752086579799652, 0.1254948079586029, -0.04069461300969124, 0.34905847907066345, -0.2166561633348465, 0.16008783876895905, -0.25329914689064026, 0.012750379741191864, 0.033723678439855576, 0.020608462393283844, 0.010907851159572601, -0.03654985502362251, 0.07902073860168457, 0.41444122791290283, 0.33786725997924805, 0.14909930527210236, 0.3150010406970978, 0.3108713626861572, 0.2954063415527344, 0.11063279211521149, 0.1282186061143875, -0.08822223544120789, -0.05829697474837303, -0.0009178593754768372, -0.13561800122261047, 0.2068491131067276, -0.30655795335769653, 0.2379712462425232, 0.18446457386016846, 0.2365676313638687, -0.16308441758155823, -0.1415458619594574, -0.5337045192718506, -0.3409031927585602, -0.050180256366729736, 0.19774752855300903, 0.015645410865545273, 0.1414393037557602, 0.27535349130630493, 0.16252420842647552, 0.14540939033031464, 0.019132254645228386, -0.31906116008758545, 0.4629013240337372, -0.19908683001995087, 0.022587815299630165, -0.06402884423732758, -0.17390067875385284, 0.08841563761234283, 0.230179101228714, 0.2323429435491562, 0.20421148836612701, 0.6210039854049683, 0.24414275586605072, 0.06797648966312408, -0.6580036282539368, -0.07415381073951721, -0.09786820411682129, 0.028869975358247757, 0.22588618099689484, -0.004691265523433685, -0.03549078106880188, -0.3405808210372925, 0.14159256219863892, -0.10641662776470184, -0.07553955912590027, -0.13433308899402618, -0.24397313594818115, 0.23960663378238678, 0.21245668828487396, 0.040098678320646286, -0.21420717239379883, -0.003996305167675018, -0.037293024361133575, 0.2396034598350525, -0.15595361590385437, 0.1253545880317688, -0.32148563861846924, 0.05612507089972496, -0.15569660067558289, 0.12053027749061584, -0.04542314261198044, -0.2339588701725006, -0.3952290415763855, 0.04044419527053833, 0.11075196415185928, -0.10766005516052246, 0.0403422974050045, 0.14221972227096558, -0.11911927163600922, 0.6033846139907837, -0.11701886355876923, -0.14454621076583862, 0.13172242045402527, 0.08573533594608307, 0.07146430015563965, -0.030724627897143364, 0.23043332993984222, 0.27377745509147644, -0.09533368051052094, -0.03246461600065231, 0.14054401218891144, -0.13274404406547546, 0.003613565117120743, 0.12888965010643005, 0.09316562861204147, 0.24334284663200378, 0.3583596646785736, 0.3802569508552551, 0.5134310126304626, -0.016682427376508713, 0.021201111376285553, -0.016683759167790413, 0.19622059166431427, 0.056918635964393616, -0.5418905019760132, -0.3005368709564209, -0.20784476399421692, 0.16071659326553345, 0.35814666748046875, 0.23568561673164368, -0.07420922070741653, 0.07975378632545471, -0.3160717785358429, -0.4818308353424072, -0.28256919980049133, 0.031580958515405655, -0.5820608139038086, 0.4152683615684509, 0.006430566310882568, -0.22045394778251648, 0.0745728462934494, -0.23080524802207947, -0.09000346064567566, -0.03523452579975128, 0.24783700704574585, -0.13567782938480377, -0.09172729402780533, -0.051387108862400055, -0.10990002006292343, 0.2903599441051483, 0.20972616970539093, 0.06667780876159668, 0.15857017040252686, 0.28521209955215454, 0.25585952401161194, 0.16902431845664978, 0.5933617353439331, -0.18496140837669373, -0.30156248807907104, -0.07426595687866211, -0.24428494274616241, 0.05198553204536438, 0.11340825259685516, -0.04169119521975517, 0.04821154475212097, -0.15709257125854492, 0.026794902980327606, -0.06396397203207016, -0.21854059398174286, 0.29015645384788513, 0.2814282774925232, -0.2805679440498352, -0.2908470928668976, 0.07611939311027527, -0.1604745090007782, -0.3581952750682831, 0.14899903535842896, -0.04449750483036041, -0.21354645490646362, 0.022870246320962906, -0.17485204339027405, -0.20685142278671265, -0.06313581764698029, 0.5041565299034119, -0.23896560072898865, 0.012056463398039341, -0.07897022366523743, 0.41510170698165894, 0.2676246166229248, -0.21318185329437256, 0.687255322933197, 0.5922523736953735, -0.33951956033706665, -0.18404629826545715, -0.6297875642776489, -0.4381033480167389, 0.2808626890182495, 0.1464448720216751, -0.029001355171203613, 0.3709908425807953, -0.08874833583831787, -0.17156992852687836, -0.12777496874332428, -0.35036545991897583, 0.24522635340690613, -0.07702398300170898, -0.33659112453460693, -0.4971018135547638, 0.16285067796707153, 0.18413396179676056, -0.15351948142051697, 0.3472069799900055, 0.20715174078941345, -0.3149200975894928, 0.03015037626028061, 0.04914358630776405, 0.8612601161003113, -0.23085658252239227, 0.0617067888379097, -0.3517204225063324, -0.16925232112407684, 0.20417743921279907, -0.03751998394727707, -0.06620360910892487, -0.0893036425113678, -0.3208792805671692, -0.13599739968776703, 0.1335485279560089, 0.295427531003952, 0.5259315967559814, 0.2308306097984314, 0.22060412168502808, -0.16398298740386963, 0.03438279777765274, 0.17272968590259552, 0.21081185340881348, 0.044387295842170715, 0.2128141075372696, 0.055312689393758774, 0.14975909888744354, 0.12890151143074036, -0.42730477452278137, -0.14002811908721924, 0.3192813992500305, 0.33436745405197144, -0.06356320530176163, -0.12642133235931396, -0.38722485303878784, -0.10566096007823944, 0.3405187129974365, -0.05295441672205925, -0.25409919023513794, -0.0037581175565719604, -0.012095410376787186, 0.07825464755296707, -0.0843190997838974, 0.03509387746453285, 0.016905346885323524, 0.4830532670021057, 0.3332120180130005, -0.018082085996866226, -0.17907193303108215, 0.31321194767951965, 0.12399480491876602, -0.1166447252035141, 0.022117704153060913, 0.2701147198677063, -0.43165016174316406, -0.2451220154762268, 0.10996843874454498, -0.2359105795621872, -0.13605548441410065, -0.13470502197742462, -0.055530622601509094, -0.25197145342826843, -0.14392827451229095, 0.1366378217935562, 0.04035886377096176, 0.043647412210702896, 0.6257819533348083, 0.014101400971412659, -0.015058130025863647, -0.12938372790813446, 0.17588090896606445, 0.6240167617797852, -0.3211272954940796, 0.10649684816598892, -0.05332207307219505, -0.41219276189804077, -0.2312484085559845, 0.1709880828857422, 0.029681185260415077, 0.045705780386924744, 0.27595654129981995, -0.08089695125818253, 0.4771777391433716, 0.3639730215072632, -0.31497013568878174, -0.1320187747478485, 0.09025979787111282, 0.03528681769967079, -0.05696219950914383, -0.07849223911762238, 0.2678528428077698, 0.2792886793613434, 0.4468814730644226, 0.04475882649421692, 0.0038149459287524223, -0.2072569578886032, 0.312486469745636, -0.29328688979148865, 0.4068150222301483, 0.19435422122478485, 0.15227273106575012, 0.19252261519432068, 0.32080960273742676, -0.17741599678993225, -0.3144141137599945, 0.08069468289613724, 0.01366836205124855, 0.3220280408859253, -0.2863624691963196, -0.22574172914028168, 0.09209363162517548, -0.04044613242149353, 0.15147510170936584, 0.12708577513694763, -0.10673138499259949, -0.04487580433487892, -0.14505958557128906, 0.11492292582988739, 0.3530826270580292, 0.09066758304834366, 0.12509331107139587, 0.5001669526100159, -0.44004133343696594, -0.3222654461860657, 0.13146531581878662, -0.1442050188779831, -0.010482408106327057, 0.23903144896030426, -0.017252657562494278, 0.046719957143068314, 0.08802460134029388, -0.18516011536121368, -0.08529574424028397, 0.21088367700576782, -0.35265249013900757, 0.2050534188747406, 0.06990581750869751, 0.07407672703266144, 0.032465167343616486, 0.37934044003486633, 0.05157221481204033, -0.22959858179092407, -0.0796157717704773, -0.056105807423591614, 0.1700921356678009, -0.4452592730522156, -0.13597357273101807, 0.19636258482933044, -0.2345925122499466, 0.030562598258256912, 0.27857518196105957, -0.006541721522808075, 0.05672036111354828, -0.3499642014503479, -0.1875801384449005, 0.16369572281837463, -0.4459981918334961, 0.182260662317276, 0.08119777590036392, 0.28098875284194946, -0.2411162406206131, 0.1345788836479187, 0.07456236332654953, 0.040303103625774384, 0.2776200771331787, -0.09046541899442673, 0.20647750794887543, 0.32527801394462585, 0.2951839864253998, 0.11353185772895813, -0.17072464525699615, 0.06479046493768692, 0.36186861991882324, -0.14042340219020844, 0.07417629659175873, 0.23179198801517487, -0.09796351939439774, 0.4305533468723297, -0.04159671440720558, -0.027010327205061913, 0.2455914467573166, 0.0628606528043747, 0.04202341288328171, 0.17344056069850922, -0.25679531693458557, -0.10057034343481064, 0.08392791450023651, -0.1749955713748932, -0.22423486411571503, 0.2809641361236572, 0.09537170827388763, 0.04797831177711487, -0.21337451040744781, 0.5158267021179199, -0.12667936086654663, 0.30585411190986633, -0.3061109781265259, -0.4717923104763031, 0.08228451758623123, 0.04306388646364212, 0.05700068175792694, 0.4251686632633209, 0.10011602938175201, 0.006884029135107994, -0.004436250776052475, 0.13388994336128235, -0.3147830069065094, 0.10531596839427948, 0.08457056432962418, 0.2586422562599182, -0.04369725286960602, -0.17963214218616486, -0.20188206434249878, 0.11183138191699982, 0.00038171466439962387, 0.070703886449337, 0.2421911656856537, -0.055974703282117844, -0.6746193170547485, 0.25904184579849243, 0.19541223347187042, -0.2519747316837311, 0.1476041078567505, 0.08812213689088821, 0.04587670415639877, -0.23332113027572632, 0.6932576298713684, -0.005759555846452713, -0.042654849588871, 0.051233917474746704, 0.07951044291257858, -0.04704613611102104, 0.18080921471118927, 0.33223530650138855, 0.06431005150079727, -0.2191946804523468, 0.07920731604099274, -0.5878246426582336, -0.10757412761449814, -0.3962894678115845, 0.17992240190505981, 0.3795863389968872, 0.06169427931308746, -0.045320890843868256, 0.1687501072883606, 0.040883757174015045, -0.16217747330665588, -0.10965067893266678, 0.28350016474723816, -0.24726861715316772, -0.020268291234970093, -0.17563949525356293, -0.10981926321983337, -0.06559695303440094, -0.3855147361755371, 0.07559213042259216, -0.3589266538619995, -0.05173514410853386, -0.0272693932056427, -0.018241923302412033, 0.3794831335544586, 0.19704169034957886, 0.052313245832920074, -0.04314013570547104, 0.33665165305137634, 0.21730861067771912, 0.061786770820617676, 0.06447282433509827, 0.16302482783794403, -0.19789831340312958, 0.5346553921699524, 0.2877953052520752, -0.09941183030605316, -0.22183333337306976, -0.2733612060546875, 0.3323022425174713, 0.22359329462051392, -0.2362116277217865, -0.23938535153865814, -0.30247098207473755, -0.1616596281528473, 0.05648502707481384, 0.21132488548755646, -0.04736333712935448, 0.3700812757015228, -0.18201932311058044, 0.2209349125623703, -0.15561479330062866, -0.26498937606811523, 0.22046825289726257, -0.2175578624010086, 0.04244557395577431, -0.19876837730407715, 0.18713894486427307, 0.17578768730163574, -0.2553979158401489, -0.5303568840026855, -0.14496012032032013, 0.5308037400245667, -0.175645649433136, 0.14720682799816132, 0.35739314556121826, -0.031086280941963196, -0.026421327143907547, -0.10509927570819855, -0.1761273741722107, -0.08719387650489807, 0.17426657676696777, 0.17511670291423798, -0.2278723269701004 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
@lvwerra hey, could you tell me how reliable is this deduplication method. i am currently using the same deduplication strategy to deduplicate a large text corpus to pretrain LLMs ~ 11B to 20B. just needed to ensure if this strategy would be fine on large datasets for LLMs pretraining.
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
49
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no @lvwerra hey, could you tell me how reliable is this deduplication method. i am currently using the same deduplication strategy to deduplicate a large text corpus to pretrain LLMs ~ 11B to 20B. just needed to ensure if this strategy would be fine on large datasets for LLMs pretraining.
[ 0.043261658400297165, -0.16642571985721588, -0.0821966677904129, 0.26867660880088806, 0.007917076349258423, 0.2554420232772827, 0.3373904228210449, 0.08059020340442657, -0.4248513877391815, -0.06280052661895752, -0.03162272274494171, 0.2793349027633667, -0.03674705699086189, 0.052438318729400635, 0.051965292543172836, 0.11090799421072006, 0.012371189892292023, 0.055589355528354645, -0.18710121512413025, -0.008635200560092926, -0.017496168613433838, -0.20586775243282318, -0.31817686557769775, -0.30880290269851685, -0.5021517872810364, -0.0988081619143486, -0.40897807478904724, -0.01951141655445099, -0.12572482228279114, -0.07198163121938705, 0.21230387687683105, 0.42531177401542664, 0.1226714700460434, 0.30169129371643066, -0.00011053636990254745, -0.41482609510421753, 0.024505306035280228, 0.12600012123584747, -0.4504889249801636, 0.050769299268722534, -0.4751383662223816, 0.10487663000822067, 0.053639985620975494, -0.011098146438598633, -0.07879623770713806, -0.2754015028476715, -0.3188801109790802, -0.2874283194541931, 0.3340498208999634, 0.24681079387664795, 0.21713218092918396, -0.05059535801410675, -0.29269012808799744, 0.08121432363986969, -0.11091645807027817, 0.461123526096344, -0.0646863803267479, 0.2006296068429947, 0.5283569097518921, -0.10369318723678589, 0.13856379687786102, 0.1428804248571396, -0.040274664759635925, 0.16503220796585083, 0.10125544667243958, -0.12323590368032455, -0.11046739667654037, -0.16145776212215424, 0.22093123197555542, 0.42282530665397644, 0.7432790994644165, -0.4695543348789215, -0.31642964482307434, -0.3874019682407379, 0.5317696928977966, 0.056563980877399445, -0.0799182876944542, 0.04791352152824402, -0.030700920149683952, 0.18732589483261108, -0.35896679759025574, -0.5856145024299622, -0.11535096168518066, -0.18692143261432648, -0.15633754432201385, -0.4039744734764099, 0.1389678418636322, -0.16152873635292053, 0.09383158385753632, 0.01658361218869686, 0.6143128275871277, -0.17163868248462677, 0.17521953582763672, 0.548287570476532, -0.3198317885398865, -0.30725058913230896, -0.26257002353668213, -0.04002656787633896, 0.20471757650375366, 0.117159903049469, 0.35004347562789917, -0.09162168949842453, -0.20959174633026123, 0.20962822437286377, 0.3928340673446655, 0.005708165466785431, -0.15084964036941528, 0.20814645290374756, -0.052910856902599335, -0.057403795421123505, -0.23560786247253418, 0.09781709313392639, -0.00533493934199214, 0.15034209191799164, 0.28810155391693115, -0.03984890878200531, 0.25664931535720825, -0.3390921950340271, -0.39365696907043457, 0.1693515032529831, -0.4405660331249237, -0.19353236258029938, -0.06830031424760818, -0.24641263484954834, 0.11668442189693451, -0.15577155351638794, 0.010678015649318695, -0.000018965452909469604, -0.23711316287517548, -0.41667109727859497, -0.09205380082130432, 0.08532288670539856, -0.18772625923156738, -0.0018939971923828125, 0.35602760314941406, -0.17674373090267181, -0.09966850280761719, 0.21512451767921448, 0.05493207275867462, -0.11296546459197998, 0.23857244849205017, -0.11712953448295593, 0.1260395348072052, -0.19477026164531708, -0.3064824640750885, -0.2531081438064575, -0.16628821194171906, 0.10705293715000153, -0.04353706166148186, 0.5126991868019104, 0.11117389798164368, -0.027883687987923622, -0.028158364817500114, 0.2257356345653534, 0.046584442257881165, -0.17732249200344086, -0.23528173565864563, 0.3990146517753601, -0.022119887173175812, 0.14994782209396362, 0.1310350000858307, -0.13253086805343628, 0.038498345762491226, -0.1025010421872139, -0.022596480324864388, 0.24192935228347778, -0.5261754393577576, -0.0749739408493042, -0.1800215095281601, -0.20420432090759277, -0.05031611770391464, 0.3597602844238281, -0.06474699825048447, 0.251150906085968, 0.09637017548084259, 0.03253985196352005, 0.11604137718677521, 0.02725755050778389, -0.16740980744361877, 0.2933351695537567, 0.06158822774887085, 0.2565856873989105, -0.18005183339118958, 0.21377328038215637, 0.3129046857357025, -0.01533291395753622, 0.04535442218184471, 0.0458366684615612, -0.23745891451835632, -0.49902981519699097, -0.2854115068912506, -0.425741046667099, 0.07378651201725006, 0.16099433600902557, 0.1517581045627594, -0.06027279049158096, 0.1460583657026291, -0.02569727972149849, 0.28927114605903625, -0.03187507763504982, -0.007184786722064018, -0.035678744316101074, 0.3048533499240875, 0.11081963777542114, 0.06665145605802536, -0.34770169854164124, -0.4954681992530823, 0.10019674152135849, -0.21277305483818054, -0.08687515556812286, 0.2085353285074234, -0.590149462223053, 0.218753844499588, -0.09548147022724152, -0.11300639808177948, 0.13192537426948547, 0.112291619181633, -0.5108158588409424, -0.07339619100093842, -0.32797613739967346, -0.3275114595890045, 0.3048754036426544, -0.2682289779186249, 0.1419285535812378, -0.22990059852600098, 0.3263152539730072, 0.2055690735578537, 0.019462469965219498, 0.12421263754367828, 0.4788341224193573, -0.010392867028713226, 0.0322822667658329, -0.047572534531354904, 0.06788119673728943, 0.1795608252286911, -0.10216715931892395, 0.1266767680644989, 0.13646215200424194, 0.2266673743724823, -0.05183067172765732, -0.05815141648054123, 0.24588225781917572, -0.013110443018376827, 0.0008484870195388794, -0.5157622694969177, 0.2058289796113968, -0.3480880558490753, -0.16005712747573853, 0.062299326062202454, -0.06451423466205597, -0.07976862788200378, -0.292787104845047, 0.09481000155210495, -0.30198559165000916, 0.18903355300426483, 0.14330996572971344, -0.10797373950481415, 0.3296036124229431, -0.4225904643535614, 0.1924721896648407, -0.3310149312019348, -0.16926151514053345, 0.03438761830329895, -0.049602411687374115, -0.004486992955207825, -0.11164961755275726, 0.19170016050338745, 0.37488460540771484, 0.32219451665878296, 0.1457604169845581, 0.4067170321941376, 0.3083072900772095, 0.15729442238807678, 0.005420558154582977, 0.06708008050918579, -0.2012961357831955, -0.044584162533283234, -0.02283056080341339, -0.15238672494888306, 0.2526244819164276, -0.3153132498264313, 0.18484808504581451, 0.233210027217865, 0.21099865436553955, -0.16967736184597015, -0.22125859558582306, -0.658925473690033, -0.6114826202392578, -0.17067310214042664, 0.24160556495189667, -0.05387568846344948, 0.1300927996635437, 0.4515649676322937, 0.07661977410316467, 0.1542397141456604, 0.03301852196455002, -0.17093251645565033, 0.6704649925231934, -0.29476866126060486, -0.061465226113796234, 0.06518399715423584, -0.1509418487548828, -0.07943809032440186, 0.2655303478240967, 0.2183503657579422, 0.2767326533794403, 0.5889173746109009, 0.197320356965065, -0.013178383931517601, -0.5501664876937866, -0.14835162460803986, -0.07195650041103363, 0.06949982792139053, 0.2127338945865631, 0.06689684838056564, -0.028137587010860443, -0.18547740578651428, 0.27023544907569885, -0.2681078612804413, 0.024921895936131477, -0.1984298676252365, -0.3824954032897949, 0.2155097872018814, 0.21045586466789246, -0.06570965051651001, -0.2925267815589905, 0.05112786591053009, -0.030758317559957504, 0.04852531850337982, -0.19130676984786987, 0.02126419171690941, -0.276774525642395, -0.024113647639751434, -0.014428835362195969, 0.15860186517238617, -0.023409144952893257, -0.33401980996131897, -0.17926576733589172, -0.11877387762069702, 0.1283029317855835, -0.17376908659934998, -0.1579200029373169, 0.16540084779262543, 0.012111328542232513, 0.3929597735404968, -0.25961029529571533, -0.25612857937812805, 0.12629394233226776, 0.1664547175168991, -0.14729024469852448, -0.02123340032994747, 0.25856488943099976, 0.3542024791240692, -0.04728662222623825, -0.004977665841579437, 0.08896768093109131, -0.11401555687189102, 0.1862729787826538, 0.2523857355117798, 0.07591092586517334, 0.06422602385282516, 0.16823329031467438, 0.3595964312553406, 0.5077082514762878, -0.08774425089359283, 0.0701243206858635, 0.22023041546344757, 0.13612410426139832, 0.06776195019483566, -0.36979809403419495, -0.0207857433706522, -0.196719229221344, 0.21898040175437927, 0.5058572888374329, 0.16471615433692932, -0.19811025261878967, 0.06374585628509521, -0.20441965758800507, -0.2634177803993225, -0.21781142055988312, -0.0862760841846466, -0.5779744386672974, 0.38881298899650574, 0.0974111258983612, -0.12613195180892944, 0.17976905405521393, -0.09863950312137604, -0.16002409160137177, -0.013902202248573303, 0.3972328305244446, -0.21513870358467102, -0.036807239055633545, -0.054378725588321686, -0.12728101015090942, 0.24604861438274384, 0.11864588409662247, 0.15175175666809082, 0.03392468020319939, 0.3283928632736206, 0.23668773472309113, 0.19177934527397156, 0.39608263969421387, -0.32778799533843994, -0.34089648723602295, -0.050202835351228714, -0.04687073081731796, 0.2023380696773529, 0.15025004744529724, -0.08702857792377472, 0.015136811882257462, 0.07183206081390381, -0.014024905860424042, -0.1829279065132141, -0.21577554941177368, 0.3812198340892792, 0.41020527482032776, -0.19532449543476105, -0.35675254464149475, 0.19951994717121124, -0.2200937569141388, -0.32456523180007935, 0.1079430803656578, 0.10785558074712753, -0.13843697309494019, -0.02025262452661991, -0.05143766850233078, -0.19886747002601624, -0.04045265167951584, 0.4803774356842041, -0.1626424789428711, -0.10512508451938629, 0.03020453080534935, 0.41198015213012695, 0.16126427054405212, 0.06186281517148018, 0.6015492677688599, 0.5452401638031006, -0.3768079876899719, -0.08940708637237549, -0.5305151343345642, -0.418615460395813, 0.44525086879730225, 0.23245425522327423, 0.027685124427080154, 0.4842444956302643, -0.11466322839260101, -0.20885641872882843, -0.16754615306854248, -0.22241602838039398, 0.194440096616745, -0.040036216378211975, -0.43810221552848816, -0.4628141522407532, 0.07330162823200226, 0.1449824869632721, -0.1474948227405548, 0.2194374054670334, 0.16748762130737305, -0.2797490656375885, -0.014605770818889141, 0.02185000479221344, 0.8265479207038879, -0.02390182763338089, 0.05485969036817551, -0.4249548316001892, -0.1669245958328247, 0.2639194130897522, 0.1264091581106186, 0.039965517818927765, -0.045017920434474945, -0.27865660190582275, -0.16808560490608215, 0.0719052404165268, 0.2548310160636902, 0.5456392765045166, 0.09926387667655945, 0.2186514139175415, -0.1295929253101349, -0.10381275415420532, 0.3218209743499756, 0.37933945655822754, 0.2515411674976349, 0.18282820284366608, 0.09415596723556519, 0.12485402822494507, 0.09329362958669662, -0.3846553862094879, -0.14375656843185425, 0.166368305683136, 0.4421338438987732, 0.06078862398862839, -0.11823786795139313, -0.361505925655365, -0.1370326429605484, 0.17115847766399384, 0.03251511976122856, -0.38955044746398926, 0.4290387034416199, -0.10434338450431824, 0.08875714987516403, 0.04268734157085419, -0.09171600639820099, -0.06373423337936401, 0.40809836983680725, 0.32462912797927856, -0.029100710526108742, -0.046399496495723724, 0.36481279134750366, 0.0611632838845253, -0.11993908882141113, -0.01737353205680847, 0.297689825296402, -0.3270900845527649, -0.28509390354156494, 0.08445163816213608, -0.28922635316848755, -0.29507556557655334, -0.04201421141624451, 0.09526336938142776, -0.020214861258864403, -0.24470657110214233, 0.1350371241569519, 0.19693401455879211, -0.0862918272614479, 0.6065042614936829, 0.15959973633289337, 0.01725081354379654, -0.2285739630460739, 0.09987884014844894, 0.5053327679634094, -0.367815762758255, 0.08102338016033173, 0.10869571566581726, -0.3276315927505493, -0.28671354055404663, 0.05346988886594772, 0.002094230381771922, -0.18350309133529663, 0.26443609595298767, -0.17327798902988434, 0.3638748526573181, 0.33430132269859314, -0.264326810836792, -0.11221154034137726, 0.02533062919974327, -0.11121265590190887, 0.0742846429347992, -0.1610778123140335, -0.015784330666065216, 0.2037447988986969, 0.40371251106262207, 0.028790943324565887, 0.21547400951385498, -0.1546243280172348, 0.3106788098812103, -0.31817060708999634, 0.4557264745235443, 0.16915494203567505, 0.27634119987487793, 0.08496695756912231, 0.10793823003768921, -0.2757297456264496, -0.1934266984462738, 0.05412689596414566, -0.0457034558057785, 0.3436537981033325, -0.2715170979499817, -0.21319212019443512, 0.11261557042598724, -0.09342453628778458, 0.07172553241252899, 0.0863366350531578, -0.11283489316701889, -0.1836063265800476, -0.030476607382297516, 0.0886673778295517, 0.04466093331575394, 0.16041195392608643, 0.052532095462083817, 0.43598052859306335, -0.4281420111656189, -0.3785400986671448, 0.1243576779961586, 0.10384021699428558, 0.05234736576676369, 0.15751546621322632, -0.053892187774181366, 0.128009632229805, 0.09304240345954895, -0.20415160059928894, 0.06106708198785782, 0.3828046917915344, -0.34476903080940247, 0.16575992107391357, 0.031235478818416595, 0.10406233370304108, -0.011804374866187572, 0.3773277699947357, 0.151526540517807, -0.19051635265350342, -0.1781519055366516, 0.1533946692943573, 0.13661448657512665, -0.45710480213165283, -0.010451585054397583, 0.2897239625453949, -0.14199015498161316, 0.08577443659305573, 0.3876189589500427, 0.04996776953339577, 0.3092455565929413, -0.08862285315990448, -0.1615685522556305, 0.09313773363828659, -0.2517458200454712, 0.12411804497241974, 0.26489681005477905, 0.2734644114971161, -0.17465347051620483, 0.22842781245708466, 0.010066263377666473, -0.12399085611104965, 0.17661140859127045, -0.008283689618110657, 0.19730734825134277, 0.18576961755752563, 0.10337197035551071, 0.30953043699264526, -0.12810082733631134, 0.11634479463100433, 0.41818827390670776, -0.006031692028045654, -0.0408661887049675, 0.2042536437511444, -0.12061620503664017, 0.2033432424068451, -0.20286326110363007, -0.037994809448719025, 0.2056581676006317, -0.13183149695396423, 0.0697600245475769, 0.11392752826213837, -0.2004050612449646, -0.03631247580051422, 0.03028688207268715, -0.16330207884311676, -0.04605209082365036, 0.1365492343902588, -0.04566473513841629, 0.039322126656770706, -0.33744460344314575, 0.4179598391056061, -0.06548827141523361, 0.1857699453830719, -0.1228422075510025, -0.2162843495607376, -0.08842958509922028, 0.11043493449687958, 0.14363758265972137, 0.4570615291595459, 0.025198860093951225, -0.012718401849269867, -0.14313678443431854, 0.0031535732559859753, -0.2671394944190979, 0.19574038684368134, 0.051139213144779205, 0.3104446530342102, -0.1199520081281662, -0.17374494671821594, 0.11504963040351868, 0.03596393018960953, 0.043491754680871964, 0.18209868669509888, 0.1889709234237671, -0.23866769671440125, -0.7429265379905701, 0.4281741678714752, 0.2434067577123642, -0.2544284760951996, 0.04578040912747383, 0.071413055062294, -0.005952160805463791, 0.11683885753154755, 0.6465744972229004, -0.0557592436671257, -0.03471781685948372, 0.025632958859205246, 0.09266265481710434, -0.06374233961105347, 0.24039483070373535, 0.490839421749115, 0.24638301134109497, -0.2382655143737793, -0.04988120496273041, -0.7255948185920715, -0.07152295857667923, -0.2512560784816742, 0.1607309877872467, 0.37871190905570984, 0.009624285623431206, -0.06887540966272354, 0.15153935551643372, 0.04608570784330368, -0.16120508313179016, 0.04517444595694542, 0.22302576899528503, -0.29469528794288635, -0.060251858085393906, -0.023133963346481323, -0.08646200597286224, -0.16273590922355652, -0.3021036982536316, 0.10445383191108704, -0.18997322022914886, -0.10672273486852646, -0.05433803051710129, 0.014281436800956726, 0.2980768382549286, 0.43335941433906555, -0.06471212208271027, 0.08301393687725067, 0.43241822719573975, 0.2274700403213501, 0.050715312361717224, 0.07466460764408112, 0.20661965012550354, -0.2462594360113144, 0.4496946930885315, 0.3730197846889496, -0.17750616371631622, -0.1466127187013626, -0.15571089088916779, 0.2823992371559143, 0.17742367088794708, 0.033704377710819244, 0.0368046760559082, -0.4343682825565338, -0.19790875911712646, -0.0511208176612854, 0.17540059983730316, 0.1129188984632492, 0.29292380809783936, -0.27937769889831543, 0.18785150349140167, -0.2344372272491455, -0.20662111043930054, 0.23365747928619385, -0.14676491916179657, -0.006357753649353981, -0.3983640968799591, 0.21646779775619507, 0.09172776341438293, -0.2213815152645111, -0.5179370045661926, -0.2191946804523468, 0.5428457260131836, -0.2509472966194153, 0.1193695068359375, 0.5045870542526245, 0.1341276913881302, -0.08090881258249283, -0.18336200714111328, -0.04160390794277191, 0.09226720035076141, 0.10755349695682526, 0.2096010148525238, -0.23072639107704163 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Hi @StephennFernandes I'm also trying to pretrain an llm, and need to do deduplication for my dataset, which method you applied please?
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
22
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no Hi @StephennFernandes I'm also trying to pretrain an llm, and need to do deduplication for my dataset, which method you applied please?
[ 0.10408537089824677, -0.19629724323749542, -0.09547547996044159, 0.19451391696929932, -0.018371567130088806, 0.28303056955337524, 0.3906221389770508, 0.011555803939700127, -0.41531339287757874, -0.03917102515697479, 0.0200912244617939, 0.26913022994995117, -0.032623291015625, 0.05937420576810837, 0.022631186991930008, 0.08876840770244598, 0.042340051382780075, 0.2136373370885849, -0.103059783577919, -0.028485069051384926, -0.03856727108359337, -0.2652570903301239, -0.3541231155395508, -0.19001178443431854, -0.5869141221046448, -0.07683319598436356, -0.46514543890953064, 0.014707069844007492, -0.21069902181625366, -0.02955029159784317, 0.31454601883888245, 0.44044435024261475, 0.0935235470533371, 0.20220047235488892, -0.0001115743289119564, -0.41741085052490234, 0.0052512772381305695, 0.156711608171463, -0.4430941939353943, -0.03260184824466705, -0.5261943936347961, 0.09835711121559143, 0.11937149614095688, -0.03686847165226936, -0.09011265635490417, -0.2872830033302307, -0.28508710861206055, -0.169892817735672, 0.3014627695083618, 0.13279861211776733, 0.2218468338251114, -0.10039020329713821, -0.28718286752700806, -0.008375805802643299, -0.08325589448213577, 0.5102076530456543, -0.11911439150571823, 0.2677146792411804, 0.48371902108192444, -0.17653951048851013, 0.25838321447372437, 0.0792311429977417, -0.09836403280496597, 0.23212577402591705, 0.2633563280105591, -0.1347775161266327, -0.08989716321229935, -0.2117137312889099, 0.16498038172721863, 0.3556431531906128, 0.8572521805763245, -0.4443866014480591, -0.30110907554626465, -0.3571479618549347, 0.5560974478721619, 0.027257287874817848, -0.03356721252202988, 0.00619670981541276, 0.0196014866232872, 0.14850939810276031, -0.2890374958515167, -0.5568060874938965, -0.08830570429563522, -0.21365569531917572, -0.2060665488243103, -0.32375916838645935, 0.10254310816526413, -0.1581401526927948, 0.10835525393486023, -0.02539064735174179, 0.5814605951309204, -0.19316807389259338, 0.19621238112449646, 0.5522961020469666, -0.291510671377182, -0.3157080113887787, -0.24242684245109558, -0.0294608473777771, 0.15292632579803467, 0.20241665840148926, 0.2980423867702484, -0.08597192913293839, -0.24270515143871307, 0.274231493473053, 0.3071005046367645, 0.08667807281017303, -0.0570906326174736, 0.32498735189437866, -0.11636660993099213, -0.13654349744319916, -0.23945337533950806, 0.060270972549915314, -0.015749892219901085, 0.21922625601291656, 0.31644976139068604, 0.08008569478988647, 0.23624198138713837, -0.32161661982536316, -0.37449440360069275, 0.0686502680182457, -0.41558295488357544, -0.26100409030914307, -0.09689730405807495, -0.178031325340271, 0.15411019325256348, -0.1829591691493988, -0.018598124384880066, 0.05221002548933029, -0.2666280269622803, -0.3817499577999115, -0.0628170371055603, 0.12365742027759552, -0.27169641852378845, 0.009142521768808365, 0.31525495648384094, -0.10185061395168304, -0.09934203326702118, 0.2353157252073288, -0.004958711564540863, -0.1387685239315033, 0.2752995491027832, -0.15007902681827545, 0.028904400765895844, -0.18835605680942535, -0.2409031242132187, -0.23054549098014832, -0.14865535497665405, 0.1318892389535904, -0.01812206208705902, 0.5061644911766052, 0.0774262323975563, 0.009960342198610306, -0.025810418650507927, 0.2322773039340973, 0.0576808899641037, -0.1963593065738678, -0.21514996886253357, 0.3269931674003601, -0.1156284436583519, 0.06893092393875122, 0.07520811259746552, -0.11333690583705902, 0.04109887406229973, -0.19083218276500702, -0.07142578810453415, 0.22967246174812317, -0.5615696310997009, -0.08292435109615326, -0.2389094978570938, -0.2227581888437271, -0.0036535561084747314, 0.31835588812828064, -0.053485460579395294, 0.28535908460617065, 0.04483497142791748, 0.05744878947734833, 0.17602065205574036, 0.09158897399902344, -0.16983091831207275, 0.1520776003599167, -0.03637271001935005, 0.23615409433841705, -0.17510119080543518, 0.30495819449424744, 0.22612085938453674, 0.019486431032419205, -0.03991193324327469, -0.016008641570806503, -0.24255973100662231, -0.5418919324874878, -0.24291330575942993, -0.39800146222114563, 0.08888022601604462, 0.09490208327770233, 0.12645970284938812, 0.06378838419914246, 0.12314900010824203, -0.11908798664808273, 0.2460111677646637, -0.13240768015384674, -0.0696713775396347, -0.09996284544467926, 0.39209869503974915, 0.12353973090648651, 0.011156762018799782, -0.3454694449901581, -0.5023683905601501, 0.09245400875806808, -0.24443592131137848, -0.1028442233800888, 0.17905214428901672, -0.57805997133255, 0.15172001719474792, -0.121910460293293, -0.1128033846616745, 0.14306187629699707, 0.10491381585597992, -0.47164908051490784, -0.10675238072872162, -0.36710605025291443, -0.3315334916114807, 0.35350915789604187, -0.17699943482875824, 0.16703790426254272, -0.2578064501285553, 0.37601128220558167, 0.11423441022634506, 0.030174925923347473, 0.09923750162124634, 0.4639240801334381, 0.05038168281316757, 0.054174020886421204, 0.008741216734051704, 0.03397829085588455, 0.1519988477230072, -0.027173854410648346, 0.2176809012889862, 0.13606145977973938, 0.18801705539226532, -0.01631772145628929, -0.007977968081831932, 0.126340851187706, 0.012074745260179043, -0.02793058007955551, -0.49499961733818054, 0.26943546533584595, -0.2674545645713806, -0.1496296525001526, 0.06671763211488724, -0.03957367688417435, -0.1436557173728943, -0.28871950507164, 0.15261322259902954, -0.29659396409988403, 0.18608365952968597, 0.18399450182914734, -0.14774395525455475, 0.355345755815506, -0.4292331635951996, 0.17995022237300873, -0.3521481454372406, -0.1459251493215561, 0.12922543287277222, -0.06666512787342072, 0.044720347970724106, -0.06821053475141525, 0.21221444010734558, 0.40853720903396606, 0.3407931327819824, 0.18709972500801086, 0.3446888029575348, 0.28721538186073303, 0.10207228362560272, 0.004696568474173546, 0.0716189295053482, -0.221196249127388, -0.006732250098139048, -0.1602463722229004, -0.1795620173215866, 0.2603778541088104, -0.1562792807817459, 0.18889212608337402, 0.2101842761039734, 0.21473751962184906, -0.1890413761138916, -0.19969309866428375, -0.6952576041221619, -0.6087480187416077, -0.07955338805913925, 0.24631096422672272, -0.00505664199590683, 0.0884544774889946, 0.3774203062057495, 0.052829887717962265, 0.1762053221464157, -0.004466070793569088, -0.19012217223644257, 0.6205377578735352, -0.33215463161468506, 0.011959951370954514, 0.008440382778644562, -0.1509629189968109, -0.0693221464753151, 0.2753416895866394, 0.19235970079898834, 0.2629420757293701, 0.6907675862312317, 0.19315670430660248, 0.048475854098796844, -0.5446290373802185, -0.1326022744178772, -0.09553834795951843, 0.13133639097213745, 0.23128511011600494, 0.09258729219436646, -0.04338407516479492, -0.29419684410095215, 0.2090485394001007, -0.18964621424674988, 0.105267733335495, -0.1489771157503128, -0.40029072761535645, 0.23359493911266327, 0.2302747368812561, -0.046359170228242874, -0.2519352436065674, -0.01587679050862789, 0.005537807941436768, 0.016916688531637192, -0.20473317801952362, 0.07631276547908783, -0.26981785893440247, -0.02069343626499176, -0.09712603688240051, 0.1326276659965515, -0.10391846299171448, -0.3091623783111572, -0.14913290739059448, -0.08684976398944855, 0.08467130362987518, -0.13689325749874115, -0.14519383013248444, 0.1435096710920334, 0.06874678283929825, 0.33485668897628784, -0.20311836898326874, -0.33684486150741577, 0.1668335497379303, 0.22347557544708252, -0.10828922688961029, -0.0412873849272728, 0.2438313364982605, 0.3748549520969391, -0.08726928383111954, -0.010698877274990082, -0.010218309238553047, -0.11035945266485214, 0.1307656466960907, 0.19948174059391022, 0.1386522352695465, 0.1026669293642044, 0.08274871110916138, 0.42397958040237427, 0.3863641619682312, -0.057130854576826096, 0.06690319627523422, 0.17805328965187073, 0.04977069050073624, 0.0706714540719986, -0.46143996715545654, -0.055401723831892014, -0.1186724603176117, 0.21236005425453186, 0.4016687870025635, 0.1515425145626068, -0.21344931423664093, -0.0058085061609745026, -0.20087583363056183, -0.28383466601371765, -0.18689008057117462, -0.11648742854595184, -0.5316383242607117, 0.40310853719711304, 0.08613324165344238, -0.1525767743587494, 0.13122078776359558, -0.016326045617461205, -0.26381388306617737, 0.0034954994916915894, 0.36529794335365295, -0.2562432587146759, -0.08909624069929123, -0.15232962369918823, -0.028756044805049896, 0.25178465247154236, 0.06834200024604797, 0.2000204473733902, -0.019643552601337433, 0.4186289608478546, 0.27441537380218506, 0.19984455406665802, 0.38274604082107544, -0.2703869640827179, -0.32563716173171997, -0.04864446073770523, -0.03846585378050804, 0.2360677570104599, 0.16125008463859558, -0.010993149131536484, 0.059441983699798584, -0.007753331214189529, -0.0735374242067337, -0.05815757438540459, -0.28257718682289124, 0.40244680643081665, 0.35496047139167786, -0.2628055512905121, -0.3843606114387512, 0.19226370751857758, -0.21186697483062744, -0.2563495337963104, 0.07645602524280548, 0.006933586671948433, -0.17738890647888184, -0.023510541766881943, -0.08979841321706772, -0.17774276435375214, -0.038035519421100616, 0.4934766888618469, -0.20435114204883575, -0.08079911023378372, 0.03676745295524597, 0.36395585536956787, 0.21112629771232605, 0.037840284407138824, 0.5584865212440491, 0.4694403111934662, -0.35278671979904175, -0.0738631933927536, -0.4982792139053345, -0.45023542642593384, 0.4314831793308258, 0.16933661699295044, 0.052892912179231644, 0.49771028757095337, -0.1315765082836151, -0.21618099510669708, -0.2514028549194336, -0.3580513894557953, 0.2659202516078949, -0.07897762209177017, -0.41193825006484985, -0.540348470211029, 0.1616005301475525, 0.25092294812202454, -0.18213525414466858, 0.17500120401382446, 0.19745807349681854, -0.2413206547498703, -0.06520523130893707, 0.11954177170991898, 0.9121695160865784, -0.006602086126804352, -0.0016338080167770386, -0.33998650312423706, -0.24286264181137085, 0.28617429733276367, 0.13417358696460724, 0.015972530469298363, -0.05303885042667389, -0.2987102270126343, -0.1991668939590454, 0.01706540957093239, 0.2469814419746399, 0.5435041785240173, 0.06957513093948364, 0.28247249126434326, -0.22090303897857666, -0.18073244392871857, 0.3593204617500305, 0.33979249000549316, 0.22342635691165924, 0.26625674962997437, 0.13729557394981384, 0.1262802928686142, 0.13145223259925842, -0.34945690631866455, -0.16932594776153564, 0.1516263484954834, 0.38567498326301575, 0.048102959990501404, -0.07398353517055511, -0.3620435893535614, -0.18500949442386627, 0.1358950436115265, -0.07393297553062439, -0.3446601629257202, 0.42041733860969543, -0.13061557710170746, 0.08228905498981476, 0.01200759969651699, -0.04193607717752457, -0.09779268503189087, 0.38338860869407654, 0.363500714302063, -0.07419136166572571, -0.07855231314897537, 0.42146217823028564, 0.01066330075263977, -0.14965486526489258, 0.028105806559324265, 0.3029538094997406, -0.2592211365699768, -0.3470694422721863, 0.09853962808847427, -0.26111143827438354, -0.29519107937812805, -0.09626279771327972, 0.03311198204755783, -0.0040242671966552734, -0.24761426448822021, 0.144949272274971, 0.23005074262619019, -0.07427582889795303, 0.6326231956481934, 0.15784163773059845, 0.09019440412521362, -0.1976783573627472, 0.06649035960435867, 0.5022770166397095, -0.33018484711647034, 0.17561456561088562, 0.05219128355383873, -0.310871422290802, -0.30027204751968384, 0.07577522844076157, 0.10693708062171936, -0.22547784447669983, 0.2137986421585083, -0.19124522805213928, 0.4216877818107605, 0.31910330057144165, -0.2566215395927429, -0.0891735702753067, 0.028002943843603134, -0.1011219397187233, 0.06653213500976562, -0.16084368526935577, 0.010291293263435364, 0.14965713024139404, 0.4154292941093445, 0.013902008533477783, 0.1673997938632965, -0.10897297412157059, 0.33611586689949036, -0.3240727186203003, 0.398394376039505, 0.11876388639211655, 0.2741004228591919, 0.1521630436182022, 0.14295661449432373, -0.3593422472476959, -0.22049352526664734, 0.08481382578611374, -0.1425492763519287, 0.26406151056289673, -0.276005357503891, -0.12287697196006775, 0.11903253197669983, -0.08662528544664383, 0.06314805895090103, 0.04286297410726547, -0.12438806891441345, -0.07683856785297394, 0.05892539769411087, 0.030295956879854202, 0.010253287851810455, 0.2223816215991974, 0.10366762429475784, 0.4323210120201111, -0.3973464071750641, -0.3641359210014343, 0.18774127960205078, 0.09386254101991653, 0.006665021181106567, 0.12093973159790039, -0.0887569785118103, 0.13963700830936432, 0.09351138770580292, -0.14500197768211365, -0.01440662145614624, 0.2628171145915985, -0.38151898980140686, 0.13567489385604858, 0.025365687906742096, 0.21744221448898315, 0.026011807844042778, 0.2939735949039459, 0.08617857098579407, -0.1756426990032196, -0.11543355137109756, 0.17800387740135193, 0.14635337889194489, -0.4489205479621887, -0.0003559404576662928, 0.30448153614997864, -0.10320471972227097, 0.05349822714924812, 0.37060558795928955, -0.00355558842420578, 0.3899890184402466, -0.06511929631233215, -0.1334840953350067, 0.09721141308546066, -0.31280994415283203, 0.17816601693630219, 0.26645851135253906, 0.27873533964157104, -0.17255598306655884, 0.21432580053806305, 0.05963621288537979, -0.20242998003959656, 0.17033588886260986, -0.0016645044088363647, 0.18710730969905853, 0.24196115136146545, 0.10940629988908768, 0.39299824833869934, -0.10209693014621735, 0.14728116989135742, 0.4584541618824005, -0.03541360795497894, -0.06492670625448227, 0.21355222165584564, -0.10241696983575821, 0.11302792280912399, -0.19258004426956177, 0.10404487699270248, 0.23587702214717865, -0.1372373104095459, 0.1164441704750061, 0.026721760630607605, -0.18684275448322296, -0.07733447104692459, -0.07494436949491501, -0.18757472932338715, -0.02742139995098114, 0.12696535885334015, -0.07680104672908783, 0.03140329197049141, -0.2654038667678833, 0.4233171343803406, 0.026652075350284576, 0.20075702667236328, -0.12907478213310242, -0.25800687074661255, -0.11505052447319031, 0.10682910680770874, 0.16322162747383118, 0.5502254962921143, 0.05263374373316765, 0.045322269201278687, -0.10268643498420715, -0.02674945443868637, -0.30070164799690247, 0.08188361674547195, 0.11796294152736664, 0.2987090051174164, -0.08393217623233795, -0.2165638953447342, -0.01847689598798752, 0.07010795921087265, 0.0477386899292469, 0.2591691017150879, 0.2219361960887909, -0.17128771543502808, -0.7686460614204407, 0.48330557346343994, 0.2627056837081909, -0.31141969561576843, 0.10881110280752182, 0.0709555372595787, -0.005091018974781036, 0.205170139670372, 0.57177734375, -0.04795471206307411, -0.07388707995414734, 0.035273175686597824, 0.08734778314828873, -0.0238972008228302, 0.15706060826778412, 0.5326239466667175, 0.23526424169540405, -0.2518249750137329, -0.003189951181411743, -0.6875713467597961, -0.14439454674720764, -0.16842655837535858, 0.044695258140563965, 0.393886536359787, -0.06591173261404037, -0.08039281517267227, 0.07270734012126923, 0.12557384371757507, -0.11541790515184402, 0.06200040131807327, 0.2897852063179016, -0.2602716386318207, -0.047937359660863876, 0.008963126689195633, -0.07292051613330841, -0.20037415623664856, -0.2700854539871216, 0.14413221180438995, -0.10366596281528473, -0.12484582513570786, -0.07841864973306656, 0.04574301093816757, 0.3004828095436096, 0.38740360736846924, -0.010538622736930847, 0.08984710276126862, 0.48199164867401123, 0.24409964680671692, 0.07582464069128036, 0.08232840895652771, 0.23335155844688416, -0.20786471664905548, 0.35360094904899597, 0.411304235458374, -0.12768009305000305, -0.1424907147884369, -0.18357527256011963, 0.25519871711730957, 0.18509401381015778, -0.019621307030320168, 0.01421072706580162, -0.4436417520046234, -0.1824403703212738, 0.01606067270040512, 0.06733471900224686, 0.07568923383951187, 0.2760623097419739, -0.21138262748718262, 0.1936415582895279, -0.2744221091270447, -0.13988418877124786, 0.20315997302532196, -0.009508080780506134, 0.04317064955830574, -0.31649747490882874, 0.20344406366348267, 0.12125803530216217, -0.21494384109973907, -0.42124202847480774, -0.2650016248226166, 0.5524914860725403, -0.2370738387107849, 0.2379271388053894, 0.5026425123214722, 0.2501438558101654, -0.058206990361213684, -0.18341772258281708, -0.05416819453239441, 0.07743003964424133, 0.09025056660175323, 0.18515753746032715, -0.19456708431243896 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Hey @Manel-Hik The following is a simpler yet really effective deduplication code that i has used in the past. given that I have limited training corpus for the languages I wanted to train i relied on this code. https://huggingface.co/datasets/Finnish-NLP/mc4_fi_cleaned/blob/main/deduplicate.py for more robust and stronger deduplication, refer to this huggingface repo, that's newly released: https://github.com/huggingface/datatrove
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
54
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no Hey @Manel-Hik The following is a simpler yet really effective deduplication code that i has used in the past. given that I have limited training corpus for the languages I wanted to train i relied on this code. https://huggingface.co/datasets/Finnish-NLP/mc4_fi_cleaned/blob/main/deduplicate.py for more robust and stronger deduplication, refer to this huggingface repo, that's newly released: https://github.com/huggingface/datatrove
[ 0.15371502935886383, -0.0973953828215599, -0.15554814040660858, 0.17679084837436676, 0.03464860841631889, 0.20085930824279785, 0.37883707880973816, 0.0944097638130188, -0.39795488119125366, -0.06671039760112762, -0.05598985403776169, 0.32060354948043823, 0.10343749076128006, 0.2095336616039276, 0.021381119266152382, 0.031454961746931076, 0.10631287842988968, 0.13076172769069672, -0.07161496579647064, -0.03443048894405365, -0.021905796602368355, -0.07025142014026642, -0.31926798820495605, -0.18224288523197174, -0.4249975085258484, -0.08772702515125275, -0.4327424466609955, -0.09562575072050095, -0.09067515283823013, -0.07367365807294846, 0.32771480083465576, 0.48290643095970154, 0.0002924632281064987, 0.24044284224510193, -0.00010464832303114235, -0.30769437551498413, -0.04099041223526001, 0.15555138885974884, -0.3729439079761505, 0.06587739288806915, -0.29308515787124634, -0.03618293255567551, 0.009551752358675003, -0.051719725131988525, -0.04224687069654465, -0.4215550422668457, -0.27573129534721375, -0.24690309166908264, 0.31214213371276855, 0.15020157396793365, 0.24458295106887817, 0.013897746801376343, -0.2542378902435303, 0.1619972288608551, -0.11103252321481705, 0.462554931640625, -0.09279066324234009, 0.36535099148750305, 0.4125575125217438, -0.15021450817584991, 0.22093060612678528, 0.18012501299381256, -0.042891133576631546, 0.15302298963069916, 0.0674653872847557, -0.038902658969163895, -0.12968215346336365, -0.19856227934360504, 0.1812117099761963, 0.3766317665576935, 0.5768020749092102, -0.5232614278793335, -0.3547583222389221, -0.3308996856212616, 0.5878812074661255, 0.010331271216273308, -0.06262349337339401, -0.026244821026921272, 0.034296274185180664, 0.1658904105424881, -0.23451697826385498, -0.5191487669944763, -0.05278763175010681, -0.13161717355251312, -0.03320601209998131, -0.3716399371623993, 0.09605266898870468, -0.12925344705581665, 0.1502864807844162, -0.040646620094776154, 0.4446236789226532, -0.20011766254901886, 0.17764905095100403, 0.5766115188598633, -0.3565886914730072, -0.31666475534439087, -0.21421843767166138, -0.11102939397096634, 0.16742268204689026, 0.10465475171804428, 0.3213728666305542, -0.10107719153165817, -0.2692074775695801, 0.27044641971588135, 0.2976289987564087, 0.02208198606967926, 0.02168605849146843, 0.12416080385446548, -0.06912800669670105, -0.13338740170001984, -0.2218746393918991, 0.02008521929383278, -0.09034840762615204, 0.12112050503492355, 0.2911328375339508, -0.016320645809173584, 0.21315628290176392, -0.26973652839660645, -0.3974265456199646, 0.10435836762189865, -0.4777250587940216, -0.14929483830928802, -0.08871255815029144, -0.18644773960113525, 0.2031327784061432, -0.05150850862264633, -0.12332573533058167, -0.036911554634571075, -0.3205631971359253, -0.4489177465438843, -0.0638275146484375, 0.1589251011610031, -0.12125211954116821, -0.12509627640247345, 0.2838901877403259, -0.2664255201816559, -0.070936419069767, 0.26174187660217285, 0.18561893701553345, -0.18726718425750732, 0.30247944593429565, -0.2683773934841156, 0.09098230302333832, -0.23539559543132782, -0.3050566017627716, -0.2522418797016144, -0.11296923458576202, -0.017103083431720734, -0.054429180920124054, 0.33993372321128845, 0.08860784769058228, 0.09480313956737518, -0.059919923543930054, 0.2962457537651062, 0.019498687237501144, -0.1613689512014389, -0.26363757252693176, 0.3728782832622528, -0.1254521906375885, 0.04271482303738594, 0.1578037291765213, -0.2148037850856781, 0.12466825544834137, -0.13157300651073456, 0.04528418928384781, 0.2133168876171112, -0.4910498559474945, -0.0733882337808609, -0.09184393286705017, -0.33662933111190796, -0.07071729749441147, 0.39136868715286255, -0.050955649465322495, 0.2875385582447052, 0.02611878700554371, 0.1016472727060318, 0.0832124799489975, -0.025937573984265327, -0.15847155451774597, 0.24152323603630066, -0.024074740707874298, 0.34316763281822205, -0.19933557510375977, 0.24589362740516663, 0.34484830498695374, 0.030479123815894127, 0.13761848211288452, 0.08784656226634979, -0.1012258231639862, -0.463034063577652, -0.2119666188955307, -0.3489219844341278, 0.20099054276943207, 0.12800031900405884, 0.04156924784183502, -0.09208876639604568, 0.10506128519773483, -0.030439596623182297, 0.3448468744754791, -0.12658941745758057, -0.058621734380722046, 0.012819375842809677, 0.38700076937675476, 0.07617582380771637, 0.10587064921855927, -0.3561789393424988, -0.4471818804740906, 0.11858478933572769, -0.22094830870628357, -0.0943400114774704, 0.1859179139137268, -0.6401190757751465, 0.15264847874641418, -0.08890269696712494, -0.1543881893157959, 0.05025244131684303, 0.2150285542011261, -0.45309463143348694, 0.015399448573589325, -0.2572084665298462, -0.2704354226589203, 0.270743191242218, -0.31277790665626526, 0.16437579691410065, -0.19113171100616455, 0.42948117852211, 0.20981888473033905, 0.03302646428346634, 0.1319911777973175, 0.5321696400642395, 0.0217195525765419, -0.013152152299880981, 0.04653048515319824, 0.09497055411338806, 0.11877503991127014, 0.04339670017361641, 0.2527012825012207, 0.08896198868751526, 0.11293482035398483, -0.0115407295525074, -0.07842366397380829, 0.3536838889122009, 0.08030924946069717, 0.014110393822193146, -0.3301065266132355, 0.25637128949165344, -0.2914775609970093, -0.07876519113779068, 0.02164345234632492, -0.058707766234874725, 0.059041790664196014, -0.1639806181192398, 0.1382286548614502, -0.3168771266937256, 0.18268893659114838, 0.11278484761714935, -0.13371767103672028, 0.3393923342227936, -0.44882282614707947, 0.19671057164669037, -0.17300422489643097, -0.13893400132656097, 0.021886363625526428, -0.006420712918043137, -0.00862063467502594, -0.07679728418588638, 0.29212629795074463, 0.48242953419685364, 0.29054099321365356, 0.20257820188999176, 0.2753105163574219, 0.2712786793708801, 0.14827553927898407, 0.10223256051540375, 0.10652648657560349, -0.23144488036632538, -0.08253610134124756, -0.1004159078001976, -0.1501675248146057, 0.262068510055542, -0.3859154284000397, -0.002703845500946045, 0.06012541800737381, 0.17663373053073883, -0.13132905960083008, -0.15962587296962738, -0.6175369620323181, -0.602257251739502, -0.215225487947464, 0.22378410398960114, -0.18817853927612305, 0.01028452068567276, 0.3559901714324951, -0.02388952299952507, 0.09303075075149536, -0.04211975634098053, -0.20391246676445007, 0.5249814987182617, -0.36654359102249146, -0.102010078728199, 0.009849682450294495, -0.18456768989562988, -0.09342434257268906, 0.31077906489372253, 0.1477607935667038, 0.34023723006248474, 0.6513429880142212, 0.07412415742874146, -0.025745436549186707, -0.5471505522727966, -0.24159836769104004, -0.06378927826881409, 0.03215085342526436, 0.20420432090759277, -0.004157640039920807, 0.027487799525260925, -0.25372016429901123, 0.14997828006744385, -0.20361639559268951, 0.01603296957910061, -0.2100856751203537, -0.2918800711631775, 0.21528148651123047, 0.24725131690502167, -0.15445344150066376, -0.30896130204200745, -0.049169860780239105, -0.0328371562063694, 0.2727124094963074, -0.28643447160720825, 0.050802767276763916, -0.2447066754102707, -0.06302295625209808, 0.09973070025444031, 0.049535930156707764, 0.026400260627269745, -0.3023691177368164, -0.21836039423942566, -0.07707579433917999, 0.10342711210250854, -0.134077787399292, -0.10965066403150558, 0.21944007277488708, 0.03137710317969322, 0.3038290739059448, -0.19103074073791504, -0.34000617265701294, 0.12982532382011414, 0.1487644463777542, -0.11540639400482178, 0.040551718324422836, 0.22357480227947235, 0.3328593075275421, -0.09059024602174759, 0.016245529055595398, 0.1290135234594345, -0.07011740654706955, 0.10822392255067825, 0.0992639884352684, 0.07564632594585419, 0.11709954589605331, 0.26565080881118774, 0.3557658791542053, 0.5964747667312622, -0.059185940772295, -0.009123541414737701, 0.111129991710186, 0.2458607703447342, 0.02856442704796791, -0.4135734736919403, -0.035664454102516174, -0.2234072983264923, 0.1969127058982849, 0.4273899793624878, 0.16701942682266235, -0.09555000811815262, 0.11060121655464172, -0.33640801906585693, -0.322443425655365, -0.27906957268714905, -0.0720890462398529, -0.5530018210411072, 0.36817994713783264, 0.04254733398556709, -0.17450588941574097, 0.12763357162475586, -0.042039599269628525, -0.11222411692142487, -0.04290340840816498, 0.2308545708656311, -0.16305586695671082, -0.17894166707992554, -0.27834248542785645, -0.17653650045394897, 0.28197842836380005, 0.15238067507743835, 0.15021683275699615, 0.02317294105887413, 0.33154863119125366, 0.2533585727214813, 0.12139436602592468, 0.46819692850112915, -0.27811336517333984, -0.26474130153656006, -0.03236939385533333, -0.027451511472463608, 0.1145610436797142, 0.1487683802843094, -0.1491784006357193, 0.11916080862283707, 0.1410372406244278, 0.0033278390765190125, -0.19400398433208466, -0.2438134104013443, 0.39585188031196594, 0.475033700466156, -0.22264088690280914, -0.2822604477405548, 0.1696193367242813, -0.2026260495185852, -0.3301454484462738, 0.08685874193906784, 0.0580696240067482, -0.043641768395900726, -0.005967610981315374, -0.036257702857255936, -0.1654544472694397, -0.07292050123214722, 0.5044202208518982, -0.07583107054233551, -0.02183692343533039, -0.009504281915724277, 0.28494685888290405, 0.15049168467521667, -0.06933578848838806, 0.5058349967002869, 0.49211281538009644, -0.3152114450931549, -0.2591366767883301, -0.6523563265800476, -0.4660318195819855, 0.4774334728717804, 0.11655597388744354, 0.003971379715949297, 0.5201625227928162, -0.1419052928686142, -0.15727469325065613, -0.12826351821422577, -0.2193794548511505, 0.2420452982187271, 0.05673130601644516, -0.31233593821525574, -0.44584792852401733, 0.021045450121164322, 0.15390610694885254, -0.15732470154762268, 0.35316893458366394, 0.2776661515235901, -0.2711332440376282, 0.10058552026748657, 0.02140674740076065, 0.8343119025230408, 0.024180367588996887, 0.06534777581691742, -0.39325299859046936, -0.3225838541984558, 0.32280030846595764, 0.06981232017278671, -0.009465672075748444, -0.014205481857061386, -0.25064972043037415, -0.11071138828992844, 0.15773530304431915, 0.26773348450660706, 0.473763644695282, 0.09881147742271423, 0.2728552222251892, -0.10600434243679047, -0.039052192121744156, 0.314360648393631, 0.27197763323783875, 0.1706884205341339, 0.13761006295681, -0.0514913946390152, 0.18239493668079376, 0.05876563861966133, -0.37772032618522644, -0.13835781812667847, 0.12908893823623657, 0.43141886591911316, -0.0060514844954013824, -0.07041790336370468, -0.3121057152748108, -0.10602433979511261, 0.20472432672977448, -0.014851473271846771, -0.31216898560523987, 0.22601167857646942, -0.08303618431091309, 0.14858806133270264, 0.09158769249916077, -0.008402170613408089, -0.08722454309463501, 0.43893447518348694, 0.393322229385376, -0.04175698757171631, -0.12039761245250702, 0.31717485189437866, 0.04457871615886688, -0.19136041402816772, 0.017264660447835922, 0.2609141767024994, -0.221400648355484, -0.16023212671279907, 0.11552685499191284, -0.4295351505279541, -0.12458088994026184, 0.03412780165672302, 0.07144197821617126, -0.10108242928981781, -0.25173527002334595, 0.19977445900440216, 0.2219982147216797, -0.1584748476743698, 0.4076021909713745, 0.07439199090003967, 0.07246480882167816, -0.18808221817016602, 0.08749160915613174, 0.5347989201545715, -0.2823600172996521, 0.1683618277311325, -0.04614569991827011, -0.32557421922683716, -0.31862685084342957, 0.1321161687374115, -0.08742456138134003, -0.1949174404144287, 0.17998751997947693, -0.11488191038370132, 0.3590543866157532, 0.1777462214231491, -0.38496628403663635, -0.14613507688045502, 0.06541167199611664, -0.1366611272096634, -0.015329532325267792, -0.17913027107715607, 0.03378434106707573, 0.18282650411128998, 0.35150808095932007, 0.2019578516483307, 0.2036563903093338, -0.10801286995410919, 0.2378852814435959, -0.3667536675930023, 0.42491161823272705, 0.09325697273015976, 0.20759406685829163, 0.073054239153862, 0.16488036513328552, -0.21275055408477783, -0.21752770245075226, 0.12670205533504486, -0.03209499269723892, 0.3738148808479309, -0.3297944664955139, -0.19048576056957245, 0.07102835923433304, -0.15401852130889893, 0.20212522149085999, 0.11347374320030212, -0.003951333463191986, -0.05697759613394737, -0.08993774652481079, 0.09609551727771759, 0.031022489070892334, 0.1651969850063324, 0.17917099595069885, 0.40549927949905396, -0.33629080653190613, -0.37692850828170776, 0.08511263132095337, 0.049201659858226776, -0.07005397975444794, 0.23700205981731415, -0.07323146611452103, 0.04372677952051163, 0.1042940765619278, -0.1989387571811676, 0.01780806854367256, 0.18610283732414246, -0.38941386342048645, 0.15694481134414673, 0.09033152461051941, 0.057599496096372604, -0.07349175959825516, 0.3711733818054199, 0.09674662351608276, -0.2232634276151657, -0.07105545699596405, 0.13284620642662048, 0.21176625788211823, -0.4611710011959076, -0.01818154565989971, 0.4270365536212921, -0.1641027331352234, 0.07509671151638031, 0.30491524934768677, -0.0053704604506492615, 0.26789379119873047, 0.04564271122217178, -0.16162902116775513, 0.0023568756878376007, -0.3007177710533142, 0.2713853418827057, 0.20199760794639587, 0.30951279401779175, -0.18603134155273438, 0.11489640921354294, -0.014778155833482742, -0.09695661813020706, 0.22342710196971893, -0.08063899725675583, 0.1832641363143921, 0.14749059081077576, 0.130649596452713, 0.22679677605628967, -0.05778120458126068, 0.016871768981218338, 0.3748311400413513, -0.0881165862083435, 0.049999646842479706, 0.27795907855033875, -0.00979992002248764, 0.16563740372657776, -0.13957391679286957, -0.0345291867852211, 0.24741008877754211, -0.12703990936279297, 0.08285827934741974, 0.08288108557462692, -0.14718449115753174, -0.07913057506084442, -0.03537458926439285, -0.0772876888513565, -0.1354544460773468, 0.11351516842842102, -0.02021719515323639, 0.03969532996416092, -0.3498621881008148, 0.42576178908348083, -0.048903390765190125, 0.3099880814552307, -0.1305757313966751, -0.3596218228340149, 0.02171856164932251, 0.10350057482719421, 0.0967579036951065, 0.4815605878829956, 0.13389739394187927, -0.07237713783979416, -0.04514991119503975, -0.024586409330368042, -0.30003589391708374, 0.14685054123401642, 0.050288766622543335, 0.3160575032234192, -0.1413329541683197, -0.10871520638465881, 0.1014057844877243, 0.11909277737140656, -0.0033297287300229073, 0.019295837730169296, 0.30033326148986816, -0.10830384492874146, -0.8327325582504272, 0.5003042221069336, 0.21244440972805023, -0.2637689411640167, -0.004948947578668594, 0.014656908810138702, -0.10470765829086304, 0.0485256128013134, 0.5439515709877014, 0.01742739789187908, -0.10446510463953018, -0.057266946882009506, 0.1284468024969101, -0.10218252241611481, 0.2846633493900299, 0.4278135597705841, 0.09425877034664154, -0.11277758330106735, -0.048883501440286636, -0.6883419752120972, -0.12809723615646362, -0.28282079100608826, 0.08041515946388245, 0.3416157066822052, -0.02085765451192856, -0.02861791104078293, 0.17333179712295532, 0.050010085105895996, -0.06550966948270798, -0.02729911543428898, 0.09670314192771912, -0.3273281753063202, -0.044279251247644424, -0.13217011094093323, -0.13429003953933716, -0.12101321667432785, -0.2991604208946228, 0.08960103243589401, -0.16636955738067627, -0.012927688658237457, 0.0562773197889328, -0.00006045401096343994, 0.2744086682796478, 0.19017967581748962, 0.024878494441509247, 0.11152763664722443, 0.34537172317504883, 0.20164671540260315, 0.06671921908855438, 0.08460599184036255, 0.2617899775505066, -0.21204137802124023, 0.5193027853965759, 0.22186291217803955, -0.04327961802482605, -0.18784001469612122, -0.26758575439453125, 0.27096739411354065, 0.22607789933681488, -0.0034963153302669525, -0.04070161655545235, -0.3417517840862274, -0.0758754089474678, 0.03644797205924988, 0.14189337193965912, -0.0038853250443935394, 0.35286298394203186, -0.257660448551178, 0.13494378328323364, -0.21790072321891785, -0.2128443866968155, 0.09233082830905914, -0.29047319293022156, -0.015329227782785892, -0.20850828289985657, 0.20291157066822052, 0.10150224715471268, -0.29390785098075867, -0.42653846740722656, -0.08534993976354599, 0.5144072771072388, -0.16102638840675354, 0.12288060784339905, 0.4846924841403961, -0.055647220462560654, 0.022808726876974106, -0.10386823117733002, -0.11689493060112, 0.06400860100984573, 0.1306862235069275, 0.2686770558357239, -0.2742960453033447 ]
https://github.com/huggingface/datasets/issues/2511
Add C4
Update on this: I'm computing the checksums of the data files. It will be available soon
## Adding a Dataset - **Name:** *C4* - **Description:** *https://github.com/allenai/allennlp/discussions/5056* - **Paper:** *https://arxiv.org/abs/1910.10683* - **Data:** *https://huggingface.co/datasets/allenai/c4* - **Motivation:** *Used a lot for pretraining* Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Should fix https://github.com/huggingface/datasets/issues/1710
16
Add C4 ## Adding a Dataset - **Name:** *C4* - **Description:** *https://github.com/allenai/allennlp/discussions/5056* - **Paper:** *https://arxiv.org/abs/1910.10683* - **Data:** *https://huggingface.co/datasets/allenai/c4* - **Motivation:** *Used a lot for pretraining* Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Should fix https://github.com/huggingface/datasets/issues/1710 Update on this: I'm computing the checksums of the data files. It will be available soon
[ -0.2586113512516022, -0.23689304292201996, -0.21562552452087402, 0.07441893219947815, 0.20855402946472168, -0.08748014271259308, 0.10772182047367096, 0.30313006043434143, 0.06430111825466156, 0.3231353759765625, -0.21327069401741028, 0.0666780099272728, -0.1542896032333374, 0.4332844614982605, -0.07344891130924225, 0.03080495074391365, 0.005563311278820038, 0.24548551440238953, -0.25166475772857666, -0.061238549649715424, -0.1237061470746994, 0.16009528934955597, 0.1151486337184906, -0.34271007776260376, -0.23706822097301483, -0.02823747508227825, -0.012636227533221245, 0.239948570728302, -0.2678382098674774, -0.22209274768829346, 0.11059057712554932, 0.25797024369239807, -0.13013210892677307, 0.31928160786628723, -0.0001002747449092567, -0.024454135447740555, -0.00228770449757576, -0.11048663407564163, -0.06924938410520554, 0.24994656443595886, -0.023055000230669975, -0.0328950434923172, -0.062034428119659424, -0.10480000078678131, -0.3629562258720398, 0.012654758989810944, 0.062226586043834686, -0.13819488883018494, 0.3689252734184265, 0.22718767821788788, 0.3632344603538513, 0.3869171738624573, -0.01940777897834778, -0.16299159824848175, 0.11132127791643143, 0.016769323498010635, -0.08710414171218872, 0.25935685634613037, 0.25845226645469666, 0.12090566754341125, -0.20024335384368896, 0.28410106897354126, 0.18478059768676758, 0.07397307455539703, 0.17568904161453247, 0.025442369282245636, -0.05504659563302994, 0.0629207193851471, 0.018719634041190147, 0.08537929505109787, 0.12152978032827377, -0.2831245958805084, -0.31106841564178467, -0.1756327748298645, 0.07415588945150375, -0.3809307813644409, 0.14682236313819885, 0.0236497949808836, 0.00826808251440525, -0.021516572684049606, -0.17067492008209229, 0.024088054895401, -0.19688954949378967, -0.051615528762340546, 0.10055576264858246, 0.06802784651517868, -0.2644306719303131, -0.24728304147720337, 0.24970129132270813, 0.03357596695423126, -0.38030505180358887, 0.1121618002653122, -0.06707426905632019, -0.05897511914372444, -0.09074686467647552, -0.29017847776412964, 0.03823939338326454, 0.25462159514427185, 0.30784615874290466, 0.1262144148349762, 0.10252849012613297, 0.2484939992427826, -0.02341911941766739, 0.10003315657377243, -0.12769724428653717, -0.07826156914234161, 0.0358930267393589, -0.2585762143135071, 0.3095815181732178, 0.19441355764865875, -0.1259978711605072, -0.14244675636291504, 0.02896735444664955, -0.15757951140403748, -0.09860944747924805, 0.05208723992109299, -0.1677929311990738, -0.2475498467683792, -0.22141942381858826, 0.07718375325202942, 0.08888234943151474, 0.007709866855293512, 0.11760608106851578, 0.5735188126564026, -0.061829809099435806, -0.19446644186973572, 0.004638776183128357, 0.27580779790878296, -0.12138151377439499, -0.14463388919830322, -0.31230899691581726, -0.05467427149415016, -0.2895224094390869, 0.022736866027116776, 0.3508208990097046, -0.06560637056827545, 0.3327206075191498, 0.053406618535518646, 0.28646111488342285, 0.12028248608112335, 0.10826478898525238, 0.018867019563913345, 0.1733446717262268, 0.03561204671859741, -0.00045585259795188904, -0.2364005744457245, 0.12093709409236908, -0.0725717842578888, -0.041709043085575104, -0.47239914536476135, 0.07080021500587463, 0.07652011513710022, -0.2188250571489334, 0.31661316752433777, 0.0024371538311243057, -0.00926845520734787, -0.04224758595228195, 0.056176744401454926, -0.07122933119535446, -0.18646059930324554, 0.014460928738117218, 0.18566223978996277, -0.09024102240800858, -0.18523235619068146, 0.1604568064212799, 0.250497043132782, 0.034887660294771194, -0.13831818103790283, 0.22253155708312988, -0.1801270991563797, 0.00530339777469635, 0.11214470863342285, 0.05465758591890335, -0.13187620043754578, -0.2068512886762619, 0.0868496298789978, -0.07572279125452042, -0.17916139960289001, -0.2858584225177765, 0.06916499137878418, -0.1840796321630478, -0.011854244396090508, 0.1742112934589386, 0.1349703073501587, 0.0025921273045241833, -0.10639336705207825, -0.04712606966495514, 0.0593738816678524, 0.013481703586876392, 0.1410413533449173, -0.21269641816616058, -0.23633453249931335, -0.15479683876037598, 0.12162549793720245, 0.14234203100204468, -0.12735623121261597, 0.20245295763015747, -0.12522967159748077, 0.32565659284591675, -0.3942757546901703, 0.06155819445848465, 0.1828734427690506, 0.40153560042381287, 0.02190672606229782, -0.19326157867908478, -0.18275311589241028, -0.2574687898159027, 0.006264008581638336, -0.059028636664152145, 0.14515212178230286, 0.02971145510673523, -0.3581784963607788, -0.08834367990493774, -0.2195279598236084, -0.13058902323246002, -0.08491240441799164, 0.38448774814605713, 0.28997838497161865, 0.0879075676202774, -0.034308385103940964, 0.020194705575704575, 0.30616751313209534, -0.1901519000530243, 0.09763715416193008, -0.07893027365207672, 0.19601109623908997, -0.11007023602724075, -0.1417631357908249, 0.34078171849250793, 0.13191397488117218, -0.06080012768507004, -0.11084864288568497, 0.14436209201812744, 0.3013295829296112, -0.03957866132259369, 0.21335408091545105, 0.2270405888557434, 0.49145960807800293, 0.033823054283857346, -0.15893615782260895, 0.006298121064901352, 0.1531943380832672, -0.010462339036166668, 0.06469082087278366, -0.18880799412727356, 0.5184324383735657, 0.030183423310518265, -0.16056180000305176, 0.21239416301250458, -0.1512405276298523, 0.22637760639190674, -0.1737159788608551, -0.06068860739469528, -0.349395751953125, 0.19808387756347656, -0.09809572994709015, 0.2594589591026306, -0.13163971900939941, -0.4100784361362457, 0.048789575695991516, 0.23382236063480377, 0.16636021435260773, 0.17038676142692566, -0.040513694286346436, -0.03633425384759903, 0.08029685914516449, 0.14019690454006195, 0.17613893747329712, 0.2134074866771698, 0.5047038197517395, 0.1331339329481125, 0.05889701098203659, -0.12547360360622406, -0.1863914132118225, 0.13831152021884918, -0.2588723301887512, -0.06428177654743195, 0.23514407873153687, 0.021916111931204796, -0.17018994688987732, -0.6001667976379395, 0.03724803403019905, -0.24977858364582062, -0.03945373743772507, -0.25433439016342163, -0.07524200528860092, -0.12406760454177856, -0.24923300743103027, -0.1242169439792633, 0.026925314217805862, -0.11308582127094269, -0.18180766701698303, 0.19951675832271576, 0.1633019745349884, -0.38518986105918884, 0.05915889889001846, -0.27874132990837097, 0.2953508496284485, 0.026985889300704002, 0.008584089577198029, 0.0370016023516655, 0.08548182994127274, 0.040805883705616, 0.277270644903183, 0.2907310426235199, 0.0665358379483223, 0.6287952661514282, -0.3146468698978424, 0.183050736784935, -0.21875883638858795, -0.5036544799804688, 0.16650378704071045, -0.1542673408985138, 0.13193266093730927, 0.21562136709690094, 0.17237597703933716, -0.09997652471065521, -0.33962664008140564, 0.15672023594379425, -0.38600364327430725, -0.3319837749004364, -0.04647000879049301, -0.054291773587465286, 0.013893958181142807, -0.3315369486808777, -0.17708763480186462, -0.03269845247268677, -0.27623292803764343, 0.4101892113685608, 0.11994165182113647, 0.013964477926492691, 0.1550646275281906, 0.09944678097963333, 0.1597021073102951, -0.3217940032482147, 0.267118364572525, -0.3387695550918579, -0.48418182134628296, 0.23189552128314972, -0.3925536870956421, -0.41235285997390747, -0.19289109110832214, -0.10431501269340515, 0.3161993622779846, -0.05308612436056137, -0.295340359210968, -0.2839130461215973, -0.1251225620508194, 0.2562996745109558, 0.06909075379371643, 0.07942835986614227, 0.2865327000617981, -0.03606787323951721, -0.3148212134838104, -0.28699034452438354, 0.00912456214427948, 0.3432369828224182, -0.260267436504364, 0.09306154400110245, -0.3781878352165222, 0.019348984584212303, 0.059110354632139206, 0.3250529170036316, 0.18047545850276947, -0.2283666878938675, 0.35486891865730286, -0.15202324092388153, 0.5535253882408142, 0.06953947991132736, -0.18838876485824585, 0.23127931356430054, -0.00453948974609375, 0.12521480023860931, 0.4402046203613281, 0.10306360572576523, 0.09411877393722534, -0.04082556813955307, 0.0296802781522274, -0.3676125705242157, -0.3207439184188843, 0.062030427157878876, 0.10892114788293839, 0.16173428297042847, -0.1250070482492447, 0.058635562658309937, -0.13354666531085968, -0.13952305912971497, 0.13392995297908783, 0.2203105092048645, -0.048796556890010834, -0.2848827540874481, -0.34416303038597107, 0.010054203681647778, -0.41936206817626953, 0.29490572214126587, 0.15922506153583527, -0.05928153544664383, -0.15735816955566406, -0.19763538241386414, -0.1458636075258255, -0.1930571347475052, 0.39510947465896606, 0.02393682487308979, 0.13954995572566986, -0.06578248739242554, -0.13501185178756714, -0.130711629986763, 0.2956537902355194, -0.3906792402267456, -0.10588826984167099, 0.2813069522380829, 0.39263999462127686, -0.47023773193359375, -0.07066783308982849, 0.07761915773153305, 0.18798168003559113, -0.0025734230875968933, 0.0136996665969491, -0.1803113967180252, -0.09844913333654404, -0.16801945865154266, 0.20984375476837158, -0.1209874302148819, 0.1346725970506668, -0.09373058378696442, -0.1281522512435913, 0.08984346687793732, -0.08726489543914795, 0.3720998167991638, 0.29086145758628845, 0.2714122235774994, 0.18563814461231232, 0.10813984274864197, 0.04840558022260666, 0.1658584475517273, 0.3566216826438904, 0.35927075147628784, -0.1186857670545578, 0.0882534384727478, -0.17350435256958008, -0.22143805027008057, 0.3014196753501892, 0.20301124453544617, 0.14867337048053741, 0.1415751427412033, 0.016374118626117706, 0.17712414264678955, -0.30325427651405334, 0.32584235072135925, 0.145759716629982, 0.0752539336681366, -0.05249938741326332, -0.020621132105588913, 0.19414624571800232, -0.14151450991630554, -0.03738544136285782, 0.2611513137817383, 0.4078720211982727, -0.30119824409484863, 0.09373284876346588, 0.24438074231147766, 0.8777469992637634, -0.004667177796363831, 0.21769699454307556, 0.2962687313556671, -0.3105139136314392, 0.10502845793962479, -0.1164754331111908, 0.05138056352734566, -0.13653555512428284, -0.35900166630744934, 0.05258767306804657, 0.048221293836832047, 0.06916256248950958, -0.0005925372242927551, -0.1677505373954773, -0.06891154497861862, 0.0936184674501419, 0.162850022315979, -0.1722346991300583, 0.09501443803310394, -0.16194134950637817, -0.18699771165847778, -0.2368478775024414, 0.33490079641342163, 0.15590354800224304, -0.19404259324073792, -0.15834173560142517, -0.2405659705400467, -0.09012185037136078, -0.1532125473022461, -0.031737446784973145, -0.08579424768686295, -0.20660987496376038, -0.10150034725666046, 0.08339962363243103, -0.062299422919750214, -0.07203812897205353, 0.05824904888868332, 0.3871600031852722, 0.3838895559310913, -0.26780763268470764, 0.10370686650276184, 0.0349542498588562, 0.019225824624300003, -0.11530226469039917, 0.1006242036819458, -0.00045876018702983856, -0.15329942107200623, -0.0048642829060554504, -0.0906592383980751, 0.19959533214569092, -0.3959483504295349, 0.07396678626537323, -0.06942646205425262, -0.3752850294113159, -0.2290605902671814, 0.03893814608454704, 0.11175379157066345, -0.13672643899917603, -0.2934677004814148, 0.27875038981437683, 0.10510960221290588, -0.11439366638660431, 0.015720508992671967, 0.35474371910095215, -0.1251775324344635, -0.25278961658477783, 0.3834075629711151, -0.15219226479530334, -0.13808542490005493, 0.22416409850120544, 0.06766414642333984, -0.2761640250682831, -0.4785533547401428, -0.2041912078857422, 0.14261400699615479, -0.23389792442321777, 0.03285211697220802, 0.09208593517541885, -0.254829466342926, 0.08803743124008179, 0.2719167470932007, 0.30567651987075806, -0.020509444177150726, 0.20510710775852203, -0.09581566601991653, -0.6194849610328674, 0.2811792492866516, -0.07657365500926971, 0.42943820357322693, -0.026386741548776627, 0.4414277672767639, -0.21097473800182343, 0.0565091148018837, -0.5384543538093567, -0.02102702669799328, -0.31814080476760864, -0.07985968887805939, 0.14333921670913696, -0.13067838549613953, 0.30841225385665894, -0.09286630153656006, 0.3257277011871338, 0.0914621576666832, -0.3117183744907379, -0.36447763442993164, -0.13206730782985687, 0.05114954710006714, -0.0996304377913475, 0.01068591047078371, 0.3214327096939087, 0.18516619503498077, -0.13806989789009094, -0.16655012965202332, 0.1431969553232193, 0.09878485649824142, 0.034663137048482895, 0.22427791357040405, 0.23744317889213562, 0.05274825543165207, 0.1088704764842987, -0.2880387604236603, 0.08403884619474411, -0.0015569329261779785, -0.07544344663619995, -0.12136919796466827, -0.3290361762046814, -0.11178123205900192, 0.5154301524162292, 0.31747862696647644, 0.18260055780410767, 0.0761369839310646, 0.18189239501953125, 0.0261961929500103, -0.21949787437915802, 0.35107892751693726, 0.43366914987564087, -0.04029340296983719, -0.08916378766298294, 0.11073805391788483, 0.1840311884880066, 0.45344385504722595, -0.3457516133785248, 0.0680997222661972, 0.055213429033756256, -0.06136229634284973, 0.3749160170555115, 0.2573201060295105, 0.08391852676868439, -0.24349062144756317, 0.17409420013427734, 0.1419275999069214, -0.14425459504127502, -0.021044623106718063, 0.010024621151387691, 0.1906673014163971, 0.06872722506523132, -0.13678839802742004, 0.26942217350006104, 0.02674035169184208, 0.1927175521850586, 0.1791888177394867, -0.12620693445205688, 0.2254703938961029, -0.340059757232666, 0.05810115113854408, 0.037732452154159546, -0.0817449539899826, 0.09689489752054214, 0.22721362113952637, 0.04929770156741142, 0.18360082805156708, 0.1171770989894867, 0.5696306824684143, -0.1565781980752945, -0.20257887244224548, -0.35961592197418213, 0.17605940997600555, -0.20359203219413757, -0.08365021646022797, -0.13763579726219177, -0.2224753201007843, -0.1705411970615387, 0.04113401845097542, 0.07987654209136963, -0.0019958168268203735, 0.19155514240264893, -0.035468243062496185, 0.06586594879627228, -0.2086837887763977, -0.06827393919229507, 0.10184672474861145, 0.2579043507575989, -0.17904697358608246, 0.16222986578941345, 0.31937456130981445, 0.02818291261792183, 0.223422110080719, 0.3514072895050049, 0.24121132493019104, -0.08719996362924576, 0.089332714676857, 0.16269826889038086, -0.17623093724250793, -0.031136995181441307, -0.3607546091079712, 0.22411847114562988, 0.3361492156982422, 0.1975809782743454, 0.37924039363861084, 0.29714590311050415, -0.35500362515449524, -0.0402270071208477, -0.08420205116271973, -0.0679759532213211, -0.07055775821208954, 0.1620289385318756, 0.02125999704003334, -0.0845302864909172, -0.18296733498573303, -0.16264277696609497, -0.4618337154388428, 0.060206905007362366, -0.006987269967794418, -0.1328732669353485, 0.20820999145507812, -0.04724614694714546, 0.16343149542808533, 0.18560457229614258, 0.5502729415893555, 0.025593899190425873, 0.12026908248662949, -0.16980357468128204, -0.4889601469039917, -0.5210317969322205, 0.2235603630542755, 0.06294964253902435, 0.027837200090289116, -0.3625485897064209, 0.07030412554740906, 0.4442746937274933, -0.06352018564939499, 0.23737236857414246, -0.03526582941412926, 0.12187103182077408, -0.09820683300495148, -0.4115133285522461, 0.15122675895690918, -0.048800162971019745, -0.11518478393554688, 0.2564333379268646, -0.14793707430362701, 0.014548204839229584, 0.033321116119623184, 0.31103071570396423, 0.005245484411716461, 0.17411108314990997, -0.24885551631450653, -0.12338833510875702, 0.32041242718696594, 0.008249063976109028, 0.4328647553920746, -0.573275625705719, -0.23789305984973907, -0.10873906314373016, -0.013697726652026176, -0.1755247265100479, 0.03371969610452652, 0.13923680782318115, 0.5417928695678711, -0.029841771349310875, -0.1966591328382492, -0.024291839450597763, 0.31964775919914246, 0.30399090051651, 0.02870425023138523, -0.14466002583503723, 0.3647102415561676, -0.0003909580409526825, -0.2065257430076599, -0.0516175702214241, 0.49152037501335144, -0.06580031663179398, -0.0153525834903121, -0.1639588177204132, -0.38801196217536926, 0.5056557655334473, -0.32079288363456726, -0.02668054774403572, -0.03443484008312225, 0.3556981086730957, 0.1834290325641632, -0.21938911080360413, -0.5304563045501709, 0.24424219131469727, 0.08327161520719528, 0.10258911550045013, -0.19241371750831604, 0.36540305614471436, -0.16867521405220032, -0.1641024351119995, -0.005941450595855713, 0.4586777687072754, 0.2416500747203827, -0.28492143750190735, -0.04658205434679985, -0.3411110043525696 ]
https://github.com/huggingface/datasets/issues/2508
Load Image Classification Dataset from Local
Hi ! Is this folder structure a standard, a bit like imagenet ? In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ? ```python from datasets import load_dataset my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir") ``` Let me know what you think
**Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset
48
Load Image Classification Dataset from Local **Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset Hi ! Is this folder structure a standard, a bit like imagenet ? In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ? ```python from datasets import load_dataset my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir") ``` Let me know what you think
[ -0.17115208506584167, -0.16674689948558807, 0.03135288506746292, 0.4532005786895752, 0.2632557153701782, -0.08111882954835892, 0.2285080850124359, 0.05178477615118027, 0.31946465373039246, 0.2681327760219574, -0.19803498685359955, 0.09343133121728897, -0.3347461223602295, 0.39439237117767334, 0.03784641996026039, -0.20311644673347473, -0.22799748182296753, 0.2942553162574768, -0.19178232550621033, -0.2173047810792923, -0.05298912525177002, -0.11123432219028473, 0.1236172616481781, 0.019518151879310608, -0.24210725724697113, 0.14863575994968414, -0.2809576392173767, 0.49198710918426514, -0.14515122771263123, -0.10265479236841202, 0.4892793297767639, 0.033760301768779755, 0.3682653307914734, 0.6073812246322632, -0.00011156163236591965, 0.10822464525699615, -0.12464295327663422, -0.29129916429519653, -0.12202401459217072, -0.3184720277786255, -0.0028071515262126923, -0.12939703464508057, 0.2840100824832916, -0.23690637946128845, -0.45906683802604675, -0.0310312882065773, 0.04542677849531174, -0.38365522027015686, 0.4092215299606323, 0.2136450707912445, 0.1300623118877411, 0.07144121825695038, -0.40907132625579834, 0.048620935529470444, -0.22430482506752014, 0.5681048035621643, -0.1489502340555191, 0.4393532872200012, 0.34599924087524414, -0.21176020801067352, -0.09515974670648575, 0.17549122869968414, 0.08138693124055862, -0.012184999883174896, 0.6244922280311584, 0.3267001211643219, -0.2012631595134735, -0.2279161810874939, -0.1793520748615265, 0.1679522693157196, 0.29163727164268494, -0.1329028606414795, -0.15209177136421204, -0.15287292003631592, 0.10395513474941254, -0.11917741596698761, 0.057165149599313736, 0.15176606178283691, -0.4100266695022583, 0.2615831792354584, -0.23542477190494537, -0.14853212237358093, -0.47287070751190186, 0.16645264625549316, -0.01571236550807953, -0.3108102083206177, -0.10968263447284698, -0.03350815176963806, 0.1107049286365509, -0.030201949179172516, -0.06378848105669022, -0.022558048367500305, 0.1726938784122467, 0.5213356614112854, -0.1483537256717682, -0.24486413598060608, -0.062401361763477325, 0.16357934474945068, 0.08547085523605347, -0.15679918229579926, 0.1323319524526596, -0.06575561314821243, -0.4273366630077362, 0.07660066336393356, 0.1742495894432068, 0.08526602387428284, -0.0694659873843193, 0.35973697900772095, -0.1167031079530716, 0.009934600442647934, -0.40188899636268616, -0.10228282958269119, -0.37660080194473267, -0.005997450090944767, -0.164957195520401, -0.0880270004272461, -0.08296553790569305, -0.051403507590293884, 0.2310633361339569, -0.21276240050792694, 0.13158226013183594, 0.1782820075750351, 0.2259930670261383, 0.2244735062122345, 0.0003825775347650051, -0.022453397512435913, 0.1043005883693695, -0.09693074226379395, -0.18790531158447266, -0.011245589703321457, -0.15397688746452332, 0.14921587705612183, -0.28463077545166016, 0.16111436486244202, 0.059334855526685715, -0.24049019813537598, 0.023940561339259148, -0.2232361137866974, 0.460196316242218, 0.16442954540252686, -0.033262141048908234, -0.19456197321414948, 0.2785155475139618, 0.20137332379817963, -0.3364458978176117, -0.15555165708065033, 0.3225756585597992, -0.12449885159730911, -0.29274627566337585, 0.0910838171839714, -0.41556087136268616, -0.30236583948135376, 0.13209755718708038, 0.1275160312652588, 0.05418314039707184, -0.11856094002723694, -0.4537295997142792, 0.04714440554380417, -0.3906649053096771, -0.037689369171857834, -0.20059439539909363, 0.0031113401055336, -0.3844121992588043, -0.11220674216747284, 0.32556089758872986, 0.49951034784317017, -0.35371658205986023, -0.19350315630435944, -0.27597904205322266, -0.12263330817222595, -0.040550269186496735, 0.35829201340675354, -0.2825184166431427, 0.3609905540943146, -0.2316223680973053, -0.0004719048738479614, 0.3596024215221405, -0.6408897042274475, -0.16024605929851532, 0.36112314462661743, -0.14685338735580444, 0.08347912132740021, -0.11066699773073196, 0.4675811529159546, 0.057320479303598404, -0.04373163357377052, -0.10971488058567047, 0.729259192943573, -0.24615061283111572, 0.10039586573839188, 0.07839126884937286, -0.34449419379234314, -0.05952011048793793, 0.38620710372924805, -0.02558620646595955, 0.261233389377594, 0.08776233345270157, -0.12027321755886078, 0.11051206290721893, -0.2400934100151062, -0.016724811866879463, -0.06607212871313095, 0.21490846574306488, 0.25257110595703125, -0.03561579808592796, 0.08568617701530457, -0.3853398561477661, 0.3809303641319275, 0.013765878975391388, 0.23321086168289185, -0.08945684134960175, -0.07757203280925751, -0.10497956722974777, -0.17977102100849152, -0.29357677698135376, -0.07404719293117523, -0.019133970141410828, 0.09748721122741699, -0.08794340491294861, -0.1982375681400299, -0.3646777868270874, 0.36070457100868225, -0.4032905101776123, 0.14608979225158691, 0.15566323697566986, 0.18723610043525696, 0.19245322048664093, 0.06632611900568008, -0.2258826643228531, 0.030402343720197678, -0.17105600237846375, -0.2163354456424713, -0.09010566025972366, 0.17415085434913635, 0.13178521394729614, 0.22554385662078857, 0.21038126945495605, 0.1911410689353943, 0.2752167880535126, -0.25691038370132446, 0.08002111315727234, -0.09539841115474701, 0.30308103561401367, 0.050475575029850006, -0.2693996727466583, 0.4733867645263672, -0.03461924567818642, 0.26508644223213196, 0.12306290864944458, -0.18078157305717468, 0.03883897513151169, -0.11778365075588226, 0.007415652275085449, -0.06953245401382446, 0.11194408684968948, 0.45861387252807617, 0.3327569365501404, 0.2433032989501953, -0.16772125661373138, -0.22179657220840454, -0.08801057934761047, 0.007638722658157349, 0.01391865685582161, 0.29516294598579407, 0.0542379766702652, 0.30939993262290955, -0.027290700003504753, -0.10970239341259003, 0.5220650434494019, 0.09713573008775711, -0.14856977760791779, 0.19683150947093964, 0.17404252290725708, 0.04497899115085602, 0.006672307848930359, -0.003708258271217346, 0.14701564610004425, 0.010973334312438965, -0.019259994849562645, 0.19009196758270264, -0.3261592984199524, -0.20017658174037933, -0.22500647604465485, -0.042919598519802094, -0.018886640667915344, 0.3271227180957794, -0.028452375903725624, -0.43521296977996826, -0.22291220724582672, -0.14855234324932098, -0.05643213167786598, 0.4121328592300415, -0.02655760571360588, -0.14377745985984802, -0.011405887082219124, 0.006125348154455423, 0.018855653703212738, 0.7483343482017517, -0.027352817356586456, -0.5523802638053894, 0.12489007413387299, 0.019249947741627693, -0.14532488584518433, 0.08160136640071869, 0.2255047857761383, -0.059997592121362686, 0.33809763193130493, -0.05578744411468506, 0.02971961721777916, -0.23997798562049866, -0.2019127607345581, 0.2341753989458084, -0.07942967861890793, 0.32943055033683777, 0.03421741724014282, 0.22608442604541779, 0.015108343213796616, -0.23021548986434937, 0.2885739803314209, -0.06191582232713699, -0.2701319754123688, -0.34025946259498596, 0.16755904257297516, 0.35592377185821533, -0.18293273448944092, -0.29139718413352966, -0.6088715195655823, -0.32067248225212097, 0.2787877321243286, 0.4164876639842987, 0.2521073818206787, 0.23076754808425903, 0.15150202810764313, -0.05467298999428749, -0.169864684343338, 0.06965972483158112, 0.11673422902822495, -0.517724335193634, 0.03586166724562645, -0.21006369590759277, -0.2204989343881607, -0.23878340423107147, -0.24666039645671844, 0.14577728509902954, 0.0720839872956276, -0.3845163583755493, -0.2613418400287628, -0.040832363069057465, 0.15928374230861664, -0.0618201419711113, -0.00138881616294384, 0.16729319095611572, -0.09545447677373886, -0.023528577759861946, 0.03895571082830429, 0.2476973533630371, 0.07944382727146149, 0.00940072350203991, -0.1864798665046692, 0.19171711802482605, 0.15556733310222626, -0.12753194570541382, 0.41025876998901367, -0.06906234472990036, -0.2088342159986496, 0.4698212742805481, -0.21833263337612152, 0.2523113787174225, -0.501658022403717, -0.504784107208252, 0.20089781284332275, 0.2034907042980194, -0.3791691064834595, 0.2592869997024536, 0.352158784866333, -0.007106972858309746, -0.3364820182323456, -0.12871390581130981, -0.06979833543300629, -0.24193435907363892, 0.3536176085472107, 0.2839045524597168, 0.33541375398635864, -0.4179280400276184, -0.1929784119129181, -0.19434642791748047, -0.05679741129279137, -0.04068712145090103, 0.6717272996902466, 0.16092628240585327, 0.009461778216063976, -0.321897029876709, 0.2331465184688568, -0.009168989956378937, -0.033269912004470825, 0.19919823110103607, -0.1552211493253708, -0.186354860663414, -0.05005013942718506, 0.0616949200630188, 0.16468513011932373, 0.30632737278938293, 0.07458613067865372, 0.10108645260334015, 0.12513874471187592, -0.47264546155929565, -0.16903316974639893, 0.09577175974845886, 0.10850474238395691, -0.16053791344165802, -0.23021836578845978, 0.6902586817741394, 0.07564548403024673, -0.3655422031879425, 0.17518717050552368, 0.17503923177719116, -0.37380215525627136, -0.10138597339391708, -0.17170622944831848, 0.035993389785289764, -0.2495570331811905, -0.03823121637105942, 0.03754872828722, 0.24717818200588226, 0.3213496804237366, 0.10703985393047333, -0.19045230746269226, -0.04738497734069824, 0.14187249541282654, -0.07746374607086182, 0.03568215295672417, 0.2747862935066223, 0.2058417648077011, 0.21507421135902405, 0.3199412524700165, -0.05523448437452316, 0.5318436622619629, -0.2067221850156784, -0.44844549894332886, -0.00828322023153305, 0.09926413744688034, 0.37003591656684875, 0.35514432191848755, 0.1360487937927246, -0.007710784673690796, 0.023809945210814476, -0.05584965646266937, -0.7978024482727051, 0.5541273355484009, 0.07840050011873245, -0.1719648391008377, 0.002003914676606655, -0.4529385566711426, 0.5468372702598572, -0.053299449384212494, -0.08428396284580231, 0.18397575616836548, 0.22372670471668243, -0.34849298000335693, 0.13049963116645813, 0.3636848032474518, 1.0036211013793945, -0.20001892745494843, 0.5979267358779907, 0.1882564127445221, 0.316577672958374, 0.18715809285640717, 0.2571653723716736, -0.11894212663173676, -0.1989307552576065, -0.3950669765472412, -0.13183672726154327, -0.13301117718219757, 0.14888626337051392, 0.11904389411211014, 0.1053663045167923, 0.1067562848329544, -0.10866521298885345, -0.03923077508807182, 0.04644337296485901, 0.2183547019958496, 0.02088433876633644, -0.5506277680397034, -0.2668253779411316, 0.13976968824863434, 0.1630827933549881, 0.3775499165058136, -0.055251892656087875, -0.042941611260175705, -0.07730010896921158, 0.009943071752786636, -0.004394523799419403, -0.139195054769516, -0.17400282621383667, 0.03353153541684151, 0.012694397941231728, -0.23282477259635925, -0.05029924958944321, 0.3883976638317108, 0.2344047725200653, 0.09642263501882553, -0.038338907063007355, 0.13552822172641754, -0.3317182958126068, 0.19218038022518158, -0.07056831568479538, -0.22021044790744781, 0.3999597430229187, 0.042843595147132874, 0.02660461515188217, -0.10411057621240616, -0.04292808100581169, -0.43457865715026855, -0.03058943897485733, -0.08446261286735535, 0.6611815690994263, -0.22106219828128815, -0.18064460158348083, -0.17034775018692017, 0.014989156275987625, 0.20418554544448853, 0.1152871698141098, 0.2015034556388855, 0.09005392342805862, -0.0656379982829094, 0.20745202898979187, -0.2563243508338928, 0.06534959375858307, 0.19793502986431122, 0.08605760335922241, -0.43008333444595337, 0.2644723355770111, 0.028217334300279617, 0.10345920920372009, -0.2177565097808838, 0.5871706008911133, 0.6104702949523926, -0.05570441856980324, 0.09968529641628265, 0.2635747492313385, -0.14791978895664215, -0.12743228673934937, 0.7271057367324829, 0.36508387327194214, -0.3910202085971832, -0.23159001767635345, -0.20751920342445374, -0.5043414831161499, 0.18778780102729797, -0.20773519575595856, 0.2692267894744873, -0.00961226038634777, 0.022333309054374695, 0.19497691094875336, -0.004062771797180176, -0.31214866042137146, 0.14859738945960999, -0.19570985436439514, 0.04609544947743416, 0.4459800720214844, 0.20564788579940796, 0.32482272386550903, 0.002192540094256401, 0.06785538047552109, -0.08650423586368561, -0.13294494152069092, -0.11388996243476868, -0.2136785238981247, 0.16442447900772095, 0.08220790326595306, 0.1318345069885254, 0.03253752365708351, -0.23563706874847412, -0.13300153613090515, -0.11400950700044632, 0.1053069680929184, -0.09798240661621094, -0.11273837089538574, 0.15725107491016388, -0.2052239328622818, 0.04629158228635788, -0.16042566299438477, 0.2952694892883301, 0.008954040706157684, 0.31244075298309326, 0.2140684872865677, -0.3142934739589691, -0.1873663067817688, -0.2776600122451782, 0.24085591733455658, 0.16740158200263977, 0.17924264073371887, -0.03075515478849411, 0.2105463445186615, 0.15597659349441528, 0.2315235733985901, 0.08175864815711975, 0.3380711078643799, -0.145468607544899, -0.21254494786262512, 0.154746413230896, 0.44874489307403564, 0.189214289188385, -0.1692369282245636, -0.2411862015724182, -0.10999110341072083, -0.1559247225522995, 0.18972593545913696, 0.3677542209625244, -0.27450552582740784, 0.35708969831466675, -0.2224763184785843, -0.1835072934627533, 0.22735925018787384, 0.1385716199874878, -0.07095727324485779, 0.11364367604255676, -0.26010167598724365, 0.08365656435489655, 0.1571112722158432, 0.20504388213157654, 0.14874403178691864, 0.44925791025161743, -0.4987841844558716, 0.21040253341197968, -0.41032642126083374, 0.053291935473680496, 0.3693913519382477, -0.3706340193748474, 0.09090907126665115, 0.00523550808429718, 0.16927337646484375, 0.06788502633571625, -0.37747645378112793, 0.2427135407924652, -0.2050592303276062, -0.299898236989975, 0.045818619430065155, 0.08836857974529266, -0.08547498285770416, 0.03379311040043831, -0.47020992636680603, -0.04123908281326294, -0.13524115085601807, 0.14716659486293793, -0.10111571848392487, -0.26011914014816284, 0.04510388523340225, 0.1402023434638977, 0.23430943489074707, 0.26192861795425415, -0.15629541873931885, 0.24965646862983704, 0.07285952568054199, -0.0985255241394043, 0.1705276221036911, 0.014076955616474152, 0.19737711548805237, 0.23257382214069366, 0.306591272354126, -0.2564777731895447, 0.4207335114479065, 0.06220013648271561, 0.24700070917606354, -0.12525327503681183, -0.11602643132209778, -0.06639032810926437, -0.1322396993637085, -0.28214848041534424, 0.27170276641845703, 0.1526799499988556, 0.15081560611724854, -0.1591506153345108, 0.16889744997024536, -0.13988055288791656, 0.1339806467294693, -0.5048719644546509, 0.3854014277458191, 0.33950117230415344, 0.1274992823600769, -0.20409731566905975, 0.2874661982059479, -0.38027966022491455, 0.16607221961021423, 0.26982253789901733, 0.06666916608810425, 0.1398974061012268, 0.248857781291008, 0.03073461726307869, 0.10641695559024811, 0.6256426572799683, 0.1565343290567398, 0.05806255713105202, -0.4024637043476105, -0.23864498734474182, -0.5080853700637817, 0.07199490815401077, 0.08851167559623718, -0.3129580020904541, -0.007391093298792839, 0.05329406261444092, 0.2365838885307312, 0.3540361523628235, -0.16840992867946625, -0.25771549344062805, 0.1331721842288971, -0.054511658847332, -0.2838408946990967, -0.1130407452583313, 0.2317335605621338, 0.29619455337524414, 0.06275398284196854, -0.37751010060310364, 0.12648138403892517, -0.23983533680438995, 0.06681474298238754, 0.2509346604347229, -0.10736487805843353, -0.2066175490617752, -0.11683985590934753, 0.3551856279373169, -0.1814100295305252, 0.10296537727117538, 0.033269986510276794, -0.09831148386001587, -0.11116275191307068, -0.08309242129325867, -0.2492656260728836, 0.004052072763442993, 0.08837446570396423, 0.43447065353393555, -0.43246784806251526, 0.12662412226200104, -0.5154187083244324, -0.18088744580745697, 0.1386324167251587, -0.11036239564418793, -0.20505966246128082, 0.0371079295873642, 0.03025815635919571, -0.031201303005218506, 0.009301477111876011, 0.47740164399147034, -0.2749955356121063, -0.26162290573120117, -0.2650998532772064, -0.12570159137248993, 0.5387347936630249, -0.39541882276535034, -0.10030005872249603, -0.02822623774409294, -0.03244034945964813, -0.04262947291135788, 0.17890435457229614, -0.09986341744661331, 0.2147546112537384, 0.2795601189136505, 0.08393978327512741, -0.1748630851507187, 0.2535271942615509, 0.149110347032547, -0.09453830122947693, -0.08244386315345764, 0.16465461254119873, -0.0835355594754219, 0.10624097287654877, -0.09352616965770721, -0.3627169132232666 ]
https://github.com/huggingface/datasets/issues/2508
Load Image Classification Dataset from Local
@lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing.
**Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset
25
Load Image Classification Dataset from Local **Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset @lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing.
[ -0.2203834354877472, -0.1735648363828659, 0.03799239918589592, 0.4659889340400696, 0.19796648621559143, -0.05095729976892471, 0.18018679320812225, 0.0725657194852829, 0.3113461136817932, 0.24052366614341736, -0.1453472226858139, 0.14189234375953674, -0.2927553355693817, 0.2843797504901886, 0.08485609292984009, -0.27476930618286133, -0.24717026948928833, 0.33131492137908936, -0.2056819200515747, -0.19570139050483704, -0.04491977021098137, -0.12572024762630463, 0.14487743377685547, 0.004187554121017456, -0.25478675961494446, 0.12772895395755768, -0.24681268632411957, 0.49817168712615967, -0.07975109666585922, -0.08459142595529556, 0.4612979590892792, -0.00933796539902687, 0.37705376744270325, 0.462099552154541, -0.00010864347132155672, 0.08189833164215088, -0.06114575266838074, -0.28805747628211975, -0.07632012665271759, -0.1762283593416214, -0.014972243458032608, -0.07907252013683319, 0.2707420885562897, -0.1627688705921173, -0.4990904927253723, -0.014790893532335758, 0.0881996750831604, -0.4173051714897156, 0.4179805517196655, 0.1468568742275238, 0.1434505432844162, 0.11187644302845001, -0.37337538599967957, 0.035077232867479324, -0.1778990924358368, 0.5875377655029297, -0.1875459998846054, 0.39445939660072327, 0.41115275025367737, -0.14059433341026306, -0.18945255875587463, 0.23884542286396027, 0.0990796834230423, -0.03896133229136467, 0.6692721843719482, 0.28048697113990784, -0.26176509261131287, -0.1706673949956894, -0.23996874690055847, 0.20665243268013, 0.3181585371494293, 0.0006303265690803528, -0.04474720358848572, -0.10670018196105957, 0.08019000291824341, -0.06097412109375, 0.10266309976577759, 0.10485649108886719, -0.4013628363609314, 0.21542596817016602, -0.3154780864715576, -0.22555138170719147, -0.5069894790649414, 0.11978305131196976, 0.003807932138442993, -0.4213102161884308, -0.06348744034767151, -0.005000710487365723, 0.16669948399066925, -0.054440490901470184, -0.09939727932214737, 0.10496725142002106, 0.08112207800149918, 0.42288124561309814, -0.1536211371421814, -0.21874019503593445, -0.055995695292949677, 0.15744902193546295, 0.09806934744119644, -0.20052173733711243, 0.21937623620033264, -0.02419506385922432, -0.49589642882347107, 0.12779927253723145, 0.1326783299446106, 0.09801419079303741, -0.01232939213514328, 0.31633806228637695, -0.1417284458875656, -0.0399908572435379, -0.3384731411933899, -0.08429359644651413, -0.3632296621799469, 0.04474985599517822, -0.26709502935409546, -0.0891440138220787, -0.11567962169647217, -0.10653426498174667, 0.15916255116462708, -0.22017818689346313, 0.1231754794716835, 0.21078063547611237, 0.1692008376121521, 0.22190412878990173, -0.02505575120449066, -0.07703883945941925, 0.17145468294620514, -0.17236758768558502, -0.19782692193984985, -0.1410321295261383, -0.1429932564496994, 0.10340848565101624, -0.3244973421096802, 0.1915985494852066, 0.08783161640167236, -0.2593477964401245, 0.06465751677751541, -0.2324136346578598, 0.36784201860427856, 0.27965036034584045, -0.0336756557226181, -0.11196686327457428, 0.3258744478225708, 0.1366644948720932, -0.39146921038627625, -0.2433127611875534, 0.25974133610725403, 0.04652392864227295, -0.2552483081817627, 0.1332138180732727, -0.3724258244037628, -0.2556298077106476, 0.05466604232788086, 0.12165010720491409, 0.1061287373304367, -0.1501435488462448, -0.3313509523868561, 0.16375760734081268, -0.47548648715019226, -0.051406025886535645, -0.16219863295555115, -0.014872681349515915, -0.33371731638908386, -0.06511243432760239, 0.3065494894981384, 0.47374963760375977, -0.416500061750412, -0.17933456599712372, -0.23163732886314392, -0.15841156244277954, -0.10638502985239029, 0.3455011248588562, -0.2947668731212616, 0.27799031138420105, -0.2246074378490448, -0.005077101290225983, 0.27058902382850647, -0.5349384546279907, -0.06017441302537918, 0.3036560118198395, -0.21194343268871307, 0.03051377274096012, -0.16403505206108093, 0.5342689156532288, 0.050146568566560745, -0.041998863220214844, -0.17459917068481445, 0.6611359119415283, -0.3526693284511566, 0.04668458551168442, 0.07806551456451416, -0.3422686755657196, -0.06446225941181183, 0.4122164249420166, -0.07974015176296234, 0.2406913936138153, 0.13182242214679718, -0.11936837434768677, -0.02362925559282303, -0.21653655171394348, -0.0034817662090063095, -0.06607276946306229, 0.0811399444937706, 0.24586477875709534, -0.0730326771736145, 0.15299609303474426, -0.3992542028427124, 0.37116989493370056, 0.009705223143100739, 0.190908744931221, 0.031049542129039764, -0.062112413346767426, -0.051072485744953156, -0.21729940176010132, -0.17213796079158783, -0.14603319764137268, -0.009047238156199455, 0.16794833540916443, -0.14346061646938324, -0.21790945529937744, -0.2863902747631073, 0.3025023937225342, -0.42283371090888977, 0.11677814275026321, 0.12822982668876648, 0.11488200724124908, 0.17171414196491241, 0.01827717386186123, -0.1940164417028427, -0.05666441470384598, -0.16768896579742432, -0.2380436658859253, -0.0803513377904892, 0.18656817078590393, 0.007543581072241068, 0.2275128960609436, 0.2719520628452301, 0.1917625367641449, 0.25240013003349304, -0.3821573555469513, 0.1531849056482315, -0.15043888986110687, 0.21512481570243835, 0.06284669786691666, -0.32064029574394226, 0.3980110287666321, -0.04544272646307945, 0.21604745090007782, 0.06680107861757278, -0.11791734397411346, -0.007740963250398636, -0.1440974920988083, 0.0915236622095108, -0.05230524018406868, 0.1271105259656906, 0.47119298577308655, 0.2664761245250702, 0.22434964776039124, -0.21888352930545807, -0.19212302565574646, -0.059593554586172104, 0.07690240442752838, -0.011223927140235901, 0.29013362526893616, -0.002883709967136383, 0.28984710574150085, 0.10341833531856537, -0.24698342382907867, 0.40351879596710205, 0.1600288599729538, -0.17158731818199158, 0.1276344507932663, 0.13307605683803558, 0.05374886095523834, -0.0414682999253273, -0.02406122535467148, 0.10061884671449661, -0.08828636258840561, -0.10255210846662521, 0.1620599627494812, -0.3434332609176636, -0.13462570309638977, -0.18638776242733002, -0.06747044622898102, 0.03680979087948799, 0.264450341463089, -0.036618880927562714, -0.48578527569770813, -0.24206995964050293, -0.030694875866174698, -0.11922113597393036, 0.4429273307323456, 0.0953444242477417, -0.12555965781211853, -0.05989411473274231, 0.038599852472543716, 0.032710883766412735, 0.8698265552520752, -0.017756668850779533, -0.4855666160583496, 0.10119341313838959, 0.012496944516897202, -0.23786026239395142, 0.12738855183124542, 0.19680266082286835, -0.10208428651094437, 0.400247186422348, -0.025190992280840874, 0.1554798185825348, -0.2948791980743408, -0.22647088766098022, 0.2518215477466583, -0.09381075203418732, 0.27488914132118225, 0.02541535347700119, 0.16291186213493347, 0.02689623087644577, -0.22394512593746185, 0.2427927702665329, -0.07285010814666748, -0.29573699831962585, -0.40952104330062866, 0.19392038881778717, 0.3621401786804199, -0.20874251425266266, -0.33245742321014404, -0.41631948947906494, -0.34125474095344543, 0.30483150482177734, 0.35396504402160645, 0.22175981104373932, 0.16516023874282837, 0.14718426764011383, 0.0040502846240997314, -0.27029454708099365, 0.09460219740867615, 0.11444853991270065, -0.4609878659248352, -0.05908893421292305, -0.18967507779598236, -0.20674067735671997, -0.22033977508544922, -0.17278918623924255, 0.11969758570194244, 0.15682055056095123, -0.459494948387146, -0.18748559057712555, 0.014501404948532581, 0.20228777825832367, -0.06841588765382767, -0.1215316504240036, 0.26960790157318115, -0.06867513060569763, -0.0675726979970932, -0.011354528367519379, 0.19309717416763306, 0.1305389255285263, 0.015099039301276207, -0.07666224986314774, 0.21416029334068298, 0.12008734047412872, -0.12899373471736908, 0.4839246869087219, -0.1341388076543808, -0.29829663038253784, 0.45868855714797974, -0.14829683303833008, 0.29975566267967224, -0.47321638464927673, -0.3920402526855469, 0.25456807017326355, 0.24725840985774994, -0.2930369973182678, 0.2879582941532135, 0.37453797459602356, -0.06341279298067093, -0.3145255148410797, -0.1609681397676468, -0.009556647390127182, -0.17707321047782898, 0.40418553352355957, 0.2089848816394806, 0.34102851152420044, -0.44032809138298035, -0.12494254857301712, -0.1967136710882187, -0.08694886416196823, 0.0050696125254035, 0.5884588360786438, 0.27646321058273315, 0.02406199462711811, -0.21659107506275177, 0.30375853180885315, 0.03214378282427788, 0.03993309289216995, 0.1948242038488388, -0.12376326322555542, -0.29565533995628357, -0.11228057742118835, 0.08544208109378815, 0.1938692331314087, 0.28487810492515564, 0.0979406014084816, 0.04826783761382103, 0.08277837932109833, -0.46670374274253845, -0.0958472341299057, 0.12186577916145325, 0.15445064008235931, -0.167449489235878, -0.28942662477493286, 0.5743999481201172, 0.07128427177667618, -0.32237571477890015, 0.17516015470027924, 0.11931830644607544, -0.37544581294059753, -0.02782941237092018, -0.039907824248075485, 0.1829686462879181, -0.21039918065071106, 0.017481841146945953, -0.010224055498838425, 0.14869406819343567, 0.34071704745292664, 0.0679076761007309, -0.15546977519989014, -0.07824896275997162, 0.06546986103057861, -0.0717562586069107, -0.029060885310173035, 0.26987847685813904, 0.2421383559703827, 0.3197582960128784, 0.42533308267593384, -0.015143034979701042, 0.5078397989273071, -0.15784873068332672, -0.3838397264480591, 0.012101203203201294, 0.12671184539794922, 0.33344706892967224, 0.37101250886917114, 0.1919388771057129, -0.03843230754137039, 0.01867900975048542, -0.1370508223772049, -0.8158705830574036, 0.5896156430244446, 0.07296939194202423, -0.2231980711221695, 0.046367693692445755, -0.29876235127449036, 0.4696884751319885, -0.10428225994110107, -0.10039760172367096, 0.21214157342910767, 0.14686712622642517, -0.302086740732193, 0.059526532888412476, 0.48895856738090515, 0.9659130573272705, -0.25652873516082764, 0.5424617528915405, 0.09194307774305344, 0.26458579301834106, 0.2019234299659729, 0.24721165001392365, -0.05077343434095383, -0.21403348445892334, -0.3854641616344452, -0.1326998472213745, -0.11570300161838531, 0.08999570459127426, 0.028009073808789253, 0.10466650128364563, -0.00047931144945323467, 0.03187640756368637, 0.04596959426999092, 0.05550388991832733, 0.18659885227680206, 0.11254533380270004, -0.5767170786857605, -0.08850625157356262, 0.16567248106002808, 0.09787239134311676, 0.3691043555736542, -0.050150834023952484, -0.09385284036397934, -0.0038339272141456604, -0.0055169276893138885, 0.011954933404922485, -0.10706739872694016, -0.13355599343776703, 0.002082688733935356, 0.006706595420837402, -0.20645396411418915, -0.03684593737125397, 0.3239459991455078, 0.19034668803215027, 0.04620660841464996, -0.14602911472320557, 0.1698487401008606, -0.26832911372184753, 0.14354307949543, -0.03717263415455818, -0.2572740316390991, 0.4271562993526459, 0.06038445234298706, 0.12325755506753922, -0.08716020733118057, -0.03428461030125618, -0.44875502586364746, -0.11540861427783966, -0.14011742174625397, 0.6795423030853271, -0.2016598880290985, -0.044187575578689575, -0.1713181436061859, 0.04547789320349693, 0.19474796950817108, 0.1356179416179657, 0.188137948513031, 0.14648622274398804, -0.14708417654037476, 0.3069870173931122, -0.16325229406356812, 0.04228341951966286, 0.1818503588438034, 0.020691143348813057, -0.48314327001571655, 0.13899825513362885, 0.05715782567858696, 0.1379522979259491, -0.2186935544013977, 0.5137706995010376, 0.6890602707862854, -0.18561066687107086, 0.09501507878303528, 0.25501564145088196, -0.17697057127952576, -0.08096083253622055, 0.7742314338684082, 0.3607250452041626, -0.43796980381011963, -0.21554861962795258, -0.08064969629049301, -0.5159038305282593, 0.1880481094121933, -0.30542805790901184, 0.342612087726593, -0.06712417304515839, -0.02053273469209671, 0.16776719689369202, 0.044603340327739716, -0.3304334878921509, 0.061592407524585724, -0.24062608182430267, 0.12688298523426056, 0.4618704617023468, 0.2617570459842682, 0.28104326128959656, 0.048700686544179916, 0.04793836921453476, -0.09347687661647797, -0.18094222247600555, -0.08970527350902557, -0.18199662864208221, 0.1569424569606781, 0.0965896025300026, 0.12959593534469604, -0.024712499231100082, -0.2508900761604309, -0.16467471420764923, -0.07659310847520828, 0.11851277947425842, -0.21175459027290344, -0.16170111298561096, 0.13779693841934204, -0.15359532833099365, 0.035975366830825806, -0.1333455890417099, 0.267618864774704, 0.006910502910614014, 0.35296279191970825, 0.08983971178531647, -0.3657230734825134, -0.245670348405838, -0.3413458466529846, 0.24445419013500214, 0.24186700582504272, 0.13333594799041748, 0.00599498488008976, 0.1923786699771881, 0.2601994276046753, 0.1615188717842102, 0.03549159690737724, 0.33019110560417175, -0.24506467580795288, -0.1639595925807953, 0.13434047996997833, 0.47915181517601013, 0.21196751296520233, -0.13090166449546814, -0.20894283056259155, -0.08899539709091187, -0.2090006321668625, 0.13441027700901031, 0.2951005697250366, -0.23451218008995056, 0.3950605094432831, -0.04755657911300659, -0.19036680459976196, 0.18427933752536774, 0.11069321632385254, -0.062436532229185104, 0.14889436960220337, -0.31555208563804626, 0.060946617275476456, 0.24177993834018707, 0.19078190624713898, 0.17385166883468628, 0.44743651151657104, -0.5088696479797363, 0.2313017100095749, -0.3525949716567993, 0.13279758393764496, 0.4371775686740875, -0.3301294445991516, 0.08896389603614807, -0.08135122060775757, 0.2755253314971924, 0.13030298054218292, -0.40827053785324097, 0.26086699962615967, -0.19795280694961548, -0.3885847330093384, -0.007152814418077469, 0.09987635910511017, -0.1769784688949585, 0.10984630882740021, -0.5392646789550781, -0.1054767295718193, -0.09678243100643158, 0.21018484234809875, -0.07887779176235199, -0.17323942482471466, 0.13058879971504211, 0.11520832777023315, 0.1759534478187561, 0.25122952461242676, -0.15431049466133118, 0.20875057578086853, 0.06096619740128517, -0.056069158017635345, 0.22936801612377167, -0.051076263189315796, 0.174259752035141, 0.3724263608455658, 0.37319326400756836, -0.3360881507396698, 0.36722227931022644, 0.10794046521186829, 0.1973186880350113, -0.06042337790131569, -0.11457179486751556, -0.07519754767417908, -0.08535952121019363, -0.27787989377975464, 0.21988873183727264, 0.13205420970916748, 0.13609638810157776, -0.1398245394229889, 0.2305927276611328, -0.28977131843566895, 0.14701054990291595, -0.4413468837738037, 0.2855163514614105, 0.38366052508354187, 0.11161903291940689, -0.2781772315502167, 0.2666490077972412, -0.3031940758228302, 0.15579591691493988, 0.12693293392658234, 0.047083642333745956, 0.05621588975191116, 0.22013680636882782, 0.049162350594997406, 0.04081842303276062, 0.6757802367210388, 0.12306313216686249, -0.0002567172050476074, -0.4220190644264221, -0.25287067890167236, -0.44941285252571106, 0.10869161784648895, 0.14980775117874146, -0.2966712415218353, 0.014644811861217022, 0.019230341538786888, 0.28938186168670654, 0.3351864814758301, -0.1327325850725174, -0.2538817226886749, 0.2743801176548004, -0.07673689723014832, -0.27864590287208557, -0.1292857527732849, 0.3408541679382324, 0.2206348329782486, 0.05678181350231171, -0.2851386070251465, 0.20806270837783813, -0.14783859252929688, 0.07504524290561676, 0.2263493835926056, -0.16681671142578125, -0.16189949214458466, -0.08489225804805756, 0.40187540650367737, -0.16492731869220734, 0.0886627733707428, 0.03236393630504608, -0.11470941454172134, -0.14090323448181152, -0.12374483048915863, -0.29879140853881836, -0.14305269718170166, 0.1465638428926468, 0.4959644377231598, -0.40861690044403076, 0.1019575223326683, -0.5701280236244202, -0.1637081801891327, 0.12768913805484772, 0.011802025139331818, -0.24403037130832672, 0.0364946648478508, -0.08011932671070099, -0.0949004665017128, 0.0979752466082573, 0.4745466709136963, -0.18974894285202026, -0.35232439637184143, -0.3604649305343628, -0.1509300172328949, 0.5336055159568787, -0.3622514605522156, -0.017983507364988327, -0.000637830700725317, -0.1082383394241333, 0.057923704385757446, 0.1308809518814087, -0.13446110486984253, 0.15276756882667542, 0.25431182980537415, 0.1060824990272522, -0.12743957340717316, 0.23315280675888062, 0.1409255564212799, -0.017737820744514465, -0.10208180546760559, 0.18049293756484985, -0.012254051864147186, 0.11068291962146759, -0.0972428023815155, -0.34073716402053833 ]
https://github.com/huggingface/datasets/issues/2508
Load Image Classification Dataset from Local
Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub. ```python from datasets import load_dataset ds = load_dataset('nateraw/image-folder', data_files='PetImages/') ```
**Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset
33
Load Image Classification Dataset from Local **Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub. ```python from datasets import load_dataset ds = load_dataset('nateraw/image-folder', data_files='PetImages/') ```
[ -0.20274946093559265, -0.18869063258171082, 0.01317838579416275, 0.4011635184288025, 0.2593047022819519, -0.027973834425210953, 0.19759701192378998, 0.14511746168136597, 0.31198999285697937, 0.28576529026031494, -0.19353516399860382, 0.1235475167632103, -0.3047412633895874, 0.3270210325717926, 0.06507750600576401, -0.22926035523414612, -0.22782579064369202, 0.3378817141056061, -0.15620413422584534, -0.24757936596870422, -0.05624270439147949, -0.09633252769708633, 0.16608351469039917, -0.008866630494594574, -0.3098392188549042, 0.1793593466281891, -0.24538251757621765, 0.5447192788124084, -0.11850128322839737, -0.10167593508958817, 0.48879164457321167, 0.0333637073636055, 0.39437565207481384, 0.5124266743659973, -0.00010685518645914271, 0.08726625144481659, -0.12944553792476654, -0.2651173770427704, -0.06088943034410477, -0.2519887685775757, -0.02067490480840206, -0.1543315351009369, 0.24183709919452667, -0.21210843324661255, -0.49971503019332886, -0.055161263793706894, 0.04619962349534035, -0.39649835228919983, 0.4658914804458618, 0.1928686946630478, 0.17464520037174225, 0.1268734633922577, -0.3423510789871216, 0.026652606204152107, -0.22405949234962463, 0.455578088760376, -0.1381312906742096, 0.40508100390434265, 0.40206700563430786, -0.2422730177640915, -0.05631320923566818, 0.2717684209346771, 0.09580850601196289, -0.0036631636321544647, 0.5949124097824097, 0.32277196645736694, -0.1611333191394806, -0.2097158282995224, -0.18577122688293457, 0.1864369809627533, 0.16504471004009247, -0.07890685647726059, -0.12299368530511856, -0.18922044336795807, 0.10587019473314285, -0.10916845500469208, 0.06453048437833786, 0.11946899443864822, -0.43928462266921997, 0.2350856065750122, -0.2582419812679291, -0.17843151092529297, -0.4480181038379669, 0.09942649304866791, 0.026265740394592285, -0.3858403265476227, -0.08957318216562271, -0.05669476091861725, 0.12812940776348114, -0.023398716002702713, -0.1673014611005783, 0.0837891697883606, 0.14295271039009094, 0.498515248298645, -0.16984663903713226, -0.22420917451381683, 0.011930540204048157, 0.09449297189712524, 0.07475286722183228, -0.16140517592430115, 0.11793598532676697, -0.03378427028656006, -0.45302310585975647, 0.0725448727607727, 0.19356872141361237, 0.11958688497543335, -0.04633788764476776, 0.30496710538864136, -0.10349877178668976, 0.0002567896153777838, -0.4169115722179413, -0.11911540478467941, -0.301264226436615, -0.03442719951272011, -0.1744803488254547, -0.04680340737104416, -0.019303545355796814, -0.13895641267299652, 0.16125063598155975, -0.1624353528022766, 0.10291849821805954, 0.19089047610759735, 0.15040679275989532, 0.24245885014533997, -0.04827276989817619, -0.003193370997905731, 0.10312822461128235, -0.12023477256298065, -0.22834621369838715, -0.06363850831985474, -0.19175215065479279, 0.1401706039905548, -0.25989291071891785, 0.11193922907114029, 0.07595603168010712, -0.29916876554489136, 0.04138690233230591, -0.21505698561668396, 0.4728562831878662, 0.230912446975708, -0.058795034885406494, -0.15649250149726868, 0.3177805244922638, 0.17213721573352814, -0.3297019302845001, -0.2200271338224411, 0.3412007987499237, -0.16476598381996155, -0.24466893076896667, 0.09085781872272491, -0.3651209771633148, -0.2542339563369751, 0.09029018878936768, 0.15490299463272095, 0.05807073414325714, -0.13078241050243378, -0.3527175188064575, 0.15043479204177856, -0.41758444905281067, 0.01915203407406807, -0.19445845484733582, -0.007577043026685715, -0.342197984457016, -0.05169839784502983, 0.34788987040519714, 0.46906864643096924, -0.3932279050350189, -0.1652912199497223, -0.16187997162342072, -0.13978959619998932, -0.06414053589105606, 0.31366077065467834, -0.22971580922603607, 0.30351051688194275, -0.16295641660690308, -0.005273729562759399, 0.22359949350357056, -0.578559398651123, -0.11556975543498993, 0.2601821720600128, -0.1376008540391922, 0.16513077914714813, -0.18176519870758057, 0.41978219151496887, 0.04826666787266731, -0.02347664162516594, -0.11054739356040955, 0.7269154787063599, -0.268849641084671, 0.08746612817049026, 0.007872909307479858, -0.3116492033004761, -0.09151273965835571, 0.4174853563308716, 0.01889221742749214, 0.27932101488113403, 0.059595342725515366, -0.09819669276475906, 0.08943558484315872, -0.258109450340271, 0.019927604123950005, -0.046738334000110626, 0.22555500268936157, 0.2770269811153412, -0.0013281702995300293, 0.05827697366476059, -0.3241302967071533, 0.41058507561683655, -0.012332689017057419, 0.2917642593383789, -0.11264596879482269, -0.06836558878421783, -0.14588886499404907, -0.17024746537208557, -0.27222663164138794, -0.13478368520736694, 0.047026507556438446, 0.08643025159835815, -0.06603196263313293, -0.15816757082939148, -0.3154456913471222, 0.3485405147075653, -0.42568323016166687, 0.13706672191619873, 0.1380573809146881, 0.13803383708000183, 0.1871839314699173, -0.021699141710996628, -0.16577303409576416, -0.002762407064437866, -0.18125009536743164, -0.17276103794574738, -0.11711712926626205, 0.20029276609420776, 0.07996847480535507, 0.24563650786876678, 0.2190038561820984, 0.1401594579219818, 0.26871514320373535, -0.28638941049575806, -0.00793827511370182, -0.07204312086105347, 0.28257715702056885, 0.0857938900589943, -0.29184597730636597, 0.4547748565673828, -0.02038390561938286, 0.2221374213695526, 0.10128749907016754, -0.11007453501224518, 0.015548942610621452, -0.1211862862110138, 0.050990328192710876, -0.07945513725280762, 0.1232161819934845, 0.4209696054458618, 0.31366869807243347, 0.12994903326034546, -0.17778539657592773, -0.1941125988960266, -0.08125355839729309, 0.05859946087002754, -0.0019887536764144897, 0.2639886140823364, 0.023717425763607025, 0.29418742656707764, 0.02845052443444729, -0.1595572829246521, 0.4201907515525818, 0.12860822677612305, -0.14480946958065033, 0.15875381231307983, 0.07808998972177505, 0.04493826627731323, -0.04981406778097153, -0.010747246444225311, 0.06404712796211243, -0.05864345282316208, -0.007914155721664429, 0.15365946292877197, -0.3867429494857788, -0.1319255530834198, -0.23638133704662323, 0.0018709748983383179, -0.007926438003778458, 0.28523382544517517, -0.1009809747338295, -0.3875081539154053, -0.14908231794834137, -0.15533135831356049, -0.10845029354095459, 0.34735000133514404, 0.04786686599254608, -0.13405364751815796, -0.09208761155605316, 0.032376497983932495, 0.06454098224639893, 0.7125995755195618, -0.024852205067873, -0.4691963791847229, 0.10370011627674103, -0.046753332018852234, -0.1814681589603424, 0.14669817686080933, 0.21568766236305237, -0.06440506130456924, 0.3603678047657013, -0.0669206902384758, 0.06591492146253586, -0.2202037125825882, -0.2478674054145813, 0.19267934560775757, -0.0845232903957367, 0.3398302495479584, 0.0223369300365448, 0.21821066737174988, -0.028224525973200798, -0.16701558232307434, 0.31362423300743103, -0.12519241869449615, -0.22485625743865967, -0.37214770913124084, 0.1539636105298996, 0.3486577272415161, -0.2092301994562149, -0.3167019784450531, -0.5308421850204468, -0.3142336905002594, 0.3089398443698883, 0.4514380693435669, 0.20633479952812195, 0.2160312533378601, 0.1925133913755417, 0.02034030109643936, -0.2060067355632782, 0.11678299307823181, 0.07099100202322006, -0.5225769281387329, 0.026053428649902344, -0.24021431803703308, -0.25740283727645874, -0.20382456481456757, -0.18804621696472168, 0.08936873823404312, 0.01790977269411087, -0.3726290464401245, -0.31708982586860657, -0.09480708837509155, 0.1927018016576767, -0.09823650121688843, -0.008915064856410027, 0.1456408053636551, -0.07697635143995285, -0.09270239621400833, -0.03808072209358215, 0.27845707535743713, 0.13741737604141235, 0.02264694683253765, -0.20678859949111938, 0.1048828735947609, 0.04211440682411194, -0.09494562447071075, 0.3632553219795227, -0.11899040639400482, -0.18582333624362946, 0.49873533844947815, -0.21889875829219818, 0.27804893255233765, -0.5007691383361816, -0.470510333776474, 0.15549235045909882, 0.20242875814437866, -0.31579726934432983, 0.2361050844192505, 0.3836197257041931, 0.041703540831804276, -0.34288638830184937, -0.08299405872821808, -0.011056166142225266, -0.24689935147762299, 0.3223658502101898, 0.342332124710083, 0.26388460397720337, -0.357363760471344, -0.14199838042259216, -0.21695032715797424, -0.07887234538793564, -0.004416786599904299, 0.5882700681686401, 0.1983957290649414, 0.00505254790186882, -0.3221973776817322, 0.2321484088897705, -0.08202669769525528, 0.009444795548915863, 0.20026196539402008, -0.11622583866119385, -0.24068135023117065, -0.10602256655693054, 0.05837520211935043, 0.14899536967277527, 0.3460451662540436, 0.10161419212818146, 0.0671902745962143, 0.12306614220142365, -0.5372577905654907, -0.14383094012737274, 0.10073556005954742, 0.05972212180495262, -0.20579025149345398, -0.25548094511032104, 0.6490076780319214, 0.06818706542253494, -0.35367342829704285, 0.15852847695350647, 0.09916775673627853, -0.34918999671936035, -0.032816167920827866, -0.1618230938911438, 0.06737321615219116, -0.28764840960502625, -0.003782525658607483, 0.03760475665330887, 0.2875194549560547, 0.2628849446773529, 0.13155695796012878, -0.17344798147678375, -0.017633337527513504, 0.1536102592945099, -0.02931155636906624, 0.027830878272652626, 0.28577402234077454, 0.22905412316322327, 0.25628164410591125, 0.3251538574695587, -0.07947324961423874, 0.5093402862548828, -0.21596714854240417, -0.47528916597366333, -0.03890449181199074, 0.11177033931016922, 0.3309127986431122, 0.35345542430877686, 0.11490470170974731, 0.0006217509508132935, -0.031413253396749496, -0.018764302134513855, -0.8070136904716492, 0.5762056708335876, 0.06889886409044266, -0.14180713891983032, 0.086676225066185, -0.4121037423610687, 0.4884510338306427, -0.09917524456977844, -0.03369845822453499, 0.17939041554927826, 0.21293289959430695, -0.2754080891609192, 0.10616498440504074, 0.3879113495349884, 0.9502140283584595, -0.20899508893489838, 0.5667920112609863, 0.16774916648864746, 0.26647645235061646, 0.24312545359134674, 0.23489226400852203, -0.104767344892025, -0.1616082489490509, -0.41554659605026245, -0.10519792139530182, -0.07668624818325043, 0.16506975889205933, 0.058850158005952835, 0.07654993236064911, 0.038069043308496475, -0.02394167333841324, -0.05125141516327858, 0.0152960866689682, 0.15119501948356628, 0.008729702793061733, -0.5815859436988831, -0.3145025372505188, 0.2094789445400238, 0.15352842211723328, 0.3991636037826538, -0.04692382365465164, -0.06686840951442719, -0.06173604726791382, 0.0073630549013614655, 0.02699284255504608, -0.10284149646759033, -0.11251424252986908, 0.03628974035382271, 0.00710265152156353, -0.234101340174675, -0.10180644690990448, 0.36089274287223816, 0.26429516077041626, 0.07599760591983795, -0.1297738254070282, 0.19389241933822632, -0.303180068731308, 0.17490769922733307, -0.08443447202444077, -0.18841460347175598, 0.4033645689487457, 0.03063391149044037, 0.040239669382572174, -0.07789165526628494, -0.04649961739778519, -0.44639861583709717, -0.051501162350177765, -0.091478630900383, 0.5949817299842834, -0.1436309516429901, -0.14426086843013763, -0.15262877941131592, 0.05576266720890999, 0.11643828451633453, 0.15654441714286804, 0.22117891907691956, 0.058964114636182785, -0.056640394032001495, 0.2580006718635559, -0.2473711371421814, 0.0799935832619667, 0.2593110203742981, 0.07327023893594742, -0.424301415681839, 0.27104490995407104, 0.13120503723621368, 0.12364360690116882, -0.23331943154335022, 0.47938448190689087, 0.5929043889045715, -0.09431147575378418, 0.13895964622497559, 0.2627602815628052, -0.1387140154838562, -0.09826379269361496, 0.7520091533660889, 0.3514804244041443, -0.42761510610580444, -0.17810267210006714, -0.18496200442314148, -0.5113028287887573, 0.13922099769115448, -0.17157359421253204, 0.3388849198818207, 0.004854336380958557, 0.0719587579369545, 0.19595389068126678, 0.021151715889573097, -0.3629048466682434, 0.1149832233786583, -0.2795417606830597, 0.07820012420415878, 0.36435842514038086, 0.22435107827186584, 0.35020872950553894, -0.008417722769081593, 0.08530712127685547, -0.026259034872055054, -0.15960976481437683, -0.16164806485176086, -0.21931669116020203, 0.1357162594795227, 0.07672110199928284, 0.12132128328084946, 0.044762104749679565, -0.16699698567390442, -0.16484081745147705, -0.0850633978843689, 0.15923333168029785, -0.08061104267835617, -0.14873044192790985, 0.19324107468128204, -0.14174163341522217, 0.010405678302049637, -0.10491880774497986, 0.21755047142505646, 0.0159711092710495, 0.2904704213142395, 0.13888244330883026, -0.3403906226158142, -0.23932600021362305, -0.266735702753067, 0.3110303580760956, 0.18645687401294708, 0.12961570918560028, -0.017091121524572372, 0.19882425665855408, 0.175484299659729, 0.1664515733718872, 0.043294042348861694, 0.3626084327697754, -0.2004905641078949, -0.2212090641260147, 0.2235444337129593, 0.4667615294456482, 0.2406204342842102, -0.19229722023010254, -0.21872578561306, -0.08077313005924225, -0.18014323711395264, 0.21730956435203552, 0.30762502551078796, -0.25529223680496216, 0.38368216156959534, -0.1784028261899948, -0.12800252437591553, 0.15896835923194885, 0.10560078918933868, -0.06708289682865143, 0.16689150035381317, -0.29202398657798767, 0.0753035768866539, 0.1400853544473648, 0.16390736401081085, 0.15058690309524536, 0.4241301417350769, -0.5359812378883362, 0.20329423248767853, -0.42836153507232666, 0.1026887595653534, 0.3870525062084198, -0.3839820623397827, 0.09441583603620529, 0.022355571389198303, 0.18999424576759338, 0.16335493326187134, -0.3974058926105499, 0.36312001943588257, -0.24559731781482697, -0.33433279395103455, -0.015243466943502426, 0.13043953478336334, -0.11918764561414719, 0.035759538412094116, -0.44166725873947144, -0.06137192249298096, -0.15142406523227692, 0.17021659016609192, -0.0652250200510025, -0.21508921682834625, 0.0124940425157547, 0.08243049681186676, 0.18490174412727356, 0.2537664473056793, -0.2565477788448334, 0.20630642771720886, 0.13199132680892944, -0.06578938663005829, 0.11269424110651016, 0.04142916947603226, 0.1676037758588791, 0.27876606583595276, 0.3783051669597626, -0.22632279992103577, 0.4136289656162262, 0.06329129636287689, 0.21889548003673553, -0.03347530961036682, -0.12379821389913559, -0.08262069523334503, -0.04447989910840988, -0.2586871087551117, 0.25961336493492126, 0.20828959345817566, 0.1723279058933258, -0.20080116391181946, 0.13485422730445862, -0.18853025138378143, 0.2333202362060547, -0.5136282444000244, 0.37228792905807495, 0.35651737451553345, 0.11054974049329758, -0.22044426202774048, 0.23794248700141907, -0.3508533239364624, 0.17277313768863678, 0.19168417155742645, 0.0668126791715622, 0.10187947750091553, 0.18691127002239227, 0.06009627878665924, 0.061736222356557846, 0.6641272902488708, 0.14943796396255493, 0.02101588249206543, -0.4050767719745636, -0.2557225823402405, -0.5360123515129089, 0.08164919912815094, 0.10624445974826813, -0.29391905665397644, 0.008480031974613667, 0.030625270679593086, 0.2576008439064026, 0.3980213403701782, -0.11944349110126495, -0.3155706226825714, 0.16355206072330475, -0.041891396045684814, -0.2796114683151245, -0.11194425821304321, 0.24544785916805267, 0.2100672423839569, 0.08102307468652725, -0.3084844648838043, 0.1834348440170288, -0.21360284090042114, 0.11777680367231369, 0.24911558628082275, -0.10128277540206909, -0.19141779839992523, -0.1190895289182663, 0.3701428472995758, -0.1382645070552826, 0.07338923960924149, -0.002566959708929062, -0.10671746730804443, -0.12259599566459656, -0.13005562126636505, -0.272676020860672, -0.07443518191576004, 0.07214012742042542, 0.522491455078125, -0.4053119421005249, 0.08760474622249603, -0.48864883184432983, -0.09441142529249191, 0.18753258883953094, -0.06869370490312576, -0.2719263732433319, 0.045387402176856995, 0.07303861528635025, -0.070062555372715, 0.010300909169018269, 0.5261642932891846, -0.23777440190315247, -0.2638457417488098, -0.3279537260532379, -0.19582416117191315, 0.5588271617889404, -0.4133074879646301, -0.13756784796714783, -0.06331159174442291, -0.04752883315086365, -0.04373162239789963, 0.07300880551338196, -0.1622508466243744, 0.20039081573486328, 0.21131576597690582, 0.12491702288389206, -0.21200712025165558, 0.30387282371520996, 0.13361337780952454, -0.0588357038795948, -0.08380268514156342, 0.14373067021369934, -0.028081774711608887, 0.14666415750980377, -0.060199327766895294, -0.3650996685028076 ]
https://github.com/huggingface/datasets/issues/2503
SubjQA wrong boolean values in entries
@arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA We are going to contact the dataset owners to report this.
## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4
27
SubjQA wrong boolean values in entries ## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4 @arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA We are going to contact the dataset owners to report this.
[ 0.12356573343276978, 0.06930430233478546, 0.027031544595956802, 0.16451945900917053, -0.33659613132476807, -0.006899036467075348, 0.08650770783424377, 0.045239679515361786, -0.09279783070087433, 0.1864388883113861, -0.09195977449417114, 0.4202951192855835, 0.21497006714344025, 0.2549099326133728, -0.21842679381370544, 0.12297323346138, 0.22864893078804016, 0.18424063920974731, -0.13635964691638947, -0.15472091734409332, -0.43177831172943115, 0.26057618856430054, -0.5335962176322937, -0.011905215680599213, -0.12751387059688568, -0.20236603915691376, -0.13335782289505005, -0.1422063410282135, -0.22388537228107452, -0.2932465076446533, 0.07300015538930893, -0.03353920206427574, -0.08117657154798508, 0.12340942770242691, -0.00010932746226899326, -0.2034587562084198, 0.05263661965727806, 0.01623285748064518, -0.2176801562309265, 0.07691748440265656, -0.2617804706096649, -0.0417560450732708, -0.19781501591205597, 0.048669300973415375, -0.33576878905296326, -0.4470202624797821, -0.20890198647975922, -0.2683665156364441, 0.38990843296051025, 0.009099717251956463, 0.17203018069267273, 0.061097465455532074, -0.1662038415670395, 0.247456356883049, 0.3539648950099945, -0.18083883821964264, -0.04923677444458008, 0.24323143064975739, -0.043776869773864746, -0.04636501520872116, 0.15075357258319855, 0.3817000687122345, 0.08788766711950302, 0.07928764820098877, 0.1195271760225296, -0.13141998648643494, -0.0643831267952919, -0.24493476748466492, 0.2853110730648041, 0.2433769404888153, 0.34003162384033203, -0.14749625325202942, -0.4372369647026062, -0.08656217157840729, -0.06885182857513428, -0.11942223459482193, 0.27293848991394043, 0.026779919862747192, 0.13243414461612701, -0.046557772904634476, 0.1046251580119133, 0.39836496114730835, 0.10855421423912048, -0.04107467085123062, -0.11356451362371445, 0.1411973536014557, -0.12439768016338348, -0.02822980284690857, -0.1896744966506958, -0.11828307807445526, 0.016792360693216324, 0.0029048416763544083, -0.635250985622406, 0.10342635959386826, -0.4720296859741211, -0.05522967875003815, -0.06515458971261978, 0.15203675627708435, -0.15406927466392517, -0.33750033378601074, 0.29584911465644836, -0.05036497116088867, 0.2031739354133606, 0.13815000653266907, 0.5345702171325684, 0.2554336488246918, 0.3524947166442871, -0.20063534379005432, -0.09164513647556305, -0.2544086277484894, 0.04281817749142647, 0.06384910643100739, 0.1985459178686142, -0.27885904908180237, -0.0028026532381772995, 0.08877864480018616, 0.10842327773571014, -0.30411282181739807, -0.581208348274231, 0.15725712478160858, -0.4001149833202362, -0.04503583908081055, 0.13402104377746582, 0.09278497099876404, 0.04765390604734421, -0.22272944450378418, -0.09906645119190216, 0.020951736718416214, -0.13459213078022003, -0.47820040583610535, -0.12395203113555908, -0.023846272379159927, -0.1999010592699051, 0.05449376255273819, 0.019470538944005966, -0.018034301698207855, -0.002073698677122593, 0.3719305396080017, -0.1979907900094986, -0.22391827404499054, 0.009152477607131004, -0.28844940662384033, 0.22148320078849792, 0.20325547456741333, -0.2496667057275772, 0.20088039338588715, 0.04937177151441574, -0.052115313708782196, -0.014767713844776154, 0.33877745270729065, 0.0891697034239769, 0.18195921182632446, -0.03698498755693436, 0.1804387867450714, -0.08917553722858429, -0.057874493300914764, 0.14108620584011078, 0.3233659267425537, 0.21533656120300293, 0.03824181482195854, 0.06313222646713257, -0.2067234218120575, -0.1559419333934784, -0.09162291884422302, -0.036430031061172485, 0.15023978054523468, -0.6753098368644714, -0.10317742824554443, -0.008157312870025635, 0.2379128485918045, 0.011877566576004028, 0.1806158423423767, 0.19111625850200653, 0.29146674275398254, 0.07678718119859695, -0.08618663251399994, -0.2743890881538391, 0.19276311993598938, -0.42520689964294434, 0.0999397337436676, 0.42203450202941895, -0.08126332610845566, -0.2345721423625946, 0.20562851428985596, 0.17051319777965546, 0.03482811897993088, 0.1862521469593048, 0.0711834579706192, 0.09806481003761292, -0.10929235816001892, -0.433603435754776, -0.0682205930352211, -0.019870448857545853, 0.2016846239566803, -0.18399591743946075, -0.0702623650431633, 0.0519552044570446, -0.48572835326194763, 0.1369781196117401, 0.1761033684015274, -0.2915922999382019, 0.07503272593021393, 0.4579089879989624, -0.3810136914253235, 0.2863348424434662, 0.037703029811382294, 0.11688096076250076, 0.19428113102912903, -0.4058646559715271, 0.0025860294699668884, 0.5612466931343079, -0.0935288816690445, -0.1990174651145935, 0.10169530659914017, 0.04799111559987068, -0.18118999898433685, 0.1231810599565506, 0.1443934142589569, -0.34422439336776733, -0.031230667605996132, -0.28290286660194397, -0.061851926147937775, 0.11431333422660828, -0.06969950348138809, 0.1398046314716339, -0.13273990154266357, -0.07713216543197632, 0.05674763396382332, 0.4595971703529358, 0.3403606414794922, 0.44744035601615906, 0.0692552924156189, -0.09828909486532211, 0.1780465543270111, 0.08166638016700745, -0.10032899677753448, -0.13978761434555054, -0.21588094532489777, -0.09324204176664352, -0.10094070434570312, 0.0486006923019886, 0.5878673195838928, -0.09767129272222519, 0.3459824025630951, 0.1544421762228012, 0.46331387758255005, 0.08115746825933456, -0.1465824544429779, -0.30199187994003296, 0.2043401002883911, -0.0304885096848011, -0.19462795555591583, -0.17291299998760223, -0.40563204884529114, 0.23564676940441132, 0.052404627203941345, -0.08954663574695587, 0.2477193921804428, 0.1411379724740982, 0.29541486501693726, 0.31672585010528564, -0.18549858033657074, 0.26495054364204407, -0.21044012904167175, -0.020297154784202576, -0.06528477370738983, 0.2469477653503418, 0.4416830837726593, 0.11517669260501862, 0.19547231495380402, -0.09817732870578766, -0.06250219792127609, -0.1693166196346283, -0.04542479291558266, 0.21417978405952454, 0.16796797513961792, -0.25506141781806946, -0.0083727166056633, 0.055994194000959396, 0.15833693742752075, -0.21402883529663086, 0.7436455488204956, -0.0561722069978714, 0.04292116314172745, -0.32199445366859436, 0.3840665817260742, -0.3165828287601471, -0.30227044224739075, 0.006539505906403065, -0.5269264578819275, 0.028217071667313576, -0.22704575955867767, 0.46890151500701904, -0.3912796676158905, -0.40673109889030457, 0.39032018184661865, 0.4209662079811096, 0.6782059073448181, -0.14898855984210968, 0.19567447900772095, -0.02830599620938301, -0.056301191449165344, -0.5697382688522339, 0.07571598887443542, 0.03661119565367699, -0.23676882684230804, 0.05959706753492355, -0.13793136179447174, -0.13686802983283997, -0.007209399715065956, -0.276875764131546, 0.11925897747278214, 0.0006522350013256073, 1.0724867582321167, -0.2695174813270569, -0.1467301845550537, -0.11903458833694458, 0.1193539947271347, -0.15747427940368652, 0.15902872383594513, -0.053990744054317474, 0.09066912531852722, -0.17395851016044617, -0.16750788688659668, -0.12466803193092346, -0.35159510374069214, 0.038258038461208344, 0.004620257765054703, -0.14376772940158844, -0.2055475413799286, 0.2674568295478821, 0.446582168340683, -0.16141286492347717, -0.3993702530860901, 0.07139379531145096, -0.017341211438179016, -0.33483198285102844, -0.2631742060184479, 0.3340449035167694, 0.052225515246391296, -0.518365740776062, -0.09259043633937836, -0.12972450256347656, 0.40315327048301697, -0.26574742794036865, -0.3339001536369324, 0.3003409504890442, 0.06765166670084, -0.22141733765602112, 0.3181125521659851, -0.396844744682312, -0.1473347246646881, -0.2791081964969635, -0.12106736749410629, -0.15482336282730103, -0.6240267157554626, 0.1361127644777298, 0.17354023456573486, 0.45682230591773987, -0.04876430332660675, 0.1495240330696106, 0.1556360125541687, -0.04252910614013672, 0.34120771288871765, 0.16516827046871185, 0.31197696924209595, 0.31864339113235474, 0.3356914520263672, 0.08319166302680969, -0.25478166341781616, 0.37566837668418884, -0.027399152517318726, -0.21273934841156006, 0.38958656787872314, 0.059905312955379486, -0.22885949909687042, -0.12770265340805054, -0.1800573468208313, -0.30491796135902405, -0.04357049614191055, -0.22001664340496063, -0.19133511185646057, -0.08325330168008804, 0.224624902009964, 0.3975697159767151, 0.0006999373435974121, -0.11591728031635284, 0.0042764656245708466, 0.0272914320230484, 0.11277076601982117, 0.007455756887793541, -0.1231146901845932, -0.2056858241558075, 0.12326711416244507, 0.25218355655670166, -0.21219956874847412, 0.4180154502391815, 0.04515860602259636, -0.009738130494952202, 0.04324718192219734, -0.061841752380132675, 0.33638057112693787, 0.10824161767959595, 0.18739479780197144, 0.16635513305664062, 0.29251712560653687, -0.3721613585948944, -0.27990010380744934, 0.029968757182359695, 0.05265702307224274, 0.3983989953994751, -0.24954921007156372, 0.03456277400255203, 0.15667025744915009, 0.15289509296417236, -0.24421891570091248, -0.39428600668907166, -0.39825838804244995, -0.525050938129425, -0.06740815192461014, 0.07311977446079254, -0.21327847242355347, -0.08598285913467407, -0.04576864093542099, 0.03692016005516052, -0.22668947279453278, -0.09521342068910599, -0.20533201098442078, 0.11773225665092468, 0.36156585812568665, 0.17255154252052307, -0.13220909237861633, 0.38318300247192383, 0.05722258612513542, 0.4139151871204376, 0.013375189155340195, 0.26560771465301514, -0.001959100365638733, 0.1644229292869568, 0.01575532555580139, -0.13113616406917572, -0.021649576723575592, 0.011956021189689636, -0.11180668324232101, 0.14196613430976868, 0.07806567847728729, -0.0004626065492630005, -0.2904468774795532, -0.23819996416568756, 0.19093815982341766, 0.29209285974502563, 0.1383163034915924, -0.2242971956729889, 0.5193617939949036, -0.26954787969589233, -0.3641127943992615, 0.14062879979610443, 0.1554797887802124, 0.04879622906446457, 0.4307953715324402, 0.521987795829773, 0.775236964225769, 0.02495068684220314, -0.19947397708892822, 0.023231059312820435, -0.5342609882354736, 0.22769346833229065, 0.1881096214056015, 0.0658886581659317, -0.3278447091579437, -0.02220924198627472, 0.04158223420381546, 0.051227789372205734, 0.08640177547931671, -0.07821044325828552, -0.23843815922737122, 0.24361352622509003, -0.06143132597208023, 0.241866335272789, 0.1969994306564331, -0.4235359728336334, 0.048317719250917435, 0.20416976511478424, 0.07956467568874359, 0.16673336923122406, 0.05051083862781525, 0.24431493878364563, -0.13791868090629578, 0.04341023042798042, 0.013646434992551804, -0.03385263681411743, -0.2221970409154892, -0.06916015595197678, -0.06499649584293365, -0.17926639318466187, 0.5730497241020203, 0.04419122636318207, -0.14023521542549133, 0.3558788597583771, 0.7642990946769714, 0.03354458138346672, -0.13019120693206787, 0.2423318773508072, 0.035023994743824005, 0.13537545502185822, -0.024363156408071518, -0.03339299187064171, 0.38631144165992737, -0.16369928419589996, -0.2512899339199066, -0.05706559866666794, 0.2584723234176636, 0.13363926112651825, -0.5338663458824158, 0.18520843982696533, 0.1505410075187683, -0.06883592903614044, 0.2695313096046448, -0.37627553939819336, 0.4878804683685303, -0.33133664727211, 0.16497118771076202, -0.04747150093317032, 0.1532198190689087, 0.27492430806159973, -0.26332300901412964, -0.11573629826307297, -0.24743695557117462, 0.04086202383041382, 0.12184262275695801, 0.43155473470687866, 0.23133033514022827, -0.1939183473587036, 0.009841453284025192, -0.1758001148700714, 0.17534282803535461, 0.12736262381076813, 0.1977408528327942, -0.10554229468107224, -0.1823628842830658, -0.38721010088920593, -0.11938521265983582, 0.41479891538619995, 0.35922545194625854, 0.102310411632061, -0.06352744251489639, -0.45720165967941284, -0.011847802437841892, 0.170110285282135, -0.2586513161659241, 0.02496209554374218, 0.04140210151672363, -0.009909916669130325, 0.04542311280965805, 0.472785621881485, -0.29465609788894653, -0.2848924696445465, -0.14373479783535004, -0.11454084515571594, -0.07920172065496445, -0.15563756227493286, -0.06097257509827614, 0.013185065239667892, 0.08099360764026642, -0.25462663173675537, -0.09117810428142548, -0.13494622707366943, -0.23785072565078735, 0.07599668949842453, 0.1858254373073578, 0.13576188683509827, -0.2410285770893097, -0.09685731679201126, -0.052846770733594894, -0.03841060400009155, -0.08517253398895264, -0.1401199996471405, 0.17089006304740906, 0.5099930763244629, -0.2567969858646393, -0.06652706116437912, -0.0687679871916771, 0.1167856901884079, 0.16966849565505981, -0.09223233163356781, 0.060390714555978775, -0.024142079055309296, -0.03748146817088127, -0.09158492088317871, -0.09868825227022171, 0.11595979332923889, -0.302684485912323, 0.025762051343917847, 0.12229183316230774, -0.18050901591777802, 0.23523154854774475, 0.013228069990873337, 0.06678516417741776, -0.041105255484580994, -0.06709478795528412, -0.16205137968063354, -0.06094402074813843, 0.17951227724552155, -0.36090153455734253, -0.2859722077846527, -0.5163059830665588, 0.07936638593673706, -0.025765597820281982, 0.16782675683498383, 0.09591621160507202, -0.12927943468093872, -0.08631008863449097, -0.04901893436908722, 0.14146491885185242, -0.08609941601753235, -0.09712797403335571, 0.16564679145812988, -0.1560973972082138, 0.05254442244768143, 0.3499756455421448, 0.051284149289131165, 0.008799910545349121, 0.668077290058136, -0.03681530803442001, 0.2858695387840271, 0.3955477774143219, 0.16174715757369995, -0.023624084889888763, 0.05408808961510658, 0.7669578194618225, 0.746368408203125, 0.06612497568130493, -0.07790277153253555, 0.13202615082263947, -0.1819620430469513, 0.06649400293827057, -0.3291188180446625, -0.3671012222766876, -0.2042684257030487, -0.14627119898796082, -0.25673726201057434, -0.7162509560585022, -0.15720349550247192, 0.024505332112312317, -0.15849736332893372, -0.20331351459026337, -0.1467432975769043, -0.1335706263780594, 0.010622072964906693, -0.27287518978118896, -0.06993336230516434, -0.3388298749923706, 0.31554725766181946, -0.02428373694419861, -0.09996393322944641, 0.4305458068847656, -0.02344498038291931, 0.2384318858385086, 0.4121885597705841, 0.20023629069328308, 0.18856848776340485, 0.39591386914253235, -0.34547993540763855, 0.08068079501390457, -0.0005046706646680832, -0.2542780935764313, 0.03888123109936714, 0.17940789461135864, -0.13216786086559296, 0.4886130690574646, 0.24901710450649261, 0.05780870467424393, -0.06443178653717041, 0.24688228964805603, 0.04448755830526352, 0.735316812992096, -0.31022411584854126, 0.0769420862197876, -0.25479570031166077, 0.019819721579551697, 0.1025855764746666, 0.00896676629781723, -0.24939510226249695, -0.21082451939582825, -0.10927680134773254, 0.01354806125164032, 0.15337571501731873, 0.1415676474571228, 0.11175563931465149, -0.11675924062728882, 0.3674061596393585, 0.009289395064115524, 0.37630653381347656, -0.2092629224061966, 0.033728599548339844, -0.6373873949050903, 0.00887276977300644, 0.332772433757782, 0.09586900472640991, 0.22323398292064667, -0.03962690383195877, 0.13147056102752686, 0.31735628843307495, 0.23484763503074646, 0.41742590069770813, -0.00005270354449748993, -0.3034650385379791, -0.5666861534118652, -0.11907520890235901, 0.24426357448101044, 0.15386570990085602, -0.007622884586453438, -0.06591378897428513, 0.3218994140625, 0.09298282116651535, 0.01822112500667572, 0.3179987072944641, -0.3438114821910858, 0.26344266533851624, 0.07506042718887329, 0.1002882719039917, 0.2569549083709717, 0.03464929014444351, 0.0482901930809021, -0.09144081175327301, 0.05132696032524109, 0.08391459286212921, -0.32726094126701355, -0.19086036086082458, -0.1339074671268463, 0.45773231983184814, 0.16185571253299713, -0.10289996862411499, 0.07809703052043915, 0.15821555256843567, 0.19925066828727722, -0.30025774240493774, -0.30784904956817627, 0.21935035288333893, 0.26223325729370117, 0.09816652536392212, -0.0249890498816967, 0.07752981036901474, 0.01793665811419487, 0.30353501439094543, -0.2655318081378937, -0.14245782792568207, 0.4916682839393616, -0.5384703278541565, 0.24424438178539276, -0.016452062875032425, 0.49954840540885925, 0.176241934299469, -0.13709329068660736, -0.10338646173477173, -0.11875781416893005, 0.3682960569858551, -0.16111117601394653, -0.12322773039340973, 0.08270531892776489, -0.031024344265460968, 0.1907951831817627, -0.017549268901348114, 0.15479350090026855, 0.31637123227119446, -0.16366039216518402, 0.32705047726631165, -0.14998644590377808 ]
https://github.com/huggingface/datasets/issues/2503
SubjQA wrong boolean values in entries
I have: - opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3 - written an email to all the paper authors
## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4
19
SubjQA wrong boolean values in entries ## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4 I have: - opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3 - written an email to all the paper authors
[ 0.17107394337654114, 0.05873548984527588, 0.04421229287981987, 0.09914502501487732, -0.31854403018951416, -0.10435990989208221, 0.09934596717357635, 0.024408072233200073, -0.14664684236049652, 0.22348622977733612, -0.06140289455652237, 0.38401180505752563, 0.22751623392105103, 0.22797365486621857, -0.2728487253189087, 0.11014159023761749, 0.24796953797340393, 0.16666114330291748, -0.07002191245555878, -0.18006150424480438, -0.4520643651485443, 0.2599632441997528, -0.6040436029434204, -0.04053156077861786, -0.12444360554218292, -0.23899239301681519, -0.1235726997256279, -0.1611761450767517, -0.31973332166671753, -0.26847928762435913, 0.022894257679581642, -0.0024614371359348297, -0.07069587707519531, 0.11735334992408752, -0.00011124740558443591, -0.19526755809783936, 0.07515165209770203, 0.017668036743998528, -0.2246207892894745, 0.08561104536056519, -0.19559791684150696, -0.0928516611456871, -0.22468584775924683, 0.04008869081735611, -0.32616564631462097, -0.4419412612915039, -0.20200198888778687, -0.21903680264949799, 0.3537076711654663, 0.025561552494764328, 0.14170262217521667, 0.015804976224899292, -0.11255273967981339, 0.2566843032836914, 0.3405126929283142, -0.2426411658525467, -0.10258200019598007, 0.24941912293434143, -0.01945500820875168, -0.045755334198474884, 0.1129647046327591, 0.3713187873363495, 0.10744814574718475, 0.09997677803039551, 0.08085639774799347, -0.0649048462510109, -0.0014373436570167542, -0.2529065012931824, 0.2693755328655243, 0.22898045182228088, 0.32893097400665283, -0.14686259627342224, -0.45845991373062134, -0.09658276289701462, -0.08553241193294525, -0.09768065810203552, 0.27906671166419983, 0.038284484297037125, 0.11279627680778503, -0.026403415948152542, 0.1741400957107544, 0.40218761563301086, 0.08610057830810547, -0.011823482811450958, -0.11401881277561188, 0.11758995056152344, -0.17911995947360992, -0.042810723185539246, -0.11246715486049652, -0.13376034796237946, -0.04953157529234886, 0.010883606038987637, -0.6033576130867004, 0.12035372853279114, -0.4970487952232361, -0.023889286443591118, 0.03688054531812668, 0.11412672698497772, -0.14819088578224182, -0.37020039558410645, 0.3033159673213959, -0.05320963263511658, 0.20162688195705414, 0.21209874749183655, 0.5167779922485352, 0.2139936238527298, 0.37682467699050903, -0.2153894305229187, -0.05886176973581314, -0.2195379137992859, 0.06174929067492485, 0.01863757148385048, 0.1607973873615265, -0.28326135873794556, 0.036087702959775925, 0.04941808804869652, 0.1375553458929062, -0.2750588655471802, -0.5347524881362915, 0.1172761619091034, -0.408518522977829, -0.035644084215164185, 0.1520290970802307, 0.08247210830450058, 0.052299294620752335, -0.21827825903892517, -0.1242639571428299, -0.014275208115577698, -0.18097266554832458, -0.46639156341552734, -0.10261212289333344, -0.01267540454864502, -0.24218972027301788, 0.0704667940735817, 0.009585157036781311, -0.005173450335860252, -0.03266135975718498, 0.36104607582092285, -0.17920617759227753, -0.23111462593078613, -0.04554475471377373, -0.31920385360717773, 0.2102462351322174, 0.156630277633667, -0.2575691342353821, 0.17693690955638885, 0.018460439518094063, -0.0885852724313736, 0.011378355324268341, 0.3068143129348755, 0.1314316987991333, 0.2160138040781021, -0.026499399915337563, 0.1529013216495514, -0.048831403255462646, -0.019424818456172943, 0.1305796355009079, 0.3427821099758148, 0.22957366704940796, 0.07665807008743286, 0.09789956361055374, -0.1246003806591034, -0.10844659805297852, -0.12016624957323074, -0.007498043589293957, 0.093076691031456, -0.5938060879707336, -0.09565568715333939, 0.0028285752050578594, 0.2563053369522095, 0.006007730960845947, 0.16146256029605865, 0.23525740206241608, 0.32175305485725403, 0.10386697947978973, -0.06968250125646591, -0.2798696458339691, 0.17832909524440765, -0.45631861686706543, 0.10512290149927139, 0.43662142753601074, -0.12204421311616898, -0.22182661294937134, 0.20335744321346283, 0.14728887379169464, 0.07212432473897934, 0.1484612226486206, 0.06065722927451134, 0.09197687357664108, -0.09786304831504822, -0.42956000566482544, -0.018879227340221405, -0.046156108379364014, 0.19466689229011536, -0.18814228475093842, -0.06674974411725998, 0.07512255012989044, -0.44976648688316345, 0.13885915279388428, 0.20895607769489288, -0.29696446657180786, 0.06513173878192902, 0.4925535023212433, -0.4521820545196533, 0.2907610237598419, 0.028489038348197937, 0.14246708154678345, 0.18904709815979004, -0.4601028561592102, 0.01877899467945099, 0.5386308431625366, -0.0874890387058258, -0.2166932225227356, 0.0964653342962265, 0.07628629356622696, -0.18289715051651, 0.12644091248512268, 0.09423784911632538, -0.32069429755210876, 0.04401120916008949, -0.2463478147983551, -0.07239525765180588, 0.11738507449626923, -0.05388210341334343, 0.16549399495124817, -0.12312884628772736, -0.08289982378482819, 0.010214780457317829, 0.5004788637161255, 0.33100250363349915, 0.447600394487381, 0.08240064233541489, -0.0840766653418541, 0.17008233070373535, 0.09187044948339462, -0.09969492256641388, -0.14697128534317017, -0.21267227828502655, -0.14874659478664398, -0.045117415487766266, 0.017673492431640625, 0.5685975551605225, -0.09613513201475143, 0.35595595836639404, 0.11582398414611816, 0.42052847146987915, 0.06816712766885757, -0.15105080604553223, -0.29873591661453247, 0.17341609299182892, -0.015857703983783722, -0.21662580966949463, -0.23649781942367554, -0.35148587822914124, 0.1823425143957138, 0.07841670513153076, -0.11229769885540009, 0.22937102615833282, 0.2149413824081421, 0.24027866125106812, 0.3250097930431366, -0.1460169106721878, 0.3074643313884735, -0.1975395679473877, 0.01359555870294571, -0.06153464317321777, 0.23450620472431183, 0.38914600014686584, 0.04157707095146179, 0.1550026834011078, -0.116053506731987, -0.08614908158779144, -0.13979074358940125, -0.031043782830238342, 0.16612738370895386, 0.203679159283638, -0.2768191397190094, -0.05340879410505295, 0.04035603627562523, 0.13672566413879395, -0.1804143786430359, 0.7738114595413208, -0.06619614362716675, 0.06290975958108902, -0.2841642498970032, 0.4080078899860382, -0.32623669505119324, -0.3555268347263336, 0.06515207141637802, -0.5793985724449158, 0.04299047589302063, -0.187652125954628, 0.4197404980659485, -0.34219616651535034, -0.37113186717033386, 0.3845452070236206, 0.43214598298072815, 0.7168489694595337, -0.08357613533735275, 0.19793102145195007, 0.03557860851287842, -0.001288128551095724, -0.5488743782043457, 0.07042050361633301, -0.00140280369669199, -0.2150142937898636, 0.027291040867567062, -0.13567835092544556, -0.09082727134227753, 0.039735097438097, -0.26626208424568176, 0.10433165729045868, 0.0013374313712120056, 1.0558439493179321, -0.27241554856300354, -0.15387871861457825, -0.10185381770133972, 0.15663328766822815, -0.0917656272649765, 0.16927048563957214, -0.008325895294547081, 0.13735373318195343, -0.1299723982810974, -0.17731636762619019, -0.12177768349647522, -0.3256247639656067, 0.12159983813762665, -0.007337510585784912, -0.17553183436393738, -0.22549615800380707, 0.2760756015777588, 0.49579527974128723, -0.09907689690589905, -0.37690258026123047, 0.08173758536577225, -0.028282811865210533, -0.2469940334558487, -0.22657281160354614, 0.34887662529945374, 0.06404218822717667, -0.5016040205955505, -0.09533783793449402, -0.1688266396522522, 0.4532336890697479, -0.29416513442993164, -0.26071467995643616, 0.3030189275741577, 0.10405790060758591, -0.21909788250923157, 0.38391077518463135, -0.3634411096572876, -0.1291668713092804, -0.3180087208747864, -0.1227654293179512, -0.15398690104484558, -0.6412755250930786, 0.1094343364238739, 0.17283210158348083, 0.4949537217617035, 0.0312016773968935, 0.12308825552463531, 0.21590104699134827, -0.11577440798282623, 0.41569754481315613, 0.18083754181861877, 0.29635685682296753, 0.3292669951915741, 0.31505081057548523, 0.1459970325231552, -0.31845027208328247, 0.4076511561870575, -0.01314014196395874, -0.22255364060401917, 0.39155489206314087, 0.10710006207227707, -0.2039831131696701, -0.12519794702529907, -0.23200027644634247, -0.29300954937934875, -0.09539026021957397, -0.22250065207481384, -0.17375516891479492, -0.08045832067728043, 0.1478118896484375, 0.4191000759601593, 0.018586985766887665, -0.04964350163936615, 0.007255947217345238, 0.06531435251235962, 0.16361775994300842, -0.03732216730713844, -0.06494984030723572, -0.14528921246528625, 0.0865941196680069, 0.22246189415454865, -0.1967712640762329, 0.4460461139678955, 0.09817618131637573, 0.06125321984291077, 0.04297645017504692, -0.07205235213041306, 0.2515117824077606, 0.08199916779994965, 0.19023357331752777, 0.18134045600891113, 0.22191044688224792, -0.3612627387046814, -0.255458801984787, 0.04540820047259331, 0.03734995052218437, 0.43113136291503906, -0.3206872344017029, -0.04649681970477104, 0.15787142515182495, 0.10755844414234161, -0.3169368505477905, -0.3542117476463318, -0.43492400646209717, -0.5650662779808044, -0.07006850093603134, 0.09108448773622513, -0.2530287206172943, -0.06877996772527695, -0.0058949971571564674, 0.044295065104961395, -0.26593872904777527, -0.04599853605031967, -0.27911579608917236, 0.08034372329711914, 0.3241609036922455, 0.13752880692481995, -0.18151608109474182, 0.38983359932899475, 0.08327196538448334, 0.3620140254497528, -0.019157880917191505, 0.22223931550979614, -0.004175029695034027, 0.1461881548166275, 0.0003618057817220688, -0.10016752779483795, -0.025740794837474823, -0.04710365831851959, -0.14575964212417603, 0.17568087577819824, 0.13809961080551147, 0.005161866545677185, -0.2981783151626587, -0.22800248861312866, 0.18839924037456512, 0.29183030128479004, 0.19234463572502136, -0.19860178232192993, 0.5775855183601379, -0.2535889744758606, -0.32387620210647583, 0.16436021029949188, 0.16832789778709412, 0.05285459756851196, 0.3784893751144409, 0.4539310038089752, 0.6912428140640259, 0.03400144726037979, -0.26502087712287903, 0.0035183224827051163, -0.49625468254089355, 0.1727016717195511, 0.19545626640319824, 0.1080075055360794, -0.3301399052143097, 0.0022258805111050606, 0.03196430206298828, 0.05545932427048683, 0.11384519934654236, -0.12017716467380524, -0.24935714900493622, 0.22814089059829712, -0.0764818862080574, 0.2382533699274063, 0.2021414041519165, -0.41768962144851685, 0.029619302600622177, 0.1498800814151764, 0.0613115094602108, 0.13912691175937653, 0.07934040576219559, 0.27108991146087646, -0.13775211572647095, 0.009885425679385662, 0.008247103542089462, -0.012412246316671371, -0.2050173580646515, -0.11988085508346558, -0.06365308165550232, -0.21084029972553253, 0.6007064580917358, 0.04969058930873871, -0.16215667128562927, 0.3443549573421478, 0.7612625956535339, 0.04146016761660576, -0.16905365884304047, 0.18092910945415497, -0.006354711949825287, 0.05393999442458153, -0.052357736974954605, -0.02423004060983658, 0.389932781457901, -0.16006362438201904, -0.2672141194343567, -0.03542342036962509, 0.2512821555137634, 0.12086224555969238, -0.4943598210811615, 0.16661234200000763, 0.16270224750041962, -0.050437070429325104, 0.33896002173423767, -0.38111433386802673, 0.44135263562202454, -0.3024432957172394, 0.1571768969297409, 0.0596398301422596, 0.1861143559217453, 0.2916506230831146, -0.24864782392978668, -0.031085502356290817, -0.22505564987659454, 0.008632674813270569, 0.07058985531330109, 0.44746050238609314, 0.1469642072916031, -0.19633205235004425, 0.0011981688439846039, -0.13529404997825623, 0.16031712293624878, 0.10215485095977783, 0.29375800490379333, -0.08954893797636032, -0.17349955439567566, -0.3739546537399292, -0.11345066875219345, 0.4546181261539459, 0.33249711990356445, 0.034906379878520966, -0.0810137540102005, -0.42791426181793213, 0.009793682023882866, 0.1897893249988556, -0.3191971182823181, -0.018634606152772903, 0.05350048094987869, -0.0060308538377285, 0.12077516317367554, 0.4614458978176117, -0.27349627017974854, -0.330218106508255, -0.18409223854541779, -0.13643167912960052, -0.0317591167986393, -0.1606331467628479, -0.06491552293300629, 0.019515104591846466, 0.058275312185287476, -0.23661725223064423, -0.05807613581418991, -0.11019007116556168, -0.2381671518087387, 0.07389315217733383, 0.22229167819023132, 0.1310155689716339, -0.2087090164422989, -0.10665497928857803, -0.0951598584651947, -0.06504147499799728, -0.11916510760784149, -0.16715872287750244, 0.17840778827667236, 0.5427195429801941, -0.31804564595222473, -0.0727732703089714, -0.09465619921684265, 0.13490912318229675, 0.178376704454422, -0.1064399927854538, 0.04572390019893646, -0.019569359719753265, -0.06045681983232498, -0.07339165359735489, -0.14290575683116913, 0.10149554908275604, -0.32491767406463623, -0.03240703046321869, 0.17913535237312317, -0.1792757660150528, 0.25571975111961365, -0.0481329970061779, 0.06875146925449371, -0.10878227651119232, -0.08069834113121033, -0.10582953691482544, -0.0837048813700676, 0.15772755444049835, -0.2939201295375824, -0.27514708042144775, -0.578019380569458, 0.08106283843517303, 0.025917697697877884, 0.2421540468931198, 0.06582039594650269, -0.1607862114906311, -0.11544729769229889, -0.08428576588630676, 0.12616805732250214, -0.07432882487773895, -0.16997936367988586, 0.10356743633747101, -0.1424228698015213, 0.062213197350502014, 0.40216824412345886, 0.016279704868793488, 0.01141870766878128, 0.6619749069213867, 0.006464160978794098, 0.27066951990127563, 0.3829728662967682, 0.1991983950138092, -0.07448234409093857, 0.14420998096466064, 0.7489559650421143, 0.7794597744941711, 0.08778057992458344, -0.15469491481781006, 0.09226243197917938, -0.24610131978988647, 0.06894031167030334, -0.2604275643825531, -0.3266122043132782, -0.19211210310459137, -0.1099599227309227, -0.23577351868152618, -0.7090876698493958, -0.14794427156448364, 0.06147800385951996, -0.22989453375339508, -0.1654641479253769, -0.1609172523021698, -0.13097445666790009, -0.016616471111774445, -0.24930091202259064, -0.03429543972015381, -0.30711913108825684, 0.3857828378677368, 0.0257285013794899, -0.09131020307540894, 0.40633049607276917, -0.07809601724147797, 0.27093833684921265, 0.336843341588974, 0.21801748871803284, 0.20856426656246185, 0.41077330708503723, -0.3620153069496155, 0.034245606511831284, 0.0007551833987236023, -0.2595653235912323, 0.058556221425533295, 0.21096330881118774, -0.17156696319580078, 0.5173906087875366, 0.1891726404428482, 0.04025929421186447, -0.057114120572805405, 0.23974159359931946, 0.05731194093823433, 0.7155687808990479, -0.3011632561683655, 0.11964019387960434, -0.24803659319877625, 0.041365548968315125, 0.08410163968801498, 0.008914299309253693, -0.2025248408317566, -0.18393662571907043, -0.1601080745458603, -0.025551334023475647, 0.13918322324752808, 0.09682412445545197, 0.09958774596452713, -0.05796769633889198, 0.3223215639591217, -0.043169062584638596, 0.4640347361564636, -0.20752248167991638, 0.05188967287540436, -0.5853189826011658, -0.09002325683832169, 0.32769840955734253, 0.03664003312587738, 0.2794473469257355, 0.03110981546342373, 0.10667100548744202, 0.4072139859199524, 0.23938460648059845, 0.43122628331184387, -0.005529852584004402, -0.3166007399559021, -0.5569552779197693, -0.14639462530612946, 0.22378037869930267, 0.11291536688804626, -0.027798660099506378, -0.10044660419225693, 0.3361705541610718, 0.07467217743396759, 0.0399961918592453, 0.3453143239021301, -0.2967599332332611, 0.254128634929657, 0.0569518506526947, 0.11006574332714081, 0.27016279101371765, -0.022424839437007904, 0.06595595926046371, -0.15218299627304077, 0.000219736248254776, 0.18629752099514008, -0.30424439907073975, -0.26314717531204224, -0.10383893549442291, 0.458238810300827, 0.1468832790851593, -0.13425713777542114, 0.05560578405857086, 0.1960706114768982, 0.23312591016292572, -0.3619263470172882, -0.2265969067811966, 0.21750660240650177, 0.3137882947921753, 0.08977048099040985, -0.05263683944940567, 0.023625638335943222, -0.04884420335292816, 0.29053282737731934, -0.31442731618881226, -0.18012036383152008, 0.438824862241745, -0.5293763875961304, 0.29066282510757446, -0.009794440120458603, 0.5312716960906982, 0.16587519645690918, -0.13086135685443878, -0.11093543469905853, -0.09465881437063217, 0.3302757740020752, -0.1105710044503212, -0.15255777537822723, 0.024437274783849716, 0.011988739483058453, 0.1898101568222046, 0.0036701373755931854, 0.13433827459812164, 0.26341697573661804, -0.09793472290039062, 0.34156370162963867, -0.13247892260551453 ]
https://github.com/huggingface/datasets/issues/2499
Python Programming Puzzles
Thanks @VictorSanh! There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles
## Adding a Dataset - **Name:** Python Programming Puzzles - **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis - **Paper:** https://arxiv.org/pdf/2106.05784.pdf - **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md)) - **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs. Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
17
Python Programming Puzzles ## Adding a Dataset - **Name:** Python Programming Puzzles - **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis - **Paper:** https://arxiv.org/pdf/2106.05784.pdf - **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md)) - **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs. Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Thanks @VictorSanh! There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles
[ -0.0690370723605156, -0.1561274528503418, -0.27598676085472107, -0.05275098234415054, -0.0006475262343883514, 0.07016491144895554, 0.01956295222043991, 0.2562187612056732, 0.0034627094864845276, 0.1276414841413498, 0.03861634433269501, 0.30958110094070435, -0.3876292407512665, 0.35757485032081604, 0.23318053781986237, -0.3480176031589508, -0.04252953082323074, -0.004456877708435059, -0.09909237921237946, 0.04900147020816803, -0.19246768951416016, 0.25098979473114014, -0.14735044538974762, -0.07994647324085236, 0.045998744666576385, -0.26552075147628784, -0.18279461562633514, 0.21184483170509338, -0.09623149037361145, -0.39951711893081665, -0.3597230911254883, 0.03805316239595413, -0.15061518549919128, 0.35618796944618225, -0.00009468572534387931, -0.44835764169692993, 0.15807190537452698, -0.03283208981156349, -0.4988933205604553, -0.052306294441223145, 0.13603630661964417, -0.23787130415439606, -0.1941978931427002, -0.17235437035560608, -0.11471787840127945, -0.010592392645776272, -0.0551275759935379, -0.35614702105522156, 0.48664939403533936, 0.2586367428302765, 0.37447652220726013, 0.2904420793056488, 0.22130556404590607, -0.03797270730137825, 0.14925694465637207, -0.1286344677209854, -0.15743565559387207, 0.20816902816295624, 0.5029330253601074, -0.18218691647052765, -0.010411038994789124, 0.05055665969848633, 0.09698241949081421, -0.12749220430850983, 0.05704817920923233, -0.27809861302375793, 0.09931503981351852, -0.5485329627990723, -0.14642831683158875, 0.10038699209690094, 0.13504008948802948, -0.11401451379060745, -0.25436607003211975, -0.38783809542655945, -0.021434836089611053, -0.11347193270921707, -0.3032557964324951, 0.20306137204170227, -0.22278481721878052, 0.018185267224907875, 0.041617993265390396, -0.13411417603492737, -0.01699037477374077, -0.09636810421943665, 0.09128284454345703, 0.21312564611434937, -0.022630061954259872, -0.16266483068466187, 0.10816971957683563, -0.11937527358531952, -0.152706578373909, 0.031442441046237946, 0.11352044343948364, 0.23475052416324615, -0.08680853247642517, -0.2609754204750061, 0.27085787057876587, 0.12392327934503555, 0.017795797437429428, 0.33556514978408813, 0.14806365966796875, -0.006074678152799606, 0.37733080983161926, -0.10289599746465683, 0.10933348536491394, 0.09280005097389221, -0.1637730598449707, -0.01967272348701954, -0.0344468429684639, 0.11256711184978485, -0.29221922159194946, 0.08856287598609924, -0.08669421076774597, -0.102369025349617, 0.05634605512022972, 0.14421582221984863, -0.08403000980615616, 0.18208540976047516, -0.17164000868797302, 0.20336033403873444, -0.22732853889465332, 0.02991664968430996, -0.0007509198039770126, 0.010750338435173035, -0.10669022798538208, 0.02601778879761696, -0.030321476981043816, 0.05749691277742386, -0.2994653284549713, -0.005629671737551689, -0.15622515976428986, 0.058140575885772705, -0.31457409262657166, -0.17955370247364044, 0.35545894503593445, 0.08707530796527863, 0.041604794561862946, 0.16897468268871307, 0.012568969279527664, -0.28265634179115295, 0.30625319480895996, -0.004567922558635473, 0.17237842082977295, -0.017137568444013596, -0.07842734456062317, -0.3076547384262085, 0.010072950273752213, -0.2725692093372345, -0.28089895844459534, 0.13339129090309143, 0.27796855568885803, 0.04492008313536644, -0.09490172564983368, 0.38167428970336914, -0.15509061515331268, 0.10567758232355118, 0.29676690697669983, 0.3964274525642395, -0.1516932249069214, 0.31332895159721375, -0.020608775317668915, -0.1080101877450943, 0.22930166125297546, -0.17705005407333374, 0.21924729645252228, 0.2873532474040985, -0.054166533052921295, 0.09850703179836273, -0.01980634778738022, -0.02205442264676094, -0.3745414912700653, 0.15869568288326263, 0.12155930697917938, 0.46548008918762207, -0.18465931713581085, 0.0024682804942131042, 0.3773064613342285, -0.2076587975025177, 0.14594808220863342, 0.03200061619281769, -0.15309061110019684, 0.03651868551969528, 0.02532893419265747, 0.258823037147522, 0.05561757832765579, -0.0200535599142313, 0.18403935432434082, 0.3140406012535095, -0.04066188633441925, -0.08315331488847733, -0.273620069026947, 0.028845878317952156, -0.14195002615451813, 0.12714354693889618, 0.1529228538274765, -0.13475865125656128, 0.03238426148891449, -0.10647881776094437, 0.16684269905090332, -0.15404459834098816, -0.2847518026828766, 0.10165378451347351, 0.19680608808994293, 0.17047575116157532, 0.10618046671152115, -0.4948401153087616, -0.09545708447694778, -0.07822220027446747, 0.2154518961906433, 0.2092566341161728, 0.11788877099752426, -0.0678558349609375, -0.16305667161941528, 0.1954733431339264, 0.07713182270526886, -0.21470984816551208, 0.35805660486221313, -0.18309110403060913, 0.15559807419776917, -0.13124075531959534, -0.1321454495191574, 0.3327614665031433, 0.09835353493690491, -0.032826751470565796, -0.29393404722213745, 0.06508432328701019, -0.13665711879730225, -0.13229991495609283, 0.16773530840873718, 0.48086732625961304, -0.03489241749048233, 0.17651605606079102, 0.15276509523391724, 0.009135007858276367, 0.16836725175380707, -0.23243440687656403, 0.08121923357248306, 0.3387720584869385, -0.15646986663341522, -0.29681676626205444, 0.1251402050256729, 0.31889665126800537, -0.022004488855600357, 0.12813860177993774, 0.33376583456993103, 0.34329864382743835, -0.06282822787761688, 0.11985374242067337, 0.32736003398895264, 0.06079171597957611, -0.04671783000230789, -0.015749480575323105, -0.3352227807044983, -0.17809784412384033, 0.44035816192626953, -0.0038234200328588486, 0.23704297840595245, -0.07174717634916306, -0.3317883312702179, 0.18784774839878082, 0.4561132490634918, -0.029113495722413063, 0.24738824367523193, -0.1612134575843811, -0.11262688785791397, 0.058572590351104736, -0.22324949502944946, 0.21602945029735565, 0.02777329832315445, 0.3220367729663849, 0.20590868592262268, 0.22308364510536194, -0.27320748567581177, -0.23217827081680298, 0.1780884563922882, 0.06397385895252228, -0.2333124727010727, 0.18996602296829224, 0.12423527240753174, 0.11440838128328323, -0.053399186581373215, -0.28260600566864014, -0.26269274950027466, -0.08109283447265625, -0.2464054375886917, 0.22956879436969757, -0.11311045289039612, -0.19713175296783447, -0.2495611011981964, 0.012756174430251122, -0.08883380889892578, -0.4756055772304535, 0.18303769826889038, 0.11652308702468872, -0.24638055264949799, -0.039042308926582336, 0.04155440255999565, 0.285076379776001, -0.2686406373977661, 0.1312718540430069, 0.17590156197547913, -0.2556346356868744, -0.04517553001642227, 0.3335234522819519, 0.10244885087013245, 0.04517904669046402, 0.7545127272605896, -0.46078169345855713, 0.3017047643661499, -0.11645064502954483, -0.5321435332298279, 0.051770489662885666, -0.07272227108478546, 0.6607949733734131, 0.30450206995010376, -0.026543930172920227, -0.01864045485854149, -0.1703273057937622, 0.06313326954841614, -0.19592596590518951, -0.05071832984685898, -0.18483303487300873, 0.18507827818393707, -0.16056865453720093, -0.2132173627614975, -0.1860855519771576, -0.046531230211257935, -0.3705587387084961, 0.39026594161987305, 0.2063407003879547, 0.21953672170639038, 0.08112834393978119, -0.07104489952325821, 0.19067835807800293, 0.06975750625133514, 0.15497426688671112, -0.023291386663913727, -0.15199902653694153, 0.0968976765871048, -0.34748193621635437, -0.2306862324476242, -0.1915351301431656, -0.4439185857772827, 0.11477914452552795, 0.0001652287319302559, -0.015054609626531601, 0.03788512945175171, -0.081868015229702, 0.21550071239471436, -0.02635355293750763, 0.3032611310482025, -0.26004481315612793, 0.19743861258029938, -0.23453199863433838, -0.20701536536216736, -0.19314293563365936, 0.18997985124588013, 0.13692109286785126, 0.07377190887928009, -0.17568916082382202, 0.003985732793807983, -0.06460639834403992, 0.5416691303253174, 0.1444905400276184, 0.09658650308847427, 0.17752662301063538, -0.039596907794475555, 0.23683631420135498, -0.03565974533557892, -0.3107919692993164, 0.009679440408945084, 0.16471579670906067, -0.1436949074268341, 0.2343009114265442, 0.27797120809555054, -0.010675931349396706, -0.04413840174674988, 0.05268422141671181, -0.2258944809436798, -0.0388459675014019, 0.3063018023967743, -0.1587509661912918, 0.1283339560031891, -0.07370753586292267, 0.026201270520687103, -0.36117851734161377, -0.015942269936203957, -0.18707099556922913, 0.038997016847133636, 0.05052139237523079, -0.04095016047358513, 0.034764375537633896, -0.24940305948257446, -0.3102259039878845, 0.1455375999212265, 0.16858600080013275, -0.008224998600780964, 0.08123114705085754, -0.32960376143455505, -0.18159805238246918, -0.04347618296742439, 0.1425541639328003, -0.01195116899907589, -0.0785708874464035, 0.36685803532600403, 0.009608753025531769, -0.03757643699645996, -0.03097688779234886, -0.3742428719997406, -0.0176460649818182, 0.19275446236133575, 0.34190720319747925, 0.015098735690116882, 0.002715496579185128, 0.040924884378910065, 0.33115261793136597, -0.08682829886674881, -0.08995530754327774, -0.2745039463043213, -0.43786439299583435, -0.3091592490673065, 0.1035919263958931, 0.2543662488460541, 0.1961684376001358, -0.025127394124865532, -0.030761107802391052, 0.036206312477588654, -0.11057248711585999, 0.2938118577003479, 0.10535591840744019, -0.005982385016977787, -0.08220073580741882, 0.14368747174739838, -0.2420024275779724, -0.09847818315029144, -0.08506367355585098, 0.1693284809589386, -0.31311002373695374, 0.18896779417991638, 0.032941848039627075, -0.04839452728629112, 0.39211365580558777, 0.21571746468544006, 0.03492853045463562, -0.03505554795265198, -0.2584013044834137, 0.334283709526062, -0.36439982056617737, -0.0816664770245552, 0.09172024577856064, 0.2204822599887848, -0.2457791566848755, -0.3512536287307739, 0.031087074428796768, -0.1219969391822815, -0.11327318102121353, 0.125778466463089, -0.20435576140880585, -0.09378258883953094, 0.13826574385166168, 0.13940109312534332, 0.7695461511611938, -0.24238230288028717, 0.14404965937137604, 0.2465067207813263, -0.3516131639480591, 0.4781215488910675, 0.08194753527641296, 0.16433952748775482, -0.3154323101043701, -0.030869685113430023, 0.09826305508613586, -0.307647705078125, 0.12328379601240158, 0.06703633815050125, -0.1559765338897705, 0.22174079716205597, -0.1696433126926422, -0.1114574670791626, 0.07527830451726913, 0.46309763193130493, 0.017309963703155518, 0.08614300191402435, -0.4428922235965729, 0.31587764620780945, 0.052827492356300354, 0.023963037878274918, -0.2839013636112213, 0.006236393935978413, -0.13431471586227417, -0.00938800536096096, -0.3785085678100586, 0.09111287444829941, -0.10660718381404877, 0.021301526576280594, -0.015566468238830566, -0.18679773807525635, 0.2088782787322998, -0.12061633169651031, 0.32456284761428833, 0.4761960506439209, 0.09715257585048676, 0.0018040239810943604, 0.21710121631622314, -0.12325380742549896, 0.2538089454174042, 0.15272490680217743, 0.46047595143318176, -0.26438599824905396, -0.07985863089561462, -0.08529717475175858, 0.25361168384552, -0.12321539968252182, -0.3077407479286194, -0.08374015986919403, 0.07088229805231094, -0.011985346674919128, 0.047911424189805984, 0.031201843172311783, -0.1383458971977234, -0.05624927952885628, 0.29171475768089294, 0.11550241708755493, -0.12299627810716629, 0.17122921347618103, -0.043992672115564346, -0.08519358187913895, -0.012080598622560501, -0.3101012408733368, 0.0772053524851799, -0.07637820392847061, 0.18735133111476898, 0.29893913865089417, -0.19598564505577087, -0.4983994662761688, -0.02725142240524292, -0.06206640601158142, 0.027731485664844513, 0.25276076793670654, -0.10063115507364273, -0.1459800899028778, -0.011940822005271912, 0.00883878767490387, 0.2668994665145874, 0.04035850614309311, -0.041474685072898865, 0.013655528426170349, -0.2834412455558777, 0.038430217653512955, 0.1314193159341812, 0.18510392308235168, -0.3328625559806824, 0.2243737429380417, 0.1172313243150711, 0.24797506630420685, -0.550517201423645, 0.004110648296773434, -0.37281060218811035, -0.00015155784785747528, 0.07444214820861816, -0.3020959198474884, -0.4391440153121948, 0.056721750646829605, 0.3743458390235901, -0.06886298209428787, -0.42985913157463074, -0.4343462586402893, -0.2867400646209717, -0.022349849343299866, -0.2107207477092743, -0.0016587995924055576, 0.18703463673591614, 0.00861060619354248, 0.04153934121131897, -0.18803878128528595, -0.11116898059844971, -0.06760561466217041, 0.11368352174758911, 0.11139660328626633, 0.09596353024244308, 0.1404605209827423, 0.09504228830337524, 0.09878533333539963, 0.0849587693810463, 0.1962413191795349, 0.09015944600105286, 0.1185632050037384, 0.07942777872085571, 0.05074417591094971, -0.1370888501405716, 0.050243739038705826, -0.012363545596599579, 0.15064755082130432, -0.05155482143163681, 0.026763856410980225, -0.2211907058954239, 0.1216374933719635, 0.10037529468536377, 0.27757930755615234, -0.028370020911097527, -0.07336140424013138, 0.2402867078781128, 0.3897968530654907, -0.18236716091632843, 0.22771240770816803, 0.19282175600528717, -0.23482902348041534, 0.23180356621742249, 0.3255149722099304, -0.0016310885548591614, 0.024412088096141815, -0.171550914645195, -0.11442524939775467, 0.14744174480438232, 0.1806931495666504, 0.32620301842689514, 0.181906059384346, 0.15659140050411224, -0.03791293129324913, 0.04039384424686432, -0.07853814959526062, 0.051246996968984604, 0.07845044136047363, -0.10342986136674881, 0.16598880290985107, 0.23158565163612366, 0.07403405010700226, 0.21539926528930664, 0.285221129655838, 0.2542472183704376, 0.12754815816879272, 0.10800403356552124, 0.23086631298065186, 0.01851215958595276, 0.007451951503753662, -0.24531762301921844, 0.08218863606452942, -0.07528477162122726, 0.277900755405426, -0.2056855857372284, -0.07192409783601761, 0.3132881224155426, -0.2913525104522705, -0.23427151143550873, -0.11080914735794067, 0.05240847170352936, -0.28130120038986206, -0.008915193378925323, -0.006207689642906189, 0.25536030530929565, -0.11429956555366516, -0.1499311327934265, 0.005470309406518936, 0.3869015872478485, -0.21557828783988953, 0.14327867329120636, 0.1367817521095276, 0.13424766063690186, 0.02536453865468502, 0.17625132203102112, 0.44407135248184204, 0.12538349628448486, -0.4179985821247101, 0.07757674902677536, -0.21725930273532867, -0.06951849907636642, -0.22134199738502502, 0.1724792718887329, 0.11156854033470154, 0.1996084600687027, 0.2587202191352844, 0.2700963616371155, -0.30194365978240967, -0.2827019691467285, 0.058990418910980225, -0.3771442770957947, -0.2978944480419159, 0.38688692450523376, -0.10451272130012512, -0.14540648460388184, -0.04395381361246109, 0.10120177268981934, -0.48623162508010864, -0.1802123337984085, 0.34348970651626587, -0.08491630107164383, -0.05050551891326904, -0.05942894145846367, 0.19330209493637085, -0.0597740076482296, 0.5083765983581543, 0.3308286964893341, 0.660435140132904, -0.09874117374420166, -0.12566472589969635, -0.5089102983474731, 0.027406543493270874, -0.06791293621063232, -0.20852819085121155, -0.028837453573942184, 0.15557728707790375, 0.024219661951065063, 0.23061315715312958, -0.020453810691833496, 0.2452186644077301, -0.11695525795221329, -0.05531715601682663, -0.42030489444732666, 0.2021092027425766, 0.09667407721281052, -0.07897493988275528, -0.002382121980190277, -0.015794500708580017, -0.04222825542092323, -0.2822074294090271, 0.2868260443210602, -0.04805564135313034, 0.0356837660074234, 0.28776904940605164, 0.044380754232406616, 0.1415066421031952, 0.10299550741910934, 0.35271260142326355, -0.014393413439393044, -0.5512962937355042, -0.041004959493875504, -0.03390337899327278, -0.11009253561496735, 0.1887824833393097, 0.2182329297065735, 0.2595933973789215, -0.06300793588161469, -0.0017135106027126312, 0.08189307153224945, 0.11975803226232529, 0.2425083965063095, 0.15262940526008606, -0.023106029257178307, -0.06923860311508179, 0.19910183548927307, -0.027071507647633553, 0.07715127617120743, 0.4572694003582001, -0.17054793238639832, 0.13092322647571564, -0.08836308866739273, -0.23117007315158844, 0.25165778398513794, -0.16412346065044403, -0.40075233578681946, -0.2591991424560547, 0.18494845926761627, 0.04761038348078728, 0.11286840587854385, -0.49099841713905334, -0.07920750975608826, 0.26596781611442566, -0.10396458953619003, -0.01582304574549198, 0.44360804557800293, -0.198533833026886, 0.03223636373877525, 0.02468714490532875, 0.03524906933307648, -0.17054077982902527, 0.003469964489340782, -0.03746117651462555, -0.22899548709392548 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
22
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now: ```python import pyarrow as pa # I used pyarrow 3.0.0 import numpy as np n, max_length = 1_000, 512 low, high, size = 0, 2 << 16, (n, max_length) table = pa.Table.from_pydict({ "input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist() }) %%timeit _ = table.to_pandas()["input_ids"].to_numpy() # 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_pandas().to_numpy() # 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_numpy() # 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) ``` Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here: https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166 Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
150
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now: ```python import pyarrow as pa # I used pyarrow 3.0.0 import numpy as np n, max_length = 1_000, 512 low, high, size = 0, 2 << 16, (n, max_length) table = pa.Table.from_pydict({ "input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist() }) %%timeit _ = table.to_pandas()["input_ids"].to_numpy() # 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_pandas().to_numpy() # 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_numpy() # 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) ``` Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here: https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166 Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Sounds like a plan @lhoestq If you create a PR I'll pick it up and try it out right away!
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
20
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. Sounds like a plan @lhoestq If you create a PR I'll pick it up and try it out right away!
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing?
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
46
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing?
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
> I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing? @thomwolf starting from the top, each rectangle represents the cumulative amount of it takes to execute the method call. Therefore, format_batch in torch_formatter.py takes ~20 sec, and the largest portion of that call is taken by to_pandas call and the smaller portion (grey rectangle) by the other method invocation(s) in format_batch (series_to_numpy etc). Features of the dataset are BERT pre-training model input columns i.e: ``` f = Features({ "input_ids": Sequence(feature=Value(dtype="int32")), "attention_mask": Sequence(feature=Value(dtype="int8")), "token_type_ids": Sequence(feature=Value(dtype="int8")), "labels": Sequence(feature=Value(dtype="int32")), "next_sentence_label": Value(dtype="int8") }) ``` I'll work with @lhoestq till we get to the bottom of this one.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
140
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. > I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing? @thomwolf starting from the top, each rectangle represents the cumulative amount of it takes to execute the method call. Therefore, format_batch in torch_formatter.py takes ~20 sec, and the largest portion of that call is taken by to_pandas call and the smaller portion (grey rectangle) by the other method invocation(s) in format_batch (series_to_numpy etc). Features of the dataset are BERT pre-training model input columns i.e: ``` f = Features({ "input_ids": Sequence(feature=Value(dtype="int32")), "attention_mask": Sequence(feature=Value(dtype="int8")), "token_type_ids": Sequence(feature=Value(dtype="int8")), "labels": Sequence(feature=Value(dtype="int32")), "next_sentence_label": Value(dtype="int8") }) ``` I'll work with @lhoestq till we get to the bottom of this one.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@lhoestq the proposed branch is faster, but overall training speedup is a few percentage points. I couldn't figure out how to include the GitHub branch into setup.py, so I couldn't start NVidia optimized Docker-based pre-training run. But on bare metal, there is a slight improvement. I'll do some more performance traces.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
51
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. @lhoestq the proposed branch is faster, but overall training speedup is a few percentage points. I couldn't figure out how to include the GitHub branch into setup.py, so I couldn't start NVidia optimized Docker-based pre-training run. But on bare metal, there is a slight improvement. I'll do some more performance traces.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Hi @vblagoje, to install Datasets from @lhoestq PR reference #2505, you can use: ```shell pip install git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head#egg=datasets ```
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
18
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. Hi @vblagoje, to install Datasets from @lhoestq PR reference #2505, you can use: ```shell pip install git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head#egg=datasets ```
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Hey @albertvillanova yes thank you, I am aware, I can easily pull it from a terminal command line but then I can't automate docker image builds as dependencies are picked up from setup.py and for some reason setup.py doesn't accept this string format.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
43
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. Hey @albertvillanova yes thank you, I am aware, I can easily pull it from a terminal command line but then I can't automate docker image builds as dependencies are picked up from setup.py and for some reason setup.py doesn't accept this string format.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@vblagoje in that case, you can add this to your `setup.py`: ```python install_requires=[ "datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head", ```
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
17
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. @vblagoje in that case, you can add this to your `setup.py`: ```python install_requires=[ "datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head", ```
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@lhoestq @thomwolf @albertvillanova The new approach is definitely faster, dataloader now takes less than 3% cumulative time (pink rectangle two rectangles to the right of tensor.py backward invocation) ![Screen Shot 2021-06-16 at 3 05 06 PM](https://user-images.githubusercontent.com/458335/122224432-19de4700-ce82-11eb-982f-d45d4bcc1e41.png) When we drill down into dataloader next invocation we get: ![Screen Shot 2021-06-16 at 3 09 56 PM](https://user-images.githubusercontent.com/458335/122224976-a1c45100-ce82-11eb-8d40-59194740d616.png) And finally format_batch: ![Screen Shot 2021-06-16 at 3 11 07 PM](https://user-images.githubusercontent.com/458335/122225132-cae4e180-ce82-11eb-8a16-967ab7c1c2aa.png) Not sure this could be further improved but this is definitely a decent step forward.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
80
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. @lhoestq @thomwolf @albertvillanova The new approach is definitely faster, dataloader now takes less than 3% cumulative time (pink rectangle two rectangles to the right of tensor.py backward invocation) ![Screen Shot 2021-06-16 at 3 05 06 PM](https://user-images.githubusercontent.com/458335/122224432-19de4700-ce82-11eb-982f-d45d4bcc1e41.png) When we drill down into dataloader next invocation we get: ![Screen Shot 2021-06-16 at 3 09 56 PM](https://user-images.githubusercontent.com/458335/122224976-a1c45100-ce82-11eb-8d40-59194740d616.png) And finally format_batch: ![Screen Shot 2021-06-16 at 3 11 07 PM](https://user-images.githubusercontent.com/458335/122225132-cae4e180-ce82-11eb-8a16-967ab7c1c2aa.png) Not sure this could be further improved but this is definitely a decent step forward.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
> ```python > datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head > ``` @albertvillanova how would I replace datasets dependency in https://github.com/huggingface/transformers/blob/master/setup.py as the above approach is not working.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
24
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. > ```python > datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head > ``` @albertvillanova how would I replace datasets dependency in https://github.com/huggingface/transformers/blob/master/setup.py as the above approach is not working.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@vblagoje I tested my proposed approach before posting it here and it worked for me. Is it not working in your case because of the SSH protocol? In that case you could try the same approach but using HTTPS: ``` "datasets @ git+https://github.com/huggingface/datasets.git@refs/pull/2505/head", ```
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
44
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. @vblagoje I tested my proposed approach before posting it here and it worked for me. Is it not working in your case because of the SSH protocol? In that case you could try the same approach but using HTTPS: ``` "datasets @ git+https://github.com/huggingface/datasets.git@refs/pull/2505/head", ```
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@albertvillanova of course it works. Apologies. I needed to change datasets in all deps references , like [here](https://github.com/huggingface/transformers/blob/master/setup.py#L235) for example.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
20
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. @albertvillanova of course it works. Apologies. I needed to change datasets in all deps references , like [here](https://github.com/huggingface/transformers/blob/master/setup.py#L235) for example.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Is time spent casting an issue here? See https://github.com/huggingface/datasets/issues/4676 that Datasets can spend huge amounts of time repeatedly casting to Python objects.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
22
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. Is time spent casting an issue here? See https://github.com/huggingface/datasets/issues/4676 that Datasets can spend huge amounts of time repeatedly casting to Python objects.
[ -0.35013535618782043, -0.2402973175048828, -0.07366806268692017, 0.19035674631595612, 0.10275395959615707, 0.147706538438797, 0.25998932123184204, 0.686816930770874, -0.12113088369369507, -0.06411954760551453, -0.3566415309906006, 0.24314069747924805, -0.11459917575120926, -0.033221568912267685, 0.066335529088974, -0.3101113438606262, 0.0007658973336219788, 0.1003079041838646, -0.06789608299732208, -0.1308620721101761, -0.10192358493804932, -0.4241635799407959, 0.05567806959152222, -0.23089276254177094, -0.17646485567092896, 0.14338861405849457, -0.07297028601169586, 0.004990372806787491, -0.014778077602386475, -0.3914085626602173, -0.016802698373794556, 0.20411241054534912, 0.19163796305656433, 0.23665592074394226, -0.00010873939754674211, -0.021962247788906097, 0.10556340962648392, 0.029854970052838326, -0.30945587158203125, 0.2616170644760132, 0.32627180218696594, -0.3157905042171478, 0.0545600950717926, -0.20534153282642365, -0.46221548318862915, -0.20446549355983734, -0.011553643271327019, -0.30791789293289185, 0.04370948672294617, 0.03249482810497284, 0.15432798862457275, 0.2567405700683594, -0.3000167906284332, 0.1878044754266739, 0.32916274666786194, 0.4852655529975891, -0.17528611421585083, 0.09861968457698822, 0.30015212297439575, 0.029168179258704185, -0.5153074860572815, 0.6179620027542114, -0.17225749790668488, -0.03250300511717796, 0.17719486355781555, 0.06036921590566635, -0.24245613813400269, -0.11645017564296722, -0.0824211910367012, 0.40601933002471924, 0.03252508491277695, -0.24458983540534973, -0.5007594227790833, -0.44535091519355774, -0.030952826142311096, -0.5959247350692749, -0.10014709085226059, 0.11138797551393509, -0.2834429442882538, 0.1466880589723587, -0.0680336207151413, 0.03688110411167145, -0.12036453187465668, -0.0961361825466156, -0.054758843034505844, 0.2587929666042328, 0.24107301235198975, -0.2225959300994873, 0.09051382541656494, 0.19611413776874542, 0.455800324678421, -0.11577953398227692, 0.2760978639125824, -0.004553115926682949, -0.3522314131259918, -0.16664156317710876, -0.023671694099903107, -0.18670833110809326, -0.15297433733940125, -0.0668884664773941, 0.12648016214370728, 0.5531219840049744, -0.09119198471307755, -0.019700437784194946, -0.23726171255111694, 0.037559956312179565, -0.10326062887907028, 0.21059156954288483, 0.19669963419437408, -0.11868079751729965, 0.06776455044746399, 0.19367563724517822, -0.0780167356133461, -0.04930725693702698, -0.31201061606407166, 0.1427365243434906, -0.48154568672180176, -0.08429019898176193, -0.1862221658229828, 0.025211069732904434, -0.13065528869628906, -0.13334991037845612, 0.040961384773254395, 0.3111969530582428, -0.2863073945045471, 0.19483348727226257, 0.1680845320224762, -0.1474616676568985, -0.24756133556365967, -0.2679261267185211, 0.051194217056035995, 0.1703956574201584, -0.2893528938293457, 0.006973340641707182, 0.20332002639770508, -0.24583062529563904, -0.09343093633651733, -0.07095491886138916, 0.07478595525026321, 0.38876020908355713, 0.020032266154885292, -0.22809633612632751, 0.47664573788642883, -0.027102220803499222, -0.06796292960643768, 0.013655973598361015, 0.18137021362781525, 0.5773722529411316, -0.27960944175720215, 0.15739959478378296, -0.19168278574943542, -0.20621590316295624, -0.15920816361904144, 0.1019589975476265, 0.0700446218252182, 0.007335048168897629, 0.06688413769006729, 0.342428058385849, 0.1331910789012909, 0.07672059535980225, 0.12647244334220886, -0.2490813285112381, -0.33565962314605713, -0.11782281845808029, 0.3001018464565277, 0.30322423577308655, -0.1989409327507019, -0.047386541962623596, 0.47587311267852783, 0.34417885541915894, 0.4220879077911377, 0.4858780801296234, -0.3000441789627075, 0.11796896159648895, -0.02902478724718094, 0.007255785167217255, 0.37165841460227966, -0.3697828948497772, -0.1297079175710678, 0.348444402217865, 0.07491263747215271, 0.270839661359787, 0.16083963215351105, 0.19488351047039032, 0.40462979674339294, -0.005936804693192244, 0.07297472655773163, 0.3954887390136719, 0.00822007842361927, -0.049947213381528854, -0.4824647605419159, -0.17390595376491547, 0.44338148832321167, 0.39572620391845703, 0.05743426829576492, -0.3865261971950531, -0.11886393278837204, -0.10473932325839996, 0.4031054973602295, -0.32271772623062134, 0.14574812352657318, 0.10898648202419281, -0.17205949127674103, 0.15341344475746155, 0.01517363078892231, 0.21905425190925598, -0.11219491809606552, 0.22420945763587952, -0.3645498752593994, 0.37964627146720886, 0.04791213199496269, -0.1950644850730896, 0.32316839694976807, -0.03614525496959686, -0.003983315080404282, -0.2554195523262024, 0.04070783406496048, -0.04461812973022461, -0.20460247993469238, 0.025376450270414352, 0.042445871978998184, 0.3719468414783478, -0.2666931748390198, 0.11531214416027069, -0.2319294959306717, 0.11067287623882294, 0.05290638655424118, -0.052873414009809494, -0.053453460335731506, 0.2816496789455414, 0.06500977277755737, -0.04305141046643257, -0.07917782664299011, 0.12981697916984558, -0.13434167206287384, 0.2028237283229828, -0.2158796489238739, 0.1773771196603775, 0.41850370168685913, -0.12596231698989868, 0.29379621148109436, 0.17013849318027496, -0.024879150092601776, -0.12089459598064423, -0.42238351702690125, 0.7661337852478027, 0.48354801535606384, 0.15578439831733704, -0.11615736037492752, -0.2186770737171173, -0.22210384905338287, 0.14841748774051666, 0.05606972426176071, 0.08440384268760681, 0.5234328508377075, 0.13681933283805847, 0.17340417206287384, 0.08097922056913376, -0.4177882969379425, 0.3712823987007141, 0.34115755558013916, 0.005134373903274536, -0.1374356746673584, 0.43637099862098694, -0.07853900641202927, -0.36627888679504395, 0.33803778886795044, -0.5506459474563599, -0.005099356174468994, 0.2330392599105835, 0.2333677113056183, 0.023532524704933167, -0.017760109156370163, -0.031464193016290665, 0.09837663918733597, 0.01054999977350235, -0.05427755042910576, 0.012683626264333725, 0.2190360724925995, 0.2533145546913147, -0.07325098663568497, -0.09442077577114105, -0.13242991268634796, 0.023658273741602898, -0.1572207510471344, 0.12378544360399246, -0.41272076964378357, -0.10316628962755203, -0.15537585318088531, -0.33626848459243774, -0.07054473459720612, -0.1799100637435913, 0.030074216425418854, 0.1377861648797989, -0.028504841029644012, 0.1710873395204544, 0.021794117987155914, 0.04697394371032715, 0.05702982842922211, -0.22337716817855835, -0.1739785522222519, -0.19699877500534058, -0.03078455477952957, 0.03385371342301369, 0.14755862951278687, -0.03262893110513687, 0.3699895739555359, -0.0069352248683571815, 0.1059635803103447, 0.0763375461101532, -0.27659276127815247, 0.04859500750899315, -0.13361136615276337, -0.2551213800907135, 0.0496092364192009, -0.12589730322360992, -0.22807784378528595, -0.12080172449350357, 0.09727275371551514, 0.001779431477189064, 0.058723896741867065, -0.15536536276340485, -0.09026368707418442, 0.1817818433046341, -0.019236182793974876, -0.22558057308197021, -0.24595899879932404, -0.3073497414588928, -0.04960602521896362, -0.16775648295879364, 0.1565372347831726, -0.20418621599674225, -0.028364401310682297, 0.13088327646255493, 0.208224818110466, 0.045659564435482025, 0.023680776357650757, -0.4292769432067871, 0.4179672300815582, -0.23069337010383606, -0.1688782125711441, -0.4011097252368927, -0.020250635221600533, 0.00005054473876953125, 0.3673454523086548, -0.44723135232925415, 0.21421462297439575, -0.06474299728870392, 0.18625742197036743, -0.2460256814956665, -0.11651848256587982, 0.1445493996143341, 0.24861560761928558, -0.09356934577226639, 0.008099891245365143, 0.07200425863265991, -0.1541757881641388, -0.23297956585884094, 0.10221587121486664, -0.07459955662488937, 0.3041978180408478, 0.3246072828769684, 0.6840352416038513, -0.06172320246696472, -0.34579282999038696, 0.10292690992355347, 0.12350213527679443, 0.1042313426733017, -0.09333708137273788, -0.23231463134288788, 0.12217589467763901, -0.2074720561504364, 0.3181700110435486, 0.32999563217163086, -0.05358637124300003, -0.21739207208156586, -0.013857614248991013, -0.2203790247440338, 0.14594653248786926, -0.24291996657848358, 0.6411696076393127, -0.4819491505622864, 0.28053736686706543, -0.09434431791305542, 0.4774987995624542, -0.26721876859664917, -0.23835021257400513, 0.2915060222148895, -0.006822727620601654, 0.2728032171726227, -0.17760123312473297, 0.10382361710071564, -0.17983509600162506, -0.4914884567260742, 0.24443551898002625, 0.3847653567790985, 0.19534772634506226, 0.03308891877532005, -0.012956909835338593, 0.19633451104164124, -0.056744590401649475, 0.265669047832489, 0.006643337197601795, -0.17947010695934296, 0.16527752578258514, -0.5235351920127869, -0.19511979818344116, 0.009396780282258987, -0.003670506179332733, -0.07097093015909195, -0.07673598825931549, 0.27617037296295166, -0.11872384697198868, -0.3965090215206146, 0.2941378355026245, -0.053548600524663925, -0.05985292047262192, -0.0008520791307091713, 0.051536332815885544, -0.01145661249756813, -0.12476171553134918, 0.1667717695236206, 0.0765727087855339, -0.010712411254644394, -0.21172720193862915, -0.05749550461769104, -0.11023309826850891, 0.28598272800445557, 0.3494955897331238, 0.02554624155163765, -0.10263841599225998, 0.021712586283683777, 0.11759762465953827, 0.07751601934432983, 0.3361061215400696, 0.47614020109176636, 0.07305538654327393, -0.37654125690460205, 0.04651934280991554, -0.034541625529527664, -0.09407062828540802, 0.21856006979942322, 0.5431826710700989, 0.09415297955274582, 0.35724708437919617, -0.2959465980529785, 0.003149084746837616, -0.44047287106513977, 0.1241222620010376, 0.07991033792495728, 0.016460798680782318, -0.5305212736129761, -0.5308511853218079, 0.444913774728775, 0.0952892005443573, -0.007360115647315979, 0.3080020546913147, -0.1986234039068222, -0.17226599156856537, 0.43405812978744507, 0.46194130182266235, 1.0132720470428467, 0.01846322789788246, 0.43711650371551514, 0.07837994396686554, -0.3031275272369385, -0.010950582101941109, -0.6706626415252686, 0.24126484990119934, -0.3993288576602936, -0.22910545766353607, -0.016653431579470634, 0.020677994936704636, 0.1523990035057068, -0.0672573521733284, 0.02059009298682213, 0.03182290866971016, 0.15620552003383636, 0.09961524605751038, -0.05272211134433746, 0.18215849995613098, 0.2133350968360901, -0.7044999003410339, -0.20400385558605194, 0.11375071108341217, 0.09074972569942474, 0.11755815148353577, -0.048960231244564056, -0.2579951882362366, -0.1663823127746582, 0.19056636095046997, -0.1383577585220337, -0.0450621023774147, -0.21009515225887299, 0.09555225819349289, -0.26390719413757324, -0.8112199306488037, 0.3461895287036896, 0.11804471909999847, 0.17771145701408386, 0.11023235321044922, 0.008975643664598465, 0.12762340903282166, 0.1128096878528595, 0.3375873267650604, 0.19162233173847198, -0.37790703773498535, 0.3423674702644348, -0.018887920305132866, 0.003991909325122833, 0.20391342043876648, 0.045379165560007095, -0.18854957818984985, -0.03059139847755432, -0.04270634055137634, 0.2833443284034729, -0.16243065893650055, 0.08990618586540222, -0.11142154037952423, -0.05001645162701607, -0.2463737428188324, 0.11213356256484985, 0.1338968575000763, -0.09504085779190063, 0.24689215421676636, -0.004864320158958435, -0.26272767782211304, -0.2601155638694763, 0.5095310211181641, 0.15353670716285706, -0.11777045577764511, 0.16912677884101868, 0.3207579255104065, -0.5200849175453186, -0.15202566981315613, 0.21273711323738098, 0.45299649238586426, -0.3142906427383423, -0.1394714117050171, -0.1035793274641037, -0.0857297033071518, -0.09491001814603806, -0.11065228283405304, -0.08580201864242554, -0.17949897050857544, -0.10170064121484756, 0.1357046365737915, -0.4016150236129761, -0.08848145604133606, -0.20727969706058502, 0.26217496395111084, 0.00598469004034996, 0.45047780871391296, -0.20523619651794434, 0.25692227482795715, -0.3582397401332855, -0.11573690921068192, 0.18900153040885925, 0.2031720131635666, -0.12233233451843262, 0.11050392687320709, 0.10153313726186752, 0.23654717206954956, 0.047012776136398315, 0.380615770816803, -0.013310659676790237, -0.14378446340560913, -0.21117320656776428, 0.13594482839107513, -0.16302436590194702, -0.20400391519069672, 0.18534496426582336, 0.07138188928365707, -0.23784029483795166, -0.39862769842147827, 0.20836398005485535, 0.12159576267004013, 0.07943011075258255, 0.2650214433670044, 0.17490628361701965, 0.14563506841659546, -0.011683011427521706, 0.16143600642681122, 0.04361133649945259, 0.35005688667297363, -0.1312401294708252, -0.033134594559669495, -0.1547236144542694, -0.18167628347873688, 0.019409360364079475, 0.16297763586044312, 0.4281507134437561, 0.0954226404428482, 0.3320983946323395, 0.027959465980529785, 0.02676517143845558, -0.1860634833574295, 0.3409811854362488, -0.0844903290271759, -0.06208132952451706, -0.26387330889701843, 0.3456558585166931, 0.13651558756828308, -0.09071392565965652, -0.06269500404596329, -0.13555428385734558, -0.41723325848579407, 0.15794391930103302, 0.18290190398693085, 0.5511476993560791, 0.45522260665893555, 0.16137713193893433, -0.06117423623800278, 0.041216302663087845, -0.21577590703964233, -0.16084380447864532, 0.47340914607048035, 0.2522919178009033, -0.015894297510385513, 0.2946062684059143, 0.06074816361069679, 0.17286483943462372, 0.1979295015335083, 0.1669103503227234, 0.5242636203765869, 0.44370192289352417, 0.22663292288780212, -0.16032573580741882, -0.28039127588272095, -0.27607014775276184, 0.07497578114271164, 0.09504012018442154, 0.43415433168411255, -0.16329559683799744, 0.26831427216529846, -0.012611751444637775, -0.46388953924179077, 0.18484920263290405, 0.5748337507247925, -0.24232518672943115, -0.07486450672149658, 0.21023701131343842, -0.019163966178894043, -0.3495028018951416, 0.09301388263702393, -0.10507242381572723, -0.07510069012641907, -0.015653543174266815, 0.31382042169570923, 0.03484100103378296, 0.019151393324136734, 0.11644354462623596, -0.16677358746528625, 0.43281489610671997, -0.21308816969394684, -0.05874673277139664, 0.03408139944076538, 0.005026616156101227, -0.06483446061611176, -0.05554938316345215, 0.2003885805606842, -0.09766389429569244, -0.377140611410141, -0.037999775260686874, -0.2076570838689804, 0.11538094282150269, 0.17506656050682068, 0.08639439940452576, -0.04718655347824097, -0.22251252830028534, 0.3377091884613037, 0.027160605415701866, -0.18818064033985138, 0.06818091869354248, 0.021009668707847595, -0.07886151969432831, -0.06442379951477051, 0.19694802165031433, 0.36741864681243896, -0.17136526107788086, -0.21732649207115173, -0.36840859055519104, -0.2444450855255127, -0.19971606135368347, 0.5486776828765869, -0.08734657615423203, -0.03353323042392731, 0.0955938845872879, 0.10148170590400696, 0.08621729910373688, 0.6552402377128601, 0.08003950119018555, 0.10044179856777191, -0.30571654438972473, -0.10018055140972137, -0.01984734833240509, -0.03477732092142105, -0.03033236786723137, -0.13634371757507324, 0.06632112711668015, -0.03536369651556015, 0.25373053550720215, -0.016054999083280563, -0.06540656089782715, -0.19823895394802094, 0.25221696496009827, 0.3421795666217804, -0.3151411712169647, 0.19319483637809753, -0.5118893980979919, 0.15018172562122345, -0.12944376468658447, -0.22087684273719788, 0.21895365417003632, 0.20186597108840942, 0.0827888771891594, -0.28309834003448486, -0.15040868520736694, 0.22019019722938538, 0.12713462114334106, 0.46971395611763, -0.09937406331300735, 0.03842354193329811, -0.1637730896472931, -0.2426309883594513, -0.11561602354049683, 0.1785312443971634, -0.1564403772354126, 0.178885817527771, 0.1588069200515747, 0.3668152391910553, 0.112052783370018, -0.5914252400398254, -0.2831098139286041, 0.636210560798645, 0.12189440429210663, -0.133390411734581, -0.1297861635684967, 0.3011380136013031, -0.1914132535457611, -0.008940200321376324, 0.11733834445476532, 0.3214929401874542, 0.40397027134895325, 0.1156478077173233, -0.6210431456565857, -0.2591521143913269, 0.3328733444213867, -0.20742852985858917, -0.07195904850959778, -0.15970183908939362, -0.07992079854011536, 0.26900529861450195, 0.5017653703689575, -0.7551463842391968, -0.1231006607413292, 0.12834131717681885, 0.09595770388841629, -0.09908135235309601, 0.325020432472229, 0.32278668880462646, 0.03672604635357857, -0.30050528049468994, -0.03767704218626022, -0.15676084160804749, -0.016945205628871918, -0.3125460743904114, -0.29178178310394287 ]
https://github.com/huggingface/datasets/issues/2494
Improve docs on Enhancing performance
Hi @albertvillanova, I hope you are doing well. I am interested in this issue, is this still unresolved and open ? The link you have provided in the above message directs to a webpage that does not exist. Thanks and Regards
In the ["Enhancing performance"](https://huggingface.co/docs/datasets/loading_datasets.html#enhancing-performance) section of docs, add specific use cases: - How to make datasets the fastest - How to make datasets take the less RAM - How to make datasets take the less hard drive mem cc: @thomwolf
41
Improve docs on Enhancing performance In the ["Enhancing performance"](https://huggingface.co/docs/datasets/loading_datasets.html#enhancing-performance) section of docs, add specific use cases: - How to make datasets the fastest - How to make datasets take the less RAM - How to make datasets take the less hard drive mem cc: @thomwolf Hi @albertvillanova, I hope you are doing well. I am interested in this issue, is this still unresolved and open ? The link you have provided in the above message directs to a webpage that does not exist. Thanks and Regards
[ 0.14003606140613556, -0.25421860814094543, -0.18044649064540863, 0.5229966640472412, -0.008908968418836594, 0.21884113550186157, -0.02222604677081108, 0.09890609979629517, -0.054346244782209396, 0.20887164771556854, 0.22724103927612305, 0.029515771195292473, 0.09634371846914291, 0.22705607116222382, 0.3726135790348053, -0.28210705518722534, 0.16862908005714417, 0.11994194984436035, 0.04334287345409393, 0.01532050222158432, -0.05238797515630722, -0.0660271868109703, -0.32839328050613403, -0.2728903293609619, -0.342789888381958, -0.06980500370264053, 0.059453949332237244, 0.1726456880569458, -0.24755547940731049, -0.29235684871673584, 0.012375125661492348, 0.2854730784893036, 0.037726499140262604, 0.15996459126472473, -0.00011523711873451248, -0.18639522790908813, 0.18287481367588043, 0.04344622790813446, -0.44857847690582275, 0.2874027192592621, -0.041082561016082764, -0.2026369273662567, -0.13970062136650085, -0.1665721833705902, -0.20099371671676636, 0.08323942124843597, -0.20250166952610016, -0.3678033649921417, 0.07048460841178894, 0.3602803349494934, 0.16117659211158752, 0.6441189050674438, -0.08017648756504059, -0.26620930433273315, 0.10500217974185944, 0.2810603976249695, -0.3510737121105194, 0.348762571811676, 0.6045701503753662, 0.01745573803782463, -0.022299565374851227, 0.446791410446167, 0.04714185744524002, 0.014928317628800869, 0.3608602285385132, -0.012451504357159138, -0.00661294162273407, -0.03745070844888687, 0.2596004605293274, 0.052637334913015366, 0.791197657585144, 0.15407098829746246, -0.41538065671920776, -0.37921637296676636, 0.13228674232959747, -0.26880738139152527, 0.1301846206188202, -0.2631183862686157, 0.04957764223217964, 0.19520772993564606, -0.32673221826553345, -0.40751633048057556, -0.09824569523334503, 0.15758708119392395, 0.11980915069580078, -0.06879837810993195, -0.3620840311050415, -0.24008303880691528, 0.27531471848487854, -0.25192391872406006, -0.17003171145915985, 0.10064586251974106, 0.24714642763137817, -0.00731456745415926, -0.038663383573293686, -0.12518543004989624, 0.03911115229129791, 0.11553886532783508, 0.31093984842300415, -0.0628233551979065, 0.41058287024497986, 0.06394647806882858, 0.08821731060743332, 0.0695444718003273, -0.12005864083766937, 0.05324165150523186, 0.05608111247420311, -0.04671281948685646, 0.2099514752626419, 0.46266719698905945, 0.08470042049884796, -0.024297654628753662, -0.1913078874349594, 0.022851325571537018, -0.21670520305633545, -0.13855424523353577, -0.028051987290382385, -0.3270973861217499, -0.24527157843112946, 0.1415194422006607, 0.12089221924543381, -0.10324608534574509, 0.08137938380241394, 0.39034321904182434, 0.1636846959590912, 0.020846504718065262, 0.10078166425228119, 0.15194576978683472, -0.5582358241081238, -0.24549223482608795, -0.12829692661762238, 0.2590419352054596, -0.43752968311309814, 0.5137224793434143, 0.33771252632141113, 0.20644676685333252, -0.006417372263967991, 0.09636688977479935, 0.08630150556564331, -0.07687703520059586, -0.14536716043949127, 0.0248710960149765, -0.0266355499625206, 0.1984272599220276, -0.27415385842323303, 0.1252882480621338, 0.025114065036177635, 0.15486015379428864, -0.15070798993110657, 0.16525854170322418, -0.32333508133888245, -0.47083407640457153, -0.2566739022731781, 0.16239923238754272, 0.03392605483531952, -0.2974988520145416, -0.37052348256111145, 0.5350146889686584, -0.13408112525939941, -0.17392174899578094, 0.11967192590236664, 0.30870091915130615, -0.45111629366874695, -0.08737601339817047, 0.3004007041454315, 0.16422100365161896, -0.07166764885187149, -0.1226319819688797, -0.06812692433595657, 0.11056818068027496, -0.013839341700077057, 0.34850895404815674, -0.1817852407693863, 0.248212069272995, -0.22922229766845703, -0.16440677642822266, 0.3641994893550873, -0.3773808479309082, -0.40963587164878845, -0.16845455765724182, -0.07454907894134521, 0.252646267414093, 0.25167223811149597, -0.24630028009414673, 0.2770155072212219, 0.06892524659633636, -0.04113435000181198, 0.11718309670686722, 0.11241951584815979, -0.17643049359321594, -0.3476288318634033, -0.2161332666873932, -0.02540096640586853, 0.1696331948041916, 0.2234954982995987, 0.07131391763687134, -0.05692475289106369, -0.12505419552326202, 0.15382222831249237, -0.22465503215789795, 0.17869703471660614, 0.17879368364810944, 0.02645232155919075, 0.05057160556316376, 0.06209518015384674, -0.06365060806274414, -0.5427767038345337, 0.28295889496803284, 0.12520575523376465, -0.14515838027000427, 0.11595582216978073, -0.16742105782032013, -0.2646569311618805, -0.22400310635566711, 0.2636561393737793, -0.3836718499660492, 0.06567369401454926, -0.03569236397743225, 0.03370476886630058, -0.1360805481672287, -0.19496364891529083, 0.16868996620178223, -0.506463885307312, 0.11239782720804214, -0.05232859030365944, 0.2905431091785431, 0.07973093539476395, -0.17123563587665558, -0.03743375837802887, 0.06948278844356537, -0.046160727739334106, 0.0024268976412713528, -0.28796619176864624, 0.006795119494199753, 0.017797918990254402, 0.3942338228225708, 0.4522881805896759, 0.5922377705574036, 0.1750328540802002, -0.13376116752624512, 0.2032788246870041, 0.028254764154553413, 0.046602968126535416, 0.11694527417421341, -0.5899415016174316, 0.10116884112358093, -0.005642309784889221, 0.2576759457588196, 0.20802919566631317, -0.10242635756731033, -0.04649669677019119, -0.06892846524715424, 0.0011569559574127197, -0.14088395237922668, 0.11956824362277985, 0.15514948964118958, 0.41180840134620667, -0.026417361572384834, -0.36689049005508423, 0.30517277121543884, 0.23861394822597504, -0.08235765993595123, -0.1405549943447113, 0.401500403881073, 0.11907947063446045, -0.2274317741394043, 0.19608712196350098, -0.2884799838066101, 0.13051307201385498, 0.3111947774887085, 0.3086104691028595, 0.06022575497627258, 0.2567100524902344, -0.006603836081922054, 0.3182506859302521, 0.0697338804602623, -0.12284038215875626, 0.12084969878196716, -0.09050744026899338, 0.016275839880108833, -0.23274856805801392, 0.04015571251511574, 0.03414594382047653, 0.12190047651529312, -0.6750867962837219, -0.26741838455200195, -0.15380418300628662, -0.02584657073020935, 0.09041973948478699, -0.20884276926517487, -0.07320259511470795, 0.05738665908575058, -0.04422710835933685, 0.31220924854278564, -0.15866251289844513, 0.008428843691945076, 0.006747137755155563, 0.8062492609024048, -0.10699445009231567, 0.18102119863033295, -0.15306098759174347, 0.13720177114009857, -0.2034721076488495, 0.15949876606464386, 0.1441412717103958, 0.16336525976657867, 0.44323596358299255, -0.3749428391456604, 0.2901265621185303, -0.5436667203903198, -0.31979870796203613, -0.10932193696498871, 0.038806311786174774, 0.34569403529167175, -0.03838986158370972, 0.2688087821006775, -0.46459949016571045, -0.051256511360406876, 0.24939456582069397, -0.2694275677204132, 0.08293405175209045, -0.5331903696060181, 0.007791227661073208, 0.0691644549369812, -0.09318742901086807, -0.48827049136161804, 0.15367361903190613, -0.5459272861480713, 0.19651266932487488, -0.1494472324848175, 0.2080756425857544, -0.2403479963541031, 0.09630658477544785, 0.4782574772834778, -0.04337521642446518, 0.3147850036621094, -0.27858486771583557, -0.6681486368179321, 0.14689302444458008, -0.17258495092391968, -0.2623440623283386, -0.005555100739002228, 0.020954761654138565, -0.039666492491960526, 0.13055691123008728, -0.17962786555290222, 0.04551185294985771, -0.06844845414161682, 0.13381294906139374, -0.16599445044994354, 0.15214453637599945, 0.413442462682724, -0.4229860305786133, -0.13156409561634064, -0.29560747742652893, -0.5080504417419434, 0.0065100789070129395, -0.13458561897277832, 0.09020517766475677, -0.04019950330257416, 0.07400359213352203, 0.07723580300807953, 0.6314695477485657, 0.002271275967359543, 0.11767284572124481, 0.30815768241882324, 0.16520678997039795, 0.1388949155807495, -0.029671527445316315, -0.2933802008628845, 0.021136870607733727, -0.056889623403549194, -0.10696854442358017, 0.28539150953292847, 0.27645307779312134, 0.239083930850029, 0.0427212193608284, -0.2039983570575714, -0.33469879627227783, -0.23108309507369995, 0.25472596287727356, 0.06008067727088928, 0.2178197205066681, -0.14822453260421753, -0.01951681450009346, -0.36827364563941956, 0.36834830045700073, -0.0019776932895183563, 0.4660065770149231, 0.30591416358947754, -0.17173190414905548, -0.2969760000705719, 0.18567603826522827, -0.43703752756118774, 0.28281572461128235, 0.04868702217936516, 0.24668268859386444, -0.16201342642307281, 0.13461115956306458, 0.1858820915222168, 0.049504030495882034, 0.5339125394821167, -0.2288254052400589, -0.3664870262145996, 0.2672850787639618, -0.33660760521888733, 0.004473751410841942, 0.10417209565639496, -0.11333887279033661, -0.05149369314312935, -0.09928463399410248, 0.5330572128295898, -0.10694907605648041, -0.4442194998264313, 0.3850623071193695, -0.21892058849334717, 0.10053928196430206, -0.2604961395263672, 0.12657208740711212, 0.0007213465869426727, -0.143502876162529, 0.3952983319759369, 0.09614676237106323, 0.1058351993560791, -0.0206172876060009, -0.08082996308803558, 0.02945234254002571, 0.011028643697500229, 0.31907862424850464, -0.05767882615327835, 0.20883271098136902, 0.12650568783283234, 0.2216331660747528, 0.2718702554702759, -0.003819029778242111, 0.3676859736442566, 0.20767487585544586, -0.31750956177711487, -0.19745704531669617, 0.13507632911205292, 0.09584702551364899, 0.3940719664096832, 0.48334354162216187, 0.07233908772468567, 0.12571877241134644, -0.0011966004967689514, 0.17420239746570587, -0.39767444133758545, 0.08976086229085922, 0.34128686785697937, -0.017614789307117462, -0.40688949823379517, -0.4200449585914612, 0.8716371655464172, 0.2803575396537781, -0.12045063078403473, 0.36583444476127625, 0.6688458323478699, -0.3463696837425232, -0.15062403678894043, 0.1631144881248474, 1.17342209815979, -0.08509916067123413, 0.2759154140949249, 0.0984291359782219, -0.30973029136657715, 0.14592494070529938, -0.17061051726341248, -0.10912130773067474, -0.03454127162694931, -0.22910411655902863, -0.050008244812488556, -0.17620660364627838, 0.43543532490730286, 0.08989450335502625, -0.2036510407924652, -0.0010006004013121128, -0.37815535068511963, 0.08087049424648285, 0.02845447137951851, 0.3840397894382477, 0.008601236157119274, -0.3575325310230255, -0.31139329075813293, 0.06179230660200119, 0.2059159129858017, 0.024831801652908325, -0.1903158724308014, 0.16783888638019562, -0.18205077946186066, -0.1632857322692871, -0.37915152311325073, -0.41014599800109863, -0.12250141054391861, -0.1791340410709381, -0.16824935376644135, -0.4028473496437073, 0.4652042090892792, 0.05867905914783478, 0.022556766867637634, 0.08821219205856323, -0.5028342008590698, 0.17246487736701965, -0.3556421101093292, -0.033568862825632095, -0.04401034861803055, -0.25352582335472107, 0.1888715624809265, -0.07405216991901398, -0.03742511570453644, -0.16416004300117493, -0.06990931183099747, -0.07394813001155853, -0.21018123626708984, -0.09711681306362152, -0.01349707692861557, -0.46328336000442505, -0.3593808710575104, -0.03622514754533768, -0.03489350527524948, -0.18364694714546204, 0.18119694292545319, 0.2376629114151001, 0.0465843640267849, 0.132827490568161, 0.23611699044704437, -0.1444689929485321, -0.1753792017698288, 0.35030195116996765, -0.03670515865087509, -0.16081058979034424, 0.1024550348520279, -0.09528743475675583, -0.32526975870132446, -0.2882676124572754, 0.004457227885723114, 0.24201996624469757, 0.1367180347442627, 0.167160302400589, 0.12928740680217743, -0.17209386825561523, -0.02833622507750988, 0.07471773028373718, 0.23928074538707733, -0.005908437073230743, 0.04932486638426781, -0.23285745084285736, -0.36924296617507935, 0.3973722457885742, -0.3579888641834259, 0.16777272522449493, -0.21741777658462524, -0.1382775902748108, 0.00228855200111866, 0.0022260379046201706, -0.35186514258384705, 0.3843528628349304, -0.08457214385271072, -0.12342765927314758, 0.4317393898963928, -0.037341661751270294, 0.200149267911911, -0.10669159889221191, 0.054762259125709534, -0.09613150358200073, -0.31568482518196106, -0.2314058542251587, -0.28784799575805664, 0.1899770200252533, -0.08770661801099777, -0.09928867220878601, 0.43958234786987305, 0.14094050228595734, -0.062430161982774734, -0.17414766550064087, 0.1231803447008133, 0.07194553315639496, 0.21086524426937103, 0.06718455255031586, -0.020670834928750992, 0.20414552092552185, -0.036576636135578156, 0.33468031883239746, 0.1844233125448227, 0.16371513903141022, -0.041910141706466675, -0.020675070583820343, -0.14010223746299744, -0.0988207682967186, 0.05865103006362915, 0.24586305022239685, 0.4726067781448364, -0.02777455747127533, 0.2456819713115692, 0.1674085259437561, 0.15819334983825684, 0.04626680910587311, 0.06962142139673233, 0.28891682624816895, -0.06061665713787079, 0.20815150439739227, 0.15863263607025146, 0.21821460127830505, 0.04293781518936157, -0.06037266179919243, -0.007251713424921036, -0.3963741958141327, 0.005149967968463898, 0.16636893153190613, 0.45172253251075745, 0.1376136839389801, -0.04908420145511627, -0.10722441226243973, 0.15312603116035461, 0.03475559502840042, 0.12893076241016388, 0.1401141732931137, 0.03225405886769295, -0.05105492100119591, 0.3866068720817566, 0.10123476386070251, 0.23257577419281006, -0.15304678678512573, -0.021200701594352722, 0.45217546820640564, 0.2848678231239319, 0.6824260354042053, -0.12354376167058945, -0.3702255189418793, 0.35638365149497986, 0.38760706782341003, -0.20194876194000244, 0.042518485337495804, -0.1838468313217163, 0.2823556661605835, -0.112889364361763, -0.15167714655399323, -0.11717525869607925, -0.01402047649025917, -0.15587741136550903, -0.32655858993530273, 0.4491620659828186, -0.3230372965335846, -0.1443939208984375, -0.15422967076301575, -0.21448177099227905, -0.15563265979290009, 0.17308473587036133, -0.2323039025068283, 0.15306325256824493, -0.0771753191947937, 0.04530264437198639, 0.16740885376930237, 0.2924550771713257, -0.31151312589645386, 0.12370555847883224, -0.2527807950973511, 0.013846039772033691, 0.0819493904709816, 0.4723770320415497, 0.4800933599472046, -0.09915558993816376, 0.11026746034622192, -0.1584957391023636, -0.16559921205043793, 0.09631314128637314, 0.15443448722362518, 0.20538026094436646, 0.0688157007098198, -0.20894818007946014, 0.08290988206863403, 0.128412127494812, -0.27346372604370117, 0.09589236974716187, -0.1618526428937912, -0.11964648962020874, -0.7112867832183838, -0.36957427859306335, -0.10691572725772858, -0.13079693913459778, -0.10845428705215454, -0.11436278373003006, 0.12493773549795151, 0.0968179777264595, 0.33770686388015747, -0.12524496018886566, -0.03657291829586029, 0.11142276972532272, 0.08962500095367432, 0.07434684038162231, 0.6388800740242004, 0.21093493700027466, 0.25908374786376953, -0.16651815176010132, -0.24917817115783691, -0.5905611515045166, -0.10442807525396347, 0.05165182799100876, -0.027986330911517143, 0.347993403673172, 0.09124639630317688, -0.09817611426115036, 0.04124251380562782, 0.461772620677948, -0.11922721564769745, 0.09225009381771088, 0.015838637948036194, -0.33751818537712097, 0.2558785378932953, -0.0054652392864227295, 0.10089130699634552, 0.03567032516002655, -0.16897156834602356, 0.19655221700668335, 0.05867547169327736, 0.01015828549861908, -0.2773522734642029, 0.4007079601287842, 0.11638042330741882, 0.38252535462379456, 0.5011314153671265, 0.11606524139642715, 0.44629520177841187, -0.05830330774188042, -0.34785884618759155, -0.4013853669166565, -0.09148969501256943, -0.006368652451783419, 0.15893563628196716, -0.01826106384396553, 0.1284252405166626, -0.23137898743152618, -0.1493067741394043, 0.05304783955216408, 0.25974151492118835, -0.09241228550672531, 0.009471755474805832, -0.13678836822509766, 0.10881537944078445, 0.10658694058656693, 0.019112421199679375, 0.15820468962192535, 0.5201456546783447, -0.11303320527076721, -0.09143882244825363, -0.42721235752105713, -0.16147424280643463, 0.4244770407676697, -0.00426767161116004, -0.17711912095546722, -0.2246381640434265, 0.4701452851295471, 0.31703636050224304, -0.06130398064851761, -0.8135512471199036, -0.34660112857818604, 0.36038482189178467, 0.09866347163915634, -0.16603006422519684, 0.48579275608062744, 0.1484130471944809, 0.019964922219514847, -0.07956363260746002, 0.4945381283760071, -0.07080908119678497, 0.0002384725958108902, -0.0810084342956543, -0.4152801036834717 ]
https://github.com/huggingface/datasets/issues/2481
Delete extracted files to save disk space
My suggestion for this would be to have this enabled by default. Plus I don't know if there should be a dedicated issue to that is another functionality. But I propose layered building rather than all at once. That is: 1. uncompress a handful of files via a generator enough to generate one arrow file 2. process arrow file 1 3. delete all the files that went in and aren't needed anymore. rinse and repeat. 1. This way much less disc space will be required - e.g. on JZ we won't be running into inode limitation, also it'd help with the collaborative hub training project 2. The user doesn't need to go and manually clean up all the huge files that were left after pre-processing 3. It would already include deleting temp files this issue is talking about I wonder if the new streaming API would be of help, except here the streaming would be into arrow files as the destination, rather than dataloaders.
As discussed with @stas00 and @lhoestq, allowing the deletion of extracted files would save a great amount of disk space to typical user.
164
Delete extracted files to save disk space As discussed with @stas00 and @lhoestq, allowing the deletion of extracted files would save a great amount of disk space to typical user. My suggestion for this would be to have this enabled by default. Plus I don't know if there should be a dedicated issue to that is another functionality. But I propose layered building rather than all at once. That is: 1. uncompress a handful of files via a generator enough to generate one arrow file 2. process arrow file 1 3. delete all the files that went in and aren't needed anymore. rinse and repeat. 1. This way much less disc space will be required - e.g. on JZ we won't be running into inode limitation, also it'd help with the collaborative hub training project 2. The user doesn't need to go and manually clean up all the huge files that were left after pre-processing 3. It would already include deleting temp files this issue is talking about I wonder if the new streaming API would be of help, except here the streaming would be into arrow files as the destination, rather than dataloaders.
[ -0.1356211155653, -0.30157917737960815, -0.1714523732662201, 0.15534155070781708, -0.07602355629205704, -0.0403156504034996, -0.12200230360031128, 0.5078594088554382, -0.07595326006412506, 0.510949432849884, 0.18390442430973053, 0.39844655990600586, -0.3721123933792114, 0.2519608438014984, -0.1107838898897171, -0.19185099005699158, -0.09776013344526291, 0.38792508840560913, 0.08525610715150833, 0.16641737520694733, -0.011336911469697952, -0.16016334295272827, 0.016019292175769806, -0.1735657900571823, -0.1610466092824936, -0.20366744697093964, 0.17428915202617645, 0.015063159167766571, -0.31645315885543823, -0.36428505182266235, -0.09835503995418549, 0.11704246699810028, 0.16184554994106293, 0.2395252287387848, -0.0001068213750841096, -0.2105756402015686, 0.18794891238212585, -0.03198699280619621, -0.3838624060153961, 0.2532769739627838, -0.0644359439611435, -0.2182496339082718, 0.020984631031751633, 0.029910020530223846, 0.11388815194368362, -0.35895007848739624, -0.009172322228550911, -0.2793229818344116, 0.6590784788131714, -0.15229547023773193, 0.2111321985721588, 0.1615835279226303, -0.3104900121688843, 0.1768413484096527, 0.01618374139070511, 0.38988083600997925, -0.34809350967407227, 0.1210867315530777, 0.4206851124763489, 0.13988617062568665, 0.032091863453388214, 0.39036014676094055, -0.06159944087266922, -0.0733969658613205, 0.5608953833580017, -0.2504018545150757, -0.0018350780010223389, -0.6491250991821289, 0.10091118514537811, 0.05914207175374031, 0.26404017210006714, -0.03024768829345703, -0.16823677718639374, -0.3032604157924652, 0.18261735141277313, -0.4667096436023712, 0.1477619707584381, 0.13485555350780487, -0.2945115268230438, 0.0794924944639206, -0.11513057351112366, -0.3061995506286621, -0.3989318311214447, -0.0596577525138855, 0.4848071038722992, -0.15651120245456696, 0.04562993720173836, -0.14605200290679932, 0.3003847897052765, 0.18411843478679657, 0.33567824959754944, -0.08329552412033081, 0.03730209544301033, 0.0891571044921875, -0.027394894510507584, -0.2479066252708435, -0.07088456302881241, -0.20191463828086853, -0.15835359692573547, 0.2543639838695526, 0.5093044638633728, 0.20726218819618225, 0.2530669569969177, 0.03607121855020523, 0.08246094733476639, 0.14074096083641052, 0.02251792699098587, -0.3135814666748047, 0.22085033357143402, 0.08109090477228165, 0.18764238059520721, -0.03581145405769348, -0.15974216163158417, 0.03855215758085251, -0.12258553504943848, -0.059242479503154755, -0.009959729388356209, 0.026474524289369583, -0.005467953160405159, -0.0316954106092453, 0.08157701045274734, 0.13492709398269653, 0.05082010477781296, -0.08022423833608627, 0.26071709394454956, 0.5838690996170044, -0.05230207368731499, 0.22845648229122162, 0.05385848879814148, -0.16589392721652985, 0.0019471445120871067, 0.04667963460087776, -0.13679462671279907, 0.12424153834581375, 0.2767365276813507, -0.1985020786523819, -0.0007487600669264793, -0.1014566496014595, 0.04452226310968399, -0.1402292251586914, 0.4040883779525757, 0.13305369019508362, 0.1663026064634323, 0.1791578233242035, -0.14524930715560913, -0.2906927168369293, -0.16341665387153625, 0.24019755423069, -0.19425152242183685, 0.3178899586200714, -0.13393452763557434, -0.41685381531715393, -0.15844446420669556, 0.24339915812015533, 0.12340989708900452, 0.3315379023551941, -0.37407350540161133, -0.002983052283525467, -0.18511828780174255, -0.006279692053794861, 0.11004048585891724, 0.2283482551574707, 0.12299048900604248, -0.12291483581066132, 0.0011526476591825485, 0.09920278936624527, -0.20826449990272522, 0.0019105970859527588, -0.3521502614021301, 0.1476609706878662, 0.2103513777256012, 0.2112833708524704, -0.21749378740787506, 0.1508670151233673, -0.051363132894039154, 0.30569207668304443, 0.38442304730415344, -0.03964133933186531, -0.3758775293827057, 0.1250845193862915, -0.11712722480297089, 0.06353822350502014, 0.39673784375190735, 0.18201321363449097, 0.3838992416858673, -0.18088339269161224, -0.16687387228012085, 0.34377163648605347, -0.09052206575870514, 0.022977514192461967, -0.5567652583122253, -0.5417342782020569, -0.2692137360572815, 0.0540844164788723, 0.25002801418304443, -0.027779050171375275, 0.11596681922674179, -0.02775411680340767, 0.15816199779510498, -0.11574482917785645, 0.2834402024745941, -0.06592817604541779, 0.2879229784011841, -0.32693803310394287, -0.25814223289489746, 0.12299133092164993, -0.21780499815940857, 0.0017615370452404022, -0.22690197825431824, -0.4157862961292267, 0.021394982933998108, -0.3032645583152771, 0.14130812883377075, -0.07493831217288971, -0.033027973026037216, 0.1762617975473404, 0.1311374306678772, 0.0012697726488113403, 0.0004971921443939209, -0.3802501857280731, -0.517528772354126, -0.12151867896318436, -0.03300062194466591, 0.09965839982032776, -0.210969477891922, 0.27102750539779663, -0.010783040896058083, -0.11327414214611053, 0.0989588052034378, 0.08857130259275436, -0.2441336214542389, -0.2142183482646942, -0.0785040482878685, 0.17507711052894592, -0.20762230455875397, 0.4073340892791748, 0.30727529525756836, 0.34746861457824707, 0.28595200181007385, -0.3495839536190033, 0.2610292136669159, 0.40261855721473694, 0.01970473676919937, 0.24638685584068298, -0.20080578327178955, 0.14026281237602234, -0.11205066740512848, 0.001403316855430603, -0.12134326994419098, 0.050783976912498474, -0.14586268365383148, -0.03699836879968643, -0.0701318308711052, -0.04790057986974716, -0.09763889014720917, 0.14651046693325043, -0.103449746966362, 0.3378802239894867, 0.20019182562828064, 0.2742254137992859, 0.4219546616077423, 0.18702079355716705, -0.17773815989494324, 0.4155232310295105, -0.04293055087327957, -0.3651120364665985, 0.17179517447948456, 0.28804388642311096, 0.1948762834072113, 0.17301301658153534, 0.0711781457066536, -0.18033288419246674, 0.5252892971038818, -0.18382270634174347, 0.4256460964679718, 0.2466791570186615, 0.022533945739269257, 0.5080839395523071, -0.10238790512084961, 0.3116406202316284, -0.20796692371368408, 0.033746372908353806, 0.04002092033624649, -0.05170901119709015, 0.26947399973869324, -0.29517364501953125, -0.1319107562303543, -0.07154389470815659, 0.22510966658592224, -0.005627862177789211, 0.08205519616603851, -0.020373782142996788, 0.5460214018821716, 0.21449345350265503, -0.6292131543159485, 0.20501971244812012, 0.028426233679056168, 0.6209685206413269, -0.2706536650657654, 0.10860525071620941, -0.41882145404815674, -0.06031503155827522, 0.12574006617069244, 0.16395743191242218, 0.33647486567497253, -0.02583036571741104, 0.32375258207321167, 0.0702529326081276, 0.2175617516040802, -0.33807167410850525, -0.11019626259803772, 0.10778997838497162, 0.15365979075431824, -0.20365186035633087, -0.09700430929660797, 0.22881624102592468, -0.08799039572477341, -0.48938271403312683, -0.2472158670425415, -0.4151546061038971, -0.02927042543888092, 0.10774636268615723, 0.15448038280010223, 0.06339764595031738, -0.36974072456359863, -0.13198360800743103, 0.008776957169175148, -0.7330990433692932, 0.43663501739501953, -0.20784646272659302, 0.1679953932762146, -0.08268262445926666, 0.23053202033042908, -0.02022746577858925, 0.15147659182548523, -0.06680165976285934, 0.09147036820650101, -0.589462399482727, 0.007184009999036789, -0.13407938182353973, -0.21079771220684052, 0.053696196526288986, -0.07346987724304199, 0.018451062962412834, 0.3070474863052368, -0.2912285327911377, -0.022329282015562057, -0.03891133517026901, 0.10446737706661224, -0.17240752279758453, -0.07545371353626251, 0.3345511555671692, 0.26625511050224304, -0.28067609667778015, 0.13345560431480408, 0.26823514699935913, 0.07442251592874527, 0.4424129128456116, 0.12115764617919922, 0.06081533432006836, -0.15106022357940674, 0.30172640085220337, 0.44000381231307983, -0.12422211468219757, 0.3253737986087799, 0.2688208818435669, 0.6192944049835205, 0.2862118184566498, -0.24666497111320496, 0.24886250495910645, 0.15975692868232727, -0.014229953289031982, 0.030119027942419052, 0.5266539454460144, 0.175133615732193, -0.13301917910575867, 0.17736078798770905, -0.2286216914653778, 0.006767041981220245, -0.1373530924320221, 0.4198544919490814, -0.36823907494544983, 0.0538393072783947, -0.03683002293109894, -0.13321703672409058, 0.033817291259765625, 0.02979353442788124, 0.15659131109714508, -0.03387102484703064, 0.6322970390319824, -0.05065783113241196, 0.03163084760308266, -0.019823776558041573, -0.4064335227012634, 0.28812116384506226, -0.021788567304611206, -0.3238888382911682, -0.0288007203489542, -0.34608668088912964, 0.1331806182861328, 0.16483065485954285, -0.1160244345664978, -0.052796825766563416, -0.24562396109104156, -0.2521003186702728, 0.10714466869831085, -0.18388845026493073, 0.05945710465312004, 0.07825830578804016, -0.14452263712882996, -0.10948285460472107, 0.34841296076774597, -0.1479453146457672, -0.35270148515701294, -0.19201992452144623, 0.34624987840652466, 0.001734800636768341, 0.23008036613464355, 0.2537960112094879, -0.24851655960083008, -0.47020503878593445, 0.17565065622329712, 0.046678297221660614, -0.08422549068927765, 0.04751422256231308, -0.31036245822906494, -0.09974201768636703, -0.08277517557144165, 0.055636003613471985, -0.016080372035503387, 0.5145266056060791, -0.24486646056175232, -0.02801329828798771, -0.055836960673332214, 0.3280678689479828, 0.41454604268074036, -0.08509387075901031, -0.02838616445660591, 0.031727518886327744, 0.279514878988266, -0.36211860179901123, 0.15286046266555786, 0.45929357409477234, -0.09289221465587616, 0.07009713351726532, -0.16184891760349274, 0.6410701274871826, -0.24812504649162292, -0.1078866496682167, -0.03505489230155945, -0.2344018518924713, 0.16017071902751923, 0.07264897227287292, 0.08420368283987045, -0.07463942468166351, -0.12370292842388153, 0.5312129259109497, 0.09284241497516632, -0.11833199858665466, 0.4810256361961365, 0.2648244798183441, 1.1928398609161377, 0.09847903996706009, 0.2629880905151367, 0.023739097639918327, -0.2545759081840515, 0.11779867112636566, -0.5239388346672058, 0.20428526401519775, 0.14120402932167053, -0.14638197422027588, 0.02145085297524929, 0.1541946828365326, -0.04919233173131943, 0.178512841463089, -0.3350701928138733, -0.11288923770189285, -0.2717013657093048, -0.09001769125461578, -0.19064073264598846, 0.239844411611557, -0.2895223796367645, -0.3097999691963196, -0.1892155110836029, 0.09821799397468567, 0.0206427201628685, -0.007575381547212601, -0.15331938862800598, -0.19985800981521606, 0.041063424199819565, -0.12145481258630753, 0.08524097502231598, -0.054028235375881195, -0.02570781484246254, 0.16328133642673492, -0.2693380117416382, -0.2498389631509781, -0.049513496458530426, 0.06558191031217575, -0.2643715739250183, -0.11697125434875488, -0.13555298745632172, 0.09949925541877747, 0.12967227399349213, 0.08278974145650864, -0.14160463213920593, -0.07219976931810379, -0.011258786544203758, -0.3059491515159607, 0.1785341501235962, -0.005491659045219421, -0.2016962170600891, -0.24031607806682587, 0.12446409463882446, 0.04504799842834473, 0.11751711368560791, 0.2096676230430603, -0.05665875971317291, -0.11201059818267822, -0.539242148399353, -0.10176220536231995, 0.21022573113441467, -0.0896100252866745, -0.31183290481567383, 0.21517840027809143, 0.09007605910301208, -0.1976977437734604, -0.08409260213375092, -0.36860600113868713, 0.26865774393081665, -0.05199632793664932, 0.28865668177604675, -0.4474611282348633, -0.19294235110282898, -0.5038596391677856, 0.0540381595492363, -0.002048458205536008, -0.284166157245636, 0.33349671959877014, -0.07614623010158539, -0.40902286767959595, 0.07413450628519058, -0.03965294733643532, 0.22958549857139587, 0.013162344694137573, -0.29827597737312317, 0.09574852883815765, -0.30867645144462585, 0.3106727600097656, -0.11097443103790283, 0.38084885478019714, -0.4966373145580292, -0.12396702170372009, 0.10371001064777374, 0.21510060131549835, -0.3594696819782257, 0.22487853467464447, 0.12557139992713928, 0.15388000011444092, -0.13852645456790924, 0.040590979158878326, 0.018712442368268967, -0.1323860138654709, -0.031655482947826385, 0.08307517319917679, -0.2785664498806, -0.24164804816246033, -0.12155640125274658, 0.1332312375307083, -0.05902813374996185, -0.1028667688369751, 0.18735669553279877, 0.09868361800909042, -0.1260303109884262, -0.176017627120018, 0.0835365355014801, -0.40184369683265686, -0.015652671456336975, -0.2817937731742859, 0.374191552400589, 0.07185155153274536, -0.15411463379859924, 0.18076716363430023, 0.20475155115127563, 0.3968234658241272, -0.2970113158226013, -0.059815406799316406, 0.00407229270786047, -0.34541618824005127, -0.042705241590738297, 0.21296575665473938, 0.13744540512561798, 0.10357608646154404, 0.2391909956932068, 0.16929028928279877, -0.06526406854391098, -0.048242416232824326, 0.2074071764945984, 0.24500691890716553, 0.1623617708683014, -0.09448863565921783, 0.03100656345486641, 0.3144347071647644, -0.12269273400306702, -0.09873119741678238, -0.09212738275527954, -0.1310138702392578, -0.1981378048658371, 0.04740971326828003, 0.3405257761478424, -0.0968254804611206, -0.11837010085582733, 0.05569511651992798, -0.14525191485881805, -0.2564467787742615, 0.3973233997821808, 0.3020842969417572, -0.0022492408752441406, -0.15398821234703064, -0.16578739881515503, -0.16696110367774963, 0.15318912267684937, -0.15232402086257935, -0.43979203701019287, 0.24781081080436707, 0.4387494623661041, 0.1649579554796219, -0.1390998363494873, -0.12997552752494812, -0.273387610912323, 0.10770568251609802, -0.08926214277744293, 0.29029691219329834, 0.4061615467071533, 0.41568270325660706, 0.1732330620288849, -0.6045848727226257, -0.18433934450149536, 0.31016305088996887, 0.01992145925760269, 0.10798561573028564, -0.04468056559562683, -0.184744730591774, -0.0763443112373352, 0.06463755667209625, 0.1822233647108078, 0.31546562910079956, 0.2762480676174164, 0.48858219385147095, 0.17372629046440125, 0.21024921536445618, 0.3308473825454712, 0.1891874074935913, 0.5358949303627014, -0.26613977551460266, -0.06814698129892349, 0.07126159965991974, -0.02693408727645874, -0.08442273736000061, 0.14018315076828003, 0.13183586299419403, -0.0837923213839531, -0.29025232791900635, 0.2506684958934784, 0.03185919672250748, 0.10536672174930573, -0.3437456488609314, 0.14990189671516418, 0.4966713786125183, 0.15131841599941254, -0.1313324123620987, 0.1357513964176178, -0.24601897597312927, -0.01924208179116249, -0.20768390595912933, 0.07258901745080948, -0.1424962878227234, -0.12643131613731384, 0.35548776388168335, -0.48642662167549133, -0.017353609204292297, -0.10775493830442429, -0.23014643788337708, 0.03521537035703659, 0.3305038809776306, -0.1148453950881958, 0.008505122736096382, -0.1938135027885437, 0.09569741785526276, -0.18647441267967224, 0.45240268111228943, 0.08075330406427383, -0.2967919707298279, -0.16217459738254547, -0.2621738612651825, -0.4147249460220337, 0.0042781829833984375, 0.06798674911260605, 0.29357844591140747, 0.1867896318435669, 0.1644284874200821, -0.0221702978014946, 0.19539572298526764, 0.023459836840629578, -0.15502281486988068, -0.01610492914915085, 0.0711744949221611, -0.4328564703464508, 0.44413915276527405, 0.5078607797622681, 0.25159159302711487, 0.09456513077020645, -0.5529874563217163, 0.11672916263341904, 0.03474627435207367, 0.049826495349407196, 0.28280818462371826, 0.09530749917030334, 0.12036523222923279, 0.26724910736083984, 0.4411727488040924, -0.018025880679488182, -0.3104729652404785, -0.17526617646217346, -0.3175334930419922, -0.19379863142967224, -0.00505858426913619, -0.19777438044548035, -0.17522510886192322, 0.3306727111339569, 0.47910478711128235, -0.3103906810283661, 0.22055797278881073, -0.35960906744003296, -0.052675504237413406, -0.10674954950809479, -0.03092835284769535, -0.253403902053833, -0.1696971207857132, -0.14702166616916656, 0.3872559368610382, 0.15682341158390045, 0.2938317358493805, -0.05719718337059021, -0.3464207649230957, -0.43736034631729126, -0.12654796242713928, 0.3629046678543091, 0.12415189296007156, -0.38025858998298645, 0.21633301675319672, 0.30516132712364197, 0.490447461605072, 0.08960767835378647, -0.11518879979848862, -0.033623967319726944, 0.0037738000974059105, -0.13261160254478455, 0.022795282304286957, 0.2835884690284729, -0.1408282071352005, -0.14517474174499512, -0.0007894188165664673, 0.31461167335510254, 0.0007040519267320633, -0.16172818839550018, -0.1770174652338028, -0.40921151638031006 ]
https://github.com/huggingface/datasets/issues/2480
Set download/extracted paths configurable
For example to be able to send uncompressed and temp build files to another volume/partition, so that the user gets the minimal disk usage on their primary setup - and ends up with just the downloaded compressed data + arrow files, but outsourcing the huge files and building to another partition. e.g. on JZ there is a special partition for fast data, but it's also volatile, so only temp files should go there. Think of it as `TMPDIR` so we need the equivalent for `datasets`.
As discussed with @stas00 and @lhoestq, setting these paths configurable may allow to overcome disk space limitation on different partitions/drives. TODO: - [x] Set configurable extracted datasets path: #2487 - [x] Set configurable downloaded datasets path: #2488 - [ ] Set configurable "incomplete" datasets path?
85
Set download/extracted paths configurable As discussed with @stas00 and @lhoestq, setting these paths configurable may allow to overcome disk space limitation on different partitions/drives. TODO: - [x] Set configurable extracted datasets path: #2487 - [x] Set configurable downloaded datasets path: #2488 - [ ] Set configurable "incomplete" datasets path? For example to be able to send uncompressed and temp build files to another volume/partition, so that the user gets the minimal disk usage on their primary setup - and ends up with just the downloaded compressed data + arrow files, but outsourcing the huge files and building to another partition. e.g. on JZ there is a special partition for fast data, but it's also volatile, so only temp files should go there. Think of it as `TMPDIR` so we need the equivalent for `datasets`.
[ -0.29625600576400757, -0.10550060868263245, -0.18218068778514862, 0.18956446647644043, 0.1187056377530098, -0.08783277869224548, -0.042484644800424576, 0.29166164994239807, 0.04623384401202202, 0.34794938564300537, -0.18032428622245789, 0.1907631754875183, 0.014195485040545464, 0.39972853660583496, 0.021299798041582108, -0.08092823624610901, -0.2167210578918457, 0.20521503686904907, -0.2652956247329712, 0.18052402138710022, -0.2859378457069397, 0.021976344287395477, 0.04428786039352417, -0.0657823234796524, -0.02646595798432827, -0.19498524069786072, -0.021311067044734955, 0.020207948982715607, -0.1970956176519394, -0.29830947518348694, 0.18015624582767487, 0.22983963787555695, 0.055078282952308655, 0.35125771164894104, -0.00009830478666117415, -0.004258066415786743, 0.06313709914684296, -0.17323924601078033, -0.6294650435447693, -0.25136035680770874, -0.019107872620224953, -0.5226917862892151, -0.03218218311667442, -0.22872355580329895, 0.022313080728054047, -0.245350643992424, 0.16773462295532227, -0.3536906838417053, 0.11977965384721756, -0.09939354658126831, 0.36816272139549255, 0.2698156237602234, -0.04304791986942291, -0.18130375444889069, 0.23484447598457336, 0.23319311439990997, -0.3291926383972168, 0.050757210701704025, 0.34339550137519836, 0.2788318991661072, 0.013140074908733368, 0.006848604418337345, 0.029504025354981422, 0.3137280344963074, 0.2971014678478241, -0.030737370252609253, 0.11221972107887268, -0.4712478816509247, 0.09974764287471771, 0.26250627636909485, 0.5066250562667847, -0.32210516929626465, -0.3209202289581299, -0.4933106303215027, -0.02518538385629654, -0.1129070594906807, 0.2811664044857025, 0.16901108622550964, -0.3046697676181793, 0.12748897075653076, -0.32154276967048645, -0.1336308717727661, -0.22725147008895874, 0.24195319414138794, -0.008945375680923462, 0.02395966649055481, -0.13588154315948486, -0.04633370041847229, 0.28548258543014526, 0.17625638842582703, 0.21328754723072052, -0.40441587567329407, 0.18549706041812897, -0.07453826069831848, 0.20018044114112854, -0.2847125828266144, -0.08080535382032394, -0.11206982284784317, 0.06433991342782974, 0.00924069993197918, 0.07908889651298523, -0.0684439092874527, 0.06422016769647598, 0.05181295797228813, 0.25647425651550293, 0.05170053616166115, -0.27149271965026855, -0.061426419764757156, 0.2406291365623474, -0.03810849040746689, 0.2174193263053894, 0.048367954790592194, -0.14445015788078308, -0.30230453610420227, -0.37247252464294434, -0.12592434883117676, -0.07519997656345367, 0.0211898572742939, -0.3299501836299896, -0.3805200159549713, 0.41526803374290466, 0.035414647310972214, 0.05590059608221054, -0.014403417706489563, 0.1345677226781845, -0.16918206214904785, -0.23717963695526123, 0.28186970949172974, -0.09388674050569534, 0.09257505089044571, -0.0458538718521595, -0.04570100083947182, -0.2854698598384857, 0.08699862658977509, 0.20560188591480255, 0.00783225242048502, 0.1775728166103363, -0.17007462680339813, -0.09774138033390045, 0.22563642263412476, 0.41308295726776123, -0.04407133534550667, 0.06897951662540436, 0.37166693806648254, 0.18513725697994232, 0.13946716487407684, -0.24644620716571808, 0.36346083879470825, -0.3581141531467438, 0.24831652641296387, -0.29182496666908264, -0.44055718183517456, 0.09445948898792267, 0.2806106209754944, -0.16439031064510345, 0.00014040619134902954, -0.19231164455413818, 0.0523218996822834, -0.08977857977151871, -0.05492209643125534, -0.02316363900899887, 0.10357487946748734, -0.018947064876556396, -0.2156529724597931, 0.13241054117679596, 0.1738235503435135, -0.3945200443267822, -0.06167329475283623, -0.3099750578403473, -0.08327688276767731, 0.14940467476844788, 0.20365294814109802, -0.2687672972679138, 0.11253627389669418, -0.3567931354045868, 0.19800712168216705, 0.3827778398990631, -0.0618518590927124, -0.35164037346839905, 0.19398032128810883, -0.11778755486011505, -0.07402349263429642, 0.23614060878753662, 0.1520562469959259, 0.40009060502052307, -0.039407726377248764, -0.0989355742931366, 0.5456365346908569, 0.08779419213533401, 0.05157144367694855, -0.21950823068618774, -0.6255838871002197, -0.0960063487291336, -0.0157761350274086, 0.07990565896034241, -0.16318902373313904, 0.23333227634429932, 0.04866459593176842, 0.09737817943096161, -0.0917540192604065, 0.23531940579414368, 0.08774104714393616, 0.176499605178833, -0.08816944062709808, -0.295493483543396, 0.07139553129673004, -0.360320508480072, 0.2684762477874756, -0.1432163119316101, -0.21407842636108398, 0.08003920316696167, -0.07038648426532745, -0.0012988019734621048, -0.25231125950813293, 0.020348533987998962, -0.17238567769527435, 0.25114384293556213, 0.17632105946540833, 0.158244788646698, -0.28602135181427, -0.11243155598640442, -0.1914060264825821, 0.08238234370946884, 0.06510183960199356, 0.08332416415214539, 0.4587308466434479, -0.1591847687959671, -0.001321178860962391, -0.057948190718889236, 0.1388753056526184, -0.230941504240036, -0.3591414988040924, 0.07074768841266632, 0.22541102766990662, 0.07961363345384598, 0.2203637808561325, 0.28306660056114197, 0.2405698597431183, 0.2718525528907776, 0.09070026874542236, 0.28839269280433655, 0.13963234424591064, -0.20508533716201782, 0.19139552116394043, -0.3032186031341553, 0.3291303515434265, -0.11398503184318542, -0.04078621417284012, 0.16215106844902039, 0.019914785400032997, 0.16569267213344574, -0.057923972606658936, 0.1096837967634201, -0.34391847252845764, -0.013533707708120346, 0.039546869695186615, 0.2599927484989166, 0.2794917821884155, 0.21899154782295227, 0.2041255086660385, 0.3102349042892456, 0.21336781978607178, 0.05243479833006859, 0.1946963667869568, 0.0100022554397583, -0.24987033009529114, -0.04617304354906082, 0.593559741973877, 0.4426037669181824, 0.48748454451560974, 0.377162367105484, -0.20008093118667603, 0.06023769453167915, -0.3213655948638916, 0.4303215444087982, -0.0018877685070037842, -0.026102613657712936, 0.16583624482154846, -0.2078157216310501, -0.0010187262669205666, -0.11548963189125061, -0.15449248254299164, 0.20194189250469208, -0.017574066296219826, 0.048308078199625015, -0.38999611139297485, -0.3329842686653137, -0.214312344789505, -0.056515105068683624, 0.07247325032949448, 0.016713015735149384, -0.0889773890376091, 0.3481670618057251, 0.1882573515176773, -0.3835691511631012, 0.14273057878017426, -0.05163528770208359, 0.3345634937286377, -0.20551276206970215, -0.2572612464427948, -0.06804031133651733, -0.018959427252411842, -0.0014070086181163788, 0.2405596673488617, 0.26267576217651367, -0.029070714488625526, 0.31855958700180054, -0.011583840474486351, 0.0144251249730587, -0.5141140818595886, -0.18237584829330444, 0.14000636339187622, 0.1323261857032776, 0.11491893231868744, 0.06110042333602905, 0.27557069063186646, 0.2675018310546875, -0.1891261786222458, 0.02622400037944317, 0.10393378138542175, -0.09534049779176712, -0.08866596966981888, 0.08249302953481674, -0.09915037453174591, -0.30676373839378357, -0.20846444368362427, -0.29015567898750305, -0.6281813383102417, 0.28313058614730835, -0.10436519980430603, 0.2514547109603882, 0.18618671596050262, 0.4520156681537628, -0.015256480313837528, 0.05248130112886429, -0.04908847063779831, -0.03546871617436409, -0.49966293573379517, 0.24731841683387756, -0.4030625820159912, 0.07870018482208252, -0.10157542675733566, 0.13165859878063202, 0.17657102644443512, 0.4386547803878784, -0.5158385634422302, -0.0015855040401220322, -0.2677955627441406, 0.35029610991477966, 0.2252785712480545, 0.048786912113428116, 0.43653348088264465, 0.06457352638244629, -0.21612337231636047, -0.050675440579652786, -0.02513054944574833, 0.16320908069610596, 0.3058547377586365, 0.13771623373031616, 0.026339270174503326, -0.1690969169139862, 0.11413116753101349, 0.33852148056030273, -0.14507019519805908, 0.284469872713089, 0.3558308780193329, 0.21508045494556427, 0.5061596035957336, -0.2726742923259735, 0.16113489866256714, 0.2804848253726959, 0.053185127675533295, -0.1758492887020111, 0.3591488003730774, 0.07300573587417603, -0.029481777921319008, 0.10041849315166473, -0.2248375415802002, 0.0020403489470481873, -0.25781431794166565, 0.36025547981262207, -0.07354539632797241, 0.16447898745536804, -0.023471323773264885, -0.05199873819947243, -0.2224881649017334, 0.09967928379774094, -0.1062946766614914, 0.09719514101743698, 0.256586492061615, 0.2397237867116928, -0.18122169375419617, 0.10043077170848846, -0.10389348119497299, 0.1167721375823021, -0.07640338689088821, -0.3136495351791382, -0.16622713208198547, -0.09616157412528992, 0.045120302587747574, 0.20977233350276947, 0.1315772831439972, -0.21139918267726898, -0.13211491703987122, -0.02741660736501217, -0.1807537078857422, -0.40940722823143005, -0.07280627638101578, 0.08741702139377594, -0.0580558255314827, 0.07890289276838303, 0.5266671180725098, -0.19687867164611816, -0.21539923548698425, -0.12179963290691376, 0.3659333288669586, -0.06545956432819366, 0.07853502035140991, 0.18126682937145233, -0.2583681046962738, -0.47361353039741516, -0.050650037825107574, 0.08218146860599518, -0.07661721855401993, -0.029502274468541145, -0.22107578814029694, -0.2395140677690506, -0.018468502908945084, -0.00915680080652237, 0.12608514726161957, 0.33215805888175964, -0.2643468976020813, 0.18739083409309387, 0.13758161664009094, 0.1935502588748932, 0.5737664699554443, 0.22595514357089996, -0.4040718078613281, 0.1423264443874359, 0.3827584385871887, -0.2888179421424866, 0.007253639400005341, 0.30472123622894287, -0.027046527713537216, -0.0695209726691246, -0.2594330906867981, 0.24250653386116028, -0.3263028562068939, 0.04531826451420784, 0.11715681850910187, -0.033728815615177155, 0.1162496879696846, -0.27841511368751526, -0.046217016875743866, -0.1442333608865738, -0.04969233646988869, 0.3877961039543152, 0.12196982651948929, -0.4149862825870514, 0.062452323734760284, 0.24170759320259094, 0.8535842895507812, 0.05963550880551338, 0.2840290665626526, -0.027189288288354874, -0.2870079278945923, 0.1652582883834839, -0.37793397903442383, -0.0063582658767700195, 0.1090162843465805, -0.1220228523015976, 0.06407249718904495, -0.0663447454571724, 0.048565953969955444, 0.3011218309402466, -0.2952785789966583, 0.02567538619041443, -0.033905189484357834, -0.06072050705552101, -0.3045536279678345, 0.05304025858640671, -0.17316880822181702, -0.3400919735431671, -0.12646307051181793, 0.26016131043434143, 0.08352886885404587, 0.10924938321113586, -0.07294770330190659, -0.13836297392845154, 0.08516044914722443, 0.2667834162712097, -0.009386815130710602, -0.3033594489097595, -0.21196599304676056, 0.13527387380599976, -0.24927371740341187, -0.19831866025924683, 0.06847798824310303, 0.10153059661388397, 0.1253798007965088, 0.28454893827438354, -0.32813936471939087, 0.060966409742832184, -0.1740521490573883, 0.017848094925284386, -0.04575688764452934, -0.21241359412670135, 0.07292956113815308, -0.17776474356651306, -0.03967738896608353, -0.17713069915771484, -0.08232676982879639, -0.12943609058856964, 0.08148844540119171, -0.1745869666337967, -0.013493373990058899, -0.03813818469643593, -0.07675985991954803, -0.18315955996513367, -0.08749677240848541, -0.2126348614692688, 0.23239105939865112, -0.11975465714931488, 0.02817186526954174, 0.25396496057510376, -0.1687568724155426, -0.25552958250045776, -0.31827807426452637, -0.04530075937509537, 0.0031735487282276154, -0.11126081645488739, 0.19568230211734772, -0.42255088686943054, -0.17197638750076294, -0.4166547358036041, 0.36001983284950256, -0.10634586215019226, -0.10559064149856567, 0.18778492510318756, -0.19377613067626953, -0.2437061369419098, -0.2756359577178955, 0.11864885687828064, 0.4634702801704407, 0.14603650569915771, -0.16597925126552582, -0.1332038789987564, -0.17634566128253937, 0.29847222566604614, -0.1030166745185852, 0.4938422739505768, -0.22985544800758362, -0.006388578563928604, 0.3236547112464905, 0.046965453773736954, -0.4705730080604553, 0.21568211913108826, 0.020962582901120186, 0.08016189932823181, 0.2978317141532898, 0.02592559903860092, -0.08452001959085464, -0.12992912530899048, 0.10001318901777267, -0.1460115611553192, -0.37172752618789673, -0.26065167784690857, -0.2561435401439667, 0.08189525455236435, -0.06671230494976044, -0.06353504210710526, 0.2903600335121155, -0.3504108786582947, -0.12600313127040863, -0.2786110043525696, 0.027600832283496857, 0.020340491086244583, -0.019335322082042694, -0.1616065949201584, 0.11066055297851562, -0.10239497572183609, -0.312755823135376, 0.3415350019931793, 0.22846445441246033, 0.39632993936538696, -0.005003005266189575, 0.26411521434783936, -0.15280069410800934, -0.17853564023971558, -0.19529147446155548, 0.23086124658584595, 0.20988255739212036, 0.27515265345573425, -0.12501245737075806, 0.26274099946022034, 0.1357969492673874, 0.0835191085934639, 0.21544909477233887, 0.293298602104187, 0.1641916036605835, -0.12303438782691956, 0.3854134678840637, 0.3824092447757721, -0.0723157674074173, -0.008513865992426872, -0.03283165395259857, 0.017337623983621597, 0.1773388534784317, 0.27157917618751526, 0.3052975535392761, -0.018816836178302765, 0.09581654518842697, -0.029158614575862885, 0.1579674929380417, 0.08972632139921188, 0.18393316864967346, 0.5496286153793335, 0.045463304966688156, -0.058817777782678604, -0.050145313143730164, -0.08261510729789734, 0.32567813992500305, 0.3156009912490845, -0.4169418215751648, 0.38790279626846313, 0.2968870997428894, -0.09835320711135864, -0.0058435797691345215, -0.29806992411613464, 0.16330336034297943, -0.12299925088882446, 0.05381068214774132, 0.08355650305747986, -0.03614579886198044, 0.19238603115081787, -0.29336464405059814, -0.17805197834968567, -0.14637397229671478, 0.1173955500125885, -0.20180648565292358, -0.2556244134902954, -0.13280318677425385, -0.41094592213630676, 0.057825639843940735, 0.03129598870873451, -0.07278665900230408, -0.13297295570373535, 0.44850361347198486, -0.06574958562850952, 0.14547064900398254, -0.09728003293275833, 0.5200182199478149, 0.14800021052360535, -0.0879783108830452, -0.15409237146377563, 0.26585298776626587, 0.0016300827264785767, -0.0782708078622818, 0.002976488322019577, 0.2568165957927704, 0.33275800943374634, 0.06811349093914032, -0.04413171112537384, -0.15603677928447723, 0.18607866764068604, -0.01335092168301344, -0.4736658036708832, -0.15062296390533447, 0.13442525267601013, 0.03756765276193619, 0.3874790072441101, 0.3374321162700653, -0.24088263511657715, 0.04641476273536682, 0.012705974280834198, -0.2789757251739502, -0.1371462196111679, 0.03429318964481354, 0.3196042478084564, -0.23846888542175293, 0.3096681833267212, -0.12755796313285828, -0.14168697595596313, -0.23466184735298157, 0.3317606747150421, -0.254135400056839, 0.19272515177726746, 0.19570861756801605, 0.16630035638809204, 0.07391659915447235, 0.5967610478401184, -0.10655221343040466, -0.286319375038147, -0.21403075754642487, -0.08220253884792328, -0.44709232449531555, 0.045909278094768524, -0.18150770664215088, -0.11742029339075089, -0.20553863048553467, 0.22575616836547852, 0.002251856029033661, 0.05611575022339821, 0.20565372705459595, 0.28574368357658386, 0.11631899327039719, 0.2888631522655487, -0.31561359763145447, -0.03523547574877739, 0.33701223134994507, 0.09677859395742416, 0.03492321819067001, -0.4380878508090973, 0.012121208012104034, 0.06113678589463234, 0.16330218315124512, 0.040151871740818024, 0.27643951773643494, 0.38122859597206116, 0.08078022301197052, 0.33576133847236633, -0.08356094360351562, 0.06629516929388046, -0.14774754643440247, -0.03541603311896324, -0.3296090364456177, -0.04637913033366203, -0.14314958453178406, -0.18115246295928955, 0.19768063724040985, 0.10995583236217499, -0.4670318067073822, -0.02052801474928856, -0.3134143650531769, 0.05104425176978111, 0.17039820551872253, 0.2583925426006317, 0.29775726795196533, 0.030479157343506813, -0.10534623265266418, 0.16488298773765564, 0.38323715329170227, 0.24095427989959717, -0.024398542940616608, -0.0819549709558487, -0.27128762006759644, -0.24334365129470825, 0.029107138514518738, 0.30659008026123047, -0.2554537355899811, -0.009842373430728912, 0.06778736412525177, 0.3064531087875366, 0.22225646674633026, -0.17101657390594482, 0.13312014937400818, 0.3338833451271057, -0.1364162266254425, -0.07111984491348267, 0.15656764805316925, -0.0535917691886425, -0.09895464032888412, 0.04901350662112236, 0.3637462556362152, 0.023652393370866776, -0.3637845516204834, -0.24383462965488434, -0.24431771039962769 ]
https://github.com/huggingface/datasets/issues/2478
Create release script
I've aligned the release script with Transformers in #6004, so I think this issue can be closed.
Create a script so that releases can be done automatically (as done in `transformers`).
17
Create release script Create a script so that releases can be done automatically (as done in `transformers`). I've aligned the release script with Transformers in #6004, so I think this issue can be closed.
[ -0.27134186029434204, -0.1784447878599167, -0.14083802700042725, -0.14698253571987152, 0.19010168313980103, -0.39825618267059326, 0.3041822016239166, 0.2301296889781952, -0.028658822178840637, 0.2744125425815582, 0.08765631914138794, 0.19482094049453735, -0.1964903175830841, 0.11970353871583939, -0.3467838168144226, 0.07049380242824554, -0.07710988074541092, 0.23730023205280304, -0.3944588601589203, -0.12210024893283844, -0.09872139990329742, 0.13060301542282104, 0.13691508769989014, 0.16311153769493103, -0.17687352001667023, -0.1277489811182022, 0.25755807757377625, 0.025867540389299393, -0.1598692387342453, -0.24558940529823303, 0.0007624663412570953, 0.20290204882621765, 0.04805634170770645, 0.1795131415128708, -0.00009123521158471704, 0.010949119925498962, 0.4945281147956848, 0.14048250019550323, -0.21538227796554565, 0.3316631317138672, -0.08962169289588928, -0.09082246571779251, 0.11809030175209045, -0.21507728099822998, -0.08475746214389801, 0.10757418721914291, 0.22418749332427979, -0.004286348819732666, 0.5080500841140747, -0.09423211961984634, 0.4410136044025421, 0.3181302547454834, -0.051120828837156296, -0.1628575623035431, 0.1072060689330101, -0.1478842794895172, -0.17224983870983124, -0.3516662120819092, 0.18954472243785858, -0.12808600068092346, -0.33173322677612305, 0.2197444885969162, 0.17658470571041107, -0.05952741578221321, 0.21909219026565552, 0.017269393429160118, 0.30310672521591187, -0.2892683148384094, -0.07493538409471512, -0.1533428132534027, 0.329919695854187, -0.18464624881744385, -0.14654773473739624, -0.11779558658599854, -0.07475694268941879, 0.03881444036960602, 0.19046786427497864, -0.031089020892977715, -0.06412811577320099, 0.16562175750732422, -0.019980883225798607, -0.14176930487155914, -0.09252630174160004, -0.21916194260120392, -0.007304053753614426, 0.3812648355960846, -0.00001785391941666603, -0.18972653150558472, 0.10854373872280121, -0.10078482329845428, 0.2844102382659912, 0.08647091686725616, -0.07899132370948792, 0.008801144547760487, 0.06898605078458786, -0.19503958523273468, 0.07176628708839417, -0.0028269216418266296, -0.035700730979442596, 0.10445380955934525, -0.14025172591209412, 0.16156941652297974, 0.06677740812301636, 0.006053607910871506, 0.3214653432369232, 0.030979394912719727, 0.1271468698978424, 0.10851308703422546, 0.44181227684020996, 0.14429183304309845, -0.04460117220878601, 0.08609065413475037, -0.07134551554918289, -0.194095179438591, 0.07287055253982544, 0.23457327485084534, 0.1765442043542862, -0.019719019532203674, 0.18357226252555847, -0.13824045658111572, 0.21946528553962708, 0.06455100327730179, -0.34359365701675415, 0.19417811930179596, -0.047389499843120575, 0.20449483394622803, 0.13075757026672363, 0.04321905970573425, -0.2630724012851715, 0.07632376253604889, -0.251973420381546, -0.16135713458061218, -0.36202195286750793, -0.13069988787174225, 0.0766754299402237, 0.2523576319217682, -0.03212641179561615, 0.17511337995529175, 0.07027091830968857, -0.03244665637612343, 0.07432352751493454, 0.3620449900627136, -0.14748558402061462, 0.23424416780471802, 0.11859101057052612, 0.20010851323604584, -0.07676425576210022, 0.05413498729467392, 0.02167852222919464, 0.06529155373573303, 0.2432548701763153, -0.0664617046713829, -0.08956728130578995, 0.45468392968177795, 0.17521288990974426, -0.07297311723232269, 0.32269930839538574, -0.0795498788356781, 0.1476774364709854, 0.0774146020412445, -0.12914517521858215, 0.09617079049348831, 0.07862018048763275, -0.026678044348955154, -0.10301460325717926, 0.2995983064174652, 0.14754973351955414, -0.26803678274154663, -0.04700767248868942, -0.21854940056800842, 0.13223671913146973, -0.08633586764335632, -0.14648288488388062, 0.003143094480037689, -0.13896949589252472, -0.27979329228401184, -0.1740495264530182, -0.19382746517658234, -0.18438749015331268, 0.11016830801963806, -0.4499521851539612, -0.12868398427963257, 0.17355452477931976, 0.1095910519361496, 0.300504595041275, -0.08837869763374329, -0.13804073631763458, 0.18630996346473694, 0.0059685129672288895, 0.41721847653388977, -0.26153767108917236, -0.3098789155483246, -0.37966638803482056, -0.15152676403522491, 0.499550998210907, 0.31236979365348816, 0.06152147054672241, 0.36783352494239807, 0.2874794900417328, 0.13288940489292145, 0.07226383686065674, 0.09446553140878677, 0.339777410030365, -0.07281027734279633, 0.029385782778263092, 0.03677469491958618, -0.2553885877132416, 0.04030323028564453, -0.35763019323349, 0.16506008803844452, 0.0927421972155571, -0.2598159909248352, -0.3674735724925995, -0.126939594745636, 0.04752011597156525, -0.007951967418193817, 0.3931800127029419, 0.240995392203331, -0.07308134436607361, -0.019925519824028015, -0.16769689321517944, 0.06357541680335999, 0.18500760197639465, 0.04690829664468765, -0.11033961176872253, -0.08243633806705475, -0.3430476188659668, -0.06774479150772095, 0.042109712958335876, -0.26546356081962585, 0.12713377177715302, -0.16438066959381104, -0.03717953711748123, 0.28507503867149353, -0.058714594691991806, 0.3334544003009796, -0.020855188369750977, 0.3865630626678467, 0.14122028648853302, 0.13149268925189972, -0.0860724225640297, 0.29924261569976807, -0.187384694814682, 0.005327768623828888, 0.008078057318925858, 0.41885000467300415, 0.01219046488404274, -0.025059804320335388, 0.06875837594270706, 0.061829544603824615, 0.2136298269033432, -0.24935570359230042, -0.03853665292263031, -0.2426956295967102, -0.2796986401081085, 0.03836749121546745, -0.07997165620326996, -0.08378506451845169, -0.048184990882873535, 0.1446186602115631, 0.24389971792697906, 0.23719856142997742, 0.18412862718105316, -0.023622065782546997, -0.009145453572273254, 0.2801648676395416, -0.03798893839120865, 0.3059869408607483, 0.038058653473854065, 0.26433655619621277, 0.01041945070028305, -0.05141211301088333, -0.04258972033858299, -0.13834214210510254, 0.1539035141468048, 0.0007283762097358704, 0.02422848343849182, 0.3059806823730469, -0.12326223403215408, -0.12820720672607422, -0.27690285444259644, 0.052674878388643265, -0.04977983981370926, -0.024550290778279305, -0.11606326699256897, -0.2850622534751892, -0.12914562225341797, -0.07945594191551208, -0.20979776978492737, 0.0009367759339511395, 0.08924505114555359, -0.08047246932983398, 0.4159132242202759, 0.2105415165424347, -0.35239505767822266, 0.44385188817977905, 0.011378195136785507, 0.16631478071212769, 0.05619664490222931, 0.32499393820762634, -0.048630423843860626, -0.055840060114860535, -0.05649006366729736, 0.33228063583374023, -0.059906255453825, -0.3424389064311981, 0.04124969616532326, -0.11820153892040253, 0.09824415296316147, -0.06941629946231842, -0.23628494143486023, 0.20171791315078735, 0.04943326860666275, -0.1911953091621399, -0.01428079605102539, 0.0778723955154419, 0.2094806730747223, -0.15160644054412842, 0.00803989265114069, -0.4324599802494049, -0.2706439197063446, -0.21851474046707153, 0.04190249368548393, -0.03611643612384796, -0.40838152170181274, -0.33750298619270325, 0.06224248558282852, -0.573411226272583, -0.1239067018032074, -0.06081220507621765, 0.014925427734851837, 0.3530992865562439, -0.11505310237407684, -0.34589195251464844, 0.05428548529744148, 0.04038255661725998, 0.20220938324928284, 0.09166239202022552, 0.2941347360610962, -0.3192835748195648, -0.3753952383995056, -0.11942349374294281, -0.22780334949493408, -0.2323531210422516, -0.08501506596803665, -0.13400623202323914, 0.018925577402114868, -0.1564808040857315, -0.06189344450831413, -0.03623814135789871, 0.05228619650006294, 0.2965109348297119, 0.18901339173316956, -0.40455904603004456, -0.25096026062965393, -0.008641382679343224, 0.16968482732772827, 0.033867161720991135, 0.07302714884281158, -0.17647266387939453, 0.13026075065135956, -0.2517735958099365, 0.44467639923095703, -0.12721529603004456, -0.039288248866796494, -0.018548130989074707, 0.05134347826242447, 0.36143743991851807, 0.09445416182279587, -0.0030471906065940857, -0.17461620271205902, 0.15950621664524078, -0.12896835803985596, 0.4780799150466919, 0.07960858196020126, -0.1719813495874405, -0.10472409427165985, 0.10341429710388184, -0.12192028760910034, -0.34347161650657654, -0.06774885952472687, 0.08066549897193909, 0.1786881536245346, 0.16548269987106323, 0.17061775922775269, 0.12353461980819702, 0.24272775650024414, 0.30684733390808105, -0.021594777703285217, 0.0689830631017685, -0.1535668671131134, -0.05947297066450119, 0.3428041636943817, -0.021651051938533783, 0.041574373841285706, -0.06058638542890549, -0.20373457670211792, -0.04282008856534958, -0.3243672847747803, -0.0031053274869918823, 0.05878978967666626, 0.40602993965148926, 0.058610543608665466, 0.11346140503883362, -0.10469993948936462, -0.11300841718912125, 0.05455602705478668, -0.08842775970697403, -0.18967139720916748, 0.09296334534883499, 0.2069513499736786, 0.11255446076393127, -0.23788580298423767, 0.03808435797691345, -0.053947463631629944, -0.15793566405773163, -0.27175089716911316, -0.07323715835809708, -0.20805513858795166, -0.07239485532045364, -0.2976296842098236, 0.25072628259658813, 0.14650310575962067, -0.12235891819000244, -0.28686654567718506, -0.3076997399330139, 0.049490347504615784, -0.15737685561180115, -0.21872879564762115, 0.09881983697414398, 0.21639809012413025, -0.007395083550363779, 0.13621863722801208, 0.03825509175658226, 0.04052971303462982, 0.03729523718357086, 0.14846619963645935, -0.018419746309518814, 0.0959094986319542, 0.07220496237277985, -0.11701905727386475, -0.14368197321891785, 0.2668720781803131, 0.10500460118055344, -0.09379500895738602, 0.15028469264507294, 0.17654651403427124, 0.14684177935123444, -0.17940488457679749, 0.06626150757074356, -0.27052226662635803, -0.003830798901617527, -0.10252506285905838, -0.02455328404903412, -0.22431126236915588, -0.2504168152809143, 0.13438597321510315, 0.0067450180649757385, -0.14075931906700134, 0.1530657559633255, 0.06099481135606766, 0.8318372368812561, -0.07622356712818146, -0.11451263725757599, -0.19480639696121216, -0.303070068359375, 0.22869561612606049, -0.04251360893249512, 0.2517557144165039, -0.5067952871322632, -0.12984758615493774, 0.11673197150230408, 0.08027373254299164, -0.1198008581995964, 0.1973101943731308, -0.35309159755706787, 0.006612767465412617, -0.15672984719276428, 0.14024589955806732, -0.06750213354825974, 0.12201297283172607, -0.10072199255228043, -0.14059258997440338, 0.002226743847131729, 0.32900482416152954, -0.006897829473018646, 0.32593733072280884, -0.2931002676486969, -0.20920488238334656, 0.18434225022792816, -0.1521090567111969, -0.05546770244836807, 0.15338724851608276, -0.04033876582980156, 0.18185652792453766, 0.12044736742973328, 0.05788490176200867, -0.30885109305381775, 0.07349167764186859, 0.18321380019187927, 0.16889087855815887, 0.07617036998271942, 0.26279038190841675, 0.24876341223716736, -0.07049529999494553, -0.19173747301101685, 0.24802163243293762, 0.05109824985265732, -0.1444355547428131, -0.12012357264757156, -0.10700639337301254, -0.02420990914106369, -0.2305656224489212, -0.18055462837219238, 0.07915323972702026, 0.16702619194984436, 0.03788033127784729, 0.29220449924468994, 0.11846567690372467, -0.24276718497276306, -0.24245144426822662, 0.39028385281562805, -0.13980092108249664, -0.0246883574873209, 0.23663949966430664, 0.22259926795959473, -0.06356671452522278, -0.19625228643417358, 0.18096712231636047, 0.002962317317724228, 0.014004349708557129, 0.044426482170820236, 0.04293420538306236, -0.25067228078842163, -0.3192524015903473, -0.0765039324760437, -0.08730866760015488, -0.30471664667129517, 0.3692755103111267, -0.15851551294326782, -0.5675219893455505, 0.19436943531036377, 0.2855169177055359, 0.11188007146120071, 0.12863220274448395, -0.226579487323761, 0.14343497157096863, -0.27820441126823425, 0.09972132742404938, -0.19466550648212433, 0.18562795221805573, 0.020741775631904602, 0.03677630424499512, 0.12220856547355652, -0.06567171961069107, -0.5749473571777344, -0.36330950260162354, -0.10895442217588425, 0.0009603351354598999, -0.07548938691616058, -0.33016204833984375, 0.063405342400074, 0.06796014308929443, 0.291229784488678, 0.08382163941860199, -0.09534241259098053, -0.42256447672843933, 0.024950280785560608, 0.05931854993104935, -0.1860915720462799, 0.19401609897613525, -0.2286820262670517, 0.06022912263870239, -0.20354586839675903, -0.02090121991932392, 0.22661924362182617, 0.13671183586120605, 0.11882457137107849, 0.06358650326728821, 0.36370208859443665, 0.08652284741401672, -0.0847533717751503, 0.03671955689787865, 0.19155097007751465, 0.147695854306221, -0.09156177937984467, -0.03811413794755936, -0.08438508212566376, -0.15584412217140198, -0.017872048541903496, 0.07519963383674622, 0.2761531472206116, 0.46056464314460754, 0.29745742678642273, -0.0020952634513378143, -0.19402459263801575, 0.27824029326438904, 0.43871191143989563, 0.02488846704363823, 0.09101700037717819, -0.29438745975494385, 0.02764703892171383, 0.543796181678772, -0.2471185028553009, -0.051974404603242874, -0.18949119746685028, -0.25641077756881714, 0.09534434974193573, 0.33592715859413147, -0.017908889800310135, -0.27626484632492065, 0.346510648727417, 0.5306485295295715, 0.13253606855869293, -0.27629566192626953, 0.04893997684121132, 0.11649267375469208, -0.09370787441730499, -0.09779953956604004, 0.2872244715690613, -0.1057487428188324, 0.19814592599868774, -0.08169500529766083, 0.1304113268852234, 0.0813465565443039, 0.12240191549062729, -0.01817188784480095, 0.2180025279521942, -0.04404778033494949, -0.09691153466701508, -0.019447579979896545, 0.1633853018283844, 0.02252877503633499, 0.28150346875190735, -0.10920576006174088, -0.09905046224594116, -0.07097690552473068, -0.32061445713043213, 0.08759959042072296, -0.1362103819847107, 0.07633842527866364, 0.09527930617332458, -0.1192815750837326, -0.12737509608268738, 0.03073994442820549, 0.13564927875995636, 0.3355739116668701, 0.12724290788173676, 0.09293586015701294, 0.09716520458459854, -0.1503991186618805, 0.11915182322263718, 0.020358208566904068, 0.35287541151046753, -0.2391510009765625, 0.030494187027215958, 0.1499476283788681, -0.04457354545593262, 0.018127983435988426, 0.30419227480888367, 0.062434639781713486, 0.3548302948474884, -0.1997123509645462, 0.09127095341682434, 0.1484886109828949, -0.019371559843420982, -0.3439302146434784, 0.07209452241659164, -0.04583446681499481, 0.11302043497562408, 0.03090457245707512, 0.35194188356399536, -0.4963358938694, 0.10905784368515015, -0.07211069762706757, -0.11056080460548401, 0.2750456631183624, 0.39579975605010986, 0.21470794081687927, -0.19676432013511658, -0.05739651620388031, 0.0661710575222969, -0.499203085899353, -0.13096578419208527, -0.09641629457473755, -0.27784812450408936, -0.0018213773146271706, -0.2417566180229187, 0.2011701911687851, 0.03256435692310333, 0.2900182604789734, -0.04948769882321358, 0.17204289138317108, 0.18037204444408417, -0.1835786998271942, -0.259032666683197, 0.5091830492019653, 0.08562871813774109, 0.0005529467016458511, -0.086220383644104, 0.0864066556096077, -0.04024798423051834, 0.03923304006457329, 0.12255921214818954, -0.2555398643016815, -0.23044860363006592, 0.052326325327157974, -0.32288092374801636, 0.1670798510313034, 0.2548754811286926, -0.10401216894388199, 0.1812736541032791, -0.23451772332191467, 0.03735332936048508, -0.0016357684507966042, 0.38598331809043884, 0.15094909071922302, -0.18771082162857056, 0.1838017851114273, -0.016625382006168365, 0.2931278347969055, -0.011337539181113243, 0.09273933619260788, -0.34694772958755493, -0.18201546370983124, -0.21056190133094788, -0.35781434178352356, -0.30770713090896606, -0.16115763783454895, 0.1769244521856308, 0.312644362449646, -0.021553928032517433, -0.09887917339801788, -0.3465912640094757, 0.05805686488747597, 0.11999134719371796, 0.11805551499128342, -0.10086046904325485, 0.16625292599201202, -0.133497416973114, 0.05336100980639458, -0.029632598161697388, 0.25976428389549255, 0.0403515063226223, 0.005000689998269081, -0.20380590856075287, -0.6487120389938354, 0.35371720790863037, 0.037906911224126816, -0.35471639037132263, 0.03310747444629669, 0.26451730728149414, -0.06786216050386429, -0.20832662284374237, -0.128378763794899, 0.24373430013656616, -0.09091836959123611, -0.14906978607177734, 0.12182514369487762, -0.07128942012786865, 0.0013771122321486473, -0.17583341896533966, -0.024315305054187775, 0.4230726659297943, 0.29461073875427246, 0.021280573680996895, -0.16188256442546844, -0.08793164044618607 ]
https://github.com/huggingface/datasets/issues/2474
cache_dir parameter for load_from_disk ?
Hi ! `load_from_disk` doesn't move the data. If you specify a local path to your mounted drive, then the dataset is going to be loaded directly from the arrow file in this directory. The cache files that result from `map` operations are also stored in the same directory by default. However note than writing data to your google drive actually fills the VM's disk (see https://github.com/huggingface/datasets/issues/643) Given that, I don't think that changing the cache directory changes anything. Let me know what you think
**Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function?
84
cache_dir parameter for load_from_disk ? **Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function? Hi ! `load_from_disk` doesn't move the data. If you specify a local path to your mounted drive, then the dataset is going to be loaded directly from the arrow file in this directory. The cache files that result from `map` operations are also stored in the same directory by default. However note than writing data to your google drive actually fills the VM's disk (see https://github.com/huggingface/datasets/issues/643) Given that, I don't think that changing the cache directory changes anything. Let me know what you think
[ -0.27172422409057617, -0.12313587963581085, -0.07020481675863266, 0.12663309276103973, 0.21557468175888062, -0.02143821492791176, 0.28476423025131226, 0.08484724164009094, 0.4296780824661255, 0.3610467314720154, -0.17608073353767395, 0.2474939376115799, -0.23836646974086761, 0.24224035441875458, 0.27031612396240234, 0.009947199374437332, 0.002495281398296356, -0.06446608901023865, -0.0686381459236145, -0.13334226608276367, -0.14860311150550842, 0.15852922201156616, 0.020862482488155365, -0.2857361435890198, -0.028274500742554665, -0.18979158997535706, -0.026502177119255066, 0.275765061378479, 0.3105607032775879, -0.3239329755306244, 0.15480902791023254, 0.1240980327129364, 0.15721891820430756, 0.5559694170951843, -0.00010478287731530145, -0.023592233657836914, -0.02221820503473282, -0.25709888339042664, -0.36808136105537415, -0.11269304156303406, -0.06556384265422821, -0.14304661750793457, 0.07896088063716888, -0.059648651629686356, -0.490425705909729, 0.08902204036712646, -0.015267858281731606, -0.2515115737915039, 0.18918171525001526, 0.11556003242731094, 0.24837012588977814, -0.0900905504822731, -0.37905532121658325, 0.06607730686664581, 0.051430560648441315, 0.04616335779428482, -0.19042524695396423, 0.5480617880821228, 0.08463511615991592, 0.10860633105039597, -0.1455182135105133, 0.43315377831459045, -0.058238305151462555, 0.16260290145874023, 0.5302646160125732, 0.3962351083755493, -0.06343143433332443, -0.17621226608753204, 0.043152134865522385, -0.12028404325246811, 0.505624532699585, -0.210980623960495, -0.23229849338531494, -0.2513064444065094, 0.022834405303001404, -0.3922424912452698, 0.38442420959472656, 0.1623051017522812, -0.19850800931453705, 0.37778034806251526, -0.2268851399421692, -0.39632314443588257, -0.1039247214794159, 0.013589359819889069, -0.000006258487701416016, -0.16830182075500488, -0.23518475890159607, -0.0759989395737648, 0.17627933621406555, 0.14493635296821594, 0.20628318190574646, -0.053626514971256256, 0.052050020545721054, 0.3046586215496063, -0.09175924956798553, -0.13891202211380005, -0.046485960483551025, 0.33140912652015686, 0.007866550236940384, 0.014784162864089012, 0.47136160731315613, 0.07972767949104309, -0.21298804879188538, 0.18167078495025635, -0.0676674097776413, 0.3930070102214813, -0.2098645269870758, -0.027415871620178223, 0.47523975372314453, 0.16826973855495453, -0.21313846111297607, -0.09706290811300278, 0.15193817019462585, -0.0439625084400177, 0.2183883935213089, 0.14001335203647614, 0.03646233305335045, -0.1857561320066452, 0.2886321544647217, -0.20891602337360382, 0.13197213411331177, 0.06946123391389847, 0.28249701857566833, 0.45583298802375793, -0.06665865331888199, -0.131329745054245, 0.12084758281707764, -0.21229548752307892, -0.16529428958892822, 0.18839409947395325, -0.10936848819255829, 0.04551568627357483, -0.2290371060371399, 0.4892905056476593, 0.2463841289281845, 0.09028659760951996, 0.2731117904186249, -0.2993308901786804, 0.207162544131279, 0.07549290359020233, 0.07553544640541077, -0.1780981421470642, 0.34908995032310486, 0.3921796381473541, -0.006289023905992508, 0.0368461012840271, -0.05101405456662178, -0.09270986914634705, -0.3634408116340637, 0.21841353178024292, -0.42283451557159424, -0.43562716245651245, 0.419455885887146, 0.1934918761253357, -0.18568609654903412, 0.07231602817773819, -0.5352764129638672, 0.3024529218673706, -0.1795235574245453, -0.16896100342273712, -0.04515732079744339, 0.059560470283031464, -0.5309443473815918, -0.33913904428482056, 0.1563926488161087, 0.28452223539352417, -0.18559563159942627, -0.11205411702394485, 0.15168677270412445, 0.1550036519765854, -0.13758990168571472, 0.3683571219444275, -0.2482611984014511, 0.020129479467868805, -0.24034442007541656, -0.15250355005264282, 0.20097088813781738, -0.3625815212726593, -0.6052302718162537, 0.1620091199874878, -0.12627285718917847, -0.031002068892121315, -0.03774552792310715, 0.1869262456893921, 0.1384860873222351, -0.19770336151123047, 0.35918128490448, 0.6201860904693604, 0.05593512952327728, 0.3013574779033661, -0.31250953674316406, -0.2830687463283539, -0.3325064182281494, 0.24173490703105927, -0.0909443348646164, 0.1030958741903305, 0.1306125670671463, -0.282785564661026, 0.05084994435310364, -0.194055438041687, 0.048846468329429626, 0.39343851804733276, 0.36019131541252136, -0.2557523846626282, -0.00823548249900341, 0.12700486183166504, -0.6520008444786072, 0.33128029108047485, -0.0341886468231678, -0.062396325170993805, -0.044327810406684875, -0.16311651468276978, 0.18902459740638733, -0.17281152307987213, -0.04324199631810188, -0.010752122849225998, 0.06556867063045502, 0.07577744871377945, 0.22532036900520325, -0.18497635424137115, -0.013154879212379456, 0.32887738943099976, 0.0081904586404562, -0.06732918322086334, 0.15776224434375763, 0.22647924721240997, 0.08563781529664993, -0.11275780200958252, -0.1247870922088623, -0.08796317130327225, 0.08169853687286377, -0.16883090138435364, -0.21738117933273315, 0.38817930221557617, 0.18219229578971863, 0.45625847578048706, -0.08318563550710678, 0.2558673918247223, 0.3007512390613556, -0.04255785048007965, 0.49232980608940125, 0.006305457092821598, 0.013065855018794537, 0.11248181015253067, -0.35704514384269714, 0.38599103689193726, -0.19074738025665283, 0.17457610368728638, 0.2347823530435562, -0.11417127400636673, 0.19006991386413574, -0.1285560429096222, 0.1645837426185608, -0.14811061322689056, 0.13594406843185425, 0.32111191749572754, 0.3957825303077698, 0.1460081785917282, -0.19961415231227875, 0.26747438311576843, 0.3323661983013153, 0.09687978029251099, 0.10319284349679947, 0.24613401293754578, -0.36912816762924194, -0.2252022922039032, 0.13975311815738678, 0.1975070685148239, 0.5396437644958496, 0.34246817231178284, 0.3131104111671448, 0.15064819157123566, 0.12478337436914444, -0.09372883290052414, 0.21068628132343292, -0.111732617020607, 0.18530498445034027, 0.07623573392629623, 0.19081789255142212, -0.14876388013362885, -0.21652016043663025, 0.07602031528949738, -0.0008255094289779663, 0.05490320175886154, -0.1907074898481369, 0.1433241069316864, 0.08543770015239716, 0.05194098502397537, -0.1658158153295517, -0.033937398344278336, -0.07656046748161316, 0.0708649680018425, 0.09297206997871399, 0.49136802554130554, -0.12501205503940582, 0.07184558361768723, 0.2910551428794861, 0.3936712145805359, -0.12275637686252594, -0.3675519824028015, -0.04873567819595337, -0.03315380960702896, -0.07195962965488434, 0.045964326709508896, 0.14639343321323395, -0.000963069498538971, 0.20919477939605713, 0.15477368235588074, -0.004435873590409756, -0.31658196449279785, -0.17443615198135376, 0.187691792845726, -0.02691543847322464, 0.5244335532188416, -0.057649970054626465, 0.013823337852954865, -0.03101813793182373, 0.0415322408080101, -0.013733978383243084, -0.4554653465747833, -0.10724659264087677, -0.39949893951416016, 0.10934866219758987, 0.2656007409095764, -0.3197874128818512, -0.011038802564144135, -0.3589964210987091, -0.5685349702835083, 0.16373370587825775, 0.28178244829177856, 0.23839277029037476, 0.2651652693748474, 0.08988090604543686, -0.061872921884059906, 0.5726665258407593, -0.05466426908969879, -0.3195030689239502, -0.38800808787345886, 0.285887748003006, -0.3585861325263977, -0.04619046673178673, 0.06633257865905762, -0.048633866012096405, 0.04153867065906525, 0.24879631400108337, -0.3152451515197754, -0.5569886565208435, -0.09413951635360718, 0.07631340622901917, -0.12392354011535645, -0.04839751869440079, 0.3200337290763855, -0.07057146728038788, -0.13556607067584991, -0.01751864328980446, -0.4911370575428009, 0.04409649223089218, 0.47895678877830505, 0.0262698233127594, 0.14131417870521545, 0.051087863743305206, -0.041100647300481796, 0.6494169235229492, -0.31435665488243103, 0.07792084664106369, 0.21430692076683044, 0.23963148891925812, 0.3123823404312134, -0.26637744903564453, -0.11682425439357758, 0.0004899273626506329, 0.0033941417932510376, -0.5504611134529114, 0.3372144103050232, 0.1995888650417328, -0.3394123911857605, -0.11921800673007965, -0.381487637758255, 0.052133604884147644, -0.2729561924934387, 0.3701464831829071, 0.22524473071098328, 0.20538821816444397, -0.010891344398260117, 0.016804389655590057, -0.3317088782787323, -0.110064797103405, 0.12909309566020966, 0.2059309482574463, 0.16580098867416382, -0.03933968394994736, -0.10687556862831116, 0.026521245017647743, -0.603047251701355, 0.36510753631591797, 0.0749174952507019, -0.43625110387802124, -0.19047771394252777, -0.09780474007129669, 0.1025557592511177, -0.023730909451842308, 0.40698468685150146, -0.3171292841434479, -0.04071801155805588, 0.01265064999461174, -0.20842066407203674, 0.09992391616106033, -0.019975772127509117, 0.09177838265895844, 0.13467685878276825, -0.19531257450580597, 0.29860901832580566, -0.023523330688476562, -0.3415674567222595, 0.08346924185752869, 0.18541283905506134, -0.3344799876213074, -0.013144409283995628, -0.1658170223236084, -0.33217209577560425, -0.24766863882541656, 0.04752960428595543, -0.02087804675102234, -0.1749146431684494, 0.10176347941160202, 0.05146394297480583, 0.04905134439468384, -0.09317562729120255, 0.03204870969057083, 0.05036395415663719, 0.4364529848098755, 0.3477070927619934, -0.035902366042137146, 0.34188488125801086, 0.18387125432491302, 0.144715815782547, 0.3590497374534607, -0.31319287419319153, 0.15049345791339874, 0.0009917635470628738, -0.06262879818677902, 0.17169010639190674, 0.5609201192855835, -0.030536632984876633, 0.016608379781246185, -0.046915918588638306, 0.05139879882335663, -0.3236755132675171, 0.30213823914527893, -0.2750931978225708, 0.11463738977909088, -0.05544913187623024, -0.42459288239479065, 0.5308992862701416, 0.02906593680381775, -0.2997187376022339, 0.13671596348285675, -0.00018551945686340332, -0.702589213848114, 0.48859739303588867, 0.33618074655532837, 0.9242454171180725, -0.24021218717098236, 0.32184505462646484, 0.07886335253715515, 0.1488070785999298, 0.1762290596961975, -0.15504105389118195, 0.24322296679019928, -0.18241454660892487, -0.43606582283973694, -0.11675365269184113, -0.18828018009662628, -0.12249625474214554, 0.010843764990568161, -0.37193620204925537, 0.3366634249687195, 0.00389263778924942, 0.00986546277999878, -0.1484052985906601, 0.305633008480072, 0.05655977874994278, -0.5729460120201111, -0.4863712191581726, 0.19159576296806335, -0.15885217487812042, 0.216287299990654, -0.020858284085989, -0.05222461745142937, 0.007826197892427444, -0.014212964102625847, -0.0103386789560318, -0.14474403858184814, -0.6259279847145081, 0.18246248364448547, -0.4253157377243042, -0.399819016456604, -0.118400439620018, 0.015510495752096176, 0.2847125828266144, 0.008999709039926529, -0.11560007929801941, 0.2833637595176697, -0.10567616671323776, 0.23309659957885742, -0.2701420485973358, -0.24820810556411743, 0.3209015130996704, 0.001377098262310028, 0.1363830864429474, -0.04803118854761124, -0.1237725242972374, -0.5901225209236145, 0.060321539640426636, -0.014385238289833069, 0.03996947407722473, -0.019612258300185204, -0.2681327760219574, 0.007938534021377563, -0.19739143550395966, -0.058412909507751465, 0.16189220547676086, 0.1366020143032074, 0.03945654258131981, 0.16733144223690033, 0.2108813375234604, -0.23716206848621368, -0.10119971632957458, 0.11550401151180267, 0.23187780380249023, -0.19327861070632935, 0.415446937084198, -0.0743580162525177, -0.0843023806810379, -0.23340561985969543, -0.20855918526649475, 0.03074723109602928, 0.07382158190011978, 0.40393099188804626, 0.024986442178487778, -0.055265918374061584, -0.00819217599928379, 0.22612369060516357, 0.1802876889705658, 0.09724237769842148, -0.4014543890953064, -0.13730573654174805, -0.3850555121898651, 0.2895958721637726, -0.1665964275598526, 0.2592765986919403, 0.028567686676979065, -0.16881141066551208, 0.016490520909428596, 0.05096735805273056, -0.42560312151908875, 0.1830047369003296, -0.11006512492895126, -0.08037180453538895, 0.315486878156662, -0.0769214853644371, 0.4419025480747223, -0.08663272857666016, 0.08021664619445801, -0.19898977875709534, -0.2595525085926056, -0.2575898766517639, -0.23026764392852783, 0.09082281589508057, -0.1220993623137474, 0.15831716358661652, -0.151914581656456, -0.1913687139749527, 0.148145392537117, -0.3160800039768219, 0.2773512005805969, -0.0007621347904205322, -0.025420844554901123, -0.21460740268230438, -0.21459339559078217, -0.002645425498485565, -0.041805315762758255, 0.18071912229061127, -0.09775389730930328, 0.17650222778320312, 0.0674683004617691, 0.030634576454758644, -0.21442271769046783, -0.08082515746355057, 0.18434128165245056, 0.0756341814994812, -0.05441500246524811, 0.03826482966542244, 0.1736975461244583, 0.15682414174079895, -0.07331817597150803, 0.1325685828924179, 0.03151954337954521, -0.21813008189201355, -0.08886999636888504, -0.02440514974296093, 0.08802708983421326, 0.22890189290046692, 0.05119727551937103, -0.14817671477794647, -0.0000337306410074234, -0.5024088025093079, 0.29113706946372986, 0.47735288739204407, 0.2948720455169678, 0.46681106090545654, 0.11888855695724487, 0.16771656274795532, 0.45170676708221436, 0.021930472925305367, -0.11844296753406525, -0.13566292822360992, 0.15268908441066742, 0.2881660759449005, 0.29488131403923035, 0.2481929361820221, 0.33669203519821167, 0.21980755031108856, -0.2805715799331665, 0.03887243941426277, -0.09681165963411331, -0.016058366745710373, -0.054368771612644196, -0.47911372780799866, 0.11152461171150208, 0.16254733502864838, -0.0872814804315567, 0.30227112770080566, -0.04252585768699646, 0.02946271002292633, -0.45164749026298523, -0.2417028844356537, -0.12607721984386444, 0.12586709856987, -0.21337038278579712, -0.10838788747787476, 0.12616601586341858, 0.006900176405906677, -0.026263851672410965, 0.3184451460838318, 0.01805535890161991, -0.28036922216415405, 0.22180840373039246, 0.04092340171337128, 0.1581665575504303, 0.28068384528160095, -0.01101728156208992, 0.218328595161438, 0.053335923701524734, -0.07505231350660324, 0.16895756125450134, -0.3555186986923218, -0.0037466958165168762, -0.06610547006130219, -0.0649142786860466, 0.013874676078557968, 0.28725337982177734, -0.27539515495300293, -0.025390788912773132, 0.07370655238628387, -0.020216383039951324, -0.24668100476264954, -0.1995467096567154, 0.027463119477033615, 0.02924594283103943, 0.059801649302244186, 0.19958503544330597, -0.16345717012882233, 0.17892949283123016, -0.07697407901287079, 0.11547580361366272, -0.04844123125076294, -0.06614092737436295, 0.34105756878852844, -0.06932078301906586, -0.2686145305633545, -0.037332333624362946, -0.1331005096435547, 0.008488524705171585, 0.16983474791049957, -0.2074604332447052, 0.06928350776433945, 0.2410336285829544, 0.1047196164727211, 0.22396071255207062, 0.6690725088119507, 0.091563880443573, 0.14589720964431763, -0.5181546211242676, 0.008450329303741455, -0.45688819885253906, -0.07257815450429916, 0.16381727159023285, 0.16610310971736908, -0.27377697825431824, 0.3370564877986908, 0.1787356585264206, 0.16221457719802856, -0.021641701459884644, -0.008584879338741302, 0.054708920419216156, -0.18801547586917877, -0.2519066631793976, -0.00044474005699157715, -0.0424702912569046, 0.09059547632932663, 0.11606498062610626, -0.4988148808479309, -0.04027589038014412, 0.08755949139595032, 0.0460803285241127, -0.08439386636018753, 0.1787145882844925, -0.09846071898937225, 0.16279342770576477, 0.6224087476730347, -0.23400232195854187, 0.056721799075603485, -0.03713875263929367, -0.15724149346351624, -0.08799117803573608, -0.17845091223716736, -0.23184141516685486, -0.12725228071212769, 0.08415095508098602, 0.5111749172210693, -0.12564541399478912, -0.08740024268627167, -0.3893437683582306, 0.18747541308403015, 0.2763236165046692, -0.07125160098075867, 0.14126603305339813, 0.07366786897182465, -0.014261260628700256, 0.13816779851913452, 0.2249017059803009, 0.31170132756233215, -0.08240316808223724, -0.07727520167827606, -0.43718892335891724, 0.01759832166135311, 0.43979600071907043, -0.16326992213726044, -0.12242962419986725, 0.08895648270845413, 0.3794548511505127, 0.16676509380340576, -0.1413537710905075, -0.47297295928001404, 0.058628641068935394, 0.1840686947107315, -0.04970402270555496, -0.3430536985397339, 0.4234716296195984, -0.02615289017558098, -0.026562094688415527, -0.21298456192016602, 0.1733538657426834, -0.026395738124847412, -0.34200361371040344, -0.503629744052887, -0.22049781680107117 ]
https://github.com/huggingface/datasets/issues/2474
cache_dir parameter for load_from_disk ?
Thanks for your answer! I am a little surprised since I just want to read the dataset. After debugging a bit, I noticed that the VM’s disk fills up when the tables (generator) are converted to a list: https://github.com/huggingface/datasets/blob/5ba149773d23369617563d752aca922081277ec2/src/datasets/table.py#L850 If I try to iterate through the table’s generator e.g.: `length = sum(1 for x in tables)` the VM’s disk fills up as well. I’m running out of Ideas 😄
**Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function?
69
cache_dir parameter for load_from_disk ? **Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function? Thanks for your answer! I am a little surprised since I just want to read the dataset. After debugging a bit, I noticed that the VM’s disk fills up when the tables (generator) are converted to a list: https://github.com/huggingface/datasets/blob/5ba149773d23369617563d752aca922081277ec2/src/datasets/table.py#L850 If I try to iterate through the table’s generator e.g.: `length = sum(1 for x in tables)` the VM’s disk fills up as well. I’m running out of Ideas 😄
[ -0.3292524516582489, -0.13604727387428284, -0.07416879385709763, 0.3395155072212219, 0.30544793605804443, 0.0242106094956398, 0.11280058324337006, 0.11024835705757141, 0.38170742988586426, 0.47350192070007324, -0.1144268810749054, 0.33082470297813416, -0.38737353682518005, 0.26286786794662476, 0.3451521694660187, 0.13998350501060486, 0.01987122744321823, 0.047779154032468796, -0.0935739278793335, -0.17910632491111755, -0.24414390325546265, 0.18871717154979706, 0.03617888689041138, -0.3975588083267212, -0.018123911693692207, -0.17535175383090973, 0.02001188136637211, 0.21087577939033508, 0.17625761032104492, -0.25358742475509644, 0.07064905762672424, 0.12896431982517242, 0.20930533111095428, 0.5231040716171265, -0.00010966256377287209, -0.03471113741397858, -0.06302662193775177, -0.23851358890533447, -0.4836075007915497, -0.11482013761997223, 0.018378429114818573, -0.21472929418087006, 0.13083063066005707, -0.016622520983219147, -0.46953240036964417, -0.012112935073673725, -0.12945273518562317, -0.17200887203216553, 0.23421795666217804, 0.08742419630289078, 0.2182985097169876, -0.10999823361635208, -0.33843520283699036, 0.054546888917684555, 0.21237632632255554, -0.03605904430150986, -0.2365245372056961, 0.5095517039299011, 0.28909236192703247, -0.017880909144878387, -0.1884745955467224, 0.49028444290161133, -0.15122899413108826, 0.131413072347641, 0.6123003363609314, 0.36705896258354187, -0.022824160754680634, -0.23940932750701904, -0.00008890405297279358, -0.10506831854581833, 0.544956624507904, -0.19282126426696777, -0.1841847449541092, -0.29294317960739136, 0.08187828212976456, -0.4848727285861969, 0.2964898645877838, 0.23943115770816803, -0.3697341978549957, 0.4065174460411072, -0.22465264797210693, -0.31071338057518005, -0.1870347261428833, -0.05296393483877182, 0.025794729590415955, -0.2531563341617584, -0.24386534094810486, -0.09821196645498276, 0.35376688838005066, 0.22490763664245605, 0.41968268156051636, -0.06052548438310623, 0.030505821108818054, 0.23567472398281097, -0.26789143681526184, -0.16732481122016907, 0.16173192858695984, 0.2779462933540344, 0.11602102965116501, 0.13762027025222778, 0.43200966715812683, 0.011315379291772842, -0.16686591506004333, 0.11391793191432953, 0.0027676764875650406, 0.2854042947292328, -0.2825756371021271, 0.09384740889072418, 0.33359044790267944, 0.187783882021904, -0.17802827060222626, -0.035674355924129486, -0.08092786371707916, 0.07280763983726501, 0.32744914293289185, 0.01600242406129837, -0.025243032723665237, -0.14080661535263062, 0.022267991676926613, -0.014022995717823505, 0.2142016589641571, 0.215157151222229, 0.3565918505191803, 0.5565622448921204, -0.11163549870252609, -0.025187555700540543, 0.162908136844635, -0.23238898813724518, -0.20444421470165253, -0.0039908732287585735, -0.10499536991119385, 0.005065886303782463, -0.169592022895813, 0.36987820267677307, 0.3263736367225647, 0.04482961446046829, 0.1683119684457779, -0.25337597727775574, 0.2748968005180359, -0.02897508628666401, 0.12011942267417908, -0.33169642090797424, 0.3535512685775757, 0.51457679271698, 0.12408056855201721, -0.03365059196949005, 0.0273190438747406, -0.23205320537090302, -0.2865382432937622, 0.41150930523872375, -0.23648706078529358, -0.4154905676841736, 0.3976670801639557, 0.17894354462623596, -0.1540035605430603, 0.12634001672267914, -0.5711727738380432, 0.2753770351409912, -0.13128989934921265, -0.014327721670269966, -0.20390117168426514, -0.005609452724456787, -0.5529271364212036, -0.3339086174964905, 0.15360741317272186, 0.3464925289154053, -0.3733968138694763, 0.07740572094917297, 0.12396926432847977, 0.17178413271903992, 0.01715322583913803, 0.42310118675231934, -0.2158161699771881, 0.12415099889039993, -0.23110073804855347, -0.32775336503982544, 0.05034797638654709, -0.08835791796445847, -0.70013827085495, 0.23209384083747864, -0.024887491017580032, 0.10380954295396805, 0.1604831963777542, 0.3248530328273773, 0.21063831448554993, -0.24328425526618958, 0.5372143983840942, 0.5482680201530457, -0.045603588223457336, 0.21872082352638245, -0.27009037137031555, -0.2495957314968109, -0.2289041429758072, 0.22867201268672943, -0.10619938373565674, 0.1680552065372467, -0.011308886110782623, -0.22654792666435242, 0.18396176397800446, -0.23297911882400513, -0.0076498007401824, 0.3606112003326416, 0.31380459666252136, -0.22965742647647858, -0.00696208281442523, 0.14888060092926025, -0.5796350240707397, 0.2576671540737152, 0.053187042474746704, -0.054532937705516815, -0.1754683405160904, -0.2799570560455322, 0.08597919344902039, 0.1150502935051918, -0.10814936459064484, 0.11995276808738708, 0.04523196816444397, 0.031409285962581635, 0.16391237080097198, -0.3627093434333801, -0.05756952986121178, 0.192623108625412, -0.22847725450992584, -0.10366400331258774, 0.055523909628391266, 0.2995520830154419, 0.17736661434173584, -0.10415147989988327, 0.028490513563156128, -0.053762517869472504, 0.08203555643558502, -0.09556416422128677, -0.08201167732477188, 0.24792510271072388, 0.351405531167984, 0.3084273338317871, -0.17221572995185852, 0.3389834761619568, 0.22552795708179474, 0.08645617961883545, 0.37394845485687256, -0.03988895192742348, 0.13210967183113098, 0.0006419941782951355, -0.27036964893341064, 0.3023081421852112, -0.24283520877361298, 0.15291401743888855, 0.14048141241073608, -0.13560914993286133, 0.29080358147621155, -0.03659362345933914, 0.12800553441047668, -0.145681694149971, 0.12924757599830627, 0.4699779450893402, 0.3004356622695923, 0.14818213880062103, -0.29167747497558594, 0.2725987136363983, 0.32742077112197876, -0.0017866697162389755, 0.10434052348136902, 0.20344188809394836, -0.3379882574081421, -0.2950522005558014, 0.1544414907693863, 0.21034593880176544, 0.4295651912689209, 0.2874739468097687, 0.2392277717590332, 0.046379294246435165, -0.0203874409198761, -0.1091996431350708, 0.267098069190979, -0.04474112391471863, 0.2852112054824829, 0.16259638965129852, 0.07050272077322006, -0.332369327545166, -0.27473053336143494, 0.1028757244348526, 0.07222627103328705, 0.172826886177063, -0.2719561755657196, 0.1694493293762207, 0.08876105397939682, 0.07311223447322845, -0.09023511409759521, -0.022102300077676773, 0.01515187881886959, 0.025263601914048195, 0.09401445090770721, 0.6236655712127686, -0.06869626045227051, -0.04967912286520004, 0.38165298104286194, 0.3992089033126831, -0.019155967980623245, -0.30554401874542236, -0.040658727288246155, -0.031011052429676056, -0.09644859284162521, 0.05325169488787651, 0.22597657144069672, -0.15034887194633484, 0.306043803691864, 0.02211502008140087, 0.023755978792905807, -0.23177509009838104, -0.11403072625398636, 0.20625616610050201, -0.09481458365917206, 0.5883115530014038, 0.0014551430940628052, 0.14540208876132965, -0.0026166103780269623, 0.17888537049293518, -0.0646846666932106, -0.3798908591270447, -0.01507081650197506, -0.13841311633586884, 0.08299614489078522, 0.1341269463300705, -0.21456991136074066, -0.064452163875103, -0.2786407172679901, -0.5284278988838196, 0.08228364586830139, 0.3449889123439789, 0.3361673355102539, 0.294219434261322, 0.22453731298446655, -0.04067038744688034, 0.7315271496772766, -0.03062044270336628, -0.3309214413166046, -0.29925477504730225, 0.34573549032211304, -0.22139640152454376, -0.06860166788101196, 0.23696118593215942, -0.0908062681555748, 0.0824195146560669, 0.25169676542282104, -0.5148745179176331, -0.4952053725719452, -0.06862848252058029, 0.029477987438440323, -0.20487168431282043, -0.03710684925317764, 0.1333857774734497, 0.005990666337311268, -0.06296386569738388, -0.05944225937128067, -0.3281792402267456, -0.09781823307275772, 0.2368493676185608, 0.09395047277212143, 0.132253497838974, 0.24172577261924744, -0.0481889583170414, 0.5023214817047119, -0.3002934753894806, 0.15722110867500305, 0.14536511898040771, 0.22082623839378357, 0.3550999164581299, -0.22882682085037231, -0.12866687774658203, -0.24849186837673187, -0.06353713572025299, -0.6394156813621521, 0.31655657291412354, 0.19068574905395508, -0.2048771232366562, -0.09530393779277802, -0.21657583117485046, 0.12270963937044144, -0.2248545140028, 0.45228704810142517, 0.17985504865646362, 0.18708375096321106, 0.07489053905010223, 0.08899398893117905, -0.3011835217475891, -0.19072356820106506, -0.06368665397167206, 0.10966923832893372, 0.25059300661087036, -0.12723655998706818, -0.03226727247238159, -0.04879164323210716, -0.6629840135574341, 0.2970026135444641, 0.032904352992773056, -0.35594502091407776, -0.022608399391174316, -0.09225915372371674, 0.15669670701026917, -0.0437035970389843, 0.6123078465461731, -0.24946381151676178, -0.046848490834236145, 0.06140456721186638, -0.20948050916194916, 0.1058543398976326, 0.10697020590305328, -0.04141395539045334, 0.108899787068367, -0.2605800926685333, 0.23247523605823517, -0.03537555783987045, -0.2694307565689087, 0.06811222434043884, 0.4016903340816498, -0.3747313320636749, 0.05558200553059578, -0.26160281896591187, -0.45194491744041443, -0.27914997935295105, 0.027767285704612732, 0.07633567601442337, -0.047964293509721756, -0.07664891332387924, -0.04709527641534805, 0.07479359209537506, -0.175521582365036, 0.0708232894539833, 0.1097227931022644, 0.5314674377441406, 0.34682604670524597, 0.10141581296920776, 0.17099495232105255, 0.07728870213031769, 0.1812954545021057, 0.5112218856811523, -0.318295955657959, 0.08110073953866959, 0.14117887616157532, -0.14577198028564453, 0.0749378353357315, 0.5205650925636292, -0.1423424780368805, -0.013347089290618896, -0.2382354736328125, 0.0977482870221138, -0.36767950654029846, 0.1682329773902893, -0.2828286290168762, 0.09865627437829971, -0.011188333854079247, -0.7148754596710205, 0.4752882122993469, -0.01681625470519066, -0.2711823284626007, 0.1365140676498413, -0.11338678002357483, -0.5768018960952759, 0.5007022023200989, 0.3116944432258606, 1.001471757888794, -0.26322364807128906, 0.365527480840683, 0.14762738347053528, 0.2187671810388565, 0.13615715503692627, -0.3522643446922302, 0.25283634662628174, -0.2399028092622757, -0.5551369786262512, -0.11111881583929062, -0.22907115519046783, -0.1229606494307518, 0.13848233222961426, -0.33389174938201904, 0.3431204855442047, -0.06438073515892029, -0.04515056684613228, -0.07369757443666458, 0.27396950125694275, -0.059137098491191864, -0.4643303155899048, -0.6345861554145813, 0.14901375770568848, -0.10266907513141632, -0.014817040413618088, -0.10195331275463104, 0.1241416484117508, 0.06667253375053406, -0.0883292481303215, -0.0709172859787941, -0.11440646648406982, -0.5100647211074829, 0.14248999953269958, -0.34982070326805115, -0.44425302743911743, -0.12107807397842407, 0.002012159675359726, 0.06330835074186325, 0.15917807817459106, -0.10619986057281494, 0.19526760280132294, -0.1250755786895752, 0.24686910212039948, -0.35377037525177, -0.16490046679973602, 0.2606600522994995, 0.005032915621995926, 0.09525614231824875, 0.11331543326377869, -0.11397536098957062, -0.5635501146316528, -0.0026650577783584595, 0.03398614376783371, 0.05278182774782181, -0.08830062299966812, -0.17899532616138458, -0.01339307427406311, -0.22882415354251862, -0.07481731474399567, 0.1304320991039276, 0.17429038882255554, -0.11997372657060623, 0.22257176041603088, 0.16051989793777466, -0.2823362350463867, -0.04380318149924278, 0.06444089114665985, 0.49076488614082336, -0.11091461032629013, 0.4364699721336365, 0.1345931887626648, -0.02801181748509407, -0.27282047271728516, -0.18751586973667145, -0.057181715965270996, -0.07911796122789383, 0.49869564175605774, -0.04690561816096306, -0.04717940837144852, 0.07177524268627167, 0.2687981128692627, 0.20989468693733215, 0.062321338802576065, -0.40799179673194885, -0.22598160803318024, -0.2895214557647705, 0.10091619193553925, -0.011605393141508102, 0.21317534148693085, 0.14438965916633606, -0.2463236302137375, -0.048242002725601196, 0.10086198896169662, -0.3798358738422394, 0.11776816099882126, -0.18414419889450073, -0.003040030598640442, 0.0865657851099968, -0.032316260039806366, 0.4071117043495178, -0.1312696933746338, 0.03468535840511322, -0.1083797961473465, -0.21908864378929138, -0.2330467402935028, -0.21973158419132233, 0.13238179683685303, -0.17514970898628235, 0.2051771730184555, -0.2381197214126587, -0.20931679010391235, 0.07413534820079803, -0.3226129412651062, 0.35402417182922363, -0.14319011569023132, -0.03967052698135376, -0.31141117215156555, -0.07734209299087524, 0.07402830570936203, -0.019183216616511345, 0.11674872785806656, -0.16924768686294556, 0.267314612865448, 0.058851052075624466, 0.018574273213744164, -0.011008785106241703, -0.11844728142023087, 0.016273733228445053, 0.1511172354221344, -0.08117488026618958, -0.1267661452293396, 0.3653869926929474, 0.08664026856422424, -0.03085365518927574, 0.14553360641002655, 0.06391885876655579, -0.0026180818676948547, -0.02842993475496769, -0.08741545677185059, 0.10323674231767654, 0.19493408501148224, -0.015340026468038559, -0.24446062743663788, -0.2322171926498413, -0.33529987931251526, 0.20439249277114868, 0.5522082448005676, 0.2231103479862213, 0.3962382972240448, 0.14897695183753967, 0.1430341899394989, 0.4616468846797943, 0.0097331702709198, -0.11774809658527374, 0.02304992452263832, 0.11638535559177399, 0.2166339010000229, 0.192487895488739, 0.19818377494812012, 0.2370377779006958, 0.3087209463119507, -0.24652385711669922, -0.00801662914454937, -0.019135966897010803, -0.026311803609132767, -0.07730244845151901, -0.5415144562721252, 0.091639444231987, 0.20279189944267273, -0.16403982043266296, 0.33981040120124817, -0.1043202131986618, -0.1156582459807396, -0.23131249845027924, -0.02267584204673767, -0.22103311121463776, 0.2519417107105255, -0.20528224110603333, -0.1138438731431961, -0.023765193298459053, -0.025441620498895645, -0.13805803656578064, 0.2771420478820801, 0.04559151083230972, -0.35649436712265015, 0.039771344512701035, 0.044712476432323456, 0.18551619350910187, 0.21198245882987976, 0.1706024706363678, 0.2630200684070587, 0.0052259936928749084, -0.2124299705028534, 0.11543135344982147, -0.15538062155246735, 0.16907598078250885, -0.019037745893001556, -0.22976578772068024, 0.11867000162601471, 0.306860089302063, -0.266712486743927, -0.04719577357172966, 0.10878193378448486, -0.03505120053887367, -0.4230213761329651, -0.07917457073926926, -0.02617236226797104, 0.2590159773826599, 0.10340653359889984, 0.11928294599056244, -0.08107393234968185, 0.1665453463792801, 0.013578899204730988, 0.0845872014760971, -0.15952745079994202, -0.004385031759738922, 0.3106912076473236, -0.11077098548412323, -0.2941136956214905, -0.04080801457166672, -0.24506419897079468, -0.03851713240146637, 0.3194062411785126, -0.22343488037586212, 0.10006951540708542, 0.2046152949333191, 0.1049986407160759, 0.06404107809066772, 0.7118222713470459, 0.15899989008903503, 0.07628821581602097, -0.47504064440727234, -0.021359920501708984, -0.44190406799316406, -0.002065308392047882, -0.03116827830672264, -0.030529310926795006, -0.16540680825710297, 0.39600473642349243, 0.2405221164226532, 0.25526413321495056, -0.2573157548904419, -0.0068070003762841225, -0.11211301386356354, -0.038503050804138184, -0.2530665993690491, -0.18215255439281464, 0.008679017424583435, 0.12658247351646423, -0.03992381691932678, -0.5482533574104309, -0.014571856707334518, 0.16094018518924713, 0.04961097985506058, -0.19704847037792206, 0.18327394127845764, -0.02719796448945999, 0.32043924927711487, 0.5041552782058716, -0.10905617475509644, 0.18635910749435425, -0.03189261630177498, -0.09492721408605576, -0.05504773184657097, -0.17870107293128967, -0.16920623183250427, -0.07300949841737747, 0.2044581025838852, 0.40933847427368164, -0.0356401726603508, -0.06850965321063995, -0.28843817114830017, 0.11084727197885513, 0.26089853048324585, 0.10092820972204208, 0.01897057332098484, 0.09533283114433289, -0.04781431704759598, 0.18058675527572632, 0.09386242181062698, 0.2747207283973694, -0.06331862509250641, -0.045184679329395294, -0.34455397725105286, -0.03105628304183483, 0.27527493238449097, -0.1956726610660553, -0.28348344564437866, 0.12744826078414917, 0.3155272901058197, 0.016292724758386612, -0.19206278026103973, -0.38680949807167053, 0.013281695544719696, 0.17631973326206207, -0.12570568919181824, -0.35351258516311646, 0.45562463998794556, 0.1166873574256897, 0.057545047253370285, -0.22959451377391815, 0.17114785313606262, 0.04496833682060242, -0.385089635848999, -0.5124902725219727, -0.3491409420967102 ]
https://github.com/huggingface/datasets/issues/2474
cache_dir parameter for load_from_disk ?
Indeed reading the data shouldn't increase the VM's disk. Not sure what google colab does under the hood for that to happen
**Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function?
22
cache_dir parameter for load_from_disk ? **Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function? Indeed reading the data shouldn't increase the VM's disk. Not sure what google colab does under the hood for that to happen
[ -0.2947950065135956, -0.20461341738700867, -0.12458860874176025, 0.24072884023189545, 0.19853796064853668, 0.0009989291429519653, 0.20941925048828125, 0.08362597227096558, 0.3559877872467041, 0.48150819540023804, -0.1554524302482605, 0.24850893020629883, -0.34520381689071655, 0.28281649947166443, 0.2444070279598236, 0.08408629894256592, -0.06382539123296738, -0.10212497413158417, -0.05279640853404999, -0.15004649758338928, -0.17460140585899353, 0.16208285093307495, 0.03361101448535919, -0.44881099462509155, -0.07578485459089279, -0.15133240818977356, -0.0464412122964859, 0.2001648247241974, 0.24470394849777222, -0.28129491209983826, 0.06417074054479599, 0.03177190199494362, 0.25425589084625244, 0.4735644459724426, -0.00010552165622357279, -0.1294771283864975, -0.020028583705425262, -0.24587909877300262, -0.4441111385822296, -0.03729180991649628, -0.09575912356376648, -0.16867688298225403, 0.14951376616954803, -0.09323844313621521, -0.5178105235099792, 0.07902408391237259, -0.039462409913539886, -0.15955394506454468, 0.1908252239227295, 0.13642999529838562, 0.24885673820972443, -0.24507664144039154, -0.3598359525203705, 0.054679371416568756, 0.06626488268375397, 0.014715675264596939, -0.17179620265960693, 0.6884990334510803, 0.2043837308883667, 0.15452873706817627, -0.17958465218544006, 0.4665694534778595, -0.046855151653289795, 0.1521947830915451, 0.45816442370414734, 0.391041100025177, 0.14757782220840454, -0.20536097884178162, 0.07688027620315552, -0.19114604592323303, 0.5348828434944153, -0.12558558583259583, -0.16754934191703796, -0.2609575390815735, 0.16568148136138916, -0.33736082911491394, 0.3232169449329376, 0.1641477644443512, -0.25155454874038696, 0.42676302790641785, -0.18876731395721436, -0.4046664535999298, -0.17559818923473358, -0.012893542647361755, -0.0105823315680027, -0.05636721849441528, -0.21413429081439972, -0.11402735859155655, 0.22210846841335297, 0.1944483518600464, 0.4096285402774811, 0.05536474287509918, 0.1349542737007141, 0.2564835846424103, -0.027253415435552597, -0.2071184366941452, -0.07895389944314957, 0.24293527007102966, -0.03255828097462654, -0.021466556936502457, 0.4337696135044098, 0.018237952142953873, -0.08490277081727982, 0.17090430855751038, -0.14302358031272888, 0.2815472185611725, -0.2321079969406128, -0.00944441556930542, 0.3639000654220581, 0.13736113905906677, -0.24179121851921082, -0.07570435851812363, -0.021449286490678787, 0.09204454720020294, 0.25844213366508484, 0.18740132451057434, -0.03705465793609619, -0.17618891596794128, 0.2375369369983673, -0.16268998384475708, 0.055740050971508026, 0.13273201882839203, 0.3196316063404083, 0.39237433671951294, -0.12882085144519806, -0.11004745215177536, 0.09977984428405762, -0.30745929479599, -0.17055203020572662, 0.04704785719513893, -0.09056570380926132, 0.06119222193956375, -0.17420250177383423, 0.4017079770565033, 0.32913926243782043, 0.16549456119537354, 0.2862095832824707, -0.3184049725532532, 0.20376159250736237, 0.033626653254032135, 0.12488673627376556, -0.29533740878105164, 0.30321937799453735, 0.3845987021923065, 0.08165033161640167, -0.1350228190422058, -0.11555501818656921, -0.11062008142471313, -0.3583953380584717, 0.3294316530227661, -0.4407780170440674, -0.49501168727874756, 0.3773175776004791, 0.2242392748594284, -0.2043096274137497, 0.05019184201955795, -0.4798677861690521, 0.3666498363018036, -0.22258219122886658, -0.10909818112850189, -0.11607316881418228, 0.050649721175432205, -0.5522585511207581, -0.3293835520744324, 0.1332044154405594, 0.24898843467235565, -0.26205527782440186, -0.05542207509279251, 0.04371313005685806, 0.1354738175868988, -0.06060104817152023, 0.33211448788642883, -0.19570592045783997, -0.02207031100988388, -0.18362495303153992, -0.2804224193096161, 0.10543883591890335, -0.2935197353363037, -0.6031994819641113, 0.18675830960273743, -0.11497898399829865, 0.01870468072593212, 0.04137825220823288, 0.2783220410346985, 0.155403733253479, -0.1983819454908371, 0.46279463171958923, 0.6393682360649109, -0.0005449522286653519, 0.18351037800312042, -0.32060664892196655, -0.24082182347774506, -0.3541865944862366, 0.2877817153930664, 0.02150881662964821, 0.11967197805643082, 0.06595887243747711, -0.20545966923236847, 0.10278262197971344, -0.1397981494665146, 0.06037028133869171, 0.2875831723213196, 0.41077297925949097, -0.2825407385826111, 0.015042008832097054, 0.17534172534942627, -0.538623571395874, 0.26812973618507385, -0.017552809789776802, -0.1096559464931488, 0.05118416249752045, -0.22344593703746796, 0.12112631648778915, -0.07061122357845306, 0.13119979202747345, 0.07172348350286484, 0.08091183006763458, 0.05415360629558563, 0.1319202184677124, -0.29699909687042236, 0.05628194287419319, 0.355916827917099, -0.0787581354379654, -0.09903968125581741, 0.3432373106479645, 0.2100740522146225, 0.1246257871389389, -0.08568376302719116, -0.023823605850338936, -0.13150113821029663, 0.11836430430412292, -0.12363459914922714, -0.13804075121879578, 0.21862301230430603, 0.31826135516166687, 0.3651818633079529, -0.11207167059183121, 0.19647739827632904, 0.25447648763656616, 0.060651373118162155, 0.4567362070083618, 0.04022533819079399, 0.04664072021842003, 0.07905233651399612, -0.28588199615478516, 0.3103998601436615, -0.13721105456352234, 0.10919618606567383, 0.20122401416301727, -0.10874466598033905, 0.1503811776638031, -0.17567360401153564, 0.15006287395954132, -0.18597707152366638, 0.12197431921958923, 0.3175133168697357, 0.3086783289909363, 0.16337531805038452, -0.20318076014518738, 0.23095661401748657, 0.2223929911851883, 0.08004999160766602, 0.04660658538341522, 0.20534458756446838, -0.36446258425712585, -0.26732495427131653, 0.19727370142936707, 0.27375897765159607, 0.4447883367538452, 0.36851975321769714, 0.343264102935791, 0.14145755767822266, 0.14807012677192688, -0.09801502525806427, 0.2551248073577881, -0.06809954345226288, 0.28472140431404114, 0.11469991505146027, 0.20746351778507233, -0.18079093098640442, -0.08506543934345245, 0.045506756752729416, 0.11019695550203323, 0.06806345283985138, -0.22062323987483978, 0.08796405792236328, 0.12087596952915192, 0.02841576188802719, -0.16711916029453278, -0.030939601361751556, 0.020742803812026978, 0.0505535751581192, 0.12001931667327881, 0.5694575309753418, -0.11720052361488342, -0.08936953544616699, 0.28385254740715027, 0.46936869621276855, -0.13822154700756073, -0.3756333887577057, 0.02559475600719452, 0.0326819121837616, -0.08782977610826492, 0.11106589436531067, 0.06938464939594269, -0.029710272327065468, 0.26077884435653687, 0.13832855224609375, 0.030777912586927414, -0.1739284098148346, -0.2027784287929535, 0.17227548360824585, -0.05329584330320358, 0.5861186385154724, -0.1246020644903183, -0.10885903239250183, -0.07432696223258972, 0.10327823460102081, -0.1498519331216812, -0.3892001211643219, 0.003685127943754196, -0.4489949643611908, 0.11958068609237671, 0.2415834367275238, -0.30052903294563293, -0.03294882923364639, -0.39202794432640076, -0.4765080511569977, 0.037233613431453705, 0.357283353805542, 0.3248087763786316, 0.20596861839294434, 0.12301640212535858, -0.04845229536294937, 0.7896345257759094, -0.0669560506939888, -0.3142927587032318, -0.29183873534202576, 0.3334437608718872, -0.3300229609012604, 0.06428170204162598, 0.16813768446445465, -0.1227303221821785, 0.03670942783355713, 0.2973198890686035, -0.41734999418258667, -0.601253867149353, 0.015989966690540314, 0.020315852016210556, -0.2475108504295349, -0.19192549586296082, 0.14350256323814392, -0.027102110907435417, -0.12193433195352554, -0.009682491421699524, -0.39612117409706116, -0.07040240615606308, 0.4241248071193695, 0.13468462228775024, 0.04280387610197067, 0.041344109922647476, -0.051711954176425934, 0.4943954348564148, -0.42502522468566895, 0.13868357241153717, 0.1263696253299713, 0.21345320343971252, 0.1903635412454605, -0.16626837849617004, -0.08754467219114304, -0.01427194569259882, 0.03787811100482941, -0.6092908978462219, 0.31057292222976685, 0.19930431246757507, -0.30155763030052185, -0.15357981622219086, -0.4781704246997833, 0.07810889929533005, -0.19985759258270264, 0.4040934443473816, 0.21912340819835663, 0.2348671853542328, -0.007950013503432274, 0.06211313605308533, -0.29676520824432373, -0.09217828512191772, 0.014764027670025826, 0.10501259565353394, 0.20144036412239075, -0.0729471743106842, 0.18760330975055695, 0.009909743443131447, -0.6256808042526245, 0.3484436273574829, 0.11104252934455872, -0.5176835060119629, -0.06398103386163712, -0.08866283297538757, 0.13463497161865234, -0.09238732606172562, 0.39779067039489746, -0.2652192711830139, -0.03282243013381958, 0.034114040434360504, -0.31063321232795715, 0.07378710806369781, 0.01701362058520317, -0.029132729396224022, 0.10787922888994217, -0.1755039244890213, 0.2598279118537903, 0.07810110598802567, -0.1723681092262268, 0.18529564142227173, 0.23880521953105927, -0.3523339033126831, -0.004913275595754385, -0.16065631806850433, -0.33518141508102417, -0.1652618646621704, 0.09792746603488922, -0.011050052009522915, -0.09175558388233185, 0.04659707099199295, 0.050469812005758286, 0.04641804099082947, -0.11907632648944855, 0.09263988584280014, 0.14653155207633972, 0.4281197190284729, 0.3504370152950287, 0.04688902571797371, 0.17362332344055176, 0.1927526891231537, 0.23718880116939545, 0.3415152132511139, -0.2283039093017578, 0.13042683899402618, 0.044316016137599945, -0.12722401320934296, 0.18420195579528809, 0.4878557324409485, -0.05337207019329071, -0.02315964549779892, -0.19348521530628204, 0.05045304819941521, -0.26507997512817383, 0.3137117028236389, -0.38102179765701294, 0.06760301440954208, -0.0759999230504036, -0.4482179880142212, 0.5460739135742188, 0.02003440633416176, -0.27572309970855713, -0.021754451096057892, -0.03255033493041992, -0.6783697605133057, 0.4378553628921509, 0.4553413391113281, 0.9008389711380005, -0.11196315288543701, 0.21547044813632965, 0.08109158277511597, 0.1416950523853302, 0.11254190653562546, -0.21480976045131683, 0.27966004610061646, -0.15955311059951782, -0.4095724821090698, -0.08386154472827911, -0.1495562642812729, -0.19859004020690918, 0.010804932564496994, -0.4309491813182831, 0.25197604298591614, -0.07401979714632034, -0.13738122582435608, -0.15706299245357513, 0.33626222610473633, -0.07315260171890259, -0.44275107979774475, -0.39694416522979736, 0.18623368442058563, -0.16747348010540009, 0.10533452033996582, -0.05230039358139038, 0.05246663838624954, 0.025886189192533493, -0.055307384580373764, -0.03064514324069023, -0.18151965737342834, -0.5493502616882324, 0.16288284957408905, -0.5084129571914673, -0.46181440353393555, -0.06531763076782227, -0.10329578816890717, 0.23194904625415802, 0.11132203042507172, -0.15061506628990173, 0.2759452760219574, -0.13748690485954285, 0.18802323937416077, -0.30673688650131226, -0.243071049451828, 0.27872222661972046, -0.047511521726846695, 0.06891598552465439, -0.029053419828414917, -0.04591936990618706, -0.5067521333694458, 0.038084909319877625, -0.006236955523490906, 0.011395242065191269, -0.0427774041891098, -0.17381305992603302, 0.010951854288578033, -0.24374867975711823, -0.03750469908118248, 0.17980007827281952, 0.0767669677734375, -0.03570665419101715, 0.17598757147789001, 0.3046207129955292, -0.30616703629493713, -0.11281731724739075, 0.06762436777353287, 0.4273449778556824, -0.11070544272661209, 0.38465166091918945, -0.10646563768386841, -0.055689506232738495, -0.26593217253685, -0.2632015347480774, -0.13731130957603455, 0.15853598713874817, 0.4549858868122101, 0.038879189640283585, -0.04199045151472092, 0.0435742549598217, 0.15753577649593353, 0.22134676575660706, 0.20079505443572998, -0.40927600860595703, -0.09016674757003784, -0.41826674342155457, 0.22307834029197693, -0.14070779085159302, 0.2151385247707367, 0.025386571884155273, -0.08743864297866821, -0.014579600654542446, 0.08593378216028214, -0.4361751973628998, 0.1979999989271164, -0.08155754208564758, -0.02963937073945999, 0.1926058828830719, -0.07594218105077744, 0.3838181793689728, -0.019842252135276794, 0.09854956716299057, -0.15137779712677002, -0.15628668665885925, -0.24190574884414673, -0.2562250792980194, 0.09367047995328903, -0.14675596356391907, 0.24336029589176178, -0.22572079300880432, -0.19529062509536743, 0.06140071526169777, -0.2626338005065918, 0.2993645668029785, -0.019647475332021713, 0.024564821273088455, -0.16296428442001343, -0.1659301221370697, 0.10875727236270905, -0.06863389909267426, 0.24350494146347046, -0.04969826340675354, 0.281096875667572, 0.04658449813723564, 0.08473846316337585, -0.08679120242595673, -0.03442774713039398, 0.17469413578510284, 0.05800488963723183, -0.04470837116241455, 0.003273412585258484, 0.1897413432598114, 0.2614056468009949, 0.01645543798804283, 0.06456518918275833, -0.055625829845666885, -0.12130407989025116, 0.011698740534484386, -0.060999758541584015, 0.11384008824825287, 0.26372870802879333, 0.013418268412351608, -0.03124869242310524, -0.14257444441318512, -0.42442986369132996, 0.24724704027175903, 0.5229254364967346, 0.23706749081611633, 0.5254070162773132, 0.1175631582736969, 0.14249500632286072, 0.4704647958278656, 0.16719722747802734, -0.1948329359292984, -0.1361900120973587, 0.08453395962715149, 0.21500638127326965, 0.18566057085990906, 0.17657272517681122, 0.3422061800956726, 0.1557602882385254, -0.34381282329559326, 0.04089723527431488, -0.0635240375995636, -0.06903807818889618, -0.06965681165456772, -0.3990441858768463, 0.09883349388837814, 0.15971851348876953, -0.13714110851287842, 0.35983824729919434, -0.07410609722137451, -0.09133117645978928, -0.3188638985157013, -0.11974106729030609, -0.21864823997020721, 0.1206926703453064, -0.2310609221458435, -0.04760831966996193, 0.0791315957903862, 0.009971924126148224, -0.1583370864391327, 0.34164538979530334, 0.06536027789115906, -0.2994527816772461, 0.1420314908027649, 0.07930134236812592, 0.10108406096696854, 0.3124508857727051, 0.022645317018032074, 0.32119840383529663, 0.034006159752607346, -0.17778833210468292, 0.04349430277943611, -0.30894482135772705, 0.08289413154125214, -0.030993711203336716, -0.17196078598499298, 0.03739836439490318, 0.2310178130865097, -0.2869725823402405, -0.1562153398990631, 0.08837142586708069, 0.008479790762066841, -0.32104942202568054, -0.20127809047698975, 0.13154236972332, 0.1785127967596054, 0.1131490170955658, 0.18418551981449127, -0.14651110768318176, 0.2762312591075897, 0.005030900239944458, 0.02240915596485138, -0.13165248930454254, -0.1250821053981781, 0.4137311577796936, -0.10895608365535736, -0.30915960669517517, -0.09268481284379959, -0.12547816336154938, -0.07501038908958435, 0.1403380036354065, -0.20830050110816956, 0.030783317983150482, 0.3496786057949066, 0.1149618923664093, 0.04278834909200668, 0.684320867061615, 0.035048723220825195, 0.0589936301112175, -0.4648110866546631, 0.02781100571155548, -0.33334434032440186, -0.007405079901218414, 0.09709423780441284, -0.000005692243576049805, -0.3546731472015381, 0.33030903339385986, 0.14767488837242126, 0.1639566421508789, -0.19179736077785492, 0.006230961997061968, 0.04750886559486389, -0.15934985876083374, -0.2527301609516144, -0.14471974968910217, -0.013253830373287201, 0.02987559884786606, 0.106224924325943, -0.47178125381469727, -0.06473937630653381, 0.07172848284244537, 0.07810898870229721, -0.12201182544231415, 0.03549562394618988, 0.013436183333396912, 0.234429731965065, 0.6783952116966248, -0.20293885469436646, 0.1535332202911377, -0.07739446312189102, -0.047239750623703, -0.10479214787483215, -0.20000846683979034, -0.17647495865821838, -0.10659918934106827, 0.2350357174873352, 0.4294142425060272, -0.07494978606700897, -0.0025268904864788055, -0.26658573746681213, 0.24772657454013824, 0.23448656499385834, 0.02888932079076767, 0.17455527186393738, 0.008323464542627335, -0.052677255123853683, 0.1104176715016365, 0.06871914863586426, 0.29575228691101074, -0.09550392627716064, -0.1706160008907318, -0.3986947536468506, 0.02797963283956051, 0.35895997285842896, -0.07618594914674759, -0.11751759052276611, -0.06443797796964645, 0.39504480361938477, 0.07125886529684067, -0.13216443359851837, -0.38632720708847046, 0.0009050965309143066, 0.2215428352355957, -0.04252161830663681, -0.33018162846565247, 0.5074207782745361, 0.09827592968940735, -0.004662301391363144, -0.23304739594459534, 0.13178066909313202, -0.0935487374663353, -0.29751187562942505, -0.5842610597610474, -0.23329785466194153 ]
https://github.com/huggingface/datasets/issues/2474
cache_dir parameter for load_from_disk ?
Apparently, Colab uses a local cache of the data files read/written from Google Drive. See: - https://github.com/googlecolab/colabtools/issues/2087#issuecomment-860818457 - https://github.com/googlecolab/colabtools/issues/1915#issuecomment-804234540 - https://github.com/googlecolab/colabtools/issues/2147#issuecomment-885052636
**Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function?
21
cache_dir parameter for load_from_disk ? **Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function? Apparently, Colab uses a local cache of the data files read/written from Google Drive. See: - https://github.com/googlecolab/colabtools/issues/2087#issuecomment-860818457 - https://github.com/googlecolab/colabtools/issues/1915#issuecomment-804234540 - https://github.com/googlecolab/colabtools/issues/2147#issuecomment-885052636
[ -0.32445430755615234, -0.10295576602220535, -0.07441189140081406, 0.14649048447608948, 0.17781177163124084, -0.028765443712472916, 0.32057279348373413, 0.07577332854270935, 0.26880142092704773, 0.42769962549209595, -0.09168896824121475, 0.31767064332962036, -0.2790684998035431, 0.26316922903060913, 0.13387258350849152, 0.11594552546739578, -0.061263613402843475, -0.01133011281490326, -0.005535036325454712, -0.14729386568069458, -0.1522970199584961, 0.13593657314777374, 0.004860140383243561, -0.3714660406112671, -0.1582966148853302, -0.13702811300754547, -0.04621472954750061, 0.1889028251171112, 0.27446919679641724, -0.2572247385978699, 0.2579568326473236, 0.08032996952533722, 0.21826927363872528, 0.4198667109012604, -0.00010667499009286985, -0.14968769252300262, 0.0011275187134742737, -0.27425417304039, -0.47487446665763855, -0.13425312936306, -0.16666993498802185, -0.10063000023365021, 0.1580016314983368, -0.05346629396080971, -0.5577458739280701, 0.19577695429325104, -0.00026910193264484406, -0.13787314295768738, 0.1841360330581665, 0.11517717689275742, 0.24303121864795685, -0.23009297251701355, -0.4325420558452606, 0.021518468856811523, 0.023128356784582138, 0.0058164820075035095, -0.2544880509376526, 0.7005155086517334, 0.20359867811203003, 0.0490310862660408, -0.09361853450536728, 0.4356158375740051, -0.05065002292394638, 0.1985403299331665, 0.45447078347206116, 0.36571457982063293, 0.11496618390083313, -0.18351984024047852, 0.028293663635849953, -0.14976009726524353, 0.5139724612236023, -0.16450715065002441, -0.17254729568958282, -0.2268381416797638, 0.15833893418312073, -0.38927528262138367, 0.3535245358943939, 0.16320396959781647, -0.25361353158950806, 0.39009159803390503, -0.19148431718349457, -0.35058867931365967, -0.10085578262805939, -0.010205008089542389, 0.06715631484985352, -0.04690559208393097, -0.17417065799236298, -0.11810115724802017, 0.22948811948299408, 0.1814558207988739, 0.438113808631897, -0.04911026358604431, 0.09874055534601212, 0.27185070514678955, 0.008757691830396652, -0.17760255932807922, -0.09213999658823013, 0.346792995929718, -0.08397810161113739, -0.005704764276742935, 0.43688684701919556, -0.03691832721233368, -0.1148441731929779, 0.2116928994655609, -0.1487443745136261, 0.33904123306274414, -0.17291754484176636, -0.06249602884054184, 0.39426368474960327, 0.18529276549816132, -0.3253231942653656, -0.0321660041809082, -0.005338998045772314, 0.024464458227157593, 0.25460681319236755, 0.17827850580215454, -0.0792023167014122, -0.22645367681980133, 0.16788652539253235, -0.2079104781150818, 0.07025744020938873, 0.12158666551113129, 0.40862777829170227, 0.3949795961380005, -0.14588983356952667, -0.14793702960014343, 0.09064200520515442, -0.34959518909454346, -0.18374118208885193, 0.1633121222257614, -0.08600416034460068, 0.08815304934978485, -0.2419557124376297, 0.4661453664302826, 0.37369242310523987, 0.07021698355674744, 0.2958602011203766, -0.2946586012840271, 0.19992254674434662, 0.0400732085108757, 0.07021445780992508, -0.3858600854873657, 0.32855886220932007, 0.3618239164352417, 0.08689141273498535, -0.07475841790437698, -0.05596982315182686, -0.1721421182155609, -0.3563913106918335, 0.26181894540786743, -0.42175865173339844, -0.46886542439460754, 0.4077794551849365, 0.19804181158542633, -0.259622722864151, 0.039398252964019775, -0.5215079188346863, 0.31507858633995056, -0.19365856051445007, -0.11585594713687897, -0.12492289394140244, 0.011689441278576851, -0.6133232116699219, -0.3281109929084778, 0.11206524819135666, 0.3146485686302185, -0.26825886964797974, -0.07012105733156204, 0.031063832342624664, 0.16841934621334076, 0.009771429002285004, 0.2918015420436859, -0.20501945912837982, -0.005692921578884125, -0.24244114756584167, -0.27151867747306824, 0.13116255402565002, -0.290242075920105, -0.5318155884742737, 0.18225547671318054, -0.08324415236711502, -0.04581039398908615, 0.04213652014732361, 0.21379812061786652, 0.19555863738059998, -0.278741717338562, 0.4660036861896515, 0.737192690372467, -0.006782026961445808, 0.21907822787761688, -0.293128103017807, -0.25252294540405273, -0.400667667388916, 0.30511826276779175, -0.06405061483383179, 0.12919338047504425, 0.06395496428012848, -0.1899641752243042, 0.032476507127285004, -0.16264840960502625, 0.0316251777112484, 0.33188945055007935, 0.4517711400985718, -0.2042606920003891, -0.03938174992799759, 0.18683674931526184, -0.4851350784301758, 0.30949342250823975, 0.09397991001605988, -0.056177347898483276, 0.014859512448310852, -0.16254667937755585, 0.1125047579407692, -0.07064730674028397, 0.00747762992978096, 0.08538898825645447, 0.07802411168813705, 0.10858485102653503, 0.10968579351902008, -0.2224678248167038, 0.08096089959144592, 0.41707730293273926, -0.03504454344511032, -0.11984123289585114, 0.3130323886871338, 0.23308606445789337, 0.07511285692453384, -0.1608203798532486, 0.012243788689374924, -0.10157924145460129, 0.1588267683982849, -0.07383302599191666, -0.16995498538017273, 0.2632192373275757, 0.29196712374687195, 0.38645774126052856, -0.09251757711172104, 0.19928935170173645, 0.251865416765213, 0.12692208588123322, 0.4303393065929413, 0.0017067864537239075, 0.07661817222833633, 0.08655158430337906, -0.21196448802947998, 0.4003139138221741, -0.21099881827831268, 0.09531638026237488, 0.21017305552959442, -0.08724911510944366, 0.23908349871635437, -0.13676311075687408, 0.15505880117416382, -0.22171270847320557, 0.1565091609954834, 0.28264978528022766, 0.35046717524528503, 0.16887296736240387, -0.16530147194862366, 0.2906665503978729, 0.2658102810382843, 0.13277877867221832, 0.10203846544027328, 0.14729231595993042, -0.2981209456920624, -0.2573697865009308, 0.22249534726142883, 0.3067612946033478, 0.5491706728935242, 0.32995861768722534, 0.2783006727695465, 0.09477242827415466, 0.06356179714202881, -0.11802507191896439, 0.30423304438591003, -0.13712210953235626, 0.2944248914718628, 0.02209175005555153, 0.17719106376171112, -0.21607300639152527, -0.12147407978773117, -0.007825052365660667, 0.06266991049051285, 0.05295346677303314, -0.1464785784482956, 0.15295752882957458, 0.028627844527363777, -0.05640988424420357, -0.20473156869411469, -0.07182715088129044, 0.053910210728645325, 0.06106415390968323, 0.08135237544775009, 0.5613362789154053, -0.08582992851734161, 0.011759327724575996, 0.29575493931770325, 0.4879603385925293, -0.15345193445682526, -0.4310719966888428, -0.002335909754037857, -0.07602342218160629, -0.13276565074920654, 0.08752909302711487, 0.05311010777950287, 0.039789944887161255, 0.2417282909154892, 0.1137179359793663, 0.03211527317762375, -0.18312367796897888, -0.1673664152622223, 0.1913754791021347, -0.04303614795207977, 0.5869831442832947, -0.0784531682729721, -0.09240521490573883, -0.1351698338985443, -0.03156789764761925, -0.06728631258010864, -0.4143819212913513, 0.02021734230220318, -0.44399091601371765, 0.09480531513690948, 0.22049500048160553, -0.29645979404449463, 0.02239856868982315, -0.375537633895874, -0.4353084862232208, 0.011694878339767456, 0.25521984696388245, 0.2514442503452301, 0.22064554691314697, 0.10562387108802795, -0.03567010164260864, 0.7625160217285156, -0.019372843205928802, -0.3234819769859314, -0.3680899739265442, 0.35832688212394714, -0.34163421392440796, 0.061104968190193176, 0.18587376177310944, -0.10248211026191711, 0.02195318229496479, 0.24549230933189392, -0.3768056631088257, -0.6603522896766663, 0.010753508657217026, 0.012113139033317566, -0.16677141189575195, -0.14378435909748077, 0.16594886779785156, 0.0022791207302361727, -0.10455229133367538, -0.06950899213552475, -0.45724111795425415, -0.04251403361558914, 0.36994701623916626, 0.1500120609998703, 0.072086863219738, 0.09177220612764359, -0.08551116287708282, 0.5460430383682251, -0.43375617265701294, 0.04503220319747925, 0.18476402759552002, 0.25758597254753113, 0.25502917170524597, -0.11768529564142227, -0.13502241671085358, 0.015599058009684086, 0.027420811355113983, -0.5899710655212402, 0.3328233063220978, 0.18412503600120544, -0.32852083444595337, -0.26516082882881165, -0.3826850354671478, 0.04979078471660614, -0.25039106607437134, 0.3058208227157593, 0.20118482410907745, 0.22292274236679077, -0.004546176642179489, 0.10072261840105057, -0.3106100559234619, -0.10397055000066757, 0.03209717944264412, 0.21959394216537476, 0.1891474425792694, -0.11027391999959946, 0.30775949358940125, -0.06295060366392136, -0.5601778030395508, 0.260836660861969, 0.13341675698757172, -0.4155910015106201, -0.14060816168785095, -0.032473042607307434, 0.09311997145414352, -0.0027429447509348392, 0.3467141389846802, -0.3197081387042999, 0.05434582009911537, 0.05102374777197838, -0.35637396574020386, 0.153248131275177, -0.07650279253721237, 0.03257172182202339, 0.0883626937866211, -0.1864113211631775, 0.19281604886054993, 0.04324779659509659, -0.18586818873882294, 0.1983780860900879, 0.17462459206581116, -0.3512587249279022, 0.00623717624694109, -0.15577970445156097, -0.3397255837917328, -0.12644244730472565, 0.08698594570159912, -0.04350186139345169, -0.0780869871377945, 0.0021066211629658937, 0.058296892791986465, 0.019240573048591614, -0.11959017068147659, 0.030710160732269287, 0.1518430858850479, 0.350283145904541, 0.3231963813304901, 0.11113764345645905, 0.11603821814060211, 0.1302042454481125, 0.28790467977523804, 0.29972293972969055, -0.2447012960910797, 0.10456152260303497, 0.0207521952688694, -0.09767848253250122, 0.10587748140096664, 0.502893328666687, -0.105189748108387, -0.09032147377729416, -0.22621721029281616, -0.01942949742078781, -0.2210337519645691, 0.3337635397911072, -0.3734934329986572, 0.05703272670507431, -0.0239272378385067, -0.4473285973072052, 0.49330613017082214, 0.05483837053179741, -0.26048344373703003, 0.019939247518777847, -0.08511282503604889, -0.678307831287384, 0.4701074957847595, 0.4167526960372925, 0.9154160022735596, -0.10577036440372467, 0.20274749398231506, 0.08018088340759277, 0.16978120803833008, 0.1343178153038025, -0.08447210490703583, 0.2456131875514984, -0.13566367328166962, -0.49933746457099915, -0.07534701377153397, -0.18734610080718994, -0.2012905478477478, -0.030260615050792694, -0.40613245964050293, 0.31317633390426636, 0.04486545920372009, -0.11525732278823853, -0.11220301687717438, 0.2049943208694458, -0.0559486523270607, -0.5258092880249023, -0.45842936635017395, 0.1802227646112442, -0.1820998638868332, 0.14783698320388794, -0.07533185929059982, 0.03001190349459648, 0.029355932027101517, 0.013947129249572754, -0.04488367214798927, -0.07919254899024963, -0.5906502604484558, 0.1565580517053604, -0.5257294774055481, -0.4920591115951538, -0.1381518542766571, -0.03476213291287422, 0.2833082675933838, 0.0790734738111496, -0.112320676445961, 0.3217437267303467, -0.11733890324831009, 0.19956505298614502, -0.36048173904418945, -0.2737467288970947, 0.39118456840515137, -0.06510965526103973, 0.15528559684753418, -0.09397835284471512, -0.057568859308958054, -0.5578818917274475, 0.11453181505203247, 0.02174486219882965, -0.06574206799268723, 0.07475577294826508, -0.19942662119865417, 0.0367349237203598, -0.16479988396167755, -0.07955966144800186, 0.17212122678756714, 0.13501890003681183, -0.013306047767400742, 0.1883697807788849, 0.18682262301445007, -0.2435324639081955, -0.1086714118719101, 0.15109901130199432, 0.31537026166915894, -0.15793095529079437, 0.3690038323402405, -0.09271225333213806, -0.08519041538238525, -0.22573038935661316, -0.2541971504688263, -0.18647047877311707, 0.09190107136964798, 0.49193745851516724, 0.027353815734386444, -0.04386432468891144, 0.0699988603591919, 0.25975000858306885, 0.2175532430410385, 0.23303905129432678, -0.33700135350227356, -0.15438446402549744, -0.3358014225959778, 0.19485433399677277, -0.18415258824825287, 0.1709679514169693, 0.0878010168671608, -0.0591125451028347, 0.034044504165649414, -0.0008776932954788208, -0.4184357523918152, 0.18873275816440582, -0.12776517868041992, -0.024930253624916077, 0.11396323889493942, -0.06425188481807709, 0.4048479199409485, 0.02198377065360546, 0.06547854840755463, -0.18572689592838287, -0.13967791199684143, -0.23901647329330444, -0.22467510402202606, 0.0924675315618515, -0.11072858422994614, 0.2466842532157898, -0.26889845728874207, -0.2423955649137497, 0.07841940224170685, -0.2630848288536072, 0.2889525592327118, -0.017327632755041122, -0.031447410583496094, -0.23678135871887207, -0.093046635389328, 0.13794341683387756, -0.0777604728937149, 0.18519672751426697, -0.08519409596920013, 0.3320137858390808, 0.07350759208202362, 0.04617297276854515, -0.1539747714996338, -0.03557169809937477, 0.280981183052063, -0.05810146778821945, -0.07577051222324371, 0.07924167811870575, 0.18759331107139587, 0.2072264850139618, -0.06767988204956055, 0.07047499716281891, -0.04020263999700546, -0.1621587574481964, -0.03140385448932648, -0.05554027110338211, 0.17734593152999878, 0.2280527502298355, 0.043749935925006866, -0.09063473343849182, -0.17408135533332825, -0.3987228274345398, 0.25369778275489807, 0.5035104155540466, 0.19472230970859528, 0.49289101362228394, 0.10108786821365356, 0.11340247839689255, 0.4537684917449951, 0.16803860664367676, -0.18816933035850525, -0.08634616434574127, 0.14350493252277374, 0.2608635425567627, 0.21980354189872742, 0.20563046634197235, 0.365963339805603, 0.14693939685821533, -0.26846030354499817, 0.08436345309019089, 0.0018733926117420197, -0.056180860847234726, -0.01429065316915512, -0.38853445649147034, 0.07028229534626007, 0.07779654115438461, -0.0890212208032608, 0.3226185739040375, -0.12402859330177307, -0.105211041867733, -0.4665319621562958, -0.0977369025349617, -0.20268096029758453, 0.10100804269313812, -0.20440047979354858, -0.045337095856666565, 0.08827988803386688, 0.07536604255437851, -0.11228539794683456, 0.3397648334503174, 0.04588202014565468, -0.2317919284105301, 0.05222512036561966, 0.11008809506893158, 0.11731128394603729, 0.40710192918777466, 0.0019397810101509094, 0.3028988242149353, 0.05949482321739197, -0.11016201972961426, 0.044002220034599304, -0.41592156887054443, 0.05078457295894623, -0.10525356233119965, -0.15275755524635315, 0.043003618717193604, 0.2704150676727295, -0.2496374547481537, -0.1989051252603531, 0.09536661207675934, 0.009213322773575783, -0.29070791602134705, -0.1225656270980835, 0.13758718967437744, 0.16808389127254486, 0.12563873827457428, 0.18114444613456726, -0.17184899747371674, 0.3154694139957428, -0.06049937382340431, -0.018065571784973145, -0.09193269908428192, -0.10162641853094101, 0.4411845803260803, -0.07692011445760727, -0.30570104718208313, 0.06672196835279465, -0.0961688756942749, 0.08808305859565735, 0.13845194876194, -0.17599786818027496, 0.013065779581665993, 0.3506636321544647, 0.11384674906730652, 0.09092302620410919, 0.666928231716156, 0.07671122252941132, 0.05443423613905907, -0.4373120367527008, -0.04642196744680405, -0.3409801125526428, -0.028983108699321747, 0.12873466312885284, 0.09380263090133667, -0.3809177577495575, 0.28939515352249146, 0.13949166238307953, 0.16852566599845886, -0.24264217913150787, -0.0020937947556376457, 0.09495479613542557, -0.1749020218849182, -0.2521570324897766, -0.19523347914218903, 0.018483374267816544, -0.06825417280197144, 0.0811232477426529, -0.47176265716552734, -0.08956834673881531, 0.052687693387269974, 0.06990554928779602, -0.0724177286028862, -0.0722922757267952, -0.013968405313789845, 0.23133452236652374, 0.6443156599998474, -0.2202550768852234, 0.10714137554168701, -0.03541082888841629, -0.024959992617368698, -0.0787544697523117, -0.1921965777873993, -0.07814177125692368, -0.10098164528608322, 0.21455800533294678, 0.4140018820762634, -0.07907984405755997, 0.1069558709859848, -0.35518139600753784, 0.26283562183380127, 0.183905690908432, 0.04045687988400459, 0.17943978309631348, -0.06588664650917053, -0.08296862244606018, 0.1301880031824112, 0.11246593296527863, 0.2879250943660736, -0.15595579147338867, -0.09434245526790619, -0.40122973918914795, 0.010006757453083992, 0.37927424907684326, -0.09772224724292755, -0.10678139328956604, -0.09265846014022827, 0.4252009987831116, 0.0793338268995285, -0.09122003614902496, -0.33995330333709717, 0.09430641680955887, 0.15382994711399078, -0.045543551445007324, -0.40835797786712646, 0.47907888889312744, 0.0648023784160614, 0.08153378963470459, -0.21902722120285034, 0.10913591086864471, -0.06646635383367538, -0.25824975967407227, -0.5530931949615479, -0.1750335544347763 ]
https://github.com/huggingface/datasets/issues/2472
Fix automatic generation of Zenodo DOI
I have received a reply from Zenodo support: > We are currently investigating and fixing this issue related to GitHub releases. As soon as we have solved it we will reach back to you.
After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right
34
Fix automatic generation of Zenodo DOI After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right I have received a reply from Zenodo support: > We are currently investigating and fixing this issue related to GitHub releases. As soon as we have solved it we will reach back to you.
[ -0.0967247486114502, 0.37050044536590576, -0.03761085495352745, 0.08053310215473175, 0.14894706010818481, -0.1063508689403534, 0.38638579845428467, 0.40311846137046814, -0.061123937368392944, 0.2544850707054138, -0.036773115396499634, 0.1469544768333435, 0.20907315611839294, -0.08258303254842758, -0.1057562306523323, 0.006159655749797821, -0.05640257149934769, 0.34776896238327026, -0.05881355702877045, -0.3109583854675293, -0.2020069807767868, 0.0611618235707283, -0.03998710960149765, 0.10835467278957367, 0.14294253289699554, -0.017871549353003502, -0.08858851343393326, 0.04019602760672569, -0.6289505958557129, -0.2941238284111023, 0.23041950166225433, 0.35367804765701294, 0.024156779050827026, 0.09775937348604202, -0.00011493675265228376, -0.19378331303596497, 0.4348076581954956, -0.03764785826206207, 0.17915035784244537, -0.3938966393470764, -0.49303457140922546, -0.3317323923110962, -0.13789798319339752, -0.2664649784564972, 0.17618077993392944, -0.3223014175891876, 0.13030770421028137, 0.1256040781736374, 0.05843134596943855, 0.39486002922058105, 0.1907944232225418, -0.08376875519752502, 0.4714025855064392, -0.24406971037387848, 0.15688863396644592, 0.08919095993041992, -0.06369300931692123, 0.06806480139493942, -0.10460056364536285, 0.28291329741477966, 0.03035154938697815, 0.29081180691719055, 0.04949154704809189, 0.17393238842487335, 0.08658808469772339, 0.11753229796886444, 0.2991637587547302, -0.2475602626800537, 0.15439815819263458, 0.08065962046384811, 0.794528067111969, -0.12338695675134659, -0.16363105177879333, 0.07832489162683487, 0.22490835189819336, -0.22180701792240143, 0.08111965656280518, 0.11009255051612854, 0.1318533718585968, 0.13094788789749146, 0.12294615805149078, -0.2656322121620178, -0.27556583285331726, 0.06500904262065887, 0.12931138277053833, -0.10518176853656769, -0.09306991100311279, 0.027528364211320877, -0.06835667788982391, -0.11677691340446472, 0.2643761932849884, -0.05980615317821503, -0.2564132809638977, 0.23115406930446625, 0.24735064804553986, -0.08098943531513214, -0.05056814104318619, 0.034148700535297394, 0.35725438594818115, 0.09732990711927414, 0.21506190299987793, -0.029652711004018784, -0.07389292120933533, -0.10371971875429153, 0.11225268244743347, 0.04197941720485687, 0.35950735211372375, -0.053041040897369385, 0.19947031140327454, 0.08720919489860535, -0.09229379892349243, 0.07371331006288528, 0.01922525092959404, -0.09754309058189392, 0.5840197205543518, -0.16857963800430298, 0.37914133071899414, -0.46984952688217163, -0.03158707916736603, 0.1213345006108284, -0.0889858603477478, -0.13561244308948517, -0.4675285816192627, 0.01893174648284912, -0.038797635585069656, 0.2661348581314087, -0.11960715055465698, 0.06387664377689362, -0.21467651426792145, -0.11195682734251022, -0.10423368215560913, -0.4499020576477051, 0.0859551876783371, 0.20724156498908997, -0.027200568467378616, -0.3636474311351776, 0.22065012156963348, 0.2520161271095276, -0.20413045585155487, -0.5929421186447144, 0.052006758749485016, 0.2018798291683197, 0.1980844885110855, 0.23983249068260193, 0.07291311025619507, 0.22776001691818237, -0.07130415737628937, -0.14306142926216125, -0.0034676790237426758, 0.31194424629211426, -0.19701054692268372, -0.41581135988235474, -0.5545145273208618, 0.12638482451438904, -0.015437882393598557, -0.030274629592895508, 0.3378933370113373, 0.17212432622909546, 0.21211811900138855, -0.12593713402748108, -0.12397248297929764, -0.09485599398612976, 0.24657335877418518, 0.10584857314825058, 0.12779781222343445, 0.27600550651550293, 0.18016742169857025, -0.059993926435709, -0.4540843367576599, 0.0730050802230835, 0.3593134880065918, -0.028415754437446594, -0.005981218535453081, 0.31276047229766846, -0.09908802807331085, -0.3946622610092163, 0.26079925894737244, -0.5165683627128601, -0.3449460566043854, -0.0686950534582138, -0.08665233850479126, 0.010610142722725868, -0.0730014368891716, -0.17844529449939728, 0.31461942195892334, 0.26420775055885315, -0.3067132532596588, -0.2928417921066284, -0.068202905356884, -0.030484162271022797, -0.26150983572006226, -0.22767329216003418, -0.31690728664398193, -0.1217576116323471, 0.6132686138153076, 0.43462514877319336, 0.1965692788362503, 0.21216072142124176, 0.22739514708518982, 0.1860170215368271, -0.05582040548324585, 0.10578159987926483, 0.5157313346862793, -0.24295036494731903, 0.24261923134326935, -0.01864493638277054, -0.0445016548037529, 0.10583700984716415, 0.3649113178253174, 0.12845435738563538, -0.14235049486160278, -0.034027934074401855, -0.34876635670661926, -0.12936703860759735, -0.19108231365680695, 0.023655608296394348, 0.10805067420005798, 0.10562600940465927, -0.0852862000465393, 0.15991410613059998, 0.09611709415912628, -0.061929404735565186, -0.1601579189300537, 0.1793094128370285, -0.06704971194267273, 0.17151232063770294, 0.03752646967768669, -0.07855810970067978, -0.0061079636216163635, 0.06782948970794678, 0.0826902985572815, 0.186873197555542, -0.21202459931373596, 0.20704132318496704, 0.006233287509530783, 0.06657136976718903, 0.175312340259552, 0.3192521631717682, 0.17917372286319733, -0.2357138991355896, -0.08516823500394821, 0.11617657542228699, -0.2221638262271881, 0.17856356501579285, 0.12050994485616684, 0.21131721138954163, -0.27666381001472473, -0.2890145778656006, -0.3767160177230835, 0.1957046240568161, 0.5364698171615601, 0.0458592064678669, -0.3070167303085327, -0.3863205909729004, -0.14156514406204224, -0.02933085337281227, 0.1237049251794815, 0.14864516258239746, -0.30023467540740967, 0.2740984261035919, 0.5304563641548157, -0.04632899910211563, 0.018406402319669724, -0.13600122928619385, 0.11121371388435364, -0.07694636285305023, 0.10970981419086456, 0.3504442274570465, 0.1392981857061386, 0.1322077065706253, -0.12048974633216858, 0.13112623989582062, -0.23987172544002533, -0.1490616500377655, 0.14200249314308167, 0.019993875175714493, 0.5988172292709351, 0.25318026542663574, 0.03805697336792946, -0.16254207491874695, -0.43302708864212036, 0.2709621787071228, 0.01334390789270401, 0.483490914106369, -0.14306114614009857, -0.5351662635803223, -0.023487037047743797, 0.2057468593120575, -0.369708389043808, -0.35036030411720276, -0.4329448640346527, -0.12391465902328491, 0.06633628904819489, 0.20660480856895447, 0.12481273710727692, 0.17800606787204742, 0.05700801685452461, 0.06154009699821472, -0.004626156762242317, 0.2375088781118393, -0.11409403383731842, 0.07026970386505127, 0.06468790769577026, -0.0235295332968235, -0.17538200318813324, -0.108382947742939, 0.2719165086746216, -0.5216572284698486, 0.11993113160133362, -0.5896315574645996, -0.07330401241779327, 0.19764122366905212, 0.18136009573936462, 0.16040997207164764, -0.22602829337120056, 0.11834540963172913, 0.11154504120349884, -0.044217851012945175, 0.03123113140463829, -0.2721317708492279, -0.15848322212696075, 0.07091277837753296, -0.48171883821487427, 0.22755834460258484, -0.035813264548778534, -0.4244438707828522, -0.06551337987184525, -0.0550050288438797, 0.029330585151910782, 0.12481261789798737, 0.3158108592033386, 0.3227924108505249, 0.08528397977352142, -0.16495457291603088, -0.1046716719865799, -0.29540255665779114, -0.10219455510377884, -0.667902410030365, 0.24700123071670532, -0.3297751247882843, -0.35668516159057617, 0.14685215055942535, 0.11165665090084076, 0.3824826776981354, -0.05930832773447037, -0.22168509662151337, 0.27150407433509827, 0.07123113423585892, 0.5275431871414185, 0.11160986125469208, -0.22549916803836823, 0.5041925311088562, 0.11810687184333801, -0.01334082055836916, -0.26285871863365173, 0.21241119503974915, 0.34261101484298706, 0.011558031663298607, 0.276550829410553, -0.09469190984964371, 0.014031674712896347, -0.16519829630851746, 0.8457223176956177, 0.129690021276474, -0.016075242310762405, -0.08349490165710449, 0.1961853951215744, 0.48977306485176086, 0.0004718676209449768, -0.1514771431684494, 0.03536498546600342, -0.007105395197868347, 0.04408922791481018, 0.4767307639122009, 0.050095487385988235, -0.2161654829978943, -0.028266888111829758, 0.09311334788799286, -0.5703094601631165, -0.22827844321727753, -0.37880387902259827, -0.4062759578227997, 0.24789729714393616, 0.38445037603378296, 0.24992701411247253, -0.2203359752893448, -0.20926743745803833, -0.02110072411596775, 0.04144526273012161, 0.2817258834838867, 0.07328713685274124, -0.1079249382019043, 0.315714955329895, -0.4676324129104614, 0.07441119849681854, 0.10375194251537323, 0.2253779172897339, -0.01939554512500763, 0.31939446926116943, 0.11534377932548523, -0.02868197113275528, 0.07527194172143936, -0.2320333868265152, 0.2020745575428009, -0.14459510147571564, 0.15431742370128632, -0.1736944019794464, -0.10938549041748047, -0.09805315732955933, 0.1274949014186859, 0.22008474171161652, 0.46407827734947205, -0.05526135861873627, -0.055642757564783096, 0.23253709077835083, -0.2038916051387787, -0.14245164394378662, -0.3197481036186218, -0.12695710361003876, -0.16696326434612274, 0.07472296804189682, 0.052680663764476776, -0.1765684187412262, 0.10465016216039658, -0.7450442910194397, -0.4398397207260132, 0.29583561420440674, 0.3356730341911316, -0.19738854467868805, -0.040976621210575104, 0.14457181096076965, 0.010809582658112049, 0.38225027918815613, 0.6417279243469238, -0.12327130138874054, 0.5436773300170898, 0.04768124595284462, 0.02761542797088623, -0.5039850473403931, -0.1938750445842743, -0.3857548236846924, -0.32286158204078674, -0.04630066454410553, 0.19023989140987396, -0.08143816143274307, 0.03213866055011749, -0.26704198122024536, 0.04850877821445465, -0.2286582589149475, 0.45177602767944336, 0.09356629103422165, -0.3955603837966919, -0.24052132666110992, 0.07859630882740021, 0.08046936988830566, -0.1259428858757019, 0.7364739179611206, 0.21694406867027283, -0.15944060683250427, -0.11230960488319397, 0.34020549058914185, 0.587636411190033, -0.34440261125564575, -0.25610142946243286, -0.10410138219594955, -0.5278940796852112, 0.31254807114601135, 0.24654455482959747, -0.0010464265942573547, -0.675463855266571, -0.42892593145370483, 0.010162005200982094, 0.07463829219341278, 0.43777212500572205, 0.09880909323692322, -0.3488585352897644, -0.16226673126220703, -0.09923802316188812, 0.280180424451828, 0.2982195019721985, -0.08015458285808563, -0.2423158586025238, -0.17290379106998444, -0.0664299726486206, 0.05987647920846939, -0.3673049807548523, 0.005349203944206238, -0.2066662609577179, -0.019205927848815918, 0.061451856046915054, 0.03715886175632477, -0.26637840270996094, 0.12452010065317154, 0.19927693903446198, 0.058591630309820175, -0.0870547890663147, -0.06028994917869568, -0.6240658164024353, 0.48381122946739197, 0.3043716549873352, 0.07511399686336517, -0.38531389832496643, 0.30929335951805115, 0.15349847078323364, -0.0655553936958313, 0.024493498727679253, 0.12996092438697815, 0.19412094354629517, -0.04262733459472656, -0.4403538405895233, -0.20090824365615845, -0.13214117288589478, -0.21048887073993683, -0.48929789662361145, -0.3531472682952881, -0.2041277438402176, 0.23660114407539368, 0.057192113250494, 0.025689303874969482, 0.16118000447750092, -0.3184298276901245, 0.09379664063453674, 0.1432299017906189, -0.017217623069882393, 0.17368540167808533, -0.09761504828929901, -0.2676520347595215, 0.015088449232280254, 0.3393763601779938, 0.2690899670124054, 0.5175557136535645, -0.026234902441501617, -0.34360915422439575, -0.006000414490699768, -0.09780417382717133, 0.35937297344207764, -0.0548260472714901, -0.29261231422424316, -0.002085503190755844, -0.3965000808238983, 0.22558997571468353, 0.0006403860752470791, 0.25469836592674255, 0.09839940071105957, -0.3241000473499298, -0.27215948700904846, -0.2226506918668747, -0.11509309709072113, 0.06330448389053345, -0.08220602571964264, 0.0008344724774360657, 0.2460261881351471, -0.07375161349773407, 0.0565660297870636, 0.016090385615825653, -0.21356123685836792, -0.06100011616945267, 0.04048147052526474, 0.022131960839033127, -0.02668285369873047, -0.048801034688949585, -0.04985661432147026, -0.25073227286338806, -0.04870852082967758, 0.06452462822198868, -0.16137491166591644, -0.09960535168647766, -0.18279077112674713, 0.1642116755247116, 0.20261824131011963, 0.19779974222183228, 0.24970152974128723, -0.21018759906291962, -0.40683093667030334, -0.0708104819059372, -0.1022661030292511, 0.4876912236213684, 0.014707043766975403, 0.16850900650024414, 0.13239754736423492, 0.38285499811172485, -0.13284271955490112, 0.0028586536645889282, 0.028110958635807037, 0.23052293062210083, -0.11951889842748642, 0.3854374289512634, -0.07181822508573532, -0.07422322779893875, -0.24059954285621643, 0.02784924954175949, -0.12327107787132263, 0.2926122546195984, 0.42037662863731384, -0.43436121940612793, 0.2582090497016907, 0.24440084397792816, 0.48163267970085144, -0.18244615197181702, 0.04719898849725723, -0.20013664662837982, -0.007896509021520615, 0.2093534767627716, -0.2823455333709717, -0.14390361309051514, -0.006837092339992523, 0.08559421449899673, -0.12652063369750977, 0.1708846539258957, 0.1535382866859436, -0.5379576086997986, -0.09032018482685089, 0.10770038515329361, 0.31460145115852356, -0.2242765873670578, 0.12771746516227722, 0.5658208131790161, -0.06559243053197861, 0.07219979166984558, 0.39553457498550415, -0.08891162276268005, -0.0875118151307106, 0.20431682467460632, 0.24432387948036194, 0.22872962057590485, 0.5702472925186157, 0.3067266047000885, 0.10869354754686356, -0.05214955657720566, 0.029427658766508102, -0.14810064435005188, 0.04019540548324585, 0.04704248905181885, 0.3019082546234131, 0.006473153829574585, 0.026269691064953804, -0.3086572289466858, -0.28236278891563416, -0.06823597848415375, -0.01626783236861229, 0.11080993711948395, -0.1570950150489807, -0.3861692547798157, 0.2526269853115082, 0.07339732348918915, 0.003778744488954544, 0.18018734455108643, 0.168781578540802, 0.00844353437423706, -0.3732501268386841, -0.8148133754730225, 0.02974962443113327, 0.038225967437028885, 0.1774597465991974, -0.22936733067035675, 0.24443264305591583, -0.3747789263725281, -0.16986647248268127, -0.017433855682611465, 0.6133744716644287, -0.0014463439583778381, 0.1128968596458435, 0.4109486937522888, -0.05258849635720253, 0.1922062784433365, -0.12827430665493011, 0.1452540159225464, 0.23826633393764496, 0.36000484228134155, 0.17354968190193176, 0.028949089348316193, 0.11825284361839294, -0.05499489605426788, 0.07286115735769272, 0.6321058869361877, 0.2950083911418915, 0.12540584802627563, -0.1075868085026741, 0.0866270363330841, -0.17644734680652618, 0.09655027091503143, 0.16448639333248138, -0.15498803555965424, -0.09914758801460266, 0.10075469315052032, 0.08492270112037659, -0.05107877030968666, -0.2872259318828583, 0.0551207959651947, -0.0023822039365768433, -0.09830546379089355, 0.1630261391401291, 0.08323578536510468, 0.24783875048160553, -0.32131439447402954, -0.4689474403858185, 0.45137760043144226, 0.07497246563434601, 0.3187843859195709, 0.17532046139240265, 0.0775500163435936, -0.0907013788819313, -0.09648256003856659, 0.3948315978050232, -0.31542861461639404, 0.16776327788829803, 0.3029376268386841, -0.39185118675231934, 0.0016646943986415863, -0.17673324048519135, -0.1617288589477539, -0.2946326732635498, -0.33363035321235657, 0.38621288537979126, 0.08621883392333984, 0.05325190722942352, 0.09137701988220215, -0.056134406477212906, 0.1138785183429718, 0.0822550505399704, 0.32400640845298767, 0.15812213718891144, -0.02813492715358734, -0.17495188117027283, -0.191430926322937, -0.21413862705230713, -0.09544765204191208, -0.3301590085029602, 0.4264926314353943, 0.05263061076402664, 0.3511555790901184, -0.023979291319847107, -0.024643700569868088, -0.08557154983282089, 0.28094175457954407, 0.05443868786096573, 0.09923286736011505, -0.6209914684295654, -0.04390638321638107, 0.04332011938095093, -0.5385663509368896, -0.08349983394145966, 0.17613446712493896, 0.04248245805501938, 0.29470294713974, -0.0027915462851524353, 0.07493558526039124, 0.26065415143966675, -0.2971813976764679, -0.15600921213626862, -0.14087198674678802, 0.26894915103912354, 0.35043513774871826, -0.4279555380344391, -0.23165565729141235, 0.0006440207362174988, 0.37004563212394714, -0.15681827068328857, -0.0027836058288812637, -0.1221081018447876, 0.04734881967306137, 0.22143258154392242, -0.03280842676758766, 0.19129185378551483, 0.05176855996251106, -0.1450217068195343, 0.18498976528644562, -0.04918932914733887 ]
https://github.com/huggingface/datasets/issues/2472
Fix automatic generation of Zenodo DOI
Other repo maintainers had the same problem with Zenodo. There is an open issue on their GitHub repo: zenodo/zenodo#2181
After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right
19
Fix automatic generation of Zenodo DOI After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right Other repo maintainers had the same problem with Zenodo. There is an open issue on their GitHub repo: zenodo/zenodo#2181
[ -0.0932827889919281, 0.3942437171936035, -0.034740786999464035, 0.09913043677806854, 0.1498735100030899, -0.10668712109327316, 0.3806299567222595, 0.38822099566459656, -0.07586831599473953, 0.2535550594329834, -0.06456294655799866, 0.20564235746860504, 0.206825390458107, -0.09449057281017303, -0.12038645148277283, 0.01683017984032631, -0.03144287317991257, 0.38636109232902527, -0.057352080941200256, -0.3248515725135803, -0.21338729560375214, 0.07664826512336731, -0.03834507241845131, 0.08022603392601013, 0.12360575050115585, 0.00874095968902111, -0.1001703068614006, 0.00405651330947876, -0.6152880191802979, -0.2550565004348755, 0.23303280770778656, 0.3883587718009949, 0.009761223569512367, 0.14030762016773224, -0.00011564424494281411, -0.22525054216384888, 0.42700183391571045, -0.016329417005181313, 0.17924609780311584, -0.37212061882019043, -0.5172890424728394, -0.3386048972606659, -0.11043917387723923, -0.2647009491920471, 0.22356298565864563, -0.3678029179573059, 0.11569546163082123, 0.11400936543941498, 0.021549031138420105, 0.3697965443134308, 0.1875544786453247, -0.10517046600580215, 0.4895666241645813, -0.217632457613945, 0.13730715215206146, 0.10013633221387863, -0.08288189768791199, 0.05873609706759453, -0.1178572028875351, 0.3063131868839264, 0.015490785241127014, 0.28525209426879883, 0.02339247055351734, 0.1728072613477707, 0.09308431297540665, 0.11475365608930588, 0.30394604802131653, -0.17149442434310913, 0.12802401185035706, 0.12308657169342041, 0.8328620195388794, -0.14327722787857056, -0.2120329886674881, 0.08801751583814621, 0.1983068585395813, -0.2366383969783783, 0.07406675070524216, 0.07899324595928192, 0.12801843881607056, 0.14638252556324005, 0.127923384308815, -0.25791680812835693, -0.2535565495491028, 0.07788451015949249, 0.07889138162136078, -0.09962758421897888, -0.08478010445833206, 0.009448688477277756, -0.04608358070254326, -0.09164351224899292, 0.3670059144496918, -0.08728332817554474, -0.24546527862548828, 0.1976323276758194, 0.24154353141784668, -0.06734048575162888, -0.03526807576417923, 0.10078629851341248, 0.332395076751709, 0.13222041726112366, 0.2674003839492798, -0.017675969749689102, -0.07961805164813995, -0.07322139292955399, 0.1397775560617447, -0.008630463853478432, 0.3600790202617645, -0.10420044511556625, 0.1855025738477707, 0.05187472328543663, -0.09834763407707214, 0.06741749495267868, 0.05446409061551094, -0.10709870606660843, 0.6239059567451477, -0.15881627798080444, 0.34527575969696045, -0.4820897877216339, -0.06010710448026657, 0.15097805857658386, -0.09230194985866547, -0.1525581181049347, -0.46435546875, -0.01698961853981018, -0.003042231546714902, 0.3226550817489624, -0.07218216359615326, 0.054592110216617584, -0.22299589216709137, -0.16848991811275482, -0.1057487279176712, -0.44631680846214294, 0.05224229767918587, 0.20658545196056366, -0.0011710338294506073, -0.35217660665512085, 0.19779072701931, 0.22604665160179138, -0.167387455701828, -0.5947023630142212, 0.04876278340816498, 0.16479529440402985, 0.1655287742614746, 0.24220365285873413, 0.03770572319626808, 0.23589573800563812, -0.05610885098576546, -0.059260718524456024, -0.025379791855812073, 0.2959367334842682, -0.15975072979927063, -0.3853192925453186, -0.5159862041473389, 0.12294955551624298, -0.01733667217195034, -0.0714501142501831, 0.36143672466278076, 0.19267526268959045, 0.2250160574913025, -0.1650748997926712, -0.15695840120315552, -0.09019695967435837, 0.25449156761169434, 0.1249288022518158, 0.11724521964788437, 0.31844452023506165, 0.0776737779378891, 0.006854794919490814, -0.4972432255744934, 0.07837771624326706, 0.3269886374473572, -0.06795643270015717, 0.004643188323825598, 0.28496524691581726, -0.06459630280733109, -0.3945792317390442, 0.23509469628334045, -0.4871270954608917, -0.3446820378303528, -0.03750592842698097, -0.06004885211586952, -0.00815008208155632, -0.07005658000707626, -0.17462418973445892, 0.24662944674491882, 0.2377924919128418, -0.32223671674728394, -0.2767674922943115, -0.10048218071460724, -0.019304223358631134, -0.24840427935123444, -0.20579731464385986, -0.2596990466117859, -0.11546193063259125, 0.6102954149246216, 0.40470659732818604, 0.16961339116096497, 0.25422585010528564, 0.19980785250663757, 0.2200542688369751, -0.04339821636676788, 0.09640413522720337, 0.4835832715034485, -0.2071889489889145, 0.23671801388263702, -0.050585709512233734, -0.019700683653354645, 0.07894609868526459, 0.38968953490257263, 0.09552266448736191, -0.09524284303188324, -0.043256912380456924, -0.3474520742893219, -0.11095453053712845, -0.158993661403656, 0.05873538926243782, 0.10617955029010773, 0.0787167027592659, -0.1146688461303711, 0.16320854425430298, 0.10622444748878479, -0.11583543568849564, -0.16014665365219116, 0.18732890486717224, -0.03615254908800125, 0.14228177070617676, 0.05587920546531677, -0.08352423459291458, 0.0014841780066490173, 0.07628656178712845, 0.08730775117874146, 0.19700512290000916, -0.23666948080062866, 0.25093066692352295, 0.018819808959960938, 0.11508286744356155, 0.10173725336790085, 0.31528669595718384, 0.1941678673028946, -0.22410744428634644, -0.10022074729204178, 0.12395131587982178, -0.21051450073719025, 0.1670019030570984, 0.060442276298999786, 0.1879071593284607, -0.29313790798187256, -0.2764583230018616, -0.38729679584503174, 0.20403249561786652, 0.5019196271896362, 0.03818101808428764, -0.3221300542354584, -0.4127163887023926, -0.118482306599617, -0.06475187838077545, 0.11552520096302032, 0.19123774766921997, -0.27570611238479614, 0.26717299222946167, 0.48865383863449097, -0.03090597875416279, 0.003014136105775833, -0.19263455271720886, 0.08808457851409912, -0.08983273804187775, 0.12282205373048782, 0.3807593882083893, 0.16728323698043823, 0.149175226688385, -0.10247249901294708, 0.09241033345460892, -0.28907153010368347, -0.1720479279756546, 0.11765054613351822, 0.04282030090689659, 0.6119809150695801, 0.2980554699897766, 0.021949324756860733, -0.1812720149755478, -0.47360914945602417, 0.2799229621887207, 0.04399871826171875, 0.4817020297050476, -0.13015735149383545, -0.5318512320518494, -0.04886878281831741, 0.22936275601387024, -0.3871009349822998, -0.377604216337204, -0.3723509907722473, -0.170017808675766, 0.03927046060562134, 0.21295295655727386, 0.10649988055229187, 0.13377706706523895, -0.007893994450569153, 0.03219953179359436, -0.01089249737560749, 0.23902322351932526, -0.14236781001091003, 0.07843824476003647, 0.073500856757164, -0.031824707984924316, -0.19766098260879517, -0.08352235704660416, 0.2792722284793854, -0.505919337272644, 0.1397278755903244, -0.5817276835441589, -0.06405115872621536, 0.1704772710800171, 0.20020337402820587, 0.1675925999879837, -0.20416131615638733, 0.1052955687046051, 0.11080516874790192, -0.05878264084458351, 0.0500783734023571, -0.2695668041706085, -0.1343621462583542, 0.07605338096618652, -0.4455573260784149, 0.23187373578548431, -0.0432303287088871, -0.46572259068489075, -0.039708808064460754, -0.06985890865325928, 0.008766431361436844, 0.08063100278377533, 0.2930545210838318, 0.2758257985115051, 0.12011680006980896, -0.18056409060955048, -0.09860536456108093, -0.23804931342601776, -0.13308149576187134, -0.6524444222450256, 0.2465551644563675, -0.31332889199256897, -0.354363352060318, 0.1500936597585678, 0.10371115803718567, 0.38144418597221375, -0.006126607768237591, -0.2047826498746872, 0.2546280324459076, 0.07921510189771652, 0.48642104864120483, 0.14918817579746246, -0.2074272781610489, 0.5132313370704651, 0.12299289554357529, -0.008554812520742416, -0.27549079060554504, 0.2137734740972519, 0.33332979679107666, -0.0036005899310112, 0.29061779379844666, -0.10349095612764359, 0.019138146191835403, -0.1552755981683731, 0.7816063761711121, 0.07481253147125244, -0.01993851736187935, -0.055643461644649506, 0.23947463929653168, 0.5023630261421204, 0.016448624432086945, -0.18362055718898773, 0.08513443171977997, -0.015605509281158447, 0.050326764583587646, 0.4427649974822998, 0.05356420949101448, -0.22758731245994568, -0.026136940345168114, 0.1506718099117279, -0.5740028023719788, -0.2443082481622696, -0.3904028534889221, -0.4486217796802521, 0.26657095551490784, 0.4034616947174072, 0.2810751497745514, -0.18915197253227234, -0.1890506148338318, -0.023412277922034264, -0.003150448203086853, 0.2987802028656006, 0.05473494529724121, -0.10947965830564499, 0.33516040444374084, -0.4646449685096741, 0.06018572300672531, 0.074549101293087, 0.2616271674633026, -0.018729787319898605, 0.31894436478614807, 0.11339305341243744, -0.0025559603236615658, 0.15044796466827393, -0.24766041338443756, 0.19632408022880554, -0.15262490510940552, 0.12429967522621155, -0.23000259697437286, -0.11025442183017731, -0.10791818052530289, 0.0619095116853714, 0.19589541852474213, 0.4469095766544342, -0.10384618490934372, -0.017788639292120934, 0.21526454389095306, -0.1738673895597458, -0.16641558706760406, -0.34622055292129517, -0.07937860488891602, -0.14328289031982422, 0.09175978600978851, 0.04844924807548523, -0.2176763266324997, 0.15449951589107513, -0.7347433567047119, -0.42759832739830017, 0.257980614900589, 0.3688339591026306, -0.13135622441768646, -0.056933045387268066, 0.12977167963981628, -0.0298403762280941, 0.3940138518810272, 0.6949187517166138, -0.08868038654327393, 0.5424677729606628, 0.016871817409992218, -0.013956889510154724, -0.5385690927505493, -0.19009461998939514, -0.380784809589386, -0.31760266423225403, -0.0570351779460907, 0.18174177408218384, -0.09068690985441208, 0.010910273529589176, -0.364843487739563, 0.0432276651263237, -0.191618412733078, 0.44328299164772034, 0.12115462869405746, -0.3691502511501312, -0.27513718605041504, 0.08683953434228897, 0.1485038846731186, -0.1373630166053772, 0.6784924268722534, 0.21683485805988312, -0.15305455029010773, -0.09534333646297455, 0.3730173408985138, 0.5726531147956848, -0.3677920699119568, -0.23237282037734985, -0.08311893045902252, -0.4831368327140808, 0.3436771631240845, 0.19610421359539032, -0.009289247915148735, -0.6566014885902405, -0.43696048855781555, -0.00293600931763649, 0.08464467525482178, 0.41135063767433167, 0.15869858860969543, -0.3403165936470032, -0.17380715906620026, -0.11967432498931885, 0.21889562904834747, 0.28962355852127075, -0.10118920356035233, -0.25795435905456543, -0.21309269964694977, -0.02071046084165573, 0.06356079876422882, -0.35723555088043213, -0.019468098878860474, -0.21399888396263123, -0.007706472650170326, 0.09368649125099182, 0.047674715518951416, -0.2661891579627991, 0.10541536659002304, 0.2157573252916336, 0.04070546105504036, -0.11219565570354462, -0.08099127560853958, -0.5836493372917175, 0.49787864089012146, 0.26467281579971313, 0.10088784992694855, -0.4010162949562073, 0.2870318591594696, 0.1576530635356903, -0.0822623148560524, 0.013152209110558033, 0.12586776912212372, 0.19049392640590668, 0.007367335259914398, -0.41336628794670105, -0.18465754389762878, -0.12445090711116791, -0.17994962632656097, -0.4760700464248657, -0.3439108729362488, -0.151312455534935, 0.19707874953746796, 0.0551084540784359, 0.029218748211860657, 0.17100661993026733, -0.3160806894302368, 0.09268304705619812, 0.17187297344207764, -0.0023674359545111656, 0.19619864225387573, -0.08726990222930908, -0.2533203661441803, 0.006774419918656349, 0.37934020161628723, 0.26093554496765137, 0.48568299412727356, -0.03243538737297058, -0.3512035012245178, -0.002474997192621231, -0.10707496851682663, 0.344870924949646, -0.09375861287117004, -0.2616345286369324, 0.0049195969477295876, -0.3712385296821594, 0.19064997136592865, 0.03909950330853462, 0.1902027428150177, 0.14966565370559692, -0.3142693042755127, -0.2813904881477356, -0.232820063829422, -0.08994286507368088, 0.0482821986079216, -0.07011334598064423, 0.028725814074277878, 0.2584741413593292, -0.058812033385038376, 0.021082522347569466, 0.04558132588863373, -0.20644457638263702, -0.04142506420612335, 0.060688018798828125, 0.00957963801920414, -0.014804281294345856, -0.044113606214523315, -0.09380634129047394, -0.25022268295288086, -0.05348534137010574, 0.08641412854194641, -0.15084731578826904, -0.09328359365463257, -0.22620348632335663, 0.1624041348695755, 0.2445545792579651, 0.20565573871135712, 0.2881828546524048, -0.22600311040878296, -0.39443957805633545, -0.11527661234140396, -0.16365742683410645, 0.5030632615089417, -0.010219469666481018, 0.1572260856628418, 0.11037090420722961, 0.4229060709476471, -0.13164889812469482, -0.016133397817611694, 0.06205938011407852, 0.18386657536029816, -0.13287381827831268, 0.3991323411464691, -0.05660514906048775, -0.07186970114707947, -0.21784521639347076, 0.026885639876127243, -0.12781277298927307, 0.23642277717590332, 0.4355159103870392, -0.4055805206298828, 0.28814396262168884, 0.23776575922966003, 0.5250594615936279, -0.15163828432559967, 0.06895031780004501, -0.20501677691936493, 0.005618208087980747, 0.20841842889785767, -0.26783353090286255, -0.1486811339855194, 0.010367517359554768, 0.1443115621805191, -0.12896482646465302, 0.15407106280326843, 0.1336093544960022, -0.5700013637542725, -0.1002749502658844, 0.09982318431138992, 0.28205183148384094, -0.21404394507408142, 0.11051389575004578, 0.6199080348014832, -0.08038704097270966, 0.10388600826263428, 0.4857155382633209, -0.0811595618724823, -0.07764079421758652, 0.27270668745040894, 0.26240721344947815, 0.2202560156583786, 0.4952886700630188, 0.2957504093647003, 0.04403264820575714, -0.06327615678310394, 0.024966973811388016, -0.13409078121185303, 0.05842311680316925, 0.08414310216903687, 0.2926391363143921, 0.04796336963772774, -0.044715944677591324, -0.29869019985198975, -0.32021719217300415, -0.07086676359176636, -0.025526870042085648, 0.08528612554073334, -0.10818077623844147, -0.38522276282310486, 0.30776166915893555, 0.07418298721313477, 0.006892576813697815, 0.1515875607728958, 0.20066894590854645, -0.022050976753234863, -0.3321383595466614, -0.893318235874176, 0.029002076014876366, 0.001289214938879013, 0.17532256245613098, -0.22150009870529175, 0.18132558465003967, -0.4121183156967163, -0.16850699484348297, -0.0005255080759525299, 0.614615797996521, -0.05067487433552742, 0.14787420630455017, 0.4311758279800415, -0.07538122683763504, 0.1523250788450241, -0.09515731781721115, 0.11300674080848694, 0.26062023639678955, 0.3594924509525299, 0.20334729552268982, 0.078285813331604, 0.10928944498300552, -0.054695792496204376, 0.06388074159622192, 0.6495121121406555, 0.31921324133872986, 0.10963758826255798, -0.12456225603818893, 0.11334162950515747, -0.1635332703590393, 0.10637067258358002, 0.19366112351417542, -0.1298442929983139, -0.11561164259910583, 0.10880272090435028, 0.0930195227265358, -0.05790949985384941, -0.276166170835495, 0.05101262778043747, 0.034268736839294434, -0.12299761176109314, 0.19120042026042938, 0.09214307367801666, 0.2127644270658493, -0.3060305714607239, -0.4880686104297638, 0.4472509026527405, 0.07533913105726242, 0.3521839678287506, 0.1332860141992569, 0.08105510473251343, -0.06173979490995407, -0.07767358422279358, 0.3390156328678131, -0.28103771805763245, 0.13682840764522552, 0.3183821141719818, -0.38334140181541443, -0.036145251244306564, -0.14716945588588715, -0.1681504249572754, -0.28407615423202515, -0.3117675185203552, 0.37159842252731323, 0.10874217003583908, 0.05441384017467499, 0.05140276998281479, -0.060113243758678436, 0.1082705408334732, 0.17983201146125793, 0.30988335609436035, 0.18124885857105255, 0.007899284362792969, -0.16391676664352417, -0.16309666633605957, -0.24107256531715393, -0.07289333641529083, -0.35302820801734924, 0.3977642059326172, 0.04077870771288872, 0.3121418356895447, -0.04800675809383392, -0.00009931251406669617, -0.06420910358428955, 0.30952367186546326, 0.05882208049297333, 0.0698169469833374, -0.6621655225753784, -0.023454617708921432, 0.011517181992530823, -0.5694556832313538, -0.08729913830757141, 0.21470960974693298, 0.045279987156391144, 0.2947055995464325, 0.012344598770141602, 0.06845247000455856, 0.2764808237552643, -0.3221190273761749, -0.14345067739486694, -0.14867278933525085, 0.23949211835861206, 0.3593898415565491, -0.43652185797691345, -0.19588881731033325, -0.028259538114070892, 0.350760281085968, -0.18796393275260925, -0.024839792400598526, -0.1295250505208969, 0.02903670258820057, 0.1974966675043106, -0.053703419864177704, 0.22174587845802307, 0.06488737463951111, -0.14822722971439362, 0.19387835264205933, -0.04484730586409569 ]
https://github.com/huggingface/datasets/issues/2472
Fix automatic generation of Zenodo DOI
I have received the following request from Zenodo support: > Could you send us the link to the repository as well as the release tag? My reply: > Sure, here it is: > - Link to the repository: https://github.com/huggingface/datasets > - Link to the repository at the release tag: https://github.com/huggingface/datasets/releases/tag/1.8.0 > - Release tag: 1.8.0
After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right
55
Fix automatic generation of Zenodo DOI After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right I have received the following request from Zenodo support: > Could you send us the link to the repository as well as the release tag? My reply: > Sure, here it is: > - Link to the repository: https://github.com/huggingface/datasets > - Link to the repository at the release tag: https://github.com/huggingface/datasets/releases/tag/1.8.0 > - Release tag: 1.8.0
[ 0.018832389265298843, 0.2643168866634369, -0.05375764146447182, 0.1654237061738968, 0.1444079577922821, -0.04862008988857269, 0.2956539988517761, 0.3008947968482971, 0.012550458312034607, 0.24218568205833435, -0.01259600929915905, 0.15270058810710907, 0.15315328538417816, -0.010560106486082077, -0.015058989636600018, -0.011382319033145905, -0.19024178385734558, 0.3833130896091461, 0.01922529935836792, -0.27282610535621643, -0.08025985956192017, 0.03522045910358429, 0.021400026977062225, 0.07574144750833511, 0.08150254935026169, -0.09376799315214157, -0.08880075812339783, 0.1431855410337448, -0.6058159470558167, -0.38807979226112366, 0.3033672273159027, 0.3281610310077667, -0.0811476930975914, -0.023491941392421722, -0.00011815063771791756, -0.17282605171203613, 0.42136436700820923, -0.005829285830259323, 0.09317775070667267, -0.4274672865867615, -0.5783345103263855, -0.299528032541275, -0.2516590356826782, -0.2421187460422516, 0.13193157315254211, -0.28708797693252563, 0.12574400007724762, 0.06869423389434814, 0.21153855323791504, 0.3670428395271301, 0.13298365473747253, 0.00801963359117508, 0.5302379131317139, -0.24284273386001587, 0.09046054631471634, 0.17405176162719727, -0.03425364941358566, 0.19185546040534973, 0.02889932319521904, 0.34875351190567017, -0.009732760488986969, 0.4010196924209595, 0.02568305842578411, -0.01158139854669571, 0.14839860796928406, 0.08371143788099289, 0.19365477561950684, -0.3168489336967468, 0.2095564305782318, 0.05807768180966377, 0.7970231771469116, -0.21155625581741333, -0.33632802963256836, -0.04875423014163971, 0.23379988968372345, -0.23394207656383514, 0.05841134116053581, -0.05324902385473251, 0.10602930188179016, 0.23671580851078033, 0.04881458729505539, -0.4525826871395111, -0.27514541149139404, -0.01644951105117798, 0.0710526555776596, -0.052521735429763794, -0.1526584029197693, -0.02697068452835083, 0.019529294222593307, -0.07952357828617096, -0.046291839331388474, 0.04424501582980156, -0.1769401878118515, 0.22727525234222412, 0.2109760344028473, -0.12592503428459167, -0.056080885231494904, 0.008323684334754944, 0.5040107369422913, 0.15380257368087769, 0.2533908486366272, -0.1297275424003601, -0.14057593047618866, -0.15241074562072754, 0.14769741892814636, 0.12187767028808594, 0.3141684830188751, -0.16101160645484924, 0.169439435005188, 0.25345197319984436, 0.08241046965122223, 0.03213353455066681, -0.023406457155942917, -0.04030301421880722, 0.3857743740081787, -0.15564653277397156, 0.4334898591041565, -0.4375567138195038, -0.16307497024536133, 0.19291293621063232, -0.18138739466667175, -0.19119267165660858, -0.39317917823791504, -0.01565495878458023, -0.1364426612854004, 0.3304491937160492, -0.19808652997016907, -0.014288410544395447, -0.09215531498193741, -0.15979395806789398, -0.08908112347126007, -0.33713510632514954, 0.014122601598501205, 0.35466939210891724, -0.05591622367501259, -0.5388819575309753, 0.26960739493370056, 0.3608839809894562, -0.1016266942024231, -0.5210307836532593, -0.1006258875131607, 0.18460141122341156, 0.14809411764144897, 0.2446361780166626, 0.09730875492095947, 0.29669150710105896, -0.10313676297664642, -0.07504195719957352, -0.09081551432609558, 0.26683124899864197, -0.20662575960159302, -0.47058671712875366, -0.4782351851463318, 0.07410639524459839, -0.053396474570035934, -0.06763707846403122, 0.2885315418243408, 0.1652776002883911, 0.09281063079833984, -0.12252244353294373, -0.06655804067850113, 0.1615639328956604, 0.16983407735824585, 0.02489863708615303, 0.26257941126823425, 0.3304296135902405, 0.10813164710998535, -0.1468622386455536, -0.31378310918807983, 0.09737102687358856, 0.282828152179718, 0.003323584794998169, -0.044850949198007584, 0.31462952494621277, -0.1357920616865158, -0.30735859274864197, 0.26961833238601685, -0.5879858136177063, -0.36415165662765503, -0.05727614089846611, -0.2582697868347168, 0.059336163103580475, -0.008058533072471619, -0.1976896971464157, 0.36864662170410156, 0.2593601942062378, -0.31462791562080383, -0.31574827432632446, -0.1256505846977234, -0.04442773386836052, -0.18985356390476227, -0.2747279107570648, -0.36286860704421997, -0.06566280126571655, 0.4524851143360138, 0.3284434676170349, 0.16307289898395538, 0.26394760608673096, 0.1869407445192337, 0.14931806921958923, 0.004100263584405184, 0.045214977115392685, 0.4665610194206238, -0.16669446229934692, 0.18847060203552246, -0.04606541246175766, -0.14474904537200928, 0.1752278208732605, 0.4449862241744995, 0.1707228422164917, -0.18219704926013947, -0.10482893139123917, -0.49845919013023376, -0.15126349031925201, -0.12356409430503845, 0.0029103532433509827, 0.020983673632144928, 0.12464415282011032, 0.056211087852716446, 0.19355052709579468, -0.0028673075139522552, 0.017253462225198746, -0.10430046916007996, 0.31859394907951355, -0.21010132133960724, 0.10657936334609985, -0.028459684923291206, -0.045615073293447495, -0.022736744955182076, 0.14328300952911377, 0.06847605109214783, 0.10750247538089752, -0.04910358041524887, 0.19792720675468445, -0.02988286130130291, 0.241042822599411, 0.15102428197860718, 0.37123581767082214, 0.37920621037483215, -0.23446254432201385, -0.04476037621498108, 0.05595109984278679, -0.2126636505126953, 0.10493823140859604, 0.11360818147659302, 0.20807796716690063, -0.2715885639190674, -0.2774091362953186, -0.3513949513435364, 0.1562841683626175, 0.42292627692222595, 0.032306376844644547, -0.34061363339424133, -0.3359733521938324, -0.1970304548740387, -0.2026633769273758, 0.2110144942998886, 0.15318022668361664, -0.33750519156455994, 0.2807775139808655, 0.5243435502052307, -0.0864705741405487, -0.01266942173242569, -0.14678633213043213, 0.07315855473279953, -0.1405574381351471, 0.07984496653079987, 0.346985787153244, 0.16212204098701477, 0.10231578350067139, -0.06705528497695923, 0.10237987339496613, -0.17161671817302704, -0.09976369142532349, 0.18451982736587524, -0.027185536921024323, 0.5872583985328674, 0.3576720952987671, -0.04272569715976715, -0.058405015617609024, -0.2886105477809906, 0.15476204454898834, 0.02367922104895115, 0.356401264667511, -0.1751265525817871, -0.663576066493988, 0.006444031372666359, 0.0676271989941597, -0.399324893951416, -0.42409783601760864, -0.5256232023239136, -0.08240770548582077, 0.05852997303009033, 0.12916211783885956, 0.16244256496429443, 0.17353153228759766, -0.07671161741018295, 0.22311198711395264, -0.09684837609529495, 0.22691848874092102, -0.17529675364494324, 0.1168273314833641, 0.0629979744553566, -0.044328734278678894, -0.2599349915981293, -0.13683603703975677, 0.29618188738822937, -0.5483993291854858, 0.13195429742336273, -0.5378555655479431, -0.062133289873600006, 0.2043304592370987, 0.16479888558387756, 0.02992754802107811, -0.007647030055522919, 0.17838221788406372, 0.18789592385292053, -0.038659606128931046, 0.014307301491498947, -0.23007294535636902, -0.22027292847633362, -0.17642556130886078, -0.3641074597835541, 0.35478219389915466, -0.029560662806034088, -0.42677292227745056, -0.03691495954990387, -0.0573267936706543, 0.14318911731243134, 0.02230851724743843, 0.3342294692993164, 0.40588870644569397, 0.04380989447236061, -0.10330301523208618, -0.14449968934059143, -0.14503668248653412, -0.09604642540216446, -0.7143985629081726, 0.25189903378486633, -0.27749672532081604, -0.2620485723018646, 0.18472564220428467, 0.10000089555978775, 0.5091557502746582, -0.03438352048397064, -0.21103161573410034, 0.06299353390932083, 0.024548526853322983, 0.48673397302627563, -0.04855382442474365, -0.08292693644762039, 0.5620525479316711, 0.15077902376651764, -0.010695300996303558, -0.22478237748146057, 0.07546994090080261, 0.2946533262729645, -0.0628257542848587, 0.2438558042049408, 0.052759893238544464, 0.09856802970170975, -0.11683675646781921, 1.0462346076965332, 0.21999111771583557, -0.024665046483278275, -0.017103925347328186, 0.14740394055843353, 0.5294188857078552, 0.15809530019760132, -0.3583492040634155, 0.015854353085160255, -0.013880312442779541, -0.010371343232691288, 0.35526877641677856, 0.09333717077970505, 0.06165236234664917, -0.06825397163629532, 0.0050904639065265656, -0.5711328387260437, -0.24302086234092712, -0.39520880579948425, -0.2392047643661499, 0.32421743869781494, 0.30303525924682617, 0.3546324372291565, -0.13798832893371582, -0.049644213169813156, 0.15883387625217438, 0.1606145203113556, 0.4409469664096832, 0.05261214077472687, -0.06966237723827362, 0.30643707513809204, -0.5714346170425415, 0.020043320953845978, 0.2249080240726471, 0.13378246128559113, -0.11484850198030472, 0.337947815656662, 0.06074324995279312, -0.01457255706191063, 0.31462347507476807, -0.18512395024299622, 0.24939802289009094, -0.2188223898410797, 0.13716325163841248, 0.05636748671531677, 0.05686446651816368, 0.018909554928541183, 0.11509090662002563, 0.36416417360305786, 0.5256967544555664, -0.17919838428497314, -0.0794079601764679, 0.2453014850616455, -0.19166387617588043, -0.15956412255764008, -0.21092979609966278, -0.015495982021093369, -0.19733089208602905, 0.05375492572784424, 0.04434002935886383, -0.06069696694612503, 0.2191060483455658, -0.5079624652862549, -0.3269940912723541, 0.37207576632499695, 0.28914740681648254, -0.17369700968265533, -0.06556431949138641, 0.11744663864374161, 0.11015039682388306, 0.33248165249824524, 0.7585225105285645, -0.06042168289422989, 0.634425163269043, 0.18790827691555023, -0.03184947744011879, -0.5295671820640564, -0.32888075709342957, -0.22416239976882935, -0.14511936902999878, 0.08287559449672699, 0.16135017573833466, -0.14539065957069397, 0.09078846126794815, -0.30729150772094727, -0.08278500288724899, -0.18392150104045868, 0.4555116593837738, 0.14272025227546692, -0.4234258532524109, -0.2619735896587372, 0.0013793855905532837, 0.19437681138515472, -0.11454436928033829, 0.6239346861839294, 0.50164794921875, -0.25444871187210083, -0.26505982875823975, 0.33414262533187866, 0.7262825965881348, -0.27815985679626465, -0.12649206817150116, -0.14782685041427612, -0.5781802535057068, 0.5295578837394714, 0.33640486001968384, -0.034968532621860504, -0.5804932117462158, -0.43405061960220337, -0.051088057458400726, 0.012436416000127792, 0.40211838483810425, 0.08464315533638, -0.3818475902080536, -0.04120282828807831, 0.06654742360115051, 0.26906657218933105, 0.2535396218299866, 0.04305581748485565, -0.3380262851715088, -0.23763704299926758, -0.1506432145833969, -0.0272215623408556, -0.31981784105300903, 0.1685463935136795, -0.19052061438560486, -0.17229467630386353, 0.06577490270137787, -0.005403485149145126, -0.4023115634918213, 0.07754333317279816, -0.05771542713046074, -0.12844586372375488, -0.0067519135773181915, -0.054662130773067474, -0.41989487409591675, 0.4081677794456482, 0.24199695885181427, 0.06241443753242493, -0.31372523307800293, 0.2111719250679016, -0.008523881435394287, -0.07329323142766953, 0.01109513733536005, 0.08913741260766983, 0.24991825222969055, -0.0027723945677280426, -0.302877277135849, -0.15819436311721802, -0.20926645398139954, -0.1547766625881195, -0.4880754351615906, -0.39397740364074707, -0.24730418622493744, 0.13273227214813232, 0.03707122057676315, 0.04572111368179321, 0.22620323300361633, -0.297945499420166, 0.03540917485952377, 0.16036027669906616, 0.02700364775955677, 0.030236735939979553, -0.13587555289268494, -0.1697160303592682, 0.04471179097890854, 0.36095407605171204, 0.07975110411643982, 0.319209486246109, -0.05924636125564575, -0.39301586151123047, -0.024870119988918304, -0.04143623262643814, 0.28861191868782043, -0.044529255479574203, -0.41304537653923035, -0.06497591733932495, -0.3906111717224121, 0.170817032456398, -0.10371577739715576, 0.23796679079532623, 0.2758376896381378, -0.20198273658752441, -0.17302390933036804, -0.3063974380493164, -0.15779606997966766, 0.15726572275161743, -0.10633425414562225, 0.040074463933706284, 0.2192179262638092, -0.051849689334630966, 0.1225074827671051, -0.07506465166807175, -0.18686221539974213, -0.10199176520109177, 0.08064458519220352, -0.10052959620952606, 0.07926462590694427, -0.04518824815750122, 0.050387825816869736, -0.24185077846050262, -0.0996202602982521, 0.013564622029662132, -0.16127392649650574, -0.01919090747833252, -0.15873779356479645, 0.20552097260951996, 0.10042101889848709, 0.21838727593421936, 0.27268871665000916, -0.22619353234767914, -0.3207332491874695, 0.021436773240566254, -0.04125822335481644, 0.5195786356925964, 0.17472165822982788, 0.05715193226933479, 0.20048710703849792, 0.5155269503593445, -0.2896465063095093, 0.024112701416015625, 0.09112060815095901, 0.3099289834499359, -0.12008537352085114, 0.3679492175579071, -0.19968745112419128, -0.10860001295804977, -0.2524873614311218, 0.05498773604631424, 0.06587211787700653, 0.09250767529010773, 0.34909766912460327, -0.32290446758270264, 0.04944418743252754, 0.44771361351013184, 0.6423046588897705, -0.21557015180587769, 0.05043727904558182, -0.055180132389068604, 0.025397207587957382, 0.1495009958744049, -0.25738775730133057, -0.12809430062770844, -0.05007144436240196, 0.05506492033600807, -0.14048831164836884, 0.21674667298793793, 0.1621721088886261, -0.394863098859787, -0.04271852225065231, 0.05679336190223694, 0.3184593617916107, -0.1251235455274582, 0.08267487585544586, 0.5675783753395081, -0.03761979192495346, 0.0553092435002327, 0.4317948520183563, 0.026059329509735107, 0.014137960970401764, -0.03094639629125595, 0.054848991334438324, 0.27326133847236633, 0.6133187413215637, 0.40353891253471375, 0.2087518572807312, -0.029863348230719566, -0.07042992115020752, -0.11069115996360779, 0.05683029815554619, 0.050235893577337265, 0.31905072927474976, 0.1692846417427063, 0.013878974132239819, -0.35733193159103394, -0.19016887247562408, 0.1133165955543518, -0.010857444256544113, 0.047569070011377335, -0.006064107641577721, -0.3562537729740143, 0.08545704185962677, 0.06014348194003105, 0.025629645213484764, 0.02808106318116188, 0.2432369589805603, -0.16580533981323242, -0.38118571043014526, -0.8119906187057495, -0.16599324345588684, 0.06581062078475952, 0.17678320407867432, -0.1928749531507492, 0.24684955179691315, -0.3664068579673767, -0.22231316566467285, -0.05094121769070625, 0.8055134415626526, 0.07574416697025299, 0.04201623424887657, 0.48832619190216064, 0.003926427569240332, 0.15368936955928802, -0.053231723606586456, 0.11957237124443054, 0.207163468003273, 0.31577011942863464, -0.05681846663355827, -0.0037858104333281517, 0.07884472608566284, -0.04483819380402565, 0.030252384021878242, 0.5185046792030334, 0.30999892950057983, 0.029018964618444443, 0.06253966689109802, -0.06577946990728378, -0.1486610472202301, 0.03385380655527115, 0.3108852505683899, -0.2482418417930603, -0.01590070128440857, 0.041779305785894394, 0.09911030530929565, -0.09125169366598129, -0.28225234150886536, 0.041464533656835556, 0.034770287573337555, -0.16201679408550262, 0.3209410607814789, 0.08015985786914825, 0.22114768624305725, -0.2779091000556946, -0.5337411165237427, 0.3785622715950012, 0.24002057313919067, 0.16459967195987701, 0.14643989503383636, 0.023342883214354515, -0.06531541794538498, -0.06794953346252441, 0.33630841970443726, -0.25858426094055176, 0.2947351932525635, 0.24832184612751007, -0.30859091877937317, 0.011193646118044853, -0.1491389125585556, -0.22184856235980988, -0.2559010088443756, -0.15649248659610748, 0.38033559918403625, 0.13336880505084991, -0.010295379906892776, -0.003480164334177971, 0.029419347643852234, -0.01128627359867096, 0.13602814078330994, 0.29525455832481384, 0.11938124150037766, -0.08723695576190948, -0.21523436903953552, -0.20249472558498383, -0.242247074842453, 0.02155647799372673, -0.41046619415283203, 0.4260915517807007, 0.028529895469546318, 0.2173587530851364, -0.0521063506603241, -0.13980327546596527, -0.1788334846496582, 0.22819088399410248, 0.1469053030014038, 0.061912037432193756, -0.5954900979995728, 0.05151292681694031, 0.014974705874919891, -0.6247375011444092, 0.02472790703177452, 0.26061609387397766, -0.01956065744161606, 0.2545495629310608, 0.03183424472808838, -0.03791940212249756, 0.3640730381011963, -0.4100944697856903, -0.04228389263153076, -0.04958919808268547, 0.30944108963012695, 0.4053806662559509, -0.543449878692627, -0.4110449552536011, -0.00008988380432128906, 0.3572206199169159, -0.08698860555887222, -0.023101747035980225, -0.09676890075206757, 0.032258324325084686, 0.17697012424468994, -0.07808123528957367, 0.1460571140050888, 0.13661792874336243, -0.2284545600414276, 0.18690161406993866, -0.05179646611213684 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Hi ! It looks like the issue comes from pyarrow. What version of pyarrow are you using ? How did you install it ?
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
24
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Hi ! It looks like the issue comes from pyarrow. What version of pyarrow are you using ? How did you install it ?
[ -0.4569718837738037, -0.21739070117473602, 0.022878184914588928, 0.4219459891319275, 0.3113079071044922, -0.2264823615550995, 0.2361338883638382, 0.15250523388385773, 0.0431259460747242, 0.3643292188644409, 0.530329704284668, 0.2979792356491089, -0.33465126156806946, -0.04656977951526642, 0.04772993549704552, -0.026567354798316956, 0.36591315269470215, -0.21823552250862122, 0.25115078687667847, 0.3584369421005249, -0.27087852358818054, 0.16277039051055908, -0.4191710352897644, 0.29371243715286255, -0.26529455184936523, 0.0822436660528183, -0.10502269119024277, 0.2865629494190216, -0.09741590172052383, -0.5258916616439819, -0.030576223507523537, -0.2955247163772583, 0.1912616789340973, 0.45836734771728516, -0.00011823356908280402, -0.09135529398918152, 0.2139717936515808, 0.012012647464871407, 0.09306974709033966, -0.4430084228515625, -0.22598609328269958, -0.252882182598114, -0.16372935473918915, -0.04087210074067116, 0.31339308619499207, 0.0046789697371423244, -0.06639397889375687, -0.15027795732021332, 0.07592954486608505, 0.7205310463905334, 0.15910927951335907, 0.21483291685581207, 0.22887073457241058, -0.11200125515460968, 0.01633906364440918, 0.1341475546360016, -0.030597643926739693, 0.06143757700920105, 0.40036529302597046, -0.2003951370716095, 0.024914562702178955, -0.16739529371261597, 0.09280864149332047, -0.2669808566570282, 0.305939257144928, -0.12271007150411606, 0.19980430603027344, -0.6616150140762329, 0.29747894406318665, -0.17242804169654846, -0.1635967493057251, -0.28783515095710754, -0.05091990530490875, -0.16323240101337433, -0.1430845707654953, -0.2230152189731598, 0.1774134337902069, -0.16718968749046326, -0.15712395310401917, 0.08328592777252197, -0.2861921191215515, 0.16995050013065338, 0.033562466502189636, 0.3086438775062561, -0.3192944824695587, 0.4002257287502289, -0.0029777055606245995, 0.3896188735961914, 0.12629535794258118, -0.28137892484664917, -0.3420288562774658, 0.13404971361160278, -0.041528504341840744, 0.26742273569107056, -0.22571586072444916, -0.16636782884597778, 0.1507909893989563, -0.1738586127758026, 0.29045790433883667, -0.24060414731502533, -0.16564220190048218, 0.28740236163139343, 0.04861196503043175, 0.21331053972244263, 0.29802197217941284, -0.020957279950380325, 0.30214178562164307, 0.3840671181678772, 0.04991079494357109, -0.0560649111866951, -0.10280261933803558, -0.040040887892246246, 0.22646693885326385, -0.11676158010959625, 0.08925168216228485, 0.12577342987060547, 0.0740242674946785, -0.15347909927368164, -0.11980153620243073, 0.4294586479663849, -0.21374237537384033, 0.27730506658554077, 0.31860968470573425, 0.2963826656341553, 0.3739163875579834, 0.2270292043685913, -0.2862905263900757, 0.033872559666633606, -0.25706517696380615, -0.08717741072177887, -0.044277824461460114, -0.2006772756576538, -0.37084516882896423, 0.09926449507474899, -0.005736488848924637, 0.23963458836078644, 0.15276390314102173, 0.045047979801893234, 0.221232607960701, -0.5398681163787842, 0.11252203583717346, -0.25730711221694946, 0.13399134576320648, 0.03508347272872925, -0.29419949650764465, 0.1408180594444275, 0.11566735804080963, -0.12368351966142654, -0.16609929502010345, 0.1671801209449768, -0.21241533756256104, -0.24575871229171753, -0.14749658107757568, 0.1560775190591812, -0.004164993762969971, 0.4375187158584595, -0.06178981810808182, 0.32287102937698364, 0.34641802310943604, -0.328504353761673, -0.025873668491840363, -0.31669026613235474, -0.4711761176586151, -0.2692379355430603, -0.04782314598560333, 0.23255357146263123, -0.11913523077964783, 0.029882661998271942, 0.200077623128891, 0.02027754858136177, 0.0941302701830864, 0.16296672821044922, -0.19793584942817688, -0.01775871217250824, -0.1911366879940033, 0.5243679881095886, 0.2797337472438812, -0.06436364352703094, -0.49060341715812683, 0.11027718335390091, -0.26730525493621826, -0.19815191626548767, -0.4909551739692688, -0.15601304173469543, 0.4023433029651642, -0.20736812055110931, 0.4260300397872925, -0.0168936625123024, -0.14121462404727936, 0.1183849349617958, -0.3067172169685364, 0.09499752521514893, 0.1623562127351761, -0.14624126255512238, 0.08063661307096481, -0.16650158166885376, 0.1831178069114685, -0.07083384692668915, 0.020328104496002197, 0.004629060626029968, -0.04265179485082626, 0.28873980045318604, 0.21363458037376404, -0.07819394767284393, 0.03517899289727211, -0.30481991171836853, -0.06838036328554153, 0.22688192129135132, 0.03475996106863022, -0.0888613909482956, -0.028238564729690552, 0.010514635592699051, -0.041165247559547424, 0.30733975768089294, 0.13911177217960358, -0.10586263239383698, 0.02163803204894066, -0.1246974766254425, 0.0030893124639987946, -0.06615325808525085, -0.03760656341910362, -0.019784441217780113, -0.18850994110107422, 0.024668013677001, -0.06323577463626862, -0.1272606998682022, -0.20103010535240173, -0.1646626740694046, -0.38877010345458984, 0.1416741907596588, 0.42396530508995056, -0.006466292776167393, -0.23094165325164795, 0.5506319999694824, 0.3362869620323181, -0.24848924577236176, -0.6358668208122253, -0.08476485311985016, 0.3994877338409424, -0.1538931280374527, 0.16345207393169403, 0.08694484829902649, -0.012666494585573673, -0.1323806643486023, 0.19112169742584229, 0.22163832187652588, 0.28241628408432007, 0.1572647988796234, -0.09599713236093521, 0.042538516223430634, 0.16591572761535645, 0.12296847999095917, 0.03259509801864624, -0.1997918337583542, -0.0025340132415294647, 0.11996696889400482, 0.05610503628849983, -0.04785504192113876, -0.04797392711043358, 0.23610278964042664, 0.27932554483413696, -0.07611237466335297, 0.12380841374397278, 0.058043982833623886, -0.16852077841758728, -0.05674661695957184, 0.2826821208000183, -0.013607330620288849, 0.6230337023735046, 0.06135699898004532, -0.028772857040166855, 0.004042906686663628, -0.38019317388534546, -0.03362850844860077, 0.13357235491275787, 0.07825558632612228, -0.12283749133348465, 0.05036112666130066, 0.25569239258766174, 0.15972231328487396, -0.19245418906211853, -0.3795141875743866, 0.019982656463980675, 0.31463348865509033, -0.461222380399704, 0.2040783166885376, -0.11882185190916061, 0.213638037443161, -0.07788781821727753, -0.17068830132484436, -0.17532381415367126, -0.39156195521354675, -0.03860565274953842, 0.1213034838438034, 0.005078047513961792, 0.15825366973876953, 0.08876869082450867, -0.14176218211650848, 0.04338943213224411, 0.3126336932182312, 0.2620716989040375, -0.004214114043861628, -0.46526235342025757, -0.12566335499286652, 0.3646591007709503, -0.14263178408145905, 0.18075694143772125, 0.1596730798482895, -0.4231133460998535, -0.13776901364326477, -0.5541075468063354, 0.03621683269739151, 0.04581218957901001, 0.21792955696582794, 0.06505313515663147, 0.0002727806568145752, -0.14178971946239471, -0.06400543451309204, 0.16275082528591156, -0.0710153877735138, -0.05115243420004845, 0.11676184833049774, 0.17636333405971527, -0.3484150171279907, -0.40044084191322327, 0.08108167350292206, -0.2404448539018631, -0.22788868844509125, 0.0398983471095562, 0.05621748045086861, 0.2899164855480194, 0.033601343631744385, 0.31736597418785095, 0.23787318170070648, 0.0640234425663948, -0.2699207365512848, -0.2033461183309555, 0.21200931072235107, -0.050956230610609055, -0.14758087694644928, -0.2852526009082794, -0.07525748014450073, 0.17720337212085724, -0.022968512028455734, 0.2650328278541565, -0.2499956637620926, -0.053525205701589584, -0.06591958552598953, 0.3023349642753601, -0.10448898375034332, -0.28444904088974, 0.3918760120868683, 0.10788265615701675, 0.0479716882109642, -0.0043214112520217896, -0.3812085688114166, -0.06521012634038925, -0.220159113407135, 0.18795232474803925, -0.004086723551154137, 0.5207586884498596, 0.15794220566749573, 0.5066375136375427, 0.3318140208721161, -0.5369670987129211, 0.17175856232643127, -0.27069032192230225, 0.12133555114269257, -0.1566910445690155, -0.1280222237110138, 0.30131107568740845, 0.040944769978523254, -0.062437769025564194, 0.1361875832080841, -0.06296420097351074, -0.49677810072898865, 0.051885947585105896, 0.08035053312778473, -0.01680132746696472, -0.28508925437927246, 0.15080603957176208, -0.06029721349477768, 0.26370230317115784, -0.13138911128044128, 0.33292677998542786, -0.24990218877792358, -0.07944004237651825, -0.16358131170272827, -0.09733481705188751, -0.17656353116035461, -0.04665051028132439, -0.5345147848129272, -0.10867252200841904, -0.6624103784561157, 0.3221203088760376, 0.19392648339271545, 0.7835571765899658, 0.021417733281850815, -0.08244436979293823, -0.24680311977863312, -0.1681990772485733, 0.6353747248649597, -0.3002033829689026, 0.0723908543586731, -0.0045126816257834435, 0.09881797432899475, -0.6122601628303528, -0.12567244470119476, -0.014385290443897247, 0.667384684085846, 0.26435917615890503, 0.9284392595291138, 0.046359769999980927, 0.04595999792218208, 0.04348112270236015, 0.017826244235038757, 0.14339393377304077, -0.06520967930555344, -0.010503564029932022, -0.05995379015803337, -0.17638294398784637, 0.19569693505764008, 0.23711322247982025, 0.20747587084770203, -0.015740277245640755, -0.4159706234931946, 0.07543175667524338, -0.37666580080986023, 0.20110130310058594, 0.13199375569820404, 0.20846644043922424, -0.2982677221298218, 0.11402678489685059, -0.07841483503580093, -0.1573798954486847, 0.28037282824516296, -0.1881636381149292, 0.026479436084628105, -0.3439127802848816, 0.2833443880081177, 0.15300253033638, 0.19953212141990662, 0.42697662115097046, -0.0416695810854435, 0.10616376996040344, -0.3421506881713867, 0.31230491399765015, -0.20471015572547913, 0.2691138684749603, 0.25358009338378906, 0.21678146719932556, -0.5693435668945312, 0.0799897164106369, 0.15404696762561798, 0.09059019386768341, -0.07607732713222504, 0.39408591389656067, -0.36817049980163574, -0.461963951587677, 0.3434624671936035, 0.1300131231546402, 0.84830242395401, 0.03642153739929199, -0.08160333335399628, -0.19214364886283875, 0.16613943874835968, 0.16866986453533173, -0.1858169436454773, -0.05073051154613495, -0.390462189912796, -0.155721977353096, -0.06776755303144455, -0.1420491635799408, 0.09832915663719177, 0.0727662444114685, -0.39251700043678284, 0.1129097118973732, 0.10997651517391205, 0.44247546792030334, -0.0006535258144140244, 0.09435108304023743, -0.1428738832473755, -0.12733428180217743, -0.06860160827636719, 0.1570533961057663, 0.12384045869112015, -0.23216283321380615, -0.14562341570854187, 0.34690433740615845, 0.14317180216312408, -0.4613878130912781, -0.6201139092445374, -0.06473560631275177, -0.5778717398643494, 0.17686161398887634, 0.18120406568050385, 0.23003806173801422, 0.16449719667434692, 0.3012729585170746, 0.07099682092666626, 0.5061180591583252, -0.21164117753505707, -0.024507049471139908, 0.039230722934007645, 0.05125211179256439, 0.14692255854606628, -0.1345071792602539, -0.017682334408164024, 0.09106341749429703, -0.03277985006570816, 0.06409356743097305, 0.0010574907064437866, 0.116432324051857, -0.5018939971923828, 0.265417218208313, 0.4029581546783447, -0.19647932052612305, -0.2089855819940567, -0.27720919251441956, -0.18969427049160004, -0.22308143973350525, 0.07184603810310364, 0.0842442512512207, -0.14883142709732056, 0.13945557177066803, -0.15316499769687653, -0.23921585083007812, 0.030135847628116608, 0.45752257108688354, -0.22565224766731262, 0.09810400009155273, -0.015494279563426971, 0.0785033255815506, -0.06773050874471664, -0.1901302933692932, 0.23269659280776978, -0.12375590950250626, -0.03255172818899155, -0.22311842441558838, -0.20077893137931824, -0.09842419624328613, 0.10800453275442123, 0.060693781822919846, 0.11290717869997025, 0.026252545416355133, -0.016009479761123657, -0.5448377132415771, -0.49196526408195496, -0.007313862442970276, -0.04543978348374367, 0.31451651453971863, -0.016501806676387787, 0.09368614852428436, -0.21283084154129028, 0.13641518354415894, -0.21793997287750244, 0.1666068434715271, -0.06328818202018738, 0.20862124860286713, -0.027621377259492874, 0.09834441542625427, -0.16325488686561584, -0.19791370630264282, 0.06050357222557068, 0.7531200051307678, -0.23598377406597137, -0.09428641945123672, -0.05259069800376892, 0.13793426752090454, 0.23985940217971802, -0.10943124443292618, -0.10331638902425766, -0.02726140059530735, 0.10392457246780396, -0.24210715293884277, 0.10288457572460175, 0.22689595818519592, -0.2034132033586502, -0.1315964013338089, 0.6177954077720642, 0.3815796375274658, 0.193136066198349, 0.35754019021987915, 0.019177064299583435, 0.2638334631919861, 0.14654284715652466, 0.36212173104286194, 0.10019626468420029, -0.0010374858975410461, -0.08830507844686508, 0.2816981077194214, 0.06608955562114716, 0.15879270434379578, 0.20862603187561035, -0.0950450599193573, 0.1765194833278656, 0.09129542857408524, -0.03936653584241867, 0.3638722598552704, -0.40028372406959534, -0.06394535303115845, 0.19165942072868347, 0.18438182771205902, 0.03246833756566048, -0.239410862326622, 0.3049275279045105, 0.18777815997600555, 0.0064045824110507965, 0.26586440205574036, 0.03628915175795555, -0.3785456717014313, 0.07931685447692871, 0.24690619111061096, 0.35297736525535583, -0.03889169543981552, -0.037059586495161057, 0.25870010256767273, -0.21215416491031647, 0.10432208329439163, 0.2033434808254242, -0.19469192624092102, 0.31319084763526917, 0.6266701221466064, -0.07402151077985764, 0.42741814255714417, 0.1257338523864746, 0.06308890879154205, -0.005494460463523865, -0.24834784865379333, 0.08081863820552826, 0.440509170293808, -0.18372726440429688, 0.15008589625358582, 0.06208737567067146, 0.2579606771469116, -0.3250872492790222, -0.16285061836242676, 0.08238159120082855, 0.07849672436714172, -0.3235330283641815, -0.07775475084781647, -0.06416559219360352, -0.15242689847946167, -0.18515637516975403, 0.02980707213282585, -0.14911136031150818, -0.13427473604679108, 0.30586472153663635, 0.10573360323905945, -0.3869330883026123, -0.24654750525951385, -0.08429713547229767, 0.04624601826071739, -0.025434009730815887, -0.2964482307434082, 0.5547575950622559, -0.1652713567018509, 0.20516443252563477, 0.15157659351825714, -0.18100093305110931, 0.5931898355484009, 0.6459060907363892, -0.22873978316783905, 0.16452394425868988, 0.1871112585067749, 0.03692843019962311, -0.02360750176012516, 0.1389945149421692, 0.00649280846118927, 0.2090337872505188, 0.2872697710990906, 0.03199803829193115, -0.1442493200302124, -0.14727315306663513, 0.3358568549156189, 0.21554265916347504, -0.05121815204620361, 0.199741929769516, -0.2628275156021118, -0.187048077583313, 0.0019921250641345978, -0.030753113329410553, -0.16916534304618835, -0.055350951850414276, 0.3815113306045532, -0.005680113099515438, 0.4061160385608673, -0.1410944163799286, 0.05566821247339249, 0.1124873012304306, 0.16584070026874542, 0.21607211232185364, -0.15393927693367004, -0.40257638692855835, -0.3473491668701172, -0.39319393038749695, 0.3725877106189728, -0.23258885741233826, 0.16857440769672394, 0.06813718378543854, -0.23746420443058014, -0.0817599818110466, 0.0034098103642463684, 0.1784849762916565, 0.2687881588935852, -0.06936071813106537, 0.5016825199127197, -0.32066357135772705, -0.04342152550816536, -0.07294096052646637, -0.13395193219184875, 0.24010449647903442, -0.43758663535118103, 0.40433835983276367, -0.3041532635688782, -0.014326412230730057, -0.19157154858112335, 0.005374230444431305, -0.22793108224868774, -0.037226513028144836, 0.6843011975288391, 0.21503600478172302, 0.40693095326423645, -0.03293865919113159, 0.1105625256896019, -0.20533189177513123, 0.10991372913122177, -0.20951789617538452, 0.2924145460128784, 0.032070618122816086, 0.132619246840477, -0.1456782966852188, -0.12368728220462799, -0.07256726175546646, -0.11026695370674133, 0.26034992933273315, -0.055872827768325806, -0.27270734310150146, 0.11994173377752304, -0.2002013921737671, -0.03079904057085514, -0.1286313831806183, 0.32804566621780396, 0.15331372618675232, 0.289993554353714, 0.03234277665615082, -0.22776934504508972, 0.39988118410110474, -0.33580467104911804, -0.33625951409339905, -0.18469856679439545, 0.18101871013641357, -0.21165511012077332, -0.3600912392139435, -0.5163124203681946, -0.35795703530311584, 0.3601653277873993, 0.02673257514834404, -0.5006996393203735, -0.0882551521062851, -0.2791074514389038, -0.09968006610870361, -0.251852810382843, 0.4753125309944153, 0.15299946069717407, -0.13949282467365265, 0.6449902653694153, -0.3258782625198364 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Thank you for the quick reply! I have `pyarrow==4.0.0`, and I am installing with `pip`. It's not one of my explicit dependencies, so I assume it came along with something else.
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
31
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Thank you for the quick reply! I have `pyarrow==4.0.0`, and I am installing with `pip`. It's not one of my explicit dependencies, so I assume it came along with something else.
[ -0.4569718837738037, -0.21739070117473602, 0.022878184914588928, 0.4219459891319275, 0.3113079071044922, -0.2264823615550995, 0.2361338883638382, 0.15250523388385773, 0.0431259460747242, 0.3643292188644409, 0.530329704284668, 0.2979792356491089, -0.33465126156806946, -0.04656977951526642, 0.04772993549704552, -0.026567354798316956, 0.36591315269470215, -0.21823552250862122, 0.25115078687667847, 0.3584369421005249, -0.27087852358818054, 0.16277039051055908, -0.4191710352897644, 0.29371243715286255, -0.26529455184936523, 0.0822436660528183, -0.10502269119024277, 0.2865629494190216, -0.09741590172052383, -0.5258916616439819, -0.030576223507523537, -0.2955247163772583, 0.1912616789340973, 0.45836734771728516, -0.00011823356908280402, -0.09135529398918152, 0.2139717936515808, 0.012012647464871407, 0.09306974709033966, -0.4430084228515625, -0.22598609328269958, -0.252882182598114, -0.16372935473918915, -0.04087210074067116, 0.31339308619499207, 0.0046789697371423244, -0.06639397889375687, -0.15027795732021332, 0.07592954486608505, 0.7205310463905334, 0.15910927951335907, 0.21483291685581207, 0.22887073457241058, -0.11200125515460968, 0.01633906364440918, 0.1341475546360016, -0.030597643926739693, 0.06143757700920105, 0.40036529302597046, -0.2003951370716095, 0.024914562702178955, -0.16739529371261597, 0.09280864149332047, -0.2669808566570282, 0.305939257144928, -0.12271007150411606, 0.19980430603027344, -0.6616150140762329, 0.29747894406318665, -0.17242804169654846, -0.1635967493057251, -0.28783515095710754, -0.05091990530490875, -0.16323240101337433, -0.1430845707654953, -0.2230152189731598, 0.1774134337902069, -0.16718968749046326, -0.15712395310401917, 0.08328592777252197, -0.2861921191215515, 0.16995050013065338, 0.033562466502189636, 0.3086438775062561, -0.3192944824695587, 0.4002257287502289, -0.0029777055606245995, 0.3896188735961914, 0.12629535794258118, -0.28137892484664917, -0.3420288562774658, 0.13404971361160278, -0.041528504341840744, 0.26742273569107056, -0.22571586072444916, -0.16636782884597778, 0.1507909893989563, -0.1738586127758026, 0.29045790433883667, -0.24060414731502533, -0.16564220190048218, 0.28740236163139343, 0.04861196503043175, 0.21331053972244263, 0.29802197217941284, -0.020957279950380325, 0.30214178562164307, 0.3840671181678772, 0.04991079494357109, -0.0560649111866951, -0.10280261933803558, -0.040040887892246246, 0.22646693885326385, -0.11676158010959625, 0.08925168216228485, 0.12577342987060547, 0.0740242674946785, -0.15347909927368164, -0.11980153620243073, 0.4294586479663849, -0.21374237537384033, 0.27730506658554077, 0.31860968470573425, 0.2963826656341553, 0.3739163875579834, 0.2270292043685913, -0.2862905263900757, 0.033872559666633606, -0.25706517696380615, -0.08717741072177887, -0.044277824461460114, -0.2006772756576538, -0.37084516882896423, 0.09926449507474899, -0.005736488848924637, 0.23963458836078644, 0.15276390314102173, 0.045047979801893234, 0.221232607960701, -0.5398681163787842, 0.11252203583717346, -0.25730711221694946, 0.13399134576320648, 0.03508347272872925, -0.29419949650764465, 0.1408180594444275, 0.11566735804080963, -0.12368351966142654, -0.16609929502010345, 0.1671801209449768, -0.21241533756256104, -0.24575871229171753, -0.14749658107757568, 0.1560775190591812, -0.004164993762969971, 0.4375187158584595, -0.06178981810808182, 0.32287102937698364, 0.34641802310943604, -0.328504353761673, -0.025873668491840363, -0.31669026613235474, -0.4711761176586151, -0.2692379355430603, -0.04782314598560333, 0.23255357146263123, -0.11913523077964783, 0.029882661998271942, 0.200077623128891, 0.02027754858136177, 0.0941302701830864, 0.16296672821044922, -0.19793584942817688, -0.01775871217250824, -0.1911366879940033, 0.5243679881095886, 0.2797337472438812, -0.06436364352703094, -0.49060341715812683, 0.11027718335390091, -0.26730525493621826, -0.19815191626548767, -0.4909551739692688, -0.15601304173469543, 0.4023433029651642, -0.20736812055110931, 0.4260300397872925, -0.0168936625123024, -0.14121462404727936, 0.1183849349617958, -0.3067172169685364, 0.09499752521514893, 0.1623562127351761, -0.14624126255512238, 0.08063661307096481, -0.16650158166885376, 0.1831178069114685, -0.07083384692668915, 0.020328104496002197, 0.004629060626029968, -0.04265179485082626, 0.28873980045318604, 0.21363458037376404, -0.07819394767284393, 0.03517899289727211, -0.30481991171836853, -0.06838036328554153, 0.22688192129135132, 0.03475996106863022, -0.0888613909482956, -0.028238564729690552, 0.010514635592699051, -0.041165247559547424, 0.30733975768089294, 0.13911177217960358, -0.10586263239383698, 0.02163803204894066, -0.1246974766254425, 0.0030893124639987946, -0.06615325808525085, -0.03760656341910362, -0.019784441217780113, -0.18850994110107422, 0.024668013677001, -0.06323577463626862, -0.1272606998682022, -0.20103010535240173, -0.1646626740694046, -0.38877010345458984, 0.1416741907596588, 0.42396530508995056, -0.006466292776167393, -0.23094165325164795, 0.5506319999694824, 0.3362869620323181, -0.24848924577236176, -0.6358668208122253, -0.08476485311985016, 0.3994877338409424, -0.1538931280374527, 0.16345207393169403, 0.08694484829902649, -0.012666494585573673, -0.1323806643486023, 0.19112169742584229, 0.22163832187652588, 0.28241628408432007, 0.1572647988796234, -0.09599713236093521, 0.042538516223430634, 0.16591572761535645, 0.12296847999095917, 0.03259509801864624, -0.1997918337583542, -0.0025340132415294647, 0.11996696889400482, 0.05610503628849983, -0.04785504192113876, -0.04797392711043358, 0.23610278964042664, 0.27932554483413696, -0.07611237466335297, 0.12380841374397278, 0.058043982833623886, -0.16852077841758728, -0.05674661695957184, 0.2826821208000183, -0.013607330620288849, 0.6230337023735046, 0.06135699898004532, -0.028772857040166855, 0.004042906686663628, -0.38019317388534546, -0.03362850844860077, 0.13357235491275787, 0.07825558632612228, -0.12283749133348465, 0.05036112666130066, 0.25569239258766174, 0.15972231328487396, -0.19245418906211853, -0.3795141875743866, 0.019982656463980675, 0.31463348865509033, -0.461222380399704, 0.2040783166885376, -0.11882185190916061, 0.213638037443161, -0.07788781821727753, -0.17068830132484436, -0.17532381415367126, -0.39156195521354675, -0.03860565274953842, 0.1213034838438034, 0.005078047513961792, 0.15825366973876953, 0.08876869082450867, -0.14176218211650848, 0.04338943213224411, 0.3126336932182312, 0.2620716989040375, -0.004214114043861628, -0.46526235342025757, -0.12566335499286652, 0.3646591007709503, -0.14263178408145905, 0.18075694143772125, 0.1596730798482895, -0.4231133460998535, -0.13776901364326477, -0.5541075468063354, 0.03621683269739151, 0.04581218957901001, 0.21792955696582794, 0.06505313515663147, 0.0002727806568145752, -0.14178971946239471, -0.06400543451309204, 0.16275082528591156, -0.0710153877735138, -0.05115243420004845, 0.11676184833049774, 0.17636333405971527, -0.3484150171279907, -0.40044084191322327, 0.08108167350292206, -0.2404448539018631, -0.22788868844509125, 0.0398983471095562, 0.05621748045086861, 0.2899164855480194, 0.033601343631744385, 0.31736597418785095, 0.23787318170070648, 0.0640234425663948, -0.2699207365512848, -0.2033461183309555, 0.21200931072235107, -0.050956230610609055, -0.14758087694644928, -0.2852526009082794, -0.07525748014450073, 0.17720337212085724, -0.022968512028455734, 0.2650328278541565, -0.2499956637620926, -0.053525205701589584, -0.06591958552598953, 0.3023349642753601, -0.10448898375034332, -0.28444904088974, 0.3918760120868683, 0.10788265615701675, 0.0479716882109642, -0.0043214112520217896, -0.3812085688114166, -0.06521012634038925, -0.220159113407135, 0.18795232474803925, -0.004086723551154137, 0.5207586884498596, 0.15794220566749573, 0.5066375136375427, 0.3318140208721161, -0.5369670987129211, 0.17175856232643127, -0.27069032192230225, 0.12133555114269257, -0.1566910445690155, -0.1280222237110138, 0.30131107568740845, 0.040944769978523254, -0.062437769025564194, 0.1361875832080841, -0.06296420097351074, -0.49677810072898865, 0.051885947585105896, 0.08035053312778473, -0.01680132746696472, -0.28508925437927246, 0.15080603957176208, -0.06029721349477768, 0.26370230317115784, -0.13138911128044128, 0.33292677998542786, -0.24990218877792358, -0.07944004237651825, -0.16358131170272827, -0.09733481705188751, -0.17656353116035461, -0.04665051028132439, -0.5345147848129272, -0.10867252200841904, -0.6624103784561157, 0.3221203088760376, 0.19392648339271545, 0.7835571765899658, 0.021417733281850815, -0.08244436979293823, -0.24680311977863312, -0.1681990772485733, 0.6353747248649597, -0.3002033829689026, 0.0723908543586731, -0.0045126816257834435, 0.09881797432899475, -0.6122601628303528, -0.12567244470119476, -0.014385290443897247, 0.667384684085846, 0.26435917615890503, 0.9284392595291138, 0.046359769999980927, 0.04595999792218208, 0.04348112270236015, 0.017826244235038757, 0.14339393377304077, -0.06520967930555344, -0.010503564029932022, -0.05995379015803337, -0.17638294398784637, 0.19569693505764008, 0.23711322247982025, 0.20747587084770203, -0.015740277245640755, -0.4159706234931946, 0.07543175667524338, -0.37666580080986023, 0.20110130310058594, 0.13199375569820404, 0.20846644043922424, -0.2982677221298218, 0.11402678489685059, -0.07841483503580093, -0.1573798954486847, 0.28037282824516296, -0.1881636381149292, 0.026479436084628105, -0.3439127802848816, 0.2833443880081177, 0.15300253033638, 0.19953212141990662, 0.42697662115097046, -0.0416695810854435, 0.10616376996040344, -0.3421506881713867, 0.31230491399765015, -0.20471015572547913, 0.2691138684749603, 0.25358009338378906, 0.21678146719932556, -0.5693435668945312, 0.0799897164106369, 0.15404696762561798, 0.09059019386768341, -0.07607732713222504, 0.39408591389656067, -0.36817049980163574, -0.461963951587677, 0.3434624671936035, 0.1300131231546402, 0.84830242395401, 0.03642153739929199, -0.08160333335399628, -0.19214364886283875, 0.16613943874835968, 0.16866986453533173, -0.1858169436454773, -0.05073051154613495, -0.390462189912796, -0.155721977353096, -0.06776755303144455, -0.1420491635799408, 0.09832915663719177, 0.0727662444114685, -0.39251700043678284, 0.1129097118973732, 0.10997651517391205, 0.44247546792030334, -0.0006535258144140244, 0.09435108304023743, -0.1428738832473755, -0.12733428180217743, -0.06860160827636719, 0.1570533961057663, 0.12384045869112015, -0.23216283321380615, -0.14562341570854187, 0.34690433740615845, 0.14317180216312408, -0.4613878130912781, -0.6201139092445374, -0.06473560631275177, -0.5778717398643494, 0.17686161398887634, 0.18120406568050385, 0.23003806173801422, 0.16449719667434692, 0.3012729585170746, 0.07099682092666626, 0.5061180591583252, -0.21164117753505707, -0.024507049471139908, 0.039230722934007645, 0.05125211179256439, 0.14692255854606628, -0.1345071792602539, -0.017682334408164024, 0.09106341749429703, -0.03277985006570816, 0.06409356743097305, 0.0010574907064437866, 0.116432324051857, -0.5018939971923828, 0.265417218208313, 0.4029581546783447, -0.19647932052612305, -0.2089855819940567, -0.27720919251441956, -0.18969427049160004, -0.22308143973350525, 0.07184603810310364, 0.0842442512512207, -0.14883142709732056, 0.13945557177066803, -0.15316499769687653, -0.23921585083007812, 0.030135847628116608, 0.45752257108688354, -0.22565224766731262, 0.09810400009155273, -0.015494279563426971, 0.0785033255815506, -0.06773050874471664, -0.1901302933692932, 0.23269659280776978, -0.12375590950250626, -0.03255172818899155, -0.22311842441558838, -0.20077893137931824, -0.09842419624328613, 0.10800453275442123, 0.060693781822919846, 0.11290717869997025, 0.026252545416355133, -0.016009479761123657, -0.5448377132415771, -0.49196526408195496, -0.007313862442970276, -0.04543978348374367, 0.31451651453971863, -0.016501806676387787, 0.09368614852428436, -0.21283084154129028, 0.13641518354415894, -0.21793997287750244, 0.1666068434715271, -0.06328818202018738, 0.20862124860286713, -0.027621377259492874, 0.09834441542625427, -0.16325488686561584, -0.19791370630264282, 0.06050357222557068, 0.7531200051307678, -0.23598377406597137, -0.09428641945123672, -0.05259069800376892, 0.13793426752090454, 0.23985940217971802, -0.10943124443292618, -0.10331638902425766, -0.02726140059530735, 0.10392457246780396, -0.24210715293884277, 0.10288457572460175, 0.22689595818519592, -0.2034132033586502, -0.1315964013338089, 0.6177954077720642, 0.3815796375274658, 0.193136066198349, 0.35754019021987915, 0.019177064299583435, 0.2638334631919861, 0.14654284715652466, 0.36212173104286194, 0.10019626468420029, -0.0010374858975410461, -0.08830507844686508, 0.2816981077194214, 0.06608955562114716, 0.15879270434379578, 0.20862603187561035, -0.0950450599193573, 0.1765194833278656, 0.09129542857408524, -0.03936653584241867, 0.3638722598552704, -0.40028372406959534, -0.06394535303115845, 0.19165942072868347, 0.18438182771205902, 0.03246833756566048, -0.239410862326622, 0.3049275279045105, 0.18777815997600555, 0.0064045824110507965, 0.26586440205574036, 0.03628915175795555, -0.3785456717014313, 0.07931685447692871, 0.24690619111061096, 0.35297736525535583, -0.03889169543981552, -0.037059586495161057, 0.25870010256767273, -0.21215416491031647, 0.10432208329439163, 0.2033434808254242, -0.19469192624092102, 0.31319084763526917, 0.6266701221466064, -0.07402151077985764, 0.42741814255714417, 0.1257338523864746, 0.06308890879154205, -0.005494460463523865, -0.24834784865379333, 0.08081863820552826, 0.440509170293808, -0.18372726440429688, 0.15008589625358582, 0.06208737567067146, 0.2579606771469116, -0.3250872492790222, -0.16285061836242676, 0.08238159120082855, 0.07849672436714172, -0.3235330283641815, -0.07775475084781647, -0.06416559219360352, -0.15242689847946167, -0.18515637516975403, 0.02980707213282585, -0.14911136031150818, -0.13427473604679108, 0.30586472153663635, 0.10573360323905945, -0.3869330883026123, -0.24654750525951385, -0.08429713547229767, 0.04624601826071739, -0.025434009730815887, -0.2964482307434082, 0.5547575950622559, -0.1652713567018509, 0.20516443252563477, 0.15157659351825714, -0.18100093305110931, 0.5931898355484009, 0.6459060907363892, -0.22873978316783905, 0.16452394425868988, 0.1871112585067749, 0.03692843019962311, -0.02360750176012516, 0.1389945149421692, 0.00649280846118927, 0.2090337872505188, 0.2872697710990906, 0.03199803829193115, -0.1442493200302124, -0.14727315306663513, 0.3358568549156189, 0.21554265916347504, -0.05121815204620361, 0.199741929769516, -0.2628275156021118, -0.187048077583313, 0.0019921250641345978, -0.030753113329410553, -0.16916534304618835, -0.055350951850414276, 0.3815113306045532, -0.005680113099515438, 0.4061160385608673, -0.1410944163799286, 0.05566821247339249, 0.1124873012304306, 0.16584070026874542, 0.21607211232185364, -0.15393927693367004, -0.40257638692855835, -0.3473491668701172, -0.39319393038749695, 0.3725877106189728, -0.23258885741233826, 0.16857440769672394, 0.06813718378543854, -0.23746420443058014, -0.0817599818110466, 0.0034098103642463684, 0.1784849762916565, 0.2687881588935852, -0.06936071813106537, 0.5016825199127197, -0.32066357135772705, -0.04342152550816536, -0.07294096052646637, -0.13395193219184875, 0.24010449647903442, -0.43758663535118103, 0.40433835983276367, -0.3041532635688782, -0.014326412230730057, -0.19157154858112335, 0.005374230444431305, -0.22793108224868774, -0.037226513028144836, 0.6843011975288391, 0.21503600478172302, 0.40693095326423645, -0.03293865919113159, 0.1105625256896019, -0.20533189177513123, 0.10991372913122177, -0.20951789617538452, 0.2924145460128784, 0.032070618122816086, 0.132619246840477, -0.1456782966852188, -0.12368728220462799, -0.07256726175546646, -0.11026695370674133, 0.26034992933273315, -0.055872827768325806, -0.27270734310150146, 0.11994173377752304, -0.2002013921737671, -0.03079904057085514, -0.1286313831806183, 0.32804566621780396, 0.15331372618675232, 0.289993554353714, 0.03234277665615082, -0.22776934504508972, 0.39988118410110474, -0.33580467104911804, -0.33625951409339905, -0.18469856679439545, 0.18101871013641357, -0.21165511012077332, -0.3600912392139435, -0.5163124203681946, -0.35795703530311584, 0.3601653277873993, 0.02673257514834404, -0.5006996393203735, -0.0882551521062851, -0.2791074514389038, -0.09968006610870361, -0.251852810382843, 0.4753125309944153, 0.15299946069717407, -0.13949282467365265, 0.6449902653694153, -0.3258782625198364 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Could you trying reinstalling pyarrow with pip ? I'm not sure why it would check in your multicurtural-sc directory for source files.
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
22
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Could you trying reinstalling pyarrow with pip ? I'm not sure why it would check in your multicurtural-sc directory for source files.
[ -0.4569718837738037, -0.21739070117473602, 0.022878184914588928, 0.4219459891319275, 0.3113079071044922, -0.2264823615550995, 0.2361338883638382, 0.15250523388385773, 0.0431259460747242, 0.3643292188644409, 0.530329704284668, 0.2979792356491089, -0.33465126156806946, -0.04656977951526642, 0.04772993549704552, -0.026567354798316956, 0.36591315269470215, -0.21823552250862122, 0.25115078687667847, 0.3584369421005249, -0.27087852358818054, 0.16277039051055908, -0.4191710352897644, 0.29371243715286255, -0.26529455184936523, 0.0822436660528183, -0.10502269119024277, 0.2865629494190216, -0.09741590172052383, -0.5258916616439819, -0.030576223507523537, -0.2955247163772583, 0.1912616789340973, 0.45836734771728516, -0.00011823356908280402, -0.09135529398918152, 0.2139717936515808, 0.012012647464871407, 0.09306974709033966, -0.4430084228515625, -0.22598609328269958, -0.252882182598114, -0.16372935473918915, -0.04087210074067116, 0.31339308619499207, 0.0046789697371423244, -0.06639397889375687, -0.15027795732021332, 0.07592954486608505, 0.7205310463905334, 0.15910927951335907, 0.21483291685581207, 0.22887073457241058, -0.11200125515460968, 0.01633906364440918, 0.1341475546360016, -0.030597643926739693, 0.06143757700920105, 0.40036529302597046, -0.2003951370716095, 0.024914562702178955, -0.16739529371261597, 0.09280864149332047, -0.2669808566570282, 0.305939257144928, -0.12271007150411606, 0.19980430603027344, -0.6616150140762329, 0.29747894406318665, -0.17242804169654846, -0.1635967493057251, -0.28783515095710754, -0.05091990530490875, -0.16323240101337433, -0.1430845707654953, -0.2230152189731598, 0.1774134337902069, -0.16718968749046326, -0.15712395310401917, 0.08328592777252197, -0.2861921191215515, 0.16995050013065338, 0.033562466502189636, 0.3086438775062561, -0.3192944824695587, 0.4002257287502289, -0.0029777055606245995, 0.3896188735961914, 0.12629535794258118, -0.28137892484664917, -0.3420288562774658, 0.13404971361160278, -0.041528504341840744, 0.26742273569107056, -0.22571586072444916, -0.16636782884597778, 0.1507909893989563, -0.1738586127758026, 0.29045790433883667, -0.24060414731502533, -0.16564220190048218, 0.28740236163139343, 0.04861196503043175, 0.21331053972244263, 0.29802197217941284, -0.020957279950380325, 0.30214178562164307, 0.3840671181678772, 0.04991079494357109, -0.0560649111866951, -0.10280261933803558, -0.040040887892246246, 0.22646693885326385, -0.11676158010959625, 0.08925168216228485, 0.12577342987060547, 0.0740242674946785, -0.15347909927368164, -0.11980153620243073, 0.4294586479663849, -0.21374237537384033, 0.27730506658554077, 0.31860968470573425, 0.2963826656341553, 0.3739163875579834, 0.2270292043685913, -0.2862905263900757, 0.033872559666633606, -0.25706517696380615, -0.08717741072177887, -0.044277824461460114, -0.2006772756576538, -0.37084516882896423, 0.09926449507474899, -0.005736488848924637, 0.23963458836078644, 0.15276390314102173, 0.045047979801893234, 0.221232607960701, -0.5398681163787842, 0.11252203583717346, -0.25730711221694946, 0.13399134576320648, 0.03508347272872925, -0.29419949650764465, 0.1408180594444275, 0.11566735804080963, -0.12368351966142654, -0.16609929502010345, 0.1671801209449768, -0.21241533756256104, -0.24575871229171753, -0.14749658107757568, 0.1560775190591812, -0.004164993762969971, 0.4375187158584595, -0.06178981810808182, 0.32287102937698364, 0.34641802310943604, -0.328504353761673, -0.025873668491840363, -0.31669026613235474, -0.4711761176586151, -0.2692379355430603, -0.04782314598560333, 0.23255357146263123, -0.11913523077964783, 0.029882661998271942, 0.200077623128891, 0.02027754858136177, 0.0941302701830864, 0.16296672821044922, -0.19793584942817688, -0.01775871217250824, -0.1911366879940033, 0.5243679881095886, 0.2797337472438812, -0.06436364352703094, -0.49060341715812683, 0.11027718335390091, -0.26730525493621826, -0.19815191626548767, -0.4909551739692688, -0.15601304173469543, 0.4023433029651642, -0.20736812055110931, 0.4260300397872925, -0.0168936625123024, -0.14121462404727936, 0.1183849349617958, -0.3067172169685364, 0.09499752521514893, 0.1623562127351761, -0.14624126255512238, 0.08063661307096481, -0.16650158166885376, 0.1831178069114685, -0.07083384692668915, 0.020328104496002197, 0.004629060626029968, -0.04265179485082626, 0.28873980045318604, 0.21363458037376404, -0.07819394767284393, 0.03517899289727211, -0.30481991171836853, -0.06838036328554153, 0.22688192129135132, 0.03475996106863022, -0.0888613909482956, -0.028238564729690552, 0.010514635592699051, -0.041165247559547424, 0.30733975768089294, 0.13911177217960358, -0.10586263239383698, 0.02163803204894066, -0.1246974766254425, 0.0030893124639987946, -0.06615325808525085, -0.03760656341910362, -0.019784441217780113, -0.18850994110107422, 0.024668013677001, -0.06323577463626862, -0.1272606998682022, -0.20103010535240173, -0.1646626740694046, -0.38877010345458984, 0.1416741907596588, 0.42396530508995056, -0.006466292776167393, -0.23094165325164795, 0.5506319999694824, 0.3362869620323181, -0.24848924577236176, -0.6358668208122253, -0.08476485311985016, 0.3994877338409424, -0.1538931280374527, 0.16345207393169403, 0.08694484829902649, -0.012666494585573673, -0.1323806643486023, 0.19112169742584229, 0.22163832187652588, 0.28241628408432007, 0.1572647988796234, -0.09599713236093521, 0.042538516223430634, 0.16591572761535645, 0.12296847999095917, 0.03259509801864624, -0.1997918337583542, -0.0025340132415294647, 0.11996696889400482, 0.05610503628849983, -0.04785504192113876, -0.04797392711043358, 0.23610278964042664, 0.27932554483413696, -0.07611237466335297, 0.12380841374397278, 0.058043982833623886, -0.16852077841758728, -0.05674661695957184, 0.2826821208000183, -0.013607330620288849, 0.6230337023735046, 0.06135699898004532, -0.028772857040166855, 0.004042906686663628, -0.38019317388534546, -0.03362850844860077, 0.13357235491275787, 0.07825558632612228, -0.12283749133348465, 0.05036112666130066, 0.25569239258766174, 0.15972231328487396, -0.19245418906211853, -0.3795141875743866, 0.019982656463980675, 0.31463348865509033, -0.461222380399704, 0.2040783166885376, -0.11882185190916061, 0.213638037443161, -0.07788781821727753, -0.17068830132484436, -0.17532381415367126, -0.39156195521354675, -0.03860565274953842, 0.1213034838438034, 0.005078047513961792, 0.15825366973876953, 0.08876869082450867, -0.14176218211650848, 0.04338943213224411, 0.3126336932182312, 0.2620716989040375, -0.004214114043861628, -0.46526235342025757, -0.12566335499286652, 0.3646591007709503, -0.14263178408145905, 0.18075694143772125, 0.1596730798482895, -0.4231133460998535, -0.13776901364326477, -0.5541075468063354, 0.03621683269739151, 0.04581218957901001, 0.21792955696582794, 0.06505313515663147, 0.0002727806568145752, -0.14178971946239471, -0.06400543451309204, 0.16275082528591156, -0.0710153877735138, -0.05115243420004845, 0.11676184833049774, 0.17636333405971527, -0.3484150171279907, -0.40044084191322327, 0.08108167350292206, -0.2404448539018631, -0.22788868844509125, 0.0398983471095562, 0.05621748045086861, 0.2899164855480194, 0.033601343631744385, 0.31736597418785095, 0.23787318170070648, 0.0640234425663948, -0.2699207365512848, -0.2033461183309555, 0.21200931072235107, -0.050956230610609055, -0.14758087694644928, -0.2852526009082794, -0.07525748014450073, 0.17720337212085724, -0.022968512028455734, 0.2650328278541565, -0.2499956637620926, -0.053525205701589584, -0.06591958552598953, 0.3023349642753601, -0.10448898375034332, -0.28444904088974, 0.3918760120868683, 0.10788265615701675, 0.0479716882109642, -0.0043214112520217896, -0.3812085688114166, -0.06521012634038925, -0.220159113407135, 0.18795232474803925, -0.004086723551154137, 0.5207586884498596, 0.15794220566749573, 0.5066375136375427, 0.3318140208721161, -0.5369670987129211, 0.17175856232643127, -0.27069032192230225, 0.12133555114269257, -0.1566910445690155, -0.1280222237110138, 0.30131107568740845, 0.040944769978523254, -0.062437769025564194, 0.1361875832080841, -0.06296420097351074, -0.49677810072898865, 0.051885947585105896, 0.08035053312778473, -0.01680132746696472, -0.28508925437927246, 0.15080603957176208, -0.06029721349477768, 0.26370230317115784, -0.13138911128044128, 0.33292677998542786, -0.24990218877792358, -0.07944004237651825, -0.16358131170272827, -0.09733481705188751, -0.17656353116035461, -0.04665051028132439, -0.5345147848129272, -0.10867252200841904, -0.6624103784561157, 0.3221203088760376, 0.19392648339271545, 0.7835571765899658, 0.021417733281850815, -0.08244436979293823, -0.24680311977863312, -0.1681990772485733, 0.6353747248649597, -0.3002033829689026, 0.0723908543586731, -0.0045126816257834435, 0.09881797432899475, -0.6122601628303528, -0.12567244470119476, -0.014385290443897247, 0.667384684085846, 0.26435917615890503, 0.9284392595291138, 0.046359769999980927, 0.04595999792218208, 0.04348112270236015, 0.017826244235038757, 0.14339393377304077, -0.06520967930555344, -0.010503564029932022, -0.05995379015803337, -0.17638294398784637, 0.19569693505764008, 0.23711322247982025, 0.20747587084770203, -0.015740277245640755, -0.4159706234931946, 0.07543175667524338, -0.37666580080986023, 0.20110130310058594, 0.13199375569820404, 0.20846644043922424, -0.2982677221298218, 0.11402678489685059, -0.07841483503580093, -0.1573798954486847, 0.28037282824516296, -0.1881636381149292, 0.026479436084628105, -0.3439127802848816, 0.2833443880081177, 0.15300253033638, 0.19953212141990662, 0.42697662115097046, -0.0416695810854435, 0.10616376996040344, -0.3421506881713867, 0.31230491399765015, -0.20471015572547913, 0.2691138684749603, 0.25358009338378906, 0.21678146719932556, -0.5693435668945312, 0.0799897164106369, 0.15404696762561798, 0.09059019386768341, -0.07607732713222504, 0.39408591389656067, -0.36817049980163574, -0.461963951587677, 0.3434624671936035, 0.1300131231546402, 0.84830242395401, 0.03642153739929199, -0.08160333335399628, -0.19214364886283875, 0.16613943874835968, 0.16866986453533173, -0.1858169436454773, -0.05073051154613495, -0.390462189912796, -0.155721977353096, -0.06776755303144455, -0.1420491635799408, 0.09832915663719177, 0.0727662444114685, -0.39251700043678284, 0.1129097118973732, 0.10997651517391205, 0.44247546792030334, -0.0006535258144140244, 0.09435108304023743, -0.1428738832473755, -0.12733428180217743, -0.06860160827636719, 0.1570533961057663, 0.12384045869112015, -0.23216283321380615, -0.14562341570854187, 0.34690433740615845, 0.14317180216312408, -0.4613878130912781, -0.6201139092445374, -0.06473560631275177, -0.5778717398643494, 0.17686161398887634, 0.18120406568050385, 0.23003806173801422, 0.16449719667434692, 0.3012729585170746, 0.07099682092666626, 0.5061180591583252, -0.21164117753505707, -0.024507049471139908, 0.039230722934007645, 0.05125211179256439, 0.14692255854606628, -0.1345071792602539, -0.017682334408164024, 0.09106341749429703, -0.03277985006570816, 0.06409356743097305, 0.0010574907064437866, 0.116432324051857, -0.5018939971923828, 0.265417218208313, 0.4029581546783447, -0.19647932052612305, -0.2089855819940567, -0.27720919251441956, -0.18969427049160004, -0.22308143973350525, 0.07184603810310364, 0.0842442512512207, -0.14883142709732056, 0.13945557177066803, -0.15316499769687653, -0.23921585083007812, 0.030135847628116608, 0.45752257108688354, -0.22565224766731262, 0.09810400009155273, -0.015494279563426971, 0.0785033255815506, -0.06773050874471664, -0.1901302933692932, 0.23269659280776978, -0.12375590950250626, -0.03255172818899155, -0.22311842441558838, -0.20077893137931824, -0.09842419624328613, 0.10800453275442123, 0.060693781822919846, 0.11290717869997025, 0.026252545416355133, -0.016009479761123657, -0.5448377132415771, -0.49196526408195496, -0.007313862442970276, -0.04543978348374367, 0.31451651453971863, -0.016501806676387787, 0.09368614852428436, -0.21283084154129028, 0.13641518354415894, -0.21793997287750244, 0.1666068434715271, -0.06328818202018738, 0.20862124860286713, -0.027621377259492874, 0.09834441542625427, -0.16325488686561584, -0.19791370630264282, 0.06050357222557068, 0.7531200051307678, -0.23598377406597137, -0.09428641945123672, -0.05259069800376892, 0.13793426752090454, 0.23985940217971802, -0.10943124443292618, -0.10331638902425766, -0.02726140059530735, 0.10392457246780396, -0.24210715293884277, 0.10288457572460175, 0.22689595818519592, -0.2034132033586502, -0.1315964013338089, 0.6177954077720642, 0.3815796375274658, 0.193136066198349, 0.35754019021987915, 0.019177064299583435, 0.2638334631919861, 0.14654284715652466, 0.36212173104286194, 0.10019626468420029, -0.0010374858975410461, -0.08830507844686508, 0.2816981077194214, 0.06608955562114716, 0.15879270434379578, 0.20862603187561035, -0.0950450599193573, 0.1765194833278656, 0.09129542857408524, -0.03936653584241867, 0.3638722598552704, -0.40028372406959534, -0.06394535303115845, 0.19165942072868347, 0.18438182771205902, 0.03246833756566048, -0.239410862326622, 0.3049275279045105, 0.18777815997600555, 0.0064045824110507965, 0.26586440205574036, 0.03628915175795555, -0.3785456717014313, 0.07931685447692871, 0.24690619111061096, 0.35297736525535583, -0.03889169543981552, -0.037059586495161057, 0.25870010256767273, -0.21215416491031647, 0.10432208329439163, 0.2033434808254242, -0.19469192624092102, 0.31319084763526917, 0.6266701221466064, -0.07402151077985764, 0.42741814255714417, 0.1257338523864746, 0.06308890879154205, -0.005494460463523865, -0.24834784865379333, 0.08081863820552826, 0.440509170293808, -0.18372726440429688, 0.15008589625358582, 0.06208737567067146, 0.2579606771469116, -0.3250872492790222, -0.16285061836242676, 0.08238159120082855, 0.07849672436714172, -0.3235330283641815, -0.07775475084781647, -0.06416559219360352, -0.15242689847946167, -0.18515637516975403, 0.02980707213282585, -0.14911136031150818, -0.13427473604679108, 0.30586472153663635, 0.10573360323905945, -0.3869330883026123, -0.24654750525951385, -0.08429713547229767, 0.04624601826071739, -0.025434009730815887, -0.2964482307434082, 0.5547575950622559, -0.1652713567018509, 0.20516443252563477, 0.15157659351825714, -0.18100093305110931, 0.5931898355484009, 0.6459060907363892, -0.22873978316783905, 0.16452394425868988, 0.1871112585067749, 0.03692843019962311, -0.02360750176012516, 0.1389945149421692, 0.00649280846118927, 0.2090337872505188, 0.2872697710990906, 0.03199803829193115, -0.1442493200302124, -0.14727315306663513, 0.3358568549156189, 0.21554265916347504, -0.05121815204620361, 0.199741929769516, -0.2628275156021118, -0.187048077583313, 0.0019921250641345978, -0.030753113329410553, -0.16916534304618835, -0.055350951850414276, 0.3815113306045532, -0.005680113099515438, 0.4061160385608673, -0.1410944163799286, 0.05566821247339249, 0.1124873012304306, 0.16584070026874542, 0.21607211232185364, -0.15393927693367004, -0.40257638692855835, -0.3473491668701172, -0.39319393038749695, 0.3725877106189728, -0.23258885741233826, 0.16857440769672394, 0.06813718378543854, -0.23746420443058014, -0.0817599818110466, 0.0034098103642463684, 0.1784849762916565, 0.2687881588935852, -0.06936071813106537, 0.5016825199127197, -0.32066357135772705, -0.04342152550816536, -0.07294096052646637, -0.13395193219184875, 0.24010449647903442, -0.43758663535118103, 0.40433835983276367, -0.3041532635688782, -0.014326412230730057, -0.19157154858112335, 0.005374230444431305, -0.22793108224868774, -0.037226513028144836, 0.6843011975288391, 0.21503600478172302, 0.40693095326423645, -0.03293865919113159, 0.1105625256896019, -0.20533189177513123, 0.10991372913122177, -0.20951789617538452, 0.2924145460128784, 0.032070618122816086, 0.132619246840477, -0.1456782966852188, -0.12368728220462799, -0.07256726175546646, -0.11026695370674133, 0.26034992933273315, -0.055872827768325806, -0.27270734310150146, 0.11994173377752304, -0.2002013921737671, -0.03079904057085514, -0.1286313831806183, 0.32804566621780396, 0.15331372618675232, 0.289993554353714, 0.03234277665615082, -0.22776934504508972, 0.39988118410110474, -0.33580467104911804, -0.33625951409339905, -0.18469856679439545, 0.18101871013641357, -0.21165511012077332, -0.3600912392139435, -0.5163124203681946, -0.35795703530311584, 0.3601653277873993, 0.02673257514834404, -0.5006996393203735, -0.0882551521062851, -0.2791074514389038, -0.09968006610870361, -0.251852810382843, 0.4753125309944153, 0.15299946069717407, -0.13949282467365265, 0.6449902653694153, -0.3258782625198364 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Sure! I tried reinstalling to get latest. pip was mad because it looks like Datasets currently wants <4.0.0 (which is interesting, because apparently I ended up with 4.0.0 already?), but I gave it a shot anyway: ```bash $ pip install --upgrade --force-reinstall pyarrow Collecting pyarrow Downloading pyarrow-4.0.1-cp39-cp39-manylinux2014_x86_64.whl (21.9 MB) |████████████████████████████████| 21.9 MB 23.8 MB/s Collecting numpy>=1.16.6 Using cached numpy-1.20.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB) Installing collected packages: numpy, pyarrow Attempting uninstall: numpy Found existing installation: numpy 1.20.3 Uninstalling numpy-1.20.3: Successfully uninstalled numpy-1.20.3 Attempting uninstall: pyarrow Found existing installation: pyarrow 3.0.0 Uninstalling pyarrow-3.0.0: Successfully uninstalled pyarrow-3.0.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 1.8.0 requires pyarrow<4.0.0,>=1.0.0, but you have pyarrow 4.0.1 which is incompatible. Successfully installed numpy-1.20.3 pyarrow-4.0.1 ``` Trying it, the same issue: ![image](https://user-images.githubusercontent.com/1170062/121730226-3f470b80-caa4-11eb-85a5-684c44c816da.png) I tried installing `"pyarrow<4.0.0"`, which gave me 3.0.0. Running, still, same issue. I agree it's weird that pyarrow is checking the source code directory for its files. (There is no `pyarrow/` directory there.) To me, that makes it seem like an issue with how pyarrow is called. Out of curiosity, I tried running this with fewer workers to see when the error arises: - 1: ✅ - 2: ✅ - 4: ✅ - 8: ✅ - 10: ✅ - 11: ❌ 🤔 - 12: ❌ - 16: ❌ - 32: ❌ checking my datasets: ```python >>> datasets DatasetDict({ train: Dataset({ features: ['text'], num_rows: 389290 }) validation.sc: Dataset({ features: ['text'], num_rows: 10 # 🤔 }) validation.wvs: Dataset({ features: ['text'], num_rows: 93928 }) }) ``` New hypothesis: crash if `num_proc` > length of a dataset? 😅 If so, this might be totally my fault, as the caller. Could be a docs fix, or maybe this library could do a check to limit `num_proc` for this case?
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
305
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Sure! I tried reinstalling to get latest. pip was mad because it looks like Datasets currently wants <4.0.0 (which is interesting, because apparently I ended up with 4.0.0 already?), but I gave it a shot anyway: ```bash $ pip install --upgrade --force-reinstall pyarrow Collecting pyarrow Downloading pyarrow-4.0.1-cp39-cp39-manylinux2014_x86_64.whl (21.9 MB) |████████████████████████████████| 21.9 MB 23.8 MB/s Collecting numpy>=1.16.6 Using cached numpy-1.20.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB) Installing collected packages: numpy, pyarrow Attempting uninstall: numpy Found existing installation: numpy 1.20.3 Uninstalling numpy-1.20.3: Successfully uninstalled numpy-1.20.3 Attempting uninstall: pyarrow Found existing installation: pyarrow 3.0.0 Uninstalling pyarrow-3.0.0: Successfully uninstalled pyarrow-3.0.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 1.8.0 requires pyarrow<4.0.0,>=1.0.0, but you have pyarrow 4.0.1 which is incompatible. Successfully installed numpy-1.20.3 pyarrow-4.0.1 ``` Trying it, the same issue: ![image](https://user-images.githubusercontent.com/1170062/121730226-3f470b80-caa4-11eb-85a5-684c44c816da.png) I tried installing `"pyarrow<4.0.0"`, which gave me 3.0.0. Running, still, same issue. I agree it's weird that pyarrow is checking the source code directory for its files. (There is no `pyarrow/` directory there.) To me, that makes it seem like an issue with how pyarrow is called. Out of curiosity, I tried running this with fewer workers to see when the error arises: - 1: ✅ - 2: ✅ - 4: ✅ - 8: ✅ - 10: ✅ - 11: ❌ 🤔 - 12: ❌ - 16: ❌ - 32: ❌ checking my datasets: ```python >>> datasets DatasetDict({ train: Dataset({ features: ['text'], num_rows: 389290 }) validation.sc: Dataset({ features: ['text'], num_rows: 10 # 🤔 }) validation.wvs: Dataset({ features: ['text'], num_rows: 93928 }) }) ``` New hypothesis: crash if `num_proc` > length of a dataset? 😅 If so, this might be totally my fault, as the caller. Could be a docs fix, or maybe this library could do a check to limit `num_proc` for this case?
[ -0.4569718837738037, -0.21739070117473602, 0.022878184914588928, 0.4219459891319275, 0.3113079071044922, -0.2264823615550995, 0.2361338883638382, 0.15250523388385773, 0.0431259460747242, 0.3643292188644409, 0.530329704284668, 0.2979792356491089, -0.33465126156806946, -0.04656977951526642, 0.04772993549704552, -0.026567354798316956, 0.36591315269470215, -0.21823552250862122, 0.25115078687667847, 0.3584369421005249, -0.27087852358818054, 0.16277039051055908, -0.4191710352897644, 0.29371243715286255, -0.26529455184936523, 0.0822436660528183, -0.10502269119024277, 0.2865629494190216, -0.09741590172052383, -0.5258916616439819, -0.030576223507523537, -0.2955247163772583, 0.1912616789340973, 0.45836734771728516, -0.00011823356908280402, -0.09135529398918152, 0.2139717936515808, 0.012012647464871407, 0.09306974709033966, -0.4430084228515625, -0.22598609328269958, -0.252882182598114, -0.16372935473918915, -0.04087210074067116, 0.31339308619499207, 0.0046789697371423244, -0.06639397889375687, -0.15027795732021332, 0.07592954486608505, 0.7205310463905334, 0.15910927951335907, 0.21483291685581207, 0.22887073457241058, -0.11200125515460968, 0.01633906364440918, 0.1341475546360016, -0.030597643926739693, 0.06143757700920105, 0.40036529302597046, -0.2003951370716095, 0.024914562702178955, -0.16739529371261597, 0.09280864149332047, -0.2669808566570282, 0.305939257144928, -0.12271007150411606, 0.19980430603027344, -0.6616150140762329, 0.29747894406318665, -0.17242804169654846, -0.1635967493057251, -0.28783515095710754, -0.05091990530490875, -0.16323240101337433, -0.1430845707654953, -0.2230152189731598, 0.1774134337902069, -0.16718968749046326, -0.15712395310401917, 0.08328592777252197, -0.2861921191215515, 0.16995050013065338, 0.033562466502189636, 0.3086438775062561, -0.3192944824695587, 0.4002257287502289, -0.0029777055606245995, 0.3896188735961914, 0.12629535794258118, -0.28137892484664917, -0.3420288562774658, 0.13404971361160278, -0.041528504341840744, 0.26742273569107056, -0.22571586072444916, -0.16636782884597778, 0.1507909893989563, -0.1738586127758026, 0.29045790433883667, -0.24060414731502533, -0.16564220190048218, 0.28740236163139343, 0.04861196503043175, 0.21331053972244263, 0.29802197217941284, -0.020957279950380325, 0.30214178562164307, 0.3840671181678772, 0.04991079494357109, -0.0560649111866951, -0.10280261933803558, -0.040040887892246246, 0.22646693885326385, -0.11676158010959625, 0.08925168216228485, 0.12577342987060547, 0.0740242674946785, -0.15347909927368164, -0.11980153620243073, 0.4294586479663849, -0.21374237537384033, 0.27730506658554077, 0.31860968470573425, 0.2963826656341553, 0.3739163875579834, 0.2270292043685913, -0.2862905263900757, 0.033872559666633606, -0.25706517696380615, -0.08717741072177887, -0.044277824461460114, -0.2006772756576538, -0.37084516882896423, 0.09926449507474899, -0.005736488848924637, 0.23963458836078644, 0.15276390314102173, 0.045047979801893234, 0.221232607960701, -0.5398681163787842, 0.11252203583717346, -0.25730711221694946, 0.13399134576320648, 0.03508347272872925, -0.29419949650764465, 0.1408180594444275, 0.11566735804080963, -0.12368351966142654, -0.16609929502010345, 0.1671801209449768, -0.21241533756256104, -0.24575871229171753, -0.14749658107757568, 0.1560775190591812, -0.004164993762969971, 0.4375187158584595, -0.06178981810808182, 0.32287102937698364, 0.34641802310943604, -0.328504353761673, -0.025873668491840363, -0.31669026613235474, -0.4711761176586151, -0.2692379355430603, -0.04782314598560333, 0.23255357146263123, -0.11913523077964783, 0.029882661998271942, 0.200077623128891, 0.02027754858136177, 0.0941302701830864, 0.16296672821044922, -0.19793584942817688, -0.01775871217250824, -0.1911366879940033, 0.5243679881095886, 0.2797337472438812, -0.06436364352703094, -0.49060341715812683, 0.11027718335390091, -0.26730525493621826, -0.19815191626548767, -0.4909551739692688, -0.15601304173469543, 0.4023433029651642, -0.20736812055110931, 0.4260300397872925, -0.0168936625123024, -0.14121462404727936, 0.1183849349617958, -0.3067172169685364, 0.09499752521514893, 0.1623562127351761, -0.14624126255512238, 0.08063661307096481, -0.16650158166885376, 0.1831178069114685, -0.07083384692668915, 0.020328104496002197, 0.004629060626029968, -0.04265179485082626, 0.28873980045318604, 0.21363458037376404, -0.07819394767284393, 0.03517899289727211, -0.30481991171836853, -0.06838036328554153, 0.22688192129135132, 0.03475996106863022, -0.0888613909482956, -0.028238564729690552, 0.010514635592699051, -0.041165247559547424, 0.30733975768089294, 0.13911177217960358, -0.10586263239383698, 0.02163803204894066, -0.1246974766254425, 0.0030893124639987946, -0.06615325808525085, -0.03760656341910362, -0.019784441217780113, -0.18850994110107422, 0.024668013677001, -0.06323577463626862, -0.1272606998682022, -0.20103010535240173, -0.1646626740694046, -0.38877010345458984, 0.1416741907596588, 0.42396530508995056, -0.006466292776167393, -0.23094165325164795, 0.5506319999694824, 0.3362869620323181, -0.24848924577236176, -0.6358668208122253, -0.08476485311985016, 0.3994877338409424, -0.1538931280374527, 0.16345207393169403, 0.08694484829902649, -0.012666494585573673, -0.1323806643486023, 0.19112169742584229, 0.22163832187652588, 0.28241628408432007, 0.1572647988796234, -0.09599713236093521, 0.042538516223430634, 0.16591572761535645, 0.12296847999095917, 0.03259509801864624, -0.1997918337583542, -0.0025340132415294647, 0.11996696889400482, 0.05610503628849983, -0.04785504192113876, -0.04797392711043358, 0.23610278964042664, 0.27932554483413696, -0.07611237466335297, 0.12380841374397278, 0.058043982833623886, -0.16852077841758728, -0.05674661695957184, 0.2826821208000183, -0.013607330620288849, 0.6230337023735046, 0.06135699898004532, -0.028772857040166855, 0.004042906686663628, -0.38019317388534546, -0.03362850844860077, 0.13357235491275787, 0.07825558632612228, -0.12283749133348465, 0.05036112666130066, 0.25569239258766174, 0.15972231328487396, -0.19245418906211853, -0.3795141875743866, 0.019982656463980675, 0.31463348865509033, -0.461222380399704, 0.2040783166885376, -0.11882185190916061, 0.213638037443161, -0.07788781821727753, -0.17068830132484436, -0.17532381415367126, -0.39156195521354675, -0.03860565274953842, 0.1213034838438034, 0.005078047513961792, 0.15825366973876953, 0.08876869082450867, -0.14176218211650848, 0.04338943213224411, 0.3126336932182312, 0.2620716989040375, -0.004214114043861628, -0.46526235342025757, -0.12566335499286652, 0.3646591007709503, -0.14263178408145905, 0.18075694143772125, 0.1596730798482895, -0.4231133460998535, -0.13776901364326477, -0.5541075468063354, 0.03621683269739151, 0.04581218957901001, 0.21792955696582794, 0.06505313515663147, 0.0002727806568145752, -0.14178971946239471, -0.06400543451309204, 0.16275082528591156, -0.0710153877735138, -0.05115243420004845, 0.11676184833049774, 0.17636333405971527, -0.3484150171279907, -0.40044084191322327, 0.08108167350292206, -0.2404448539018631, -0.22788868844509125, 0.0398983471095562, 0.05621748045086861, 0.2899164855480194, 0.033601343631744385, 0.31736597418785095, 0.23787318170070648, 0.0640234425663948, -0.2699207365512848, -0.2033461183309555, 0.21200931072235107, -0.050956230610609055, -0.14758087694644928, -0.2852526009082794, -0.07525748014450073, 0.17720337212085724, -0.022968512028455734, 0.2650328278541565, -0.2499956637620926, -0.053525205701589584, -0.06591958552598953, 0.3023349642753601, -0.10448898375034332, -0.28444904088974, 0.3918760120868683, 0.10788265615701675, 0.0479716882109642, -0.0043214112520217896, -0.3812085688114166, -0.06521012634038925, -0.220159113407135, 0.18795232474803925, -0.004086723551154137, 0.5207586884498596, 0.15794220566749573, 0.5066375136375427, 0.3318140208721161, -0.5369670987129211, 0.17175856232643127, -0.27069032192230225, 0.12133555114269257, -0.1566910445690155, -0.1280222237110138, 0.30131107568740845, 0.040944769978523254, -0.062437769025564194, 0.1361875832080841, -0.06296420097351074, -0.49677810072898865, 0.051885947585105896, 0.08035053312778473, -0.01680132746696472, -0.28508925437927246, 0.15080603957176208, -0.06029721349477768, 0.26370230317115784, -0.13138911128044128, 0.33292677998542786, -0.24990218877792358, -0.07944004237651825, -0.16358131170272827, -0.09733481705188751, -0.17656353116035461, -0.04665051028132439, -0.5345147848129272, -0.10867252200841904, -0.6624103784561157, 0.3221203088760376, 0.19392648339271545, 0.7835571765899658, 0.021417733281850815, -0.08244436979293823, -0.24680311977863312, -0.1681990772485733, 0.6353747248649597, -0.3002033829689026, 0.0723908543586731, -0.0045126816257834435, 0.09881797432899475, -0.6122601628303528, -0.12567244470119476, -0.014385290443897247, 0.667384684085846, 0.26435917615890503, 0.9284392595291138, 0.046359769999980927, 0.04595999792218208, 0.04348112270236015, 0.017826244235038757, 0.14339393377304077, -0.06520967930555344, -0.010503564029932022, -0.05995379015803337, -0.17638294398784637, 0.19569693505764008, 0.23711322247982025, 0.20747587084770203, -0.015740277245640755, -0.4159706234931946, 0.07543175667524338, -0.37666580080986023, 0.20110130310058594, 0.13199375569820404, 0.20846644043922424, -0.2982677221298218, 0.11402678489685059, -0.07841483503580093, -0.1573798954486847, 0.28037282824516296, -0.1881636381149292, 0.026479436084628105, -0.3439127802848816, 0.2833443880081177, 0.15300253033638, 0.19953212141990662, 0.42697662115097046, -0.0416695810854435, 0.10616376996040344, -0.3421506881713867, 0.31230491399765015, -0.20471015572547913, 0.2691138684749603, 0.25358009338378906, 0.21678146719932556, -0.5693435668945312, 0.0799897164106369, 0.15404696762561798, 0.09059019386768341, -0.07607732713222504, 0.39408591389656067, -0.36817049980163574, -0.461963951587677, 0.3434624671936035, 0.1300131231546402, 0.84830242395401, 0.03642153739929199, -0.08160333335399628, -0.19214364886283875, 0.16613943874835968, 0.16866986453533173, -0.1858169436454773, -0.05073051154613495, -0.390462189912796, -0.155721977353096, -0.06776755303144455, -0.1420491635799408, 0.09832915663719177, 0.0727662444114685, -0.39251700043678284, 0.1129097118973732, 0.10997651517391205, 0.44247546792030334, -0.0006535258144140244, 0.09435108304023743, -0.1428738832473755, -0.12733428180217743, -0.06860160827636719, 0.1570533961057663, 0.12384045869112015, -0.23216283321380615, -0.14562341570854187, 0.34690433740615845, 0.14317180216312408, -0.4613878130912781, -0.6201139092445374, -0.06473560631275177, -0.5778717398643494, 0.17686161398887634, 0.18120406568050385, 0.23003806173801422, 0.16449719667434692, 0.3012729585170746, 0.07099682092666626, 0.5061180591583252, -0.21164117753505707, -0.024507049471139908, 0.039230722934007645, 0.05125211179256439, 0.14692255854606628, -0.1345071792602539, -0.017682334408164024, 0.09106341749429703, -0.03277985006570816, 0.06409356743097305, 0.0010574907064437866, 0.116432324051857, -0.5018939971923828, 0.265417218208313, 0.4029581546783447, -0.19647932052612305, -0.2089855819940567, -0.27720919251441956, -0.18969427049160004, -0.22308143973350525, 0.07184603810310364, 0.0842442512512207, -0.14883142709732056, 0.13945557177066803, -0.15316499769687653, -0.23921585083007812, 0.030135847628116608, 0.45752257108688354, -0.22565224766731262, 0.09810400009155273, -0.015494279563426971, 0.0785033255815506, -0.06773050874471664, -0.1901302933692932, 0.23269659280776978, -0.12375590950250626, -0.03255172818899155, -0.22311842441558838, -0.20077893137931824, -0.09842419624328613, 0.10800453275442123, 0.060693781822919846, 0.11290717869997025, 0.026252545416355133, -0.016009479761123657, -0.5448377132415771, -0.49196526408195496, -0.007313862442970276, -0.04543978348374367, 0.31451651453971863, -0.016501806676387787, 0.09368614852428436, -0.21283084154129028, 0.13641518354415894, -0.21793997287750244, 0.1666068434715271, -0.06328818202018738, 0.20862124860286713, -0.027621377259492874, 0.09834441542625427, -0.16325488686561584, -0.19791370630264282, 0.06050357222557068, 0.7531200051307678, -0.23598377406597137, -0.09428641945123672, -0.05259069800376892, 0.13793426752090454, 0.23985940217971802, -0.10943124443292618, -0.10331638902425766, -0.02726140059530735, 0.10392457246780396, -0.24210715293884277, 0.10288457572460175, 0.22689595818519592, -0.2034132033586502, -0.1315964013338089, 0.6177954077720642, 0.3815796375274658, 0.193136066198349, 0.35754019021987915, 0.019177064299583435, 0.2638334631919861, 0.14654284715652466, 0.36212173104286194, 0.10019626468420029, -0.0010374858975410461, -0.08830507844686508, 0.2816981077194214, 0.06608955562114716, 0.15879270434379578, 0.20862603187561035, -0.0950450599193573, 0.1765194833278656, 0.09129542857408524, -0.03936653584241867, 0.3638722598552704, -0.40028372406959534, -0.06394535303115845, 0.19165942072868347, 0.18438182771205902, 0.03246833756566048, -0.239410862326622, 0.3049275279045105, 0.18777815997600555, 0.0064045824110507965, 0.26586440205574036, 0.03628915175795555, -0.3785456717014313, 0.07931685447692871, 0.24690619111061096, 0.35297736525535583, -0.03889169543981552, -0.037059586495161057, 0.25870010256767273, -0.21215416491031647, 0.10432208329439163, 0.2033434808254242, -0.19469192624092102, 0.31319084763526917, 0.6266701221466064, -0.07402151077985764, 0.42741814255714417, 0.1257338523864746, 0.06308890879154205, -0.005494460463523865, -0.24834784865379333, 0.08081863820552826, 0.440509170293808, -0.18372726440429688, 0.15008589625358582, 0.06208737567067146, 0.2579606771469116, -0.3250872492790222, -0.16285061836242676, 0.08238159120082855, 0.07849672436714172, -0.3235330283641815, -0.07775475084781647, -0.06416559219360352, -0.15242689847946167, -0.18515637516975403, 0.02980707213282585, -0.14911136031150818, -0.13427473604679108, 0.30586472153663635, 0.10573360323905945, -0.3869330883026123, -0.24654750525951385, -0.08429713547229767, 0.04624601826071739, -0.025434009730815887, -0.2964482307434082, 0.5547575950622559, -0.1652713567018509, 0.20516443252563477, 0.15157659351825714, -0.18100093305110931, 0.5931898355484009, 0.6459060907363892, -0.22873978316783905, 0.16452394425868988, 0.1871112585067749, 0.03692843019962311, -0.02360750176012516, 0.1389945149421692, 0.00649280846118927, 0.2090337872505188, 0.2872697710990906, 0.03199803829193115, -0.1442493200302124, -0.14727315306663513, 0.3358568549156189, 0.21554265916347504, -0.05121815204620361, 0.199741929769516, -0.2628275156021118, -0.187048077583313, 0.0019921250641345978, -0.030753113329410553, -0.16916534304618835, -0.055350951850414276, 0.3815113306045532, -0.005680113099515438, 0.4061160385608673, -0.1410944163799286, 0.05566821247339249, 0.1124873012304306, 0.16584070026874542, 0.21607211232185364, -0.15393927693367004, -0.40257638692855835, -0.3473491668701172, -0.39319393038749695, 0.3725877106189728, -0.23258885741233826, 0.16857440769672394, 0.06813718378543854, -0.23746420443058014, -0.0817599818110466, 0.0034098103642463684, 0.1784849762916565, 0.2687881588935852, -0.06936071813106537, 0.5016825199127197, -0.32066357135772705, -0.04342152550816536, -0.07294096052646637, -0.13395193219184875, 0.24010449647903442, -0.43758663535118103, 0.40433835983276367, -0.3041532635688782, -0.014326412230730057, -0.19157154858112335, 0.005374230444431305, -0.22793108224868774, -0.037226513028144836, 0.6843011975288391, 0.21503600478172302, 0.40693095326423645, -0.03293865919113159, 0.1105625256896019, -0.20533189177513123, 0.10991372913122177, -0.20951789617538452, 0.2924145460128784, 0.032070618122816086, 0.132619246840477, -0.1456782966852188, -0.12368728220462799, -0.07256726175546646, -0.11026695370674133, 0.26034992933273315, -0.055872827768325806, -0.27270734310150146, 0.11994173377752304, -0.2002013921737671, -0.03079904057085514, -0.1286313831806183, 0.32804566621780396, 0.15331372618675232, 0.289993554353714, 0.03234277665615082, -0.22776934504508972, 0.39988118410110474, -0.33580467104911804, -0.33625951409339905, -0.18469856679439545, 0.18101871013641357, -0.21165511012077332, -0.3600912392139435, -0.5163124203681946, -0.35795703530311584, 0.3601653277873993, 0.02673257514834404, -0.5006996393203735, -0.0882551521062851, -0.2791074514389038, -0.09968006610870361, -0.251852810382843, 0.4753125309944153, 0.15299946069717407, -0.13949282467365265, 0.6449902653694153, -0.3258782625198364 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Good catch ! Not sure why it could raise such a weird issue from pyarrow though We should definitely reduce num_proc to the length of the dataset if needed and log a warning.
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
33
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Good catch ! Not sure why it could raise such a weird issue from pyarrow though We should definitely reduce num_proc to the length of the dataset if needed and log a warning.
[ -0.4569718837738037, -0.21739070117473602, 0.022878184914588928, 0.4219459891319275, 0.3113079071044922, -0.2264823615550995, 0.2361338883638382, 0.15250523388385773, 0.0431259460747242, 0.3643292188644409, 0.530329704284668, 0.2979792356491089, -0.33465126156806946, -0.04656977951526642, 0.04772993549704552, -0.026567354798316956, 0.36591315269470215, -0.21823552250862122, 0.25115078687667847, 0.3584369421005249, -0.27087852358818054, 0.16277039051055908, -0.4191710352897644, 0.29371243715286255, -0.26529455184936523, 0.0822436660528183, -0.10502269119024277, 0.2865629494190216, -0.09741590172052383, -0.5258916616439819, -0.030576223507523537, -0.2955247163772583, 0.1912616789340973, 0.45836734771728516, -0.00011823356908280402, -0.09135529398918152, 0.2139717936515808, 0.012012647464871407, 0.09306974709033966, -0.4430084228515625, -0.22598609328269958, -0.252882182598114, -0.16372935473918915, -0.04087210074067116, 0.31339308619499207, 0.0046789697371423244, -0.06639397889375687, -0.15027795732021332, 0.07592954486608505, 0.7205310463905334, 0.15910927951335907, 0.21483291685581207, 0.22887073457241058, -0.11200125515460968, 0.01633906364440918, 0.1341475546360016, -0.030597643926739693, 0.06143757700920105, 0.40036529302597046, -0.2003951370716095, 0.024914562702178955, -0.16739529371261597, 0.09280864149332047, -0.2669808566570282, 0.305939257144928, -0.12271007150411606, 0.19980430603027344, -0.6616150140762329, 0.29747894406318665, -0.17242804169654846, -0.1635967493057251, -0.28783515095710754, -0.05091990530490875, -0.16323240101337433, -0.1430845707654953, -0.2230152189731598, 0.1774134337902069, -0.16718968749046326, -0.15712395310401917, 0.08328592777252197, -0.2861921191215515, 0.16995050013065338, 0.033562466502189636, 0.3086438775062561, -0.3192944824695587, 0.4002257287502289, -0.0029777055606245995, 0.3896188735961914, 0.12629535794258118, -0.28137892484664917, -0.3420288562774658, 0.13404971361160278, -0.041528504341840744, 0.26742273569107056, -0.22571586072444916, -0.16636782884597778, 0.1507909893989563, -0.1738586127758026, 0.29045790433883667, -0.24060414731502533, -0.16564220190048218, 0.28740236163139343, 0.04861196503043175, 0.21331053972244263, 0.29802197217941284, -0.020957279950380325, 0.30214178562164307, 0.3840671181678772, 0.04991079494357109, -0.0560649111866951, -0.10280261933803558, -0.040040887892246246, 0.22646693885326385, -0.11676158010959625, 0.08925168216228485, 0.12577342987060547, 0.0740242674946785, -0.15347909927368164, -0.11980153620243073, 0.4294586479663849, -0.21374237537384033, 0.27730506658554077, 0.31860968470573425, 0.2963826656341553, 0.3739163875579834, 0.2270292043685913, -0.2862905263900757, 0.033872559666633606, -0.25706517696380615, -0.08717741072177887, -0.044277824461460114, -0.2006772756576538, -0.37084516882896423, 0.09926449507474899, -0.005736488848924637, 0.23963458836078644, 0.15276390314102173, 0.045047979801893234, 0.221232607960701, -0.5398681163787842, 0.11252203583717346, -0.25730711221694946, 0.13399134576320648, 0.03508347272872925, -0.29419949650764465, 0.1408180594444275, 0.11566735804080963, -0.12368351966142654, -0.16609929502010345, 0.1671801209449768, -0.21241533756256104, -0.24575871229171753, -0.14749658107757568, 0.1560775190591812, -0.004164993762969971, 0.4375187158584595, -0.06178981810808182, 0.32287102937698364, 0.34641802310943604, -0.328504353761673, -0.025873668491840363, -0.31669026613235474, -0.4711761176586151, -0.2692379355430603, -0.04782314598560333, 0.23255357146263123, -0.11913523077964783, 0.029882661998271942, 0.200077623128891, 0.02027754858136177, 0.0941302701830864, 0.16296672821044922, -0.19793584942817688, -0.01775871217250824, -0.1911366879940033, 0.5243679881095886, 0.2797337472438812, -0.06436364352703094, -0.49060341715812683, 0.11027718335390091, -0.26730525493621826, -0.19815191626548767, -0.4909551739692688, -0.15601304173469543, 0.4023433029651642, -0.20736812055110931, 0.4260300397872925, -0.0168936625123024, -0.14121462404727936, 0.1183849349617958, -0.3067172169685364, 0.09499752521514893, 0.1623562127351761, -0.14624126255512238, 0.08063661307096481, -0.16650158166885376, 0.1831178069114685, -0.07083384692668915, 0.020328104496002197, 0.004629060626029968, -0.04265179485082626, 0.28873980045318604, 0.21363458037376404, -0.07819394767284393, 0.03517899289727211, -0.30481991171836853, -0.06838036328554153, 0.22688192129135132, 0.03475996106863022, -0.0888613909482956, -0.028238564729690552, 0.010514635592699051, -0.041165247559547424, 0.30733975768089294, 0.13911177217960358, -0.10586263239383698, 0.02163803204894066, -0.1246974766254425, 0.0030893124639987946, -0.06615325808525085, -0.03760656341910362, -0.019784441217780113, -0.18850994110107422, 0.024668013677001, -0.06323577463626862, -0.1272606998682022, -0.20103010535240173, -0.1646626740694046, -0.38877010345458984, 0.1416741907596588, 0.42396530508995056, -0.006466292776167393, -0.23094165325164795, 0.5506319999694824, 0.3362869620323181, -0.24848924577236176, -0.6358668208122253, -0.08476485311985016, 0.3994877338409424, -0.1538931280374527, 0.16345207393169403, 0.08694484829902649, -0.012666494585573673, -0.1323806643486023, 0.19112169742584229, 0.22163832187652588, 0.28241628408432007, 0.1572647988796234, -0.09599713236093521, 0.042538516223430634, 0.16591572761535645, 0.12296847999095917, 0.03259509801864624, -0.1997918337583542, -0.0025340132415294647, 0.11996696889400482, 0.05610503628849983, -0.04785504192113876, -0.04797392711043358, 0.23610278964042664, 0.27932554483413696, -0.07611237466335297, 0.12380841374397278, 0.058043982833623886, -0.16852077841758728, -0.05674661695957184, 0.2826821208000183, -0.013607330620288849, 0.6230337023735046, 0.06135699898004532, -0.028772857040166855, 0.004042906686663628, -0.38019317388534546, -0.03362850844860077, 0.13357235491275787, 0.07825558632612228, -0.12283749133348465, 0.05036112666130066, 0.25569239258766174, 0.15972231328487396, -0.19245418906211853, -0.3795141875743866, 0.019982656463980675, 0.31463348865509033, -0.461222380399704, 0.2040783166885376, -0.11882185190916061, 0.213638037443161, -0.07788781821727753, -0.17068830132484436, -0.17532381415367126, -0.39156195521354675, -0.03860565274953842, 0.1213034838438034, 0.005078047513961792, 0.15825366973876953, 0.08876869082450867, -0.14176218211650848, 0.04338943213224411, 0.3126336932182312, 0.2620716989040375, -0.004214114043861628, -0.46526235342025757, -0.12566335499286652, 0.3646591007709503, -0.14263178408145905, 0.18075694143772125, 0.1596730798482895, -0.4231133460998535, -0.13776901364326477, -0.5541075468063354, 0.03621683269739151, 0.04581218957901001, 0.21792955696582794, 0.06505313515663147, 0.0002727806568145752, -0.14178971946239471, -0.06400543451309204, 0.16275082528591156, -0.0710153877735138, -0.05115243420004845, 0.11676184833049774, 0.17636333405971527, -0.3484150171279907, -0.40044084191322327, 0.08108167350292206, -0.2404448539018631, -0.22788868844509125, 0.0398983471095562, 0.05621748045086861, 0.2899164855480194, 0.033601343631744385, 0.31736597418785095, 0.23787318170070648, 0.0640234425663948, -0.2699207365512848, -0.2033461183309555, 0.21200931072235107, -0.050956230610609055, -0.14758087694644928, -0.2852526009082794, -0.07525748014450073, 0.17720337212085724, -0.022968512028455734, 0.2650328278541565, -0.2499956637620926, -0.053525205701589584, -0.06591958552598953, 0.3023349642753601, -0.10448898375034332, -0.28444904088974, 0.3918760120868683, 0.10788265615701675, 0.0479716882109642, -0.0043214112520217896, -0.3812085688114166, -0.06521012634038925, -0.220159113407135, 0.18795232474803925, -0.004086723551154137, 0.5207586884498596, 0.15794220566749573, 0.5066375136375427, 0.3318140208721161, -0.5369670987129211, 0.17175856232643127, -0.27069032192230225, 0.12133555114269257, -0.1566910445690155, -0.1280222237110138, 0.30131107568740845, 0.040944769978523254, -0.062437769025564194, 0.1361875832080841, -0.06296420097351074, -0.49677810072898865, 0.051885947585105896, 0.08035053312778473, -0.01680132746696472, -0.28508925437927246, 0.15080603957176208, -0.06029721349477768, 0.26370230317115784, -0.13138911128044128, 0.33292677998542786, -0.24990218877792358, -0.07944004237651825, -0.16358131170272827, -0.09733481705188751, -0.17656353116035461, -0.04665051028132439, -0.5345147848129272, -0.10867252200841904, -0.6624103784561157, 0.3221203088760376, 0.19392648339271545, 0.7835571765899658, 0.021417733281850815, -0.08244436979293823, -0.24680311977863312, -0.1681990772485733, 0.6353747248649597, -0.3002033829689026, 0.0723908543586731, -0.0045126816257834435, 0.09881797432899475, -0.6122601628303528, -0.12567244470119476, -0.014385290443897247, 0.667384684085846, 0.26435917615890503, 0.9284392595291138, 0.046359769999980927, 0.04595999792218208, 0.04348112270236015, 0.017826244235038757, 0.14339393377304077, -0.06520967930555344, -0.010503564029932022, -0.05995379015803337, -0.17638294398784637, 0.19569693505764008, 0.23711322247982025, 0.20747587084770203, -0.015740277245640755, -0.4159706234931946, 0.07543175667524338, -0.37666580080986023, 0.20110130310058594, 0.13199375569820404, 0.20846644043922424, -0.2982677221298218, 0.11402678489685059, -0.07841483503580093, -0.1573798954486847, 0.28037282824516296, -0.1881636381149292, 0.026479436084628105, -0.3439127802848816, 0.2833443880081177, 0.15300253033638, 0.19953212141990662, 0.42697662115097046, -0.0416695810854435, 0.10616376996040344, -0.3421506881713867, 0.31230491399765015, -0.20471015572547913, 0.2691138684749603, 0.25358009338378906, 0.21678146719932556, -0.5693435668945312, 0.0799897164106369, 0.15404696762561798, 0.09059019386768341, -0.07607732713222504, 0.39408591389656067, -0.36817049980163574, -0.461963951587677, 0.3434624671936035, 0.1300131231546402, 0.84830242395401, 0.03642153739929199, -0.08160333335399628, -0.19214364886283875, 0.16613943874835968, 0.16866986453533173, -0.1858169436454773, -0.05073051154613495, -0.390462189912796, -0.155721977353096, -0.06776755303144455, -0.1420491635799408, 0.09832915663719177, 0.0727662444114685, -0.39251700043678284, 0.1129097118973732, 0.10997651517391205, 0.44247546792030334, -0.0006535258144140244, 0.09435108304023743, -0.1428738832473755, -0.12733428180217743, -0.06860160827636719, 0.1570533961057663, 0.12384045869112015, -0.23216283321380615, -0.14562341570854187, 0.34690433740615845, 0.14317180216312408, -0.4613878130912781, -0.6201139092445374, -0.06473560631275177, -0.5778717398643494, 0.17686161398887634, 0.18120406568050385, 0.23003806173801422, 0.16449719667434692, 0.3012729585170746, 0.07099682092666626, 0.5061180591583252, -0.21164117753505707, -0.024507049471139908, 0.039230722934007645, 0.05125211179256439, 0.14692255854606628, -0.1345071792602539, -0.017682334408164024, 0.09106341749429703, -0.03277985006570816, 0.06409356743097305, 0.0010574907064437866, 0.116432324051857, -0.5018939971923828, 0.265417218208313, 0.4029581546783447, -0.19647932052612305, -0.2089855819940567, -0.27720919251441956, -0.18969427049160004, -0.22308143973350525, 0.07184603810310364, 0.0842442512512207, -0.14883142709732056, 0.13945557177066803, -0.15316499769687653, -0.23921585083007812, 0.030135847628116608, 0.45752257108688354, -0.22565224766731262, 0.09810400009155273, -0.015494279563426971, 0.0785033255815506, -0.06773050874471664, -0.1901302933692932, 0.23269659280776978, -0.12375590950250626, -0.03255172818899155, -0.22311842441558838, -0.20077893137931824, -0.09842419624328613, 0.10800453275442123, 0.060693781822919846, 0.11290717869997025, 0.026252545416355133, -0.016009479761123657, -0.5448377132415771, -0.49196526408195496, -0.007313862442970276, -0.04543978348374367, 0.31451651453971863, -0.016501806676387787, 0.09368614852428436, -0.21283084154129028, 0.13641518354415894, -0.21793997287750244, 0.1666068434715271, -0.06328818202018738, 0.20862124860286713, -0.027621377259492874, 0.09834441542625427, -0.16325488686561584, -0.19791370630264282, 0.06050357222557068, 0.7531200051307678, -0.23598377406597137, -0.09428641945123672, -0.05259069800376892, 0.13793426752090454, 0.23985940217971802, -0.10943124443292618, -0.10331638902425766, -0.02726140059530735, 0.10392457246780396, -0.24210715293884277, 0.10288457572460175, 0.22689595818519592, -0.2034132033586502, -0.1315964013338089, 0.6177954077720642, 0.3815796375274658, 0.193136066198349, 0.35754019021987915, 0.019177064299583435, 0.2638334631919861, 0.14654284715652466, 0.36212173104286194, 0.10019626468420029, -0.0010374858975410461, -0.08830507844686508, 0.2816981077194214, 0.06608955562114716, 0.15879270434379578, 0.20862603187561035, -0.0950450599193573, 0.1765194833278656, 0.09129542857408524, -0.03936653584241867, 0.3638722598552704, -0.40028372406959534, -0.06394535303115845, 0.19165942072868347, 0.18438182771205902, 0.03246833756566048, -0.239410862326622, 0.3049275279045105, 0.18777815997600555, 0.0064045824110507965, 0.26586440205574036, 0.03628915175795555, -0.3785456717014313, 0.07931685447692871, 0.24690619111061096, 0.35297736525535583, -0.03889169543981552, -0.037059586495161057, 0.25870010256767273, -0.21215416491031647, 0.10432208329439163, 0.2033434808254242, -0.19469192624092102, 0.31319084763526917, 0.6266701221466064, -0.07402151077985764, 0.42741814255714417, 0.1257338523864746, 0.06308890879154205, -0.005494460463523865, -0.24834784865379333, 0.08081863820552826, 0.440509170293808, -0.18372726440429688, 0.15008589625358582, 0.06208737567067146, 0.2579606771469116, -0.3250872492790222, -0.16285061836242676, 0.08238159120082855, 0.07849672436714172, -0.3235330283641815, -0.07775475084781647, -0.06416559219360352, -0.15242689847946167, -0.18515637516975403, 0.02980707213282585, -0.14911136031150818, -0.13427473604679108, 0.30586472153663635, 0.10573360323905945, -0.3869330883026123, -0.24654750525951385, -0.08429713547229767, 0.04624601826071739, -0.025434009730815887, -0.2964482307434082, 0.5547575950622559, -0.1652713567018509, 0.20516443252563477, 0.15157659351825714, -0.18100093305110931, 0.5931898355484009, 0.6459060907363892, -0.22873978316783905, 0.16452394425868988, 0.1871112585067749, 0.03692843019962311, -0.02360750176012516, 0.1389945149421692, 0.00649280846118927, 0.2090337872505188, 0.2872697710990906, 0.03199803829193115, -0.1442493200302124, -0.14727315306663513, 0.3358568549156189, 0.21554265916347504, -0.05121815204620361, 0.199741929769516, -0.2628275156021118, -0.187048077583313, 0.0019921250641345978, -0.030753113329410553, -0.16916534304618835, -0.055350951850414276, 0.3815113306045532, -0.005680113099515438, 0.4061160385608673, -0.1410944163799286, 0.05566821247339249, 0.1124873012304306, 0.16584070026874542, 0.21607211232185364, -0.15393927693367004, -0.40257638692855835, -0.3473491668701172, -0.39319393038749695, 0.3725877106189728, -0.23258885741233826, 0.16857440769672394, 0.06813718378543854, -0.23746420443058014, -0.0817599818110466, 0.0034098103642463684, 0.1784849762916565, 0.2687881588935852, -0.06936071813106537, 0.5016825199127197, -0.32066357135772705, -0.04342152550816536, -0.07294096052646637, -0.13395193219184875, 0.24010449647903442, -0.43758663535118103, 0.40433835983276367, -0.3041532635688782, -0.014326412230730057, -0.19157154858112335, 0.005374230444431305, -0.22793108224868774, -0.037226513028144836, 0.6843011975288391, 0.21503600478172302, 0.40693095326423645, -0.03293865919113159, 0.1105625256896019, -0.20533189177513123, 0.10991372913122177, -0.20951789617538452, 0.2924145460128784, 0.032070618122816086, 0.132619246840477, -0.1456782966852188, -0.12368728220462799, -0.07256726175546646, -0.11026695370674133, 0.26034992933273315, -0.055872827768325806, -0.27270734310150146, 0.11994173377752304, -0.2002013921737671, -0.03079904057085514, -0.1286313831806183, 0.32804566621780396, 0.15331372618675232, 0.289993554353714, 0.03234277665615082, -0.22776934504508972, 0.39988118410110474, -0.33580467104911804, -0.33625951409339905, -0.18469856679439545, 0.18101871013641357, -0.21165511012077332, -0.3600912392139435, -0.5163124203681946, -0.35795703530311584, 0.3601653277873993, 0.02673257514834404, -0.5006996393203735, -0.0882551521062851, -0.2791074514389038, -0.09968006610870361, -0.251852810382843, 0.4753125309944153, 0.15299946069717407, -0.13949282467365265, 0.6449902653694153, -0.3258782625198364 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
This has been fixed in #2566, thanks @connor-mccarthy ! We'll make a new release soon that includes the fix ;)
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
20
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue This has been fixed in #2566, thanks @connor-mccarthy ! We'll make a new release soon that includes the fix ;)
[ -0.4569718837738037, -0.21739070117473602, 0.022878184914588928, 0.4219459891319275, 0.3113079071044922, -0.2264823615550995, 0.2361338883638382, 0.15250523388385773, 0.0431259460747242, 0.3643292188644409, 0.530329704284668, 0.2979792356491089, -0.33465126156806946, -0.04656977951526642, 0.04772993549704552, -0.026567354798316956, 0.36591315269470215, -0.21823552250862122, 0.25115078687667847, 0.3584369421005249, -0.27087852358818054, 0.16277039051055908, -0.4191710352897644, 0.29371243715286255, -0.26529455184936523, 0.0822436660528183, -0.10502269119024277, 0.2865629494190216, -0.09741590172052383, -0.5258916616439819, -0.030576223507523537, -0.2955247163772583, 0.1912616789340973, 0.45836734771728516, -0.00011823356908280402, -0.09135529398918152, 0.2139717936515808, 0.012012647464871407, 0.09306974709033966, -0.4430084228515625, -0.22598609328269958, -0.252882182598114, -0.16372935473918915, -0.04087210074067116, 0.31339308619499207, 0.0046789697371423244, -0.06639397889375687, -0.15027795732021332, 0.07592954486608505, 0.7205310463905334, 0.15910927951335907, 0.21483291685581207, 0.22887073457241058, -0.11200125515460968, 0.01633906364440918, 0.1341475546360016, -0.030597643926739693, 0.06143757700920105, 0.40036529302597046, -0.2003951370716095, 0.024914562702178955, -0.16739529371261597, 0.09280864149332047, -0.2669808566570282, 0.305939257144928, -0.12271007150411606, 0.19980430603027344, -0.6616150140762329, 0.29747894406318665, -0.17242804169654846, -0.1635967493057251, -0.28783515095710754, -0.05091990530490875, -0.16323240101337433, -0.1430845707654953, -0.2230152189731598, 0.1774134337902069, -0.16718968749046326, -0.15712395310401917, 0.08328592777252197, -0.2861921191215515, 0.16995050013065338, 0.033562466502189636, 0.3086438775062561, -0.3192944824695587, 0.4002257287502289, -0.0029777055606245995, 0.3896188735961914, 0.12629535794258118, -0.28137892484664917, -0.3420288562774658, 0.13404971361160278, -0.041528504341840744, 0.26742273569107056, -0.22571586072444916, -0.16636782884597778, 0.1507909893989563, -0.1738586127758026, 0.29045790433883667, -0.24060414731502533, -0.16564220190048218, 0.28740236163139343, 0.04861196503043175, 0.21331053972244263, 0.29802197217941284, -0.020957279950380325, 0.30214178562164307, 0.3840671181678772, 0.04991079494357109, -0.0560649111866951, -0.10280261933803558, -0.040040887892246246, 0.22646693885326385, -0.11676158010959625, 0.08925168216228485, 0.12577342987060547, 0.0740242674946785, -0.15347909927368164, -0.11980153620243073, 0.4294586479663849, -0.21374237537384033, 0.27730506658554077, 0.31860968470573425, 0.2963826656341553, 0.3739163875579834, 0.2270292043685913, -0.2862905263900757, 0.033872559666633606, -0.25706517696380615, -0.08717741072177887, -0.044277824461460114, -0.2006772756576538, -0.37084516882896423, 0.09926449507474899, -0.005736488848924637, 0.23963458836078644, 0.15276390314102173, 0.045047979801893234, 0.221232607960701, -0.5398681163787842, 0.11252203583717346, -0.25730711221694946, 0.13399134576320648, 0.03508347272872925, -0.29419949650764465, 0.1408180594444275, 0.11566735804080963, -0.12368351966142654, -0.16609929502010345, 0.1671801209449768, -0.21241533756256104, -0.24575871229171753, -0.14749658107757568, 0.1560775190591812, -0.004164993762969971, 0.4375187158584595, -0.06178981810808182, 0.32287102937698364, 0.34641802310943604, -0.328504353761673, -0.025873668491840363, -0.31669026613235474, -0.4711761176586151, -0.2692379355430603, -0.04782314598560333, 0.23255357146263123, -0.11913523077964783, 0.029882661998271942, 0.200077623128891, 0.02027754858136177, 0.0941302701830864, 0.16296672821044922, -0.19793584942817688, -0.01775871217250824, -0.1911366879940033, 0.5243679881095886, 0.2797337472438812, -0.06436364352703094, -0.49060341715812683, 0.11027718335390091, -0.26730525493621826, -0.19815191626548767, -0.4909551739692688, -0.15601304173469543, 0.4023433029651642, -0.20736812055110931, 0.4260300397872925, -0.0168936625123024, -0.14121462404727936, 0.1183849349617958, -0.3067172169685364, 0.09499752521514893, 0.1623562127351761, -0.14624126255512238, 0.08063661307096481, -0.16650158166885376, 0.1831178069114685, -0.07083384692668915, 0.020328104496002197, 0.004629060626029968, -0.04265179485082626, 0.28873980045318604, 0.21363458037376404, -0.07819394767284393, 0.03517899289727211, -0.30481991171836853, -0.06838036328554153, 0.22688192129135132, 0.03475996106863022, -0.0888613909482956, -0.028238564729690552, 0.010514635592699051, -0.041165247559547424, 0.30733975768089294, 0.13911177217960358, -0.10586263239383698, 0.02163803204894066, -0.1246974766254425, 0.0030893124639987946, -0.06615325808525085, -0.03760656341910362, -0.019784441217780113, -0.18850994110107422, 0.024668013677001, -0.06323577463626862, -0.1272606998682022, -0.20103010535240173, -0.1646626740694046, -0.38877010345458984, 0.1416741907596588, 0.42396530508995056, -0.006466292776167393, -0.23094165325164795, 0.5506319999694824, 0.3362869620323181, -0.24848924577236176, -0.6358668208122253, -0.08476485311985016, 0.3994877338409424, -0.1538931280374527, 0.16345207393169403, 0.08694484829902649, -0.012666494585573673, -0.1323806643486023, 0.19112169742584229, 0.22163832187652588, 0.28241628408432007, 0.1572647988796234, -0.09599713236093521, 0.042538516223430634, 0.16591572761535645, 0.12296847999095917, 0.03259509801864624, -0.1997918337583542, -0.0025340132415294647, 0.11996696889400482, 0.05610503628849983, -0.04785504192113876, -0.04797392711043358, 0.23610278964042664, 0.27932554483413696, -0.07611237466335297, 0.12380841374397278, 0.058043982833623886, -0.16852077841758728, -0.05674661695957184, 0.2826821208000183, -0.013607330620288849, 0.6230337023735046, 0.06135699898004532, -0.028772857040166855, 0.004042906686663628, -0.38019317388534546, -0.03362850844860077, 0.13357235491275787, 0.07825558632612228, -0.12283749133348465, 0.05036112666130066, 0.25569239258766174, 0.15972231328487396, -0.19245418906211853, -0.3795141875743866, 0.019982656463980675, 0.31463348865509033, -0.461222380399704, 0.2040783166885376, -0.11882185190916061, 0.213638037443161, -0.07788781821727753, -0.17068830132484436, -0.17532381415367126, -0.39156195521354675, -0.03860565274953842, 0.1213034838438034, 0.005078047513961792, 0.15825366973876953, 0.08876869082450867, -0.14176218211650848, 0.04338943213224411, 0.3126336932182312, 0.2620716989040375, -0.004214114043861628, -0.46526235342025757, -0.12566335499286652, 0.3646591007709503, -0.14263178408145905, 0.18075694143772125, 0.1596730798482895, -0.4231133460998535, -0.13776901364326477, -0.5541075468063354, 0.03621683269739151, 0.04581218957901001, 0.21792955696582794, 0.06505313515663147, 0.0002727806568145752, -0.14178971946239471, -0.06400543451309204, 0.16275082528591156, -0.0710153877735138, -0.05115243420004845, 0.11676184833049774, 0.17636333405971527, -0.3484150171279907, -0.40044084191322327, 0.08108167350292206, -0.2404448539018631, -0.22788868844509125, 0.0398983471095562, 0.05621748045086861, 0.2899164855480194, 0.033601343631744385, 0.31736597418785095, 0.23787318170070648, 0.0640234425663948, -0.2699207365512848, -0.2033461183309555, 0.21200931072235107, -0.050956230610609055, -0.14758087694644928, -0.2852526009082794, -0.07525748014450073, 0.17720337212085724, -0.022968512028455734, 0.2650328278541565, -0.2499956637620926, -0.053525205701589584, -0.06591958552598953, 0.3023349642753601, -0.10448898375034332, -0.28444904088974, 0.3918760120868683, 0.10788265615701675, 0.0479716882109642, -0.0043214112520217896, -0.3812085688114166, -0.06521012634038925, -0.220159113407135, 0.18795232474803925, -0.004086723551154137, 0.5207586884498596, 0.15794220566749573, 0.5066375136375427, 0.3318140208721161, -0.5369670987129211, 0.17175856232643127, -0.27069032192230225, 0.12133555114269257, -0.1566910445690155, -0.1280222237110138, 0.30131107568740845, 0.040944769978523254, -0.062437769025564194, 0.1361875832080841, -0.06296420097351074, -0.49677810072898865, 0.051885947585105896, 0.08035053312778473, -0.01680132746696472, -0.28508925437927246, 0.15080603957176208, -0.06029721349477768, 0.26370230317115784, -0.13138911128044128, 0.33292677998542786, -0.24990218877792358, -0.07944004237651825, -0.16358131170272827, -0.09733481705188751, -0.17656353116035461, -0.04665051028132439, -0.5345147848129272, -0.10867252200841904, -0.6624103784561157, 0.3221203088760376, 0.19392648339271545, 0.7835571765899658, 0.021417733281850815, -0.08244436979293823, -0.24680311977863312, -0.1681990772485733, 0.6353747248649597, -0.3002033829689026, 0.0723908543586731, -0.0045126816257834435, 0.09881797432899475, -0.6122601628303528, -0.12567244470119476, -0.014385290443897247, 0.667384684085846, 0.26435917615890503, 0.9284392595291138, 0.046359769999980927, 0.04595999792218208, 0.04348112270236015, 0.017826244235038757, 0.14339393377304077, -0.06520967930555344, -0.010503564029932022, -0.05995379015803337, -0.17638294398784637, 0.19569693505764008, 0.23711322247982025, 0.20747587084770203, -0.015740277245640755, -0.4159706234931946, 0.07543175667524338, -0.37666580080986023, 0.20110130310058594, 0.13199375569820404, 0.20846644043922424, -0.2982677221298218, 0.11402678489685059, -0.07841483503580093, -0.1573798954486847, 0.28037282824516296, -0.1881636381149292, 0.026479436084628105, -0.3439127802848816, 0.2833443880081177, 0.15300253033638, 0.19953212141990662, 0.42697662115097046, -0.0416695810854435, 0.10616376996040344, -0.3421506881713867, 0.31230491399765015, -0.20471015572547913, 0.2691138684749603, 0.25358009338378906, 0.21678146719932556, -0.5693435668945312, 0.0799897164106369, 0.15404696762561798, 0.09059019386768341, -0.07607732713222504, 0.39408591389656067, -0.36817049980163574, -0.461963951587677, 0.3434624671936035, 0.1300131231546402, 0.84830242395401, 0.03642153739929199, -0.08160333335399628, -0.19214364886283875, 0.16613943874835968, 0.16866986453533173, -0.1858169436454773, -0.05073051154613495, -0.390462189912796, -0.155721977353096, -0.06776755303144455, -0.1420491635799408, 0.09832915663719177, 0.0727662444114685, -0.39251700043678284, 0.1129097118973732, 0.10997651517391205, 0.44247546792030334, -0.0006535258144140244, 0.09435108304023743, -0.1428738832473755, -0.12733428180217743, -0.06860160827636719, 0.1570533961057663, 0.12384045869112015, -0.23216283321380615, -0.14562341570854187, 0.34690433740615845, 0.14317180216312408, -0.4613878130912781, -0.6201139092445374, -0.06473560631275177, -0.5778717398643494, 0.17686161398887634, 0.18120406568050385, 0.23003806173801422, 0.16449719667434692, 0.3012729585170746, 0.07099682092666626, 0.5061180591583252, -0.21164117753505707, -0.024507049471139908, 0.039230722934007645, 0.05125211179256439, 0.14692255854606628, -0.1345071792602539, -0.017682334408164024, 0.09106341749429703, -0.03277985006570816, 0.06409356743097305, 0.0010574907064437866, 0.116432324051857, -0.5018939971923828, 0.265417218208313, 0.4029581546783447, -0.19647932052612305, -0.2089855819940567, -0.27720919251441956, -0.18969427049160004, -0.22308143973350525, 0.07184603810310364, 0.0842442512512207, -0.14883142709732056, 0.13945557177066803, -0.15316499769687653, -0.23921585083007812, 0.030135847628116608, 0.45752257108688354, -0.22565224766731262, 0.09810400009155273, -0.015494279563426971, 0.0785033255815506, -0.06773050874471664, -0.1901302933692932, 0.23269659280776978, -0.12375590950250626, -0.03255172818899155, -0.22311842441558838, -0.20077893137931824, -0.09842419624328613, 0.10800453275442123, 0.060693781822919846, 0.11290717869997025, 0.026252545416355133, -0.016009479761123657, -0.5448377132415771, -0.49196526408195496, -0.007313862442970276, -0.04543978348374367, 0.31451651453971863, -0.016501806676387787, 0.09368614852428436, -0.21283084154129028, 0.13641518354415894, -0.21793997287750244, 0.1666068434715271, -0.06328818202018738, 0.20862124860286713, -0.027621377259492874, 0.09834441542625427, -0.16325488686561584, -0.19791370630264282, 0.06050357222557068, 0.7531200051307678, -0.23598377406597137, -0.09428641945123672, -0.05259069800376892, 0.13793426752090454, 0.23985940217971802, -0.10943124443292618, -0.10331638902425766, -0.02726140059530735, 0.10392457246780396, -0.24210715293884277, 0.10288457572460175, 0.22689595818519592, -0.2034132033586502, -0.1315964013338089, 0.6177954077720642, 0.3815796375274658, 0.193136066198349, 0.35754019021987915, 0.019177064299583435, 0.2638334631919861, 0.14654284715652466, 0.36212173104286194, 0.10019626468420029, -0.0010374858975410461, -0.08830507844686508, 0.2816981077194214, 0.06608955562114716, 0.15879270434379578, 0.20862603187561035, -0.0950450599193573, 0.1765194833278656, 0.09129542857408524, -0.03936653584241867, 0.3638722598552704, -0.40028372406959534, -0.06394535303115845, 0.19165942072868347, 0.18438182771205902, 0.03246833756566048, -0.239410862326622, 0.3049275279045105, 0.18777815997600555, 0.0064045824110507965, 0.26586440205574036, 0.03628915175795555, -0.3785456717014313, 0.07931685447692871, 0.24690619111061096, 0.35297736525535583, -0.03889169543981552, -0.037059586495161057, 0.25870010256767273, -0.21215416491031647, 0.10432208329439163, 0.2033434808254242, -0.19469192624092102, 0.31319084763526917, 0.6266701221466064, -0.07402151077985764, 0.42741814255714417, 0.1257338523864746, 0.06308890879154205, -0.005494460463523865, -0.24834784865379333, 0.08081863820552826, 0.440509170293808, -0.18372726440429688, 0.15008589625358582, 0.06208737567067146, 0.2579606771469116, -0.3250872492790222, -0.16285061836242676, 0.08238159120082855, 0.07849672436714172, -0.3235330283641815, -0.07775475084781647, -0.06416559219360352, -0.15242689847946167, -0.18515637516975403, 0.02980707213282585, -0.14911136031150818, -0.13427473604679108, 0.30586472153663635, 0.10573360323905945, -0.3869330883026123, -0.24654750525951385, -0.08429713547229767, 0.04624601826071739, -0.025434009730815887, -0.2964482307434082, 0.5547575950622559, -0.1652713567018509, 0.20516443252563477, 0.15157659351825714, -0.18100093305110931, 0.5931898355484009, 0.6459060907363892, -0.22873978316783905, 0.16452394425868988, 0.1871112585067749, 0.03692843019962311, -0.02360750176012516, 0.1389945149421692, 0.00649280846118927, 0.2090337872505188, 0.2872697710990906, 0.03199803829193115, -0.1442493200302124, -0.14727315306663513, 0.3358568549156189, 0.21554265916347504, -0.05121815204620361, 0.199741929769516, -0.2628275156021118, -0.187048077583313, 0.0019921250641345978, -0.030753113329410553, -0.16916534304618835, -0.055350951850414276, 0.3815113306045532, -0.005680113099515438, 0.4061160385608673, -0.1410944163799286, 0.05566821247339249, 0.1124873012304306, 0.16584070026874542, 0.21607211232185364, -0.15393927693367004, -0.40257638692855835, -0.3473491668701172, -0.39319393038749695, 0.3725877106189728, -0.23258885741233826, 0.16857440769672394, 0.06813718378543854, -0.23746420443058014, -0.0817599818110466, 0.0034098103642463684, 0.1784849762916565, 0.2687881588935852, -0.06936071813106537, 0.5016825199127197, -0.32066357135772705, -0.04342152550816536, -0.07294096052646637, -0.13395193219184875, 0.24010449647903442, -0.43758663535118103, 0.40433835983276367, -0.3041532635688782, -0.014326412230730057, -0.19157154858112335, 0.005374230444431305, -0.22793108224868774, -0.037226513028144836, 0.6843011975288391, 0.21503600478172302, 0.40693095326423645, -0.03293865919113159, 0.1105625256896019, -0.20533189177513123, 0.10991372913122177, -0.20951789617538452, 0.2924145460128784, 0.032070618122816086, 0.132619246840477, -0.1456782966852188, -0.12368728220462799, -0.07256726175546646, -0.11026695370674133, 0.26034992933273315, -0.055872827768325806, -0.27270734310150146, 0.11994173377752304, -0.2002013921737671, -0.03079904057085514, -0.1286313831806183, 0.32804566621780396, 0.15331372618675232, 0.289993554353714, 0.03234277665615082, -0.22776934504508972, 0.39988118410110474, -0.33580467104911804, -0.33625951409339905, -0.18469856679439545, 0.18101871013641357, -0.21165511012077332, -0.3600912392139435, -0.5163124203681946, -0.35795703530311584, 0.3601653277873993, 0.02673257514834404, -0.5006996393203735, -0.0882551521062851, -0.2791074514389038, -0.09968006610870361, -0.251852810382843, 0.4753125309944153, 0.15299946069717407, -0.13949282467365265, 0.6449902653694153, -0.3258782625198364 ]
https://github.com/huggingface/datasets/issues/2462
Merge DatasetDict and Dataset
Unless there is high demande I don't think we will end up implementing this. This is a lot of work with very few advantages
As discussed in #2424 and #2437 (please see there for detailed conversation): - It would be desirable to improve UX with respect the confusion between DatasetDict and Dataset. - The difference between Dataset and DatasetDict is an additional abstraction complexity that confuses "typical" end users. - A user expects a "Dataset" (whatever it contains multiple or a single split) and maybe it could be interesting to try to simplify the user-facing API as much as possible to hide this complexity from the end user. Here is a proposal for discussion and refined (and potential abandon if it's not good enough): - let's consider that a DatasetDict is also a Dataset with the various split concatenated one after the other - let's disallow the use of integers in split names (probably not a very big breaking change) - when you index with integers you access the examples progressively in split after the other is finished (in a deterministic order) - when you index with strings/split name you have the same behavior as now (full backward compat) - let's then also have all the methods of a Dataset on the DatasetDict The end goal would be to merge both Dataset and DatasetDict object in a single object that would be (pretty much totally) backward compatible with both. There are a few things that we could discuss if we want to merge Dataset and DatasetDict: 1. what happens if you index by a string ? Does it return the column or the split ? We could disallow conflicts between column names and split names to avoid ambiguities. It can be surprising to be able to get a column or a split using the same indexing feature ``` from datasets import load_dataset dataset = load_dataset(...) dataset["train"] dataset["input_ids"] ``` 2. what happens when you iterate over the object ? I guess it should iterate over the examples as a Dataset object, but a DatasetDict used to iterate over the splits as they are the dictionary keys. This is a breaking change that we can discuss. Moreover regarding your points: - integers are not allowed as split names already - it's definitely doable to have all the methods. Maybe some of them like train_test_split that is currently only available for Dataset can be tweaked to work for a split dataset cc: @thomwolf @lhoestq
24
Merge DatasetDict and Dataset As discussed in #2424 and #2437 (please see there for detailed conversation): - It would be desirable to improve UX with respect the confusion between DatasetDict and Dataset. - The difference between Dataset and DatasetDict is an additional abstraction complexity that confuses "typical" end users. - A user expects a "Dataset" (whatever it contains multiple or a single split) and maybe it could be interesting to try to simplify the user-facing API as much as possible to hide this complexity from the end user. Here is a proposal for discussion and refined (and potential abandon if it's not good enough): - let's consider that a DatasetDict is also a Dataset with the various split concatenated one after the other - let's disallow the use of integers in split names (probably not a very big breaking change) - when you index with integers you access the examples progressively in split after the other is finished (in a deterministic order) - when you index with strings/split name you have the same behavior as now (full backward compat) - let's then also have all the methods of a Dataset on the DatasetDict The end goal would be to merge both Dataset and DatasetDict object in a single object that would be (pretty much totally) backward compatible with both. There are a few things that we could discuss if we want to merge Dataset and DatasetDict: 1. what happens if you index by a string ? Does it return the column or the split ? We could disallow conflicts between column names and split names to avoid ambiguities. It can be surprising to be able to get a column or a split using the same indexing feature ``` from datasets import load_dataset dataset = load_dataset(...) dataset["train"] dataset["input_ids"] ``` 2. what happens when you iterate over the object ? I guess it should iterate over the examples as a Dataset object, but a DatasetDict used to iterate over the splits as they are the dictionary keys. This is a breaking change that we can discuss. Moreover regarding your points: - integers are not allowed as split names already - it's definitely doable to have all the methods. Maybe some of them like train_test_split that is currently only available for Dataset can be tweaked to work for a split dataset cc: @thomwolf @lhoestq Unless there is high demande I don't think we will end up implementing this. This is a lot of work with very few advantages
[ -0.2488575428724289, 0.2865616977214813, -0.15830017626285553, -0.08640149235725403, 0.1658450812101364, 0.13265997171401978, 0.292547345161438, 0.5712530612945557, 0.3036353886127472, 0.15918266773223877, -0.04712812602519989, 0.3749985098838806, -0.210419699549675, 0.5265567302703857, 0.09425348788499832, -0.2134987711906433, 0.19173365831375122, 0.012486711144447327, -0.1653098613023758, 0.2129739671945572, -0.2128128558397293, -0.03384751081466675, -0.14943581819534302, -0.005818076431751251, -0.11495912075042725, 0.002167603000998497, -0.27686867117881775, 0.07306798547506332, -0.28366175293922424, -0.2834363877773285, 0.16510890424251556, 0.3582260310649872, 0.03250754624605179, 0.5052651166915894, -0.00010631149052642286, 0.018492713570594788, 0.24034442007541656, 0.12366245687007904, -0.3340831995010376, -0.4432717561721802, -0.38537928462028503, -0.19128422439098358, 0.13929085433483124, -0.3149038553237915, 0.07665016502141953, -0.27153757214546204, -0.15661285817623138, -0.4005148410797119, 0.4014294743537903, 0.13227228820323944, 0.1618528664112091, -0.1447625607252121, 0.0626969188451767, -0.03227055072784424, 0.06696411967277527, 0.22914278507232666, -0.0033332426100969315, -0.14381448924541473, 0.12613390386104584, 0.1548992246389389, 0.21381179988384247, 0.21681395173072815, -0.02029910683631897, -0.24553607404232025, 0.036854952573776245, 0.04893762990832329, -0.22482165694236755, -0.22237282991409302, -0.22313594818115234, 0.10908351838588715, 0.4180297255516052, -0.3691553771495819, -0.42319977283477783, -0.28133341670036316, -0.02748413011431694, -0.5305545330047607, -0.078239805996418, -0.06166783720254898, 0.10734355449676514, 0.32661858201026917, -0.021961169317364693, -0.13517849147319794, -0.195004403591156, 0.09210647642612457, -0.11635251343250275, 0.29505258798599243, 0.15560035407543182, 0.09686814248561859, -0.032514315098524094, -0.11387552320957184, 0.45611780881881714, -0.13540443778038025, 0.20991019904613495, 0.02953050285577774, -0.15778087079524994, -0.3522334098815918, 0.03764134645462036, -0.37890416383743286, 0.22620466351509094, 0.22161442041397095, -0.029957015067338943, 0.2419849932193756, -0.1207675114274025, 0.1388879418373108, 0.29876306653022766, 0.092789426445961, 0.18356101214885712, 0.06795128434896469, 0.3093569278717041, 0.025544896721839905, -0.05318711698055267, 0.05548817664384842, -0.006775171495974064, -0.19745980203151703, -0.12252122163772583, 0.09956157952547073, 0.39819854497909546, -0.07491496205329895, -0.14504019916057587, -0.22815720736980438, -0.1271776556968689, -0.1829790472984314, 0.11901792883872986, 0.1492713987827301, -0.1034160926938057, 0.316669225692749, 0.05588432401418686, 0.09386378526687622, 0.045312754809856415, -0.3042934238910675, -0.10544651746749878, -0.004416231065988541, -0.1213611513376236, 0.10098496824502945, 0.20683352649211884, -0.06737247109413147, -0.14566680788993835, 0.30205726623535156, -0.019084535539150238, 0.037277400493621826, 0.14116227626800537, -0.1747094839811325, 0.4256739318370819, -0.02265627309679985, 0.12988802790641785, -0.2300034612417221, 0.10161994397640228, -0.11834061145782471, -0.2892035245895386, 0.0885772779583931, -0.28963229060173035, -0.46636930108070374, -0.05707685649394989, 0.24905329942703247, -0.04738827049732208, 0.09900454431772232, 0.003160931169986725, 0.518695056438446, -0.057465024292469025, 0.04438846930861473, -0.21146169304847717, -0.06890349090099335, -0.19274702668190002, -0.27821943163871765, 0.42986974120140076, -0.07107782363891602, -0.45972004532814026, -0.10366460680961609, -0.1690329909324646, 0.038365840911865234, -0.13666456937789917, 0.27754607796669006, -0.4073297083377838, 0.33656972646713257, -0.05926202982664108, 0.11695548892021179, 0.4665136933326721, -0.2263123095035553, -0.15217015147209167, 0.056387268006801605, 0.09425453841686249, 0.05682234466075897, -0.02131323516368866, 0.007570663001388311, 0.32766562700271606, -0.0466839037835598, 0.45899924635887146, 0.3446946144104004, -0.30702146887779236, -0.15106141567230225, -0.043818265199661255, -0.4369269013404846, 0.23079274594783783, 0.13374736905097961, 0.019504856318235397, -0.21701869368553162, 0.012678131461143494, -0.0503775030374527, 0.22356852889060974, -0.29339301586151123, -0.05332212895154953, -0.0755368247628212, 0.24095438420772552, 0.2661905288696289, 0.19865624606609344, -0.3371717035770416, -0.4336097836494446, -0.06505359709262848, 0.28592291474342346, 0.009241968393325806, -0.07272389531135559, -0.5102499127388, -0.1091386005282402, 0.08547478914260864, -0.00858474150300026, 0.2570748031139374, 0.18812985718250275, -0.37778371572494507, -0.0652802586555481, -0.15272392332553864, -0.4672236442565918, 0.2788465619087219, -0.2054281234741211, 0.20261496305465698, -0.3142315447330475, 0.25183266401290894, -0.0934593454003334, -0.06153193116188049, -0.08268105983734131, 0.5111251473426819, 0.027494505047798157, -0.1297525316476822, 0.19698897004127502, 0.4123210906982422, 0.29339849948883057, -0.2017897218465805, 0.04875795543193817, 0.2253640592098236, 0.23873309791088104, 0.11240868270397186, 0.06266821175813675, 0.06423439085483551, 0.02777118980884552, -0.07662554830312729, -0.27181345224380493, 0.4710821509361267, -0.21413235366344452, 0.31252679228782654, 0.24937178194522858, -0.07252658158540726, 0.03683968633413315, -0.07996919006109238, -0.33985498547554016, -0.18318267166614532, -0.16387812793254852, -0.4357256293296814, 0.1049003005027771, 0.08826478570699692, -0.2165881097316742, 0.23004880547523499, 0.33980321884155273, -0.06444582343101501, 0.030053962022066116, -0.004823207855224609, -0.08220010250806808, -0.17648372054100037, -0.15646089613437653, 0.30211275815963745, 0.34104856848716736, 0.3803151547908783, 0.08752049505710602, 0.055373866111040115, 0.09246628731489182, 0.0007575247436761856, 0.24994346499443054, 0.4293215274810791, -0.008554084226489067, 0.1058313250541687, 0.17502877116203308, 0.23566535115242004, 0.03881559520959854, -0.33914411067962646, -0.04573075473308563, -0.027776291593909264, -0.3561369776725769, 0.07149844616651535, -0.14685383439064026, -0.23072674870491028, -0.29497843980789185, -0.32998088002204895, -0.06921733915805817, -0.6024797558784485, 0.05656568333506584, 0.009031236171722412, -0.3425752520561218, 0.10408652573823929, 0.020873606204986572, 0.34626659750938416, -0.2998613119125366, 0.055140458047389984, 0.10605095326900482, -0.13984772562980652, 0.09077845513820648, 0.15379145741462708, 0.3106991648674011, 0.2106560468673706, 0.6137558221817017, 0.08955909311771393, -0.12493206560611725, 0.015458496287465096, -0.6535696983337402, 0.0900254026055336, -0.13478823006153107, 0.13078969717025757, 0.36134961247444153, -0.23171205818653107, 0.14673423767089844, -0.4981386959552765, -0.11934276670217514, 0.02192189358174801, -0.07087799161672592, -0.31709226965904236, 0.16688606142997742, 0.06066667288541794, -0.21340630948543549, -0.528031051158905, -0.4193064272403717, -0.42268526554107666, 0.2899070978164673, -0.17700162529945374, 0.18565230071544647, -0.10970300436019897, -0.12761132419109344, 0.130731463432312, 0.3446011245250702, 0.08491241931915283, -0.09444761276245117, 0.05010874941945076, 0.020269252359867096, -0.23585842549800873, -0.12870681285858154, -0.029285859316587448, -0.11772207915782928, 0.11369100213050842, 0.09443645179271698, -0.041314929723739624, 0.11731066554784775, -0.175691157579422, 0.33687257766723633, 0.13815510272979736, 0.052030421793460846, 0.32736045122146606, 0.3993275761604309, -0.13311336934566498, -0.05564768612384796, -0.12308816611766815, -0.06893999129533768, -0.09166637063026428, -0.141657292842865, 0.22403058409690857, 0.2884161174297333, 0.03333616629242897, 0.8066476583480835, 0.18446464836597443, 0.004008818417787552, 0.031074024736881256, 0.17552761733531952, 0.09413090348243713, -0.25731512904167175, -0.3355790078639984, -0.2361929565668106, -0.27865907549858093, -0.1877746880054474, 0.14110735058784485, 0.17978569865226746, 0.11355208605527878, -0.14748480916023254, -0.036329321563243866, -0.23548194766044617, -0.4774206578731537, 0.2878265976905823, -0.12705639004707336, 0.025058764964342117, -0.04258085787296295, -0.13148771226406097, -0.2099202573299408, 0.1952434778213501, 0.08510249853134155, 0.14818140864372253, 0.033723026514053345, -0.15722942352294922, -0.4009932577610016, -0.2074079066514969, -0.4466875195503235, 0.2342057228088379, 0.21114382147789001, 0.04974668473005295, 0.17750973999500275, -0.3664649426937103, -0.07602334022521973, -0.05919453129172325, 0.5152672529220581, -0.19757650792598724, -0.5099653601646423, 0.05986906960606575, -0.1102663204073906, -0.0744958445429802, 0.15617762506008148, -0.08728645741939545, 0.23558901250362396, 0.2499455362558365, 0.3597455620765686, -0.32611554861068726, -0.3024384379386902, 0.36288756132125854, 0.2914455235004425, -0.009823895990848541, -0.1444593220949173, 0.07633629441261292, -0.049864158034324646, -0.29266148805618286, -0.29709047079086304, 0.13733531534671783, 0.08829382061958313, -0.3977501392364502, -0.16411417722702026, -0.3316015303134918, -0.15331074595451355, 0.3783740997314453, 0.0464983768761158, 0.2952233850955963, -0.22582806646823883, 0.21820171177387238, 0.092969611287117, 0.2469523847103119, 0.27594193816185, 0.4079289138317108, -0.22532090544700623, -0.35152915120124817, -0.14733558893203735, -0.16085243225097656, 0.4176541268825531, 0.23881393671035767, 0.07326111197471619, 0.16718044877052307, -0.06692373752593994, -0.08661916851997375, -0.24144506454467773, 0.036410000175237656, 0.08281050622463226, 0.21414947509765625, -0.6076757907867432, -0.6710017919540405, 0.2967972457408905, 0.3538145124912262, -0.362981915473938, 0.5521374940872192, 0.10027594864368439, -0.4039517641067505, 0.6101619005203247, -0.020809806883335114, 0.9097275137901306, 0.15833532810211182, 0.27298909425735474, 0.061334677040576935, -0.22379496693611145, 0.5816217064857483, -0.041103795170784, 0.10898123681545258, -0.2542419135570526, -0.19491343200206757, -0.04501506686210632, -0.005451120436191559, 0.06880270689725876, -0.049633994698524475, -0.5203741192817688, 0.26831725239753723, -0.16414542496204376, -0.08463384211063385, -0.20116083323955536, 0.4475950598716736, -0.0077884383499622345, -0.2549818456172943, -0.2614680826663971, 0.13570232689380646, 0.01056969165802002, -0.3465791940689087, -0.009105009026825428, -0.09257308393716812, -0.1744832843542099, -0.030639709904789925, -0.03476814553141594, -0.08957858383655548, 0.06164070591330528, 0.4217357635498047, -0.29194727540016174, -0.15784397721290588, 0.28883010149002075, 0.05826057121157646, 0.5240311026573181, -0.009442660957574844, -0.0364639088511467, 0.057777125388383865, -0.0006683021783828735, 0.13020993769168854, 0.1415628045797348, -0.29358169436454773, 0.550933837890625, 0.10132933408021927, -0.09006719291210175, 0.07826035469770432, 0.15198566019535065, -0.24394570291042328, -0.3179149627685547, 0.10899749398231506, 0.44370192289352417, -0.6293697357177734, -0.1658364236354828, 0.3145582675933838, 0.04440115764737129, -0.29432016611099243, 0.18315890431404114, -0.07528582215309143, -0.07055351883172989, 0.2262265682220459, -0.049499135464429855, -0.1536005437374115, 0.03091839700937271, 0.012416869401931763, 0.3037135601043701, -0.07306743413209915, 0.3395606577396393, 0.23908631503582, -0.14349764585494995, -0.22062194347381592, -0.01824811100959778, 0.46132996678352356, -0.23734450340270996, 0.15717607736587524, -0.14752884209156036, -0.015957437455654144, 0.12865813076496124, 0.11854953318834305, 0.09163707494735718, 0.17338106036186218, -0.26548540592193604, 0.06611314415931702, -0.29534947872161865, 0.3936712145805359, 0.2803956866264343, 0.4573831558227539, 0.06759126484394073, 0.06672638654708862, -0.2731472849845886, 0.04630620777606964, -0.3829546570777893, -0.06380505859851837, 0.09080927819013596, 0.1545926034450531, -0.012609627097845078, -0.04210921376943588, -0.10606884956359863, -0.30045872926712036, 0.12712645530700684, -0.2385319322347641, 0.018709570169448853, -0.29410165548324585, -0.13150449097156525, 0.10679954290390015, 0.0209333598613739, 0.08145184069871902, -0.05826599895954132, -0.06133699417114258, -0.2008330374956131, -0.25006943941116333, 0.13045476377010345, 0.10103758424520493, 0.042204346507787704, 0.27097010612487793, 0.3323439657688141, 0.2969140410423279, 0.0770658627152443, 0.294979065656662, 0.13523027300834656, 0.3035581111907959, 0.06791763007640839, 0.3120231032371521, -0.3629404902458191, -0.04585041105747223, 0.018898913636803627, 0.1648775041103363, 0.1738230288028717, 0.086436927318573, 0.07138192653656006, -0.1732209473848343, -0.17791397869586945, 0.09218241274356842, 0.40273579955101013, 0.4417871832847595, -0.17362140119075775, 0.13502688705921173, 0.14895999431610107, 0.27595198154449463, -0.17485164105892181, 0.042795438319444656, 0.07120746374130249, -0.06847021728754044, 0.05294879153370857, 0.23315644264221191, 0.029045898467302322, 0.28594669699668884, -0.2344547063112259, 0.17017468810081482, 0.22421197593212128, -0.05996439605951309, 0.5520371198654175, 0.3134668171405792, 0.029422808438539505, -0.1072758138179779, -0.13741272687911987, 0.007038723677396774, 0.20297083258628845, 0.288503497838974, -0.2837708592414856, 0.41784653067588806, 0.35322919487953186, 0.01128356158733368, 0.42996710538864136, 0.16162993013858795, 0.15786579251289368, 0.1731998324394226, -0.06889155507087708, 0.08435006439685822, 0.3210403323173523, 0.35432809591293335, -0.1441137194633484, -0.4330444931983948, 0.11330126971006393, 0.13605356216430664, 0.04050324484705925, -0.04502301290631294, -0.14182844758033752, 0.04709521681070328, -0.10603328049182892, -0.1725095510482788, -0.06294721364974976, -0.12978582084178925, 0.2624632716178894, 0.11152468621730804, 0.13101966679096222, -0.3900430500507355, 0.16533014178276062, 0.0757172554731369, 0.42001447081565857, -0.18368174135684967, -0.2366442233324051, 0.2608688473701477, -0.04311995208263397, 0.1304643452167511, 0.09579354524612427, 0.3407958149909973, 0.24988335371017456, -0.22531095147132874, 0.023993711918592453, 0.04467788338661194, -0.15619251132011414, -0.04317370802164078, -0.21976007521152496, -0.020070932805538177, 0.11896747350692749, 0.3456505835056305, 0.26187509298324585, -0.10018033534288406, -0.23758621513843536, 0.12755906581878662, 0.24135632812976837, -0.33193472027778625, 0.5445011258125305, 0.3280532658100128, -0.24693408608436584, 0.23070240020751953, -0.010101385414600372, -0.32738760113716125, -0.31724435091018677, 0.33477169275283813, -0.049076445400714874, 0.07420643419027328, -0.036202266812324524, 0.12895441055297852, 0.03809213638305664, 0.1381034255027771, 0.20873473584651947, 0.2612878978252411, -0.13516035676002502, -0.04520308971405029, -0.37763407826423645, -0.3723454177379608, -0.09162059426307678, -0.05019156634807587, 0.17463456094264984, 0.15961386263370514, 0.0019864216446876526, 0.11919538676738739, -0.055072396993637085, -0.09596996009349823, 0.06986250728368759, -0.09683790802955627, -0.3538249433040619, -0.05708720162510872, 0.022726498544216156, -0.1217150092124939, 0.0881955623626709, -0.20339420437812805, 0.030547434464097023, 0.000016996636986732483, -0.040037743747234344, -0.13915741443634033, 0.13436003029346466, 0.4379579722881317, 0.055207330733537674, 0.21783754229545593, 0.12568026781082153, 0.22455498576164246, -0.13349178433418274, 0.020969485864043236, -0.025854196399450302, -0.11859123408794403, -0.5474950075149536, 0.5529869198799133, 0.052689436823129654, 0.023864150047302246, -0.30141448974609375, -0.22663839161396027, 0.058259930461645126, 0.14342229068279266, 0.03404494374990463, -0.14904393255710602, -0.37267881631851196, 0.042859919369220734, 0.11944498866796494, 0.12364768236875534, -0.1512186974287033, 0.45820996165275574, -0.09772215783596039, 0.1342340111732483, -0.03826496750116348, -0.2747536897659302, 0.2563870847225189, -0.08185955137014389, -0.25028523802757263, -0.2100881040096283, 0.04837607592344284, 0.36126938462257385, 0.10201111435890198, -0.6625667214393616, -0.3288571834564209, 0.22217845916748047, -0.10293535143136978, -0.12373027205467224, 0.5318606495857239, 0.21738258004188538, -0.04301426187157631, -0.22596992552280426, 0.09037040919065475, 0.07846654951572418, -0.2676386833190918, 0.1052708625793457, -0.28520500659942627 ]
https://github.com/huggingface/datasets/issues/2450
BLUE file not found
Hi ! The `blue` metric doesn't exist, but the `bleu` metric does. You can get the full list of metrics [here](https://github.com/huggingface/datasets/tree/master/metrics) or by running ```python from datasets import list_metrics print(list_metrics()) ```
Hi, I'm having the following issue when I try to load the `blue` metric. ```shell import datasets metric = datasets.load_metric('blue') Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 320, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-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/1.7.0/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 332, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-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/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<input>", line 1, in <module> File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 605, in load_metric dataset=False, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 343, in prepare_module combined_path, github_file_path FileNotFoundError: Couldn't find file locally at blue/blue.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.7.0/metrics/blue/blue.py. The file is also not present on the master branch on github. ``` Here is dataset installed version info ```shell pip freeze | grep datasets datasets==1.7.0 ```
31
BLUE file not found Hi, I'm having the following issue when I try to load the `blue` metric. ```shell import datasets metric = datasets.load_metric('blue') Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 320, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-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/1.7.0/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 332, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-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/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<input>", line 1, in <module> File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 605, in load_metric dataset=False, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 343, in prepare_module combined_path, github_file_path FileNotFoundError: Couldn't find file locally at blue/blue.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.7.0/metrics/blue/blue.py. The file is also not present on the master branch on github. ``` Here is dataset installed version info ```shell pip freeze | grep datasets datasets==1.7.0 ``` Hi ! The `blue` metric doesn't exist, but the `bleu` metric does. You can get the full list of metrics [here](https://github.com/huggingface/datasets/tree/master/metrics) or by running ```python from datasets import list_metrics print(list_metrics()) ```
[ -0.20386230945587158, -0.28628575801849365, -0.06850096583366394, 0.4027130603790283, 0.3037271499633789, 0.06551120430231094, 0.21024446189403534, 0.3386651575565338, 0.08859772980213165, 0.18913935124874115, -0.22809019684791565, -0.1502072662115097, 0.08000031113624573, -0.3868103325366974, 0.20862679183483124, -0.08383508026599884, -0.09768571704626083, 0.2933505177497864, 0.1404934823513031, -0.011933434754610062, -0.2906019687652588, 0.2794250249862671, -0.07932893931865692, 0.14019256830215454, -0.24834756553173065, 0.2007487416267395, 0.05582072585821152, 0.45762571692466736, -0.06615877151489258, -0.4756872355937958, 0.26282015442848206, 0.061307139694690704, 0.08449403196573257, 0.6237054467201233, -0.00011814786557806656, 0.13531871140003204, 0.4002447724342346, -0.026030635461211205, -0.175504669547081, -0.7946476936340332, -0.2668890357017517, -0.3052862584590912, -0.12067940086126328, -0.13633814454078674, -0.03307078406214714, -0.09621067345142365, 0.06317294389009476, -0.1688697636127472, 0.08809690177440643, 0.26953113079071045, 0.1627938151359558, 0.3915829658508301, 0.006883107125759125, -0.08062722533941269, 0.17665155231952667, -0.11437690258026123, 0.11083217710256577, 0.5380028486251831, 0.13249412178993225, 0.03391005098819733, 0.19657623767852783, 0.2750689685344696, 0.0797882080078125, 0.09859925508499146, 0.3210594952106476, -0.013312340714037418, 0.5190859436988831, 0.09361381828784943, -0.01569141075015068, 0.26796436309814453, 0.27825430035591125, -0.006516110152006149, -0.5074592232704163, 0.058742955327034, -0.23881754279136658, -0.43786168098449707, 0.3182871341705322, -0.0005306778475642204, 0.0924747884273529, 0.04046440124511719, -0.30453792214393616, -0.375883013010025, -0.2266744077205658, 0.008756652474403381, -0.3165692090988159, 0.2712298035621643, -0.12965744733810425, -0.03933851420879364, 0.13115429878234863, 0.03577962890267372, -0.14904819428920746, -0.024120040237903595, -0.20869112014770508, 0.1841866672039032, -0.2370866984128952, 0.1590324193239212, -0.05660248547792435, -0.12406707555055618, 0.169156014919281, 0.13269701600074768, 0.2836335003376007, -0.06715293228626251, -0.11540626734495163, 0.2826261818408966, 0.17405153810977936, 0.2684215307235718, 0.016282878816127777, 0.14224174618721008, 0.362393856048584, 0.40904369950294495, -0.20268850028514862, -0.21729150414466858, -0.0469188466668129, -0.5095570087432861, 0.27179229259490967, 0.1654089391231537, 0.23335035145282745, -0.36690157651901245, -0.5468932390213013, -0.17521554231643677, 0.20148500800132751, -0.13843941688537598, 0.24282322824001312, 0.389091819524765, -0.15422949194908142, 0.13559579849243164, -0.02411927469074726, 0.2843506336212158, -0.37260082364082336, -0.04797320067882538, -0.24617862701416016, 0.2700366675853729, -0.2791171967983246, 0.18529924750328064, 0.13473866879940033, -0.1474323570728302, 0.4780178666114807, -0.24406801164150238, 0.1274051070213318, -0.2823774814605713, 0.13585664331912994, -0.13075508177280426, -0.06326901167631149, 0.3866441547870636, -0.06634125858545303, 0.023597458377480507, 0.07565164566040039, -0.15336662530899048, -0.11509343236684799, 0.19220545887947083, -0.3756904900074005, -0.36892086267471313, 0.006316035985946655, 0.17950621247291565, -0.6024383306503296, -0.01351257786154747, -0.17065107822418213, 0.004513341933488846, 0.08976045995950699, -0.5304586291313171, -0.1209515854716301, -0.05367138981819153, -0.35206422209739685, -0.18835878372192383, 0.28999701142311096, 0.5583950877189636, -0.2963096797466278, -0.3161922097206116, -0.22414997220039368, -0.07183533906936646, 0.011851616203784943, 0.1162729263305664, -0.19576171040534973, 0.24859297275543213, -0.5058683753013611, -0.22169741988182068, 0.6039158701896667, -0.929304838180542, -0.39943528175354004, 0.035459164530038834, -0.3145424723625183, 0.10011301189661026, 0.15496602654457092, -0.04678282141685486, 0.11582684516906738, -0.23216472566127777, 0.3024938702583313, 0.05251970887184143, 0.07492844760417938, -0.1573144793510437, -0.21482740342617035, -0.19922497868537903, 0.1408916413784027, 0.18598845601081848, 0.3698253929615021, -0.06913378089666367, 0.29879531264305115, -0.11590853333473206, -0.0255061537027359, 0.02428118884563446, -0.09792281687259674, 0.38071638345718384, 0.0568261444568634, 0.004855498671531677, 0.08503391593694687, -0.43431660532951355, 0.09629644453525543, 0.2571777403354645, -0.1961856186389923, -0.23993530869483948, -0.018684715032577515, 0.11084845662117004, -0.47680172324180603, -0.30331748723983765, -0.3182031512260437, -0.09447112679481506, 0.030812717974185944, 0.06201302632689476, 0.014846324920654297, 0.07499761879444122, -0.17083336412906647, 0.31706947088241577, -0.007422506809234619, 0.07927539199590683, -0.06200838461518288, 0.20121577382087708, 0.012167869135737419, -0.026517707854509354, -0.03337821736931801, 0.2669575810432434, 0.365077406167984, -0.16622795164585114, -0.19538819789886475, 0.4600690007209778, 0.09969790279865265, 0.32135632634162903, 0.29703861474990845, 0.0997050479054451, 0.33416518568992615, -0.21529079973697662, 0.07844086736440659, -0.029769815504550934, 0.11452186852693558, -0.03748282045125961, 0.09939407557249069, 0.3468850255012512, 0.08314619958400726, 0.13898730278015137, 0.18914812803268433, -0.2690497934818268, 0.2665729224681854, -0.1116633415222168, 0.04689791053533554, -0.1202341690659523, 0.40826329588890076, -0.09457796812057495, 0.08442613482475281, -0.03534695506095886, 0.04255618900060654, -0.11088637262582779, 0.25586220622062683, -0.10557779669761658, 0.015631817281246185, 0.0747179388999939, -0.19704371690750122, -0.09896595031023026, -0.2834334671497345, 0.28936538100242615, 0.7424989342689514, 0.20361670851707458, 0.04988565668463707, -0.0030593611299991608, 0.060002755373716354, -0.13520491123199463, 0.18277302384376526, 0.13641510903835297, 0.05581478029489517, 0.45327630639076233, 0.12846748530864716, -0.11208613961935043, -0.16044557094573975, -0.2615601718425751, 0.03807232528924942, -0.07983795553445816, -0.3087829053401947, 0.22652201354503632, -0.18209917843341827, 0.18140992522239685, -0.09773213416337967, -0.09753592312335968, -0.0847240537405014, -0.2716193199157715, 0.013992652297019958, 0.18672426044940948, 0.3018181622028351, 0.02678721584379673, -0.10490086674690247, 0.11724838614463806, -0.00928669422864914, -0.26149415969848633, -0.07971613109111786, -0.22664499282836914, -0.13808992505073547, -0.06516645848751068, -0.016585946083068848, -0.01859278231859207, 0.3383125960826874, -0.4342367351055145, 0.20172634720802307, -0.2717137038707733, -0.3112034201622009, -0.032779693603515625, 0.2021765261888504, 0.5519153475761414, 0.07795386016368866, 0.05498920753598213, 0.08392095565795898, 0.20930926501750946, 0.424053430557251, -0.2478799968957901, -0.11664577573537827, 0.1270679384469986, -0.11344228684902191, 0.09350354969501495, -0.03988824412226677, -0.4275737702846527, -0.32910802960395813, -0.40540048480033875, -0.12228232622146606, -0.10583007335662842, 0.03058033064007759, 0.517866849899292, 0.06769998371601105, 0.1980973780155182, 0.15952801704406738, 0.15133707225322723, -0.1719415783882141, -0.5531233549118042, 0.483040988445282, -0.34446170926094055, -0.21059516072273254, 0.3475137948989868, 0.10935105383396149, 0.4056747555732727, 0.047030188143253326, -0.3599720001220703, -0.34144359827041626, 0.1025693342089653, 0.022994045168161392, -0.12403419613838196, 0.10322027653455734, 0.06841133534908295, -0.13852623105049133, -0.07988433539867401, -0.1686670184135437, -0.19954615831375122, 0.06327454000711441, 0.06499895453453064, 0.6346908211708069, -0.17629879713058472, 0.1323319673538208, -0.1719236820936203, 0.617142379283905, 0.0703134536743164, 0.02021670900285244, 0.3262609839439392, 0.19427938759326935, 0.4952045977115631, -0.012560844421386719, -0.21302655339241028, 0.043326959013938904, 0.24607038497924805, -0.017660366371273994, 0.08087437599897385, 0.3187311291694641, 0.06356136500835419, -0.24101589620113373, -0.3034929931163788, -0.2976820170879364, -0.04306592792272568, -0.20336419343948364, -0.17103885114192963, 0.24341216683387756, 0.14585863053798676, -0.08208069950342178, -0.3605436086654663, -0.0717066302895546, 0.16134166717529297, 0.8195821642875671, 0.14233775436878204, 0.11081664264202118, 0.029033582657575607, -0.2295907884836197, -0.015448741614818573, 0.2639460563659668, 0.37175294756889343, 0.2841867208480835, -0.23739038407802582, 0.28653448820114136, 0.056456055492162704, -0.07767245173454285, 0.592678427696228, -0.28800955414772034, 0.1730368584394455, 0.18347634375095367, -0.09341849386692047, -0.08870203793048859, -0.11450862884521484, 0.21750327944755554, 0.2971908450126648, 0.11775512993335724, 0.5743361711502075, -0.1608583778142929, -0.1962335854768753, 0.0543237142264843, 0.34009912610054016, -0.34546148777008057, -0.2840364873409271, -0.4877050220966339, -0.523684024810791, -0.004220690578222275, -0.37217721343040466, -0.07870277762413025, 0.29045745730400085, 0.015256508253514767, -0.11968667805194855, -0.0763869658112526, 0.014491032809019089, 0.14429868757724762, 0.010987384244799614, 0.4414970874786377, -0.34869781136512756, 0.09011036157608032, 0.6808421611785889, -0.31703802943229675, 0.2050168514251709, 0.312632292509079, 0.08659583330154419, -0.48040008544921875, 0.10928788781166077, 0.10433951020240784, 0.12079404294490814, 0.3142735958099365, -0.08968687057495117, -0.22369614243507385, 0.0016913674771785736, -0.01646527647972107, 0.0017650434747338295, 0.11623740941286087, 0.1674048900604248, 0.3277079164981842, -0.32917165756225586, -0.5208200812339783, 0.09036651253700256, 0.22082893550395966, 0.033224038779735565, 0.4332658648490906, 0.014651544392108917, -0.27603086829185486, 0.03045129030942917, -0.13768064975738525, 0.9293700456619263, -0.18821735680103302, 0.019713718444108963, 0.17260417342185974, -0.38399046659469604, 0.058399997651576996, -0.2677534818649292, 0.2663506269454956, -0.19038456678390503, -0.3532458543777466, -0.03400507941842079, -0.3336505591869354, 0.24305522441864014, -0.06068123131990433, 0.011192727833986282, 0.5956477522850037, -0.08135457336902618, 0.0939350426197052, 0.05194232612848282, 0.09046167135238647, -0.14237095415592194, 0.05772390589118004, 0.03296371549367905, 0.10518921911716461, -0.2272540181875229, 0.2990383505821228, -0.19362181425094604, -0.23088864982128143, -0.13081173598766327, -0.06555652618408203, -0.08909870684146881, -0.0723472535610199, -0.07467766106128693, 0.3519773483276367, -0.009472005069255829, -0.285693883895874, 0.03226228430867195, 0.27865898609161377, 0.21322739124298096, -0.14110594987869263, -0.2179095596075058, 0.48787662386894226, -0.38859236240386963, -0.0016283782897517085, -0.023485422134399414, 0.0653720572590828, 0.0743613913655281, -0.01140054501593113, -0.4216509759426117, 0.19944879412651062, -0.1593196839094162, -0.18825694918632507, 0.04123948514461517, 0.07506401091814041, -0.11037662625312805, 0.09093008190393448, 0.014743322506546974, -0.19740891456604004, -0.022082727402448654, -0.16858263313770294, 0.10556739568710327, 0.19607974588871002, -0.2721882462501526, -0.1259487271308899, 0.10737016052007675, -0.3957342505455017, 0.02946624904870987, 0.4185596704483032, -0.07178977876901627, -0.2697698771953583, 0.28886711597442627, -0.2526535391807556, -0.18641147017478943, -0.15333756804466248, 0.06394193321466446, -0.41451314091682434, -0.15542402863502502, 0.2565380036830902, -0.006288914941251278, 0.2278643697500229, 0.12130856513977051, 0.22092020511627197, 0.2727257013320923, -0.44247138500213623, -0.0002790577709674835, -0.6986165642738342, -0.15930920839309692, 0.1652504801750183, -0.31366172432899475, 0.06748736649751663, -0.05747135728597641, -0.11493304371833801, -0.1241895779967308, -0.005432097241282463, -0.2733653783798218, 0.13236971199512482, -0.2543608248233795, -0.033106110990047455, -0.04856445640325546, -0.11973869055509567, 0.31253138184547424, -0.07951590418815613, 0.04122705012559891, -0.11261829733848572, -0.28047171235084534, -0.16524642705917358, -0.14272458851337433, 0.18839257955551147, -0.19192951917648315, -0.016200492158532143, 0.008710053749382496, -0.025624265894293785, 0.2526683509349823, 0.027589578181505203, 0.010217171162366867, 0.15086910128593445, 0.05499739944934845, -0.09086188673973083, -0.25866734981536865, 0.09715782105922699, 0.08898909389972687, 0.26019150018692017, 0.11086151748895645, 0.5788547396659851, 0.06358359009027481, -0.05769043415784836, -0.09157667309045792, 0.032540567219257355, -0.07203834503889084, -0.13964614272117615, 0.1044914498925209, 0.03049214370548725, 0.30993980169296265, -0.35266268253326416, 0.11166493594646454, 0.13820864260196686, 0.21256668865680695, 0.1743495762348175, -0.20873214304447174, 0.28193092346191406, -0.03556755185127258, 0.1611005663871765, -0.07845350354909897, -0.13478222489356995, 0.2081986665725708, -0.008705652318894863, 0.030010778456926346, 0.2454165518283844, 0.23988860845565796, -0.06868485361337662, 0.1356218010187149, 0.18054544925689697, 0.7161699533462524, -0.16568394005298615, 0.16468274593353271, 0.021139826625585556, 0.09979884326457977, 0.09091890603303909, 0.5014138221740723, 0.34044453501701355, 0.1566222906112671, 0.47476279735565186, -0.09747659415006638, 0.21649204194545746, -0.02982877939939499, 0.36042308807373047, -0.45851293206214905, -0.40436163544654846, -0.19773496687412262, -0.08092349767684937, -0.09769332408905029, -0.1050591841340065, -0.15716485679149628, 0.4915156066417694, -0.4113047122955322, 0.14842043817043304, 0.010811826214194298, -0.009137004613876343, -0.09679295867681503, 0.05855624005198479, 0.11243675649166107, -0.22585511207580566, -0.1174158900976181, -0.06319181621074677, 0.30379438400268555, 0.07005666196346283, -0.0320826917886734, 0.06841542571783066, -0.03019847720861435, -0.21106739342212677, 0.13467511534690857, 0.3773546516895294, 0.09899675101041794, -0.230566143989563, 0.2642076015472412, 0.3478001356124878, 0.11718589067459106, 0.32136067748069763, 0.2767159640789032, 0.3790936768054962, 0.3753463625907898, -0.15458562970161438, 0.0001059146597981453, -0.018359016627073288, -0.18060302734375, 0.04106881096959114, 0.25786611437797546, 0.00837937742471695, -0.1360829919576645, 0.04830117151141167, 0.20088708400726318, -0.11682940274477005, 0.5617833733558655, 0.05702947825193405, -0.0070073772221803665, -0.27161234617233276, 0.458309143781662, -0.33330613374710083, 0.0492209792137146, -0.31297212839126587, -0.2718116343021393, -0.552604079246521, -0.026705842465162277, 0.2775917053222656, 0.11550381779670715, 0.12282172590494156, 0.08374045044183731, 0.04878158122301102, -0.007032832130789757, -0.0819084495306015, 0.45083147287368774, 0.0906258076429367, -0.5584520101547241, 0.025281302630901337, -0.6570865511894226, 0.11530284583568573, 0.10051922500133514, 0.1148272305727005, 0.04990040883421898, 0.08326881378889084, -0.46902939677238464, -0.07760525494813919, 0.5111389756202698, 0.2343604862689972, 0.5092459321022034, 0.09479258954524994, -0.379203736782074, -0.25153520703315735, 0.135381817817688, -0.011165956035256386, -0.1206040233373642, -0.327991247177124, -0.10267122089862823, -0.18781420588493347, 0.02133716642856598, -0.16140639781951904, -0.044039953500032425, 0.09439246356487274, 0.11642136424779892, 0.3828520178794861, -0.12363964319229126, 0.6549372673034668, -0.011011861264705658, 0.03502265363931656, -0.16222697496414185, -0.22878628969192505, 0.08515536785125732, -0.1250770390033722, -0.034303102642297745, 0.26235267519950867, -0.2591589689254761, -0.07011336088180542, -0.2872568368911743, 0.43545255064964294, -0.06141481548547745, -0.4957469403743744, -0.1876620501279831, -0.05074503272771835, -0.2257562279701233, -0.008248579688370228, 0.12453728914260864, 0.26749470829963684, -0.08363616466522217, 0.14694443345069885, -0.16055911779403687, -0.0961768701672554, 0.6528550386428833, -0.1847652792930603, -0.27925121784210205, 0.1726895421743393, 0.3615815341472626, 0.35179999470710754, 0.0711645856499672, -0.3607064187526703, 0.1369381546974182, 0.36500564217567444, 0.20709046721458435, -0.20161567628383636, 0.22849296033382416, 0.012900401838123798, -0.009761001914739609, 0.10811404883861542, -0.3145315647125244, 0.0765542984008789, 0.015070164576172829, -0.007906761020421982, -0.012949241325259209 ]
https://github.com/huggingface/datasets/issues/2447
dataset adversarial_qa has no answers in the "test" set
Hi ! I'm pretty sure that the answers are not made available for the test set on purpose because it is part of the DynaBench benchmark, for which you can submit your predictions on the website. In any case we should mention this in the dataset card of this dataset.
## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0
50
dataset adversarial_qa has no answers in the "test" set ## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0 Hi ! I'm pretty sure that the answers are not made available for the test set on purpose because it is part of the DynaBench benchmark, for which you can submit your predictions on the website. In any case we should mention this in the dataset card of this dataset.
[ -0.10978108644485474, 0.17811381816864014, -0.13903814554214478, 0.3103134036064148, 0.1634770929813385, -0.08224913477897644, 0.30948469042778015, 0.44992586970329285, -0.05196283757686615, 0.11818771064281464, 0.16112400591373444, 0.3690260350704193, -0.1847231388092041, -0.24796739220619202, 0.08575690537691116, 0.10906042158603668, -0.11853338032960892, 0.08756905794143677, -0.07204501330852509, -0.30292075872421265, -0.16614681482315063, 0.0697544738650322, -0.17387937009334564, -0.13992130756378174, -0.2601904273033142, 0.18746642768383026, -0.14256656169891357, 0.07132826745510101, 0.03794008865952492, -0.5859718918800354, 0.28416338562965393, -0.1142050176858902, 0.019933242350816727, 0.3333708345890045, -0.00011121213901787996, -0.019680742174386978, 0.20171773433685303, -0.0623740553855896, -0.40615853667259216, -0.12888969480991364, -0.513702392578125, -0.2587311565876007, 0.15622028708457947, -0.24372169375419617, -0.23430898785591125, -0.2186059057712555, -0.12169994413852692, -0.2548483610153198, 0.2813833951950073, 0.5967982411384583, 0.25033971667289734, 0.16455760598182678, -0.21277658641338348, -0.1812819391489029, 0.032563239336013794, -0.19477222859859467, -0.13608120381832123, 0.33405813574790955, 0.06695783138275146, -0.2101399004459381, 0.23444253206253052, 0.16329774260520935, 0.08183985948562622, -0.02168136090040207, -0.054768748581409454, -0.05772477388381958, 0.2928401827812195, -0.25347375869750977, 0.07991601526737213, 0.26779529452323914, 0.3713647723197937, -0.1823158860206604, -0.25029125809669495, -0.36105287075042725, 0.20175281167030334, -0.09945818036794662, 0.2094527781009674, 0.20931091904640198, -0.25330859422683716, 0.0622793510556221, -0.027208490297198296, 0.22658714652061462, -0.06233569234609604, -0.030975602567195892, -0.2526054382324219, 0.4209858477115631, 0.07187306135892868, -0.10543849319219589, -0.05728825554251671, 0.15569795668125153, 0.08894748985767365, -0.31126701831817627, -0.09311053156852722, 0.140128493309021, -0.43708229064941406, -0.08142855018377304, -0.0774306133389473, -0.0911610946059227, 0.2894624173641205, 0.19920684397220612, 0.35636207461357117, -0.15858793258666992, 0.139470636844635, -0.15875336527824402, 0.14829570055007935, 0.45544886589050293, 0.20182502269744873, 0.2326286882162094, 0.0324283167719841, 0.11870741844177246, -0.040506016463041306, 0.11368376016616821, -0.2118980586528778, -0.22871899604797363, 0.13019034266471863, 0.20998907089233398, 0.3855895400047302, -0.23297995328903198, -0.32873934507369995, 0.34387147426605225, -0.3541024625301361, -0.11510921269655228, -0.06458473950624466, 0.33888134360313416, -0.30864354968070984, 0.16804850101470947, -0.15073972940444946, 0.2771683931350708, -0.2411508411169052, -0.2918153703212738, -0.2530304193496704, -0.1557370275259018, -0.3436107039451599, -0.189678356051445, 0.33857202529907227, 0.24747838079929352, 0.20085862278938293, 0.0807730033993721, 0.1476811170578003, -0.024535179138183594, 0.21170617640018463, -0.3234576880931854, 0.13556604087352753, 0.3594358563423157, -0.103156179189682, 0.14196230471134186, 0.15584638714790344, -0.48543208837509155, 0.07887648791074753, 0.5665239691734314, 0.18988995254039764, -0.13121864199638367, 0.0712205246090889, 0.25135573744773865, -0.30318307876586914, 0.0074214451014995575, 0.012111105024814606, 0.31106022000312805, 0.01770121604204178, -0.03676217421889305, 0.3407377004623413, -0.3106960654258728, 0.03751731291413307, -0.27488574385643005, 0.6375954747200012, 0.44500505924224854, -0.3981798589229584, 0.17784719169139862, 0.005382053088396788, -0.05730893835425377, -0.16764721274375916, -0.2092047929763794, 0.01141094695776701, 0.10535034537315369, -0.18463270366191864, -0.02190694957971573, 0.2112336903810501, -0.3385695815086365, -0.4776213467121124, -0.12738391757011414, 0.1589171141386032, 0.2947569489479065, 0.02322893589735031, -0.090172678232193, 0.13673460483551025, 0.2509723901748657, 0.08365651220083237, 0.18503756821155548, -0.019513191655278206, -0.20156607031822205, -0.45163699984550476, 0.022746307775378227, 0.3778620958328247, 0.3694099187850952, 0.26429733633995056, -0.026087671518325806, -0.11608914285898209, -0.3355938494205475, 0.25888288021087646, 0.25189411640167236, -0.0911189392209053, 0.1675363928079605, 0.1315602958202362, -0.13001748919487, 0.033612776547670364, -0.08910253643989563, -0.4266723692417145, 0.3443763554096222, 0.025459345430135727, 0.13816885650157928, 0.13159233331680298, 0.02827717363834381, -0.48812055587768555, 0.009474797174334526, -0.3255442976951599, -0.5843749046325684, 0.19271910190582275, 0.2720831036567688, -0.01291818730533123, 0.38385918736457825, -0.199986070394516, 0.2762499749660492, -0.023983443155884743, -0.07314743846654892, -0.18080149590969086, 0.231124147772789, -0.016862059012055397, -0.16073960065841675, -0.07487750053405762, 0.3288770914077759, -0.08152958005666733, 0.08156818151473999, -0.12945649027824402, 0.1215953528881073, 0.0694558247923851, -0.30597710609436035, 0.12493716925382614, 0.4802091717720032, 0.09088094532489777, -0.329910546541214, -0.13329699635505676, 0.2975679039955139, 0.2645035684108734, -0.04716132953763008, -0.1427665650844574, 0.36390221118927, -0.08440035581588745, 0.2512456476688385, -0.10649123787879944, 0.14909686148166656, 0.2662831246852875, -0.22307878732681274, -0.14983774721622467, 0.07928675413131714, 0.1012176126241684, 0.038841936737298965, 0.3362996578216553, 0.16320498287677765, -0.30365636944770813, 0.07479113340377808, 0.3500984013080597, -0.09239800274372101, 0.10340102016925812, 0.0270148366689682, -0.15504291653633118, 0.04075535386800766, 0.26168909668922424, 0.305230051279068, 0.6639758944511414, 0.24401558935642242, 0.08897480368614197, 0.05747073143720627, 0.007366379257291555, -0.20857767760753632, 0.13791565597057343, -0.2342080920934677, 0.005295581184327602, 0.40908682346343994, 0.20289571583271027, 0.05274677649140358, -0.08904819935560226, 0.1290138214826584, -0.04212958738207817, 0.19840526580810547, -0.2945139706134796, -0.002309594303369522, -0.17506565153598785, 0.17356961965560913, 0.12954053282737732, -0.20930200815200806, -0.2406199872493744, -0.16494235396385193, 0.29555410146713257, -0.35212981700897217, 0.003002721816301346, 0.31882551312446594, -0.2050447165966034, 0.22722172737121582, -0.1827199012041092, 0.08392231166362762, -0.2140142321586609, -0.1988138109445572, -0.416583776473999, 0.1731054186820984, -0.07498749345541, -0.056941017508506775, 0.2524852752685547, -0.24617548286914825, -0.18822361528873444, 0.06284753978252411, -0.09349731355905533, 0.09652942419052124, -0.08145740628242493, 0.6559175848960876, -0.021519698202610016, 0.07231061905622482, -0.3762667179107666, -0.04156855493783951, 0.3522251844406128, -0.044890303164720535, -0.010141982696950436, 0.15238165855407715, 0.24039551615715027, 0.01745268702507019, -0.014871589839458466, -0.700323760509491, -0.318059504032135, -0.20939284563064575, 0.01687195897102356, -0.037311844527721405, 0.13445261120796204, 0.1834021955728531, 0.2676595449447632, 0.11864214390516281, -0.24194617569446564, -0.009201370179653168, -0.15999361872673035, -0.050642628222703934, 0.3487634062767029, -0.14894890785217285, -0.5024712085723877, -0.14942394196987152, -0.24361158907413483, 0.2617567181587219, -0.13328257203102112, -0.5106108784675598, -0.07823030650615692, -0.26239022612571716, 0.3865683972835541, -0.18901236355304718, -0.055949218571186066, 0.3177073001861572, -0.19468659162521362, -0.07754585146903992, -0.288166344165802, -0.05380552262067795, 0.38967832922935486, -0.0496956929564476, 0.1622004210948944, -0.24369528889656067, 0.21004146337509155, 0.060175832360982895, 0.5309693813323975, 0.11873139441013336, 0.1414564549922943, 0.22025766968727112, -0.20970584452152252, 0.3259543776512146, -0.2176634669303894, -0.3961414694786072, 0.02886936254799366, 0.24462243914604187, 0.12613116204738617, 0.2928256094455719, 0.021324794739484787, 0.09017640352249146, -0.1461825668811798, 0.004550892859697342, -0.420444518327713, -0.22030335664749146, 0.13751108944416046, -0.6682154536247253, -0.004271253943443298, 0.027372688055038452, 0.1203070804476738, -0.004759682342410088, -0.07089926302433014, -0.1687236726284027, 0.07492706924676895, -0.011258736252784729, -0.07110246270895004, -0.37020841240882874, -0.09722737222909927, -0.07663043588399887, 0.16083869338035583, -0.12264493852853775, 0.44652536511421204, -0.08604180067777634, -0.11592929065227509, 0.19337156414985657, 0.1177218109369278, 0.7862274050712585, -0.04372990131378174, -0.1693386435508728, 0.34840893745422363, -0.05744714289903641, -0.43232688307762146, -0.2542472183704376, -0.21686981618404388, -0.02882324531674385, -0.10573475062847137, -0.12558311223983765, -0.322147399187088, -0.0818287655711174, -0.021938327699899673, 0.12844592332839966, -0.3099876046180725, -0.10105456411838531, -0.3357020616531372, -0.19736388325691223, -0.12847524881362915, 0.2869136929512024, 0.06324342638254166, 0.21370364725589752, -0.23228205740451813, -0.21417413651943207, -0.13224376738071442, -0.1597711741924286, 0.26116734743118286, 0.26442188024520874, 0.2692781686782837, -0.04667077958583832, 0.24108660221099854, 0.019289856776595116, -0.1497373729944229, 0.024390418082475662, 0.3924177885055542, -0.08863808214664459, 0.005886562168598175, 0.19427278637886047, -0.3076930344104767, 0.5265528559684753, 0.2358262538909912, -0.2248592972755432, -0.23870131373405457, -0.42071861028671265, 0.10476195812225342, -0.15072588622570038, -0.031878381967544556, 0.3642636239528656, 0.004929305985569954, 0.07622210681438446, -0.48853448033332825, 0.08439663052558899, -0.23330798745155334, -0.2787138521671295, 0.1871902346611023, 0.1780787855386734, -0.11865323781967163, 0.28732192516326904, 0.004713013768196106, 0.9321401715278625, -0.010908804833889008, 0.17284736037254333, 0.4116937816143036, -0.025412388145923615, 0.17834718525409698, -0.20655207335948944, 0.12834739685058594, -0.26680126786231995, -0.5641282200813293, 0.20464587211608887, -0.13053661584854126, 0.08502493798732758, 0.25654488801956177, -0.06349620223045349, 0.2525482177734375, -0.2689887285232544, 0.020152907818555832, 0.27331480383872986, -0.0011875778436660767, -0.11384064704179764, 0.349571168422699, -0.5553537607192993, 0.18295226991176605, 0.12218370288610458, 0.04467903450131416, -0.11005072295665741, -0.06545580923557281, -0.21238745748996735, -0.1899009346961975, -0.304563045501709, 0.18471187353134155, -0.42080456018447876, -0.10040806233882904, 0.41224637627601624, -0.1661558300256729, -0.08993835747241974, 0.6880052089691162, 0.30511748790740967, 0.2804509997367859, -0.017732316628098488, 0.27637529373168945, 0.05976144224405289, 0.2724177837371826, 0.27887988090515137, 0.06515108793973923, 0.17537911236286163, -0.21563223004341125, -0.5686725378036499, 0.25946366786956787, -0.04790342226624489, -0.16489702463150024, -0.14864300191402435, 0.1658141165971756, 0.15820784866809845, -0.09793826937675476, -0.1528482735157013, -0.04641561210155487, 0.22321218252182007, -0.07335437834262848, 0.2347387671470642, -0.05659210681915283, -0.10363657772541046, 0.3340062201023102, 0.22252298891544342, -0.37763628363609314, -0.038417112082242966, 0.29359424114227295, 0.007356120273470879, 0.3854392170906067, 0.6925075054168701, 0.07378508150577545, 0.003433831036090851, -0.35356420278549194, -0.13148479163646698, 0.45647990703582764, -0.5438269376754761, 0.14699754118919373, -0.09942033886909485, -0.08609206974506378, -0.15986381471157074, 0.06760397553443909, 0.2713718116283417, -0.2666704058647156, 0.09457726776599884, -0.4723008871078491, 0.0035773087292909622, 0.28083547949790955, 0.03975233808159828, 0.07877698540687561, 0.03956487029790878, -0.14465290307998657, -0.00916654709726572, 0.2214588224887848, -0.4289360046386719, -0.026875849813222885, -0.4231906533241272, 0.07263484597206116, -0.5557459592819214, -0.10464987903833389, 0.23438484966754913, -0.07860586047172546, 0.20538978278636932, -0.2429320365190506, -0.10319377481937408, -0.3527091145515442, -0.10482822358608246, 0.13701772689819336, -0.025814048945903778, -0.01746135577559471, -0.23414047062397003, -0.2490490972995758, -0.1347709447145462, -0.07919557392597198, 0.11725960671901703, 0.048621565103530884, -0.030480124056339264, 0.26381051540374756, 0.20258769392967224, 0.28724804520606995, -0.16848893463611603, 0.11143503338098526, -0.3002914488315582, -0.25100451707839966, 0.10556795448064804, 0.031623806804418564, 0.11233438551425934, -0.049731601029634476, -0.01279107853770256, 0.07256761193275452, -0.2300703078508377, 0.017617573961615562, 0.25108110904693604, -0.1145707368850708, 0.2062978446483612, 0.043052420020103455, 0.031312327831983566, 0.11563795804977417, -0.30330967903137207, 0.1346183717250824, 0.01455596275627613, 0.29698920249938965, -0.47037166357040405, 0.08459342271089554, 0.02367711067199707, 0.2388778179883957, 0.10698482394218445, 0.13748231530189514, 0.2607828378677368, -0.32112759351730347, 0.13862654566764832, 0.23268947005271912, -0.013532762415707111, -0.023846082389354706, 0.17044837772846222, 0.5367965698242188, -0.20396634936332703, 0.008984435349702835, -0.1139197126030922, -0.12241265177726746, -0.17463144659996033, -0.010903216898441315, -0.18863391876220703, 0.3858891427516937, 0.05869936943054199, -0.2206844687461853, -0.018533363938331604, -0.09379492700099945, 0.16258196532726288, 0.059614136815071106, -0.06334148347377777, -0.08210747689008713, -0.036684371531009674, 0.2787970006465912, -0.00972627755254507, 0.1430375576019287, -0.220646470785141, -0.18216004967689514, 0.01563076302409172, -0.006455664057284594, -0.12740260362625122, -0.19690260291099548, -0.32757848501205444, -0.33535486459732056, -0.04325888678431511, -0.18407104909420013, 0.10115880519151688, -0.0019414722919464111, -0.29039520025253296, -0.12640038132667542, 0.3109067976474762, 0.3682551980018616, 0.12637042999267578, -0.010489560663700104, 0.28455352783203125, 0.2754606604576111, 0.15946824848651886, 0.13388031721115112, 0.5755476355552673, 0.07081490755081177, 0.2835339307785034, -0.37512627243995667, 0.00895698368549347, 0.11790545284748077, -0.0702085942029953, -0.2208063006401062, 0.5092963576316833, 0.11034002155065536, 0.1771216243505478, 0.07240583002567291, 0.23228973150253296, -0.2277543693780899, 0.21047838032245636, 0.08829807490110397, 0.05429345741868019, -0.19770970940589905, 0.19495147466659546, 0.019338499754667282, 0.05321650207042694, 0.009532008320093155, 0.13720430433750153, -0.42939990758895874, 0.061972472816705704, 0.1822436898946762, -0.10396961122751236, 0.0761232078075409, -0.3123709559440613, 0.11642014980316162, -0.2462460994720459, 0.25774917006492615, 0.1471642553806305, 0.3499373197555542, -0.24695169925689697, -0.03559520095586777, -0.5702098608016968, 0.17264004051685333, 0.11825290322303772, 0.14767660200595856, 0.2577412724494934, -0.023924894630908966, 0.013377733528614044, -0.06701210141181946, 0.08896823227405548, 0.2568536698818207, -0.29572319984436035, 0.184173583984375, -0.5471512079238892, -0.3395521640777588, -0.2542598843574524, 0.21780452132225037, -0.0658859834074974, -0.14002065360546112, 0.031874265521764755, -0.057308074086904526, 0.07126636058092117, 0.22362202405929565, -0.08836254477500916, 0.26971039175987244, 0.2985754907131195, 0.17394119501113892, 0.18484628200531006, 0.4591228663921356, 0.11619960516691208, -0.016821956261992455, -0.1099831759929657, 0.050625745207071304, 0.03506186231970787, 0.22039157152175903, 0.08671355247497559, 0.14765675365924835, 0.023555641993880272, -0.11279606819152832, 0.14142513275146484, 0.13624566793441772, 0.20048873126506805, -0.016013657674193382, -0.22180622816085815, 0.010288313031196594, 0.1975567638874054, 0.2081078290939331, -0.0014721397310495377, 0.1964024007320404, -0.13111835718154907, 0.2788810133934021, -0.21680200099945068, -0.24094033241271973, 0.37658169865608215, -0.28645557165145874, -0.028071396052837372, -0.1468077301979065, 0.17726698517799377, 0.1771668791770935, -0.08746235072612762, -0.413985013961792, -0.24788764119148254, 0.4810097813606262, -0.04419885575771332, -0.05258912593126297, 0.2417890727519989, -0.008454989641904831, 0.14735420048236847, 0.0200287327170372, 0.39000996947288513, 0.02551691234111786, 0.03006434254348278, -0.06108984351158142, -0.2780909538269043 ]
https://github.com/huggingface/datasets/issues/2447
dataset adversarial_qa has no answers in the "test" set
Makes sense, but not intuitive for someone searching through the datasets. Thanks for adding the note to clarify.
## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0
18
dataset adversarial_qa has no answers in the "test" set ## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0 Makes sense, but not intuitive for someone searching through the datasets. Thanks for adding the note to clarify.
[ -0.038018859922885895, 0.17751643061637878, -0.10937879979610443, 0.37599384784698486, 0.19822125136852264, -0.0062385499477386475, 0.36139458417892456, 0.36952802538871765, -0.06413225829601288, 0.03522816300392151, 0.10371224582195282, 0.379220575094223, -0.19908595085144043, -0.19723400473594666, 0.04321128875017166, 0.1114882379770279, -0.01555362343788147, 0.10720385611057281, -0.06027859449386597, -0.31920117139816284, -0.23112106323242188, 0.09493157267570496, -0.23309390246868134, -0.09491296112537384, -0.292115718126297, 0.11944898962974548, -0.204321026802063, 0.1561519056558609, 0.00975852645933628, -0.5535632371902466, 0.28130775690078735, -0.14924481511116028, -0.01675315760076046, 0.4255779981613159, -0.00011180147703271359, -0.04905512183904648, 0.225686177611351, -0.03517136722803116, -0.3814619183540344, -0.24431826174259186, -0.4445737302303314, -0.2766771912574768, 0.17988179624080658, -0.22161316871643066, -0.16940513253211975, -0.256025105714798, -0.11212311685085297, -0.11372756958007812, 0.2730475664138794, 0.5292612314224243, 0.24091096222400665, 0.09419729560613632, -0.18431727588176727, -0.1333683431148529, 0.1004742980003357, -0.09490707516670227, -0.12460396438837051, 0.3207916021347046, 0.12391231954097748, -0.2727341949939728, 0.2450588345527649, 0.16121496260166168, 0.018522849306464195, -0.12457822263240814, 0.0030626505613327026, 0.002246732823550701, 0.22872766852378845, -0.2950291037559509, 0.09054554998874664, 0.2719072699546814, 0.5253136157989502, -0.15793418884277344, -0.22853955626487732, -0.33739277720451355, 0.19660665094852448, -0.08126110583543777, 0.21876075863838196, 0.2738300859928131, -0.19870920479297638, 0.07514521479606628, -0.03449300676584244, 0.22938227653503418, -0.09455346316099167, 0.05150022357702255, -0.3328443467617035, 0.39915356040000916, 0.04832832142710686, -0.09724583476781845, -0.12214845418930054, 0.10521507263183594, -0.036953218281269073, -0.25761085748672485, -0.03454418107867241, 0.2256595492362976, -0.5387452244758606, -0.02726871520280838, 0.019076362252235413, 0.005516208708286285, 0.26368260383605957, 0.3198457956314087, 0.2951924800872803, -0.2196023166179657, -0.0240472462028265, -0.10021162778139114, 0.21415850520133972, 0.3907953202724457, 0.19319458305835724, 0.29822492599487305, 0.03790070489048958, 0.05198179930448532, -0.09909403324127197, 0.10562929511070251, -0.25504016876220703, -0.20896051824092865, 0.23880796134471893, 0.14434108138084412, 0.48253434896469116, -0.20456846058368683, -0.2926567792892456, 0.337761789560318, -0.41905108094215393, -0.1475977599620819, -0.0480976440012455, 0.4000512957572937, -0.24041025340557098, 0.09226787090301514, -0.1325741708278656, 0.254182368516922, -0.2532404065132141, -0.25836095213890076, -0.24440711736679077, -0.1555509716272354, -0.30432939529418945, -0.23283132910728455, 0.2940029799938202, 0.08912622928619385, 0.20440614223480225, 0.1051173061132431, 0.07444687932729721, 0.00010320544242858887, 0.17030829191207886, -0.34432870149612427, 0.111570805311203, 0.38973289728164673, -0.1513686627149582, 0.21313712000846863, 0.21465575695037842, -0.3839137554168701, 0.024978913366794586, 0.5199176073074341, 0.07579046487808228, -0.08110512793064117, 0.018467197194695473, 0.23107054829597473, -0.21549588441848755, -0.04484712332487106, 0.08544265478849411, 0.3162039518356323, 0.07862641662359238, -0.12877249717712402, 0.2978665828704834, -0.3184589147567749, 0.02186262235045433, -0.3275708854198456, 0.5358554720878601, 0.5741314888000488, -0.40689101815223694, 0.16163595020771027, -0.037515006959438324, -0.05495048686861992, -0.14433333277702332, -0.14782540500164032, 0.03479026257991791, 0.1809511035680771, -0.24102410674095154, 0.07046371698379517, 0.12287252396345139, -0.3233368396759033, -0.38953065872192383, -0.08868065476417542, 0.18949036300182343, 0.3247493505477905, 0.03544682264328003, -0.11824020743370056, -0.0009163916110992432, 0.16042597591876984, 0.13699570298194885, 0.19700844585895538, -0.0356903001666069, -0.19063758850097656, -0.3829178214073181, 0.03646305948495865, 0.40991514921188354, 0.3123601973056793, 0.2516896724700928, -0.02370896190404892, -0.07209540158510208, -0.4327600300312042, 0.24368062615394592, 0.20881947875022888, -0.13705411553382874, 0.11046069115400314, 0.2225862741470337, -0.05620163679122925, 0.10332031548023224, -0.12282834947109222, -0.4905353784561157, 0.3253701627254486, 0.10021482408046722, 0.20543172955513, 0.05290719494223595, -0.009693676605820656, -0.49309900403022766, -0.02304583042860031, -0.33542540669441223, -0.5171921253204346, 0.1825161725282669, 0.2514166831970215, -0.051437877118587494, 0.3741508424282074, -0.2586691081523895, 0.2646826207637787, 0.02583707682788372, 0.028163673356175423, -0.1718520075082779, 0.26963716745376587, -0.017910907045006752, -0.06891508400440216, -0.1050153523683548, 0.252437025308609, 0.01642482355237007, 0.08035782724618912, -0.09951474517583847, 0.18329963088035583, 0.09955909848213196, -0.2532208561897278, -0.01256629079580307, 0.41387200355529785, 0.10780150443315506, -0.22407406568527222, -0.1017097607254982, 0.2977457046508789, 0.3071594536304474, -0.10763078927993774, -0.14292553067207336, 0.25571519136428833, -0.08010777831077576, 0.3540758788585663, -0.057454559952020645, 0.13494762778282166, 0.25344425439834595, -0.2289259284734726, -0.1601988673210144, 0.05039109289646149, 0.17797814309597015, 0.05095960944890976, 0.4108893573284149, 0.2816084325313568, -0.31638938188552856, 0.12265525013208389, 0.2962827682495117, -0.1855599731206894, 0.08770450949668884, 0.06651164591312408, -0.10739617794752121, 0.11107245832681656, 0.20658117532730103, 0.32907581329345703, 0.6542758345603943, 0.24634456634521484, 0.01476525142788887, 0.05477627366781235, -0.08123596012592316, -0.2099502831697464, 0.16974225640296936, -0.1730264276266098, 0.0966530367732048, 0.44937917590141296, 0.19869627058506012, 0.12201455980539322, -0.1478351205587387, 0.013279050588607788, -0.07287535071372986, 0.21297146379947662, -0.41339945793151855, 0.09009461849927902, -0.2010110467672348, 0.11179058998823166, 0.0624765045940876, -0.24618570506572723, -0.27874815464019775, -0.21887850761413574, 0.2188401073217392, -0.4404742121696472, -0.033938851207494736, 0.25485554337501526, -0.2764030992984772, 0.26956361532211304, -0.1428874135017395, 0.07612001150846481, -0.23701532185077667, -0.1646421104669571, -0.4196373522281647, 0.13508330285549164, 0.018620967864990234, -0.10707094520330429, 0.24625331163406372, -0.28131264448165894, -0.23749098181724548, 0.10747234523296356, -0.1896659880876541, 0.1197575032711029, -0.17432616651058197, 0.6320789456367493, 0.05495353788137436, 0.09482121467590332, -0.29637598991394043, -0.05842311680316925, 0.3697793781757355, -0.0066815949976444244, -0.08747199922800064, 0.17274975776672363, 0.22859761118888855, 0.018605152145028114, -0.04210346192121506, -0.7604621052742004, -0.33591583371162415, -0.2818158268928528, -0.019322022795677185, 0.025629203766584396, 0.19124051928520203, 0.33604761958122253, 0.2473781704902649, 0.13082221150398254, -0.22398917376995087, 0.055147312581539154, -0.1709394007921219, -0.01250070333480835, 0.3971099853515625, -0.1424562931060791, -0.4635104835033417, -0.0660351812839508, -0.21370938420295715, 0.21118320524692535, -0.04787119850516319, -0.491960346698761, -0.06670523434877396, -0.2664312422275543, 0.274979829788208, -0.1996055692434311, 0.09075749665498734, 0.2340376377105713, -0.1649855077266693, -0.05455891788005829, -0.2723255455493927, -0.14402195811271667, 0.3495981693267822, -0.09067247807979584, 0.1211499571800232, -0.190751314163208, 0.2533169984817505, -0.0005461983382701874, 0.4581642746925354, 0.08765946328639984, 0.18730930984020233, 0.2734174430370331, -0.17522679269313812, 0.41849103569984436, -0.2320496141910553, -0.42649030685424805, 0.0626349002122879, 0.30192679166793823, -0.007107898592948914, 0.32044684886932373, 0.09070805460214615, 0.0949329063296318, -0.16753262281417847, -0.053275108337402344, -0.503821849822998, -0.20431748032569885, 0.1366642564535141, -0.5980345606803894, -0.011459775269031525, -0.019063765183091164, 0.10016905516386032, 0.027233004570007324, -0.04678095504641533, -0.22395528852939606, 0.13145172595977783, 0.031217806041240692, -0.07206959277391434, -0.42949172854423523, -0.06588343530893326, -0.09282933920621872, 0.13156428933143616, -0.15443459153175354, 0.4282397925853729, -0.08382949233055115, -0.1761915683746338, 0.19342041015625, 0.13685466349124908, 0.9014121294021606, -0.07689196616411209, -0.19094035029411316, 0.34549474716186523, -0.05745546519756317, -0.40612202882766724, -0.2854190468788147, -0.20009753108024597, 0.018040349707007408, -0.09650608897209167, -0.04594741016626358, -0.38908711075782776, -0.07289238274097443, 0.07278990745544434, 0.11115307360887527, -0.266755074262619, -0.13791713118553162, -0.3741108179092407, -0.23094701766967773, -0.13023945689201355, 0.21484895050525665, 0.05626034736633301, 0.1579611599445343, -0.21491743624210358, -0.18121527135372162, -0.09744363278150558, -0.14678964018821716, 0.32308483123779297, 0.24873994290828705, 0.29227936267852783, -0.028935493901371956, 0.1983170062303543, -0.01896517723798752, -0.13424943387508392, 0.06719464808702469, 0.5639820694923401, -0.14793197810649872, -0.11240553855895996, 0.174831360578537, -0.2797800600528717, 0.5428378582000732, 0.24140599370002747, -0.18708474934101105, -0.2742554545402527, -0.3951377272605896, 0.02260749042034149, -0.13516493141651154, -0.11714073270559311, 0.3611705005168915, -0.035936638712882996, -0.052091795951128006, -0.5506643056869507, 0.13865412771701813, -0.1921023279428482, -0.2379797250032425, 0.19635170698165894, 0.22045932710170746, -0.14512576162815094, 0.43536508083343506, -0.04967208951711655, 0.923674464225769, -0.057225555181503296, 0.19388030469417572, 0.45616939663887024, 0.006199575960636139, 0.31328874826431274, -0.18444359302520752, 0.07074497640132904, -0.2815210521221161, -0.5043562650680542, 0.16491204500198364, -0.12413077056407928, 0.07165613770484924, 0.3066307306289673, -0.1143864095211029, 0.2874796390533447, -0.38415902853012085, 0.165544793009758, 0.3029683232307434, -0.11740933358669281, -0.16478295624256134, 0.3358222246170044, -0.633698046207428, 0.1677836775779724, 0.14473000168800354, -0.0005198903381824493, -0.14079317450523376, 0.02402064949274063, -0.23329290747642517, -0.28579747676849365, -0.30500876903533936, 0.16505670547485352, -0.38122832775115967, -0.15649883449077606, 0.4907226264476776, -0.12659594416618347, -0.039644576609134674, 0.6422728896141052, 0.15312504768371582, 0.2409210503101349, -0.045037634670734406, 0.2599819302558899, 0.0654425099492073, 0.2937282621860504, 0.22771714627742767, -0.040505122393369675, 0.3724675476551056, -0.09048233926296234, -0.5008724927902222, 0.24005088210105896, -0.08746936917304993, -0.13171586394309998, -0.1945074051618576, 0.2537888288497925, 0.12011555582284927, -0.12074874341487885, -0.19406607747077942, -0.05993370711803436, 0.29552751779556274, -0.06975466012954712, 0.20950248837471008, 0.0012135282158851624, -0.005002315156161785, 0.3027437627315521, 0.2215651124715805, -0.36331242322921753, -0.05514035001397133, 0.2310790717601776, 0.02977885864675045, 0.31977593898773193, 0.7269600629806519, 0.10232378542423248, -0.0020685382187366486, -0.3283357620239258, -0.11119444668292999, 0.42422929406166077, -0.4804452061653137, 0.16729752719402313, -0.02308153361082077, -0.025554656982421875, -0.08293130993843079, 0.02990344539284706, 0.18869420886039734, -0.28460416197776794, 0.04248584434390068, -0.5493792295455933, 0.0757254809141159, 0.28488147258758545, 0.04535897448658943, 0.12376667559146881, 0.11413062363862991, -0.19741229712963104, 0.04801604896783829, 0.22118185460567474, -0.41143476963043213, -0.01587444543838501, -0.41325271129608154, 0.09460366517305374, -0.5187209844589233, 0.008077401667833328, 0.1861644983291626, -0.12223902344703674, 0.20893608033657074, -0.2573081851005554, -0.06633932888507843, -0.32094496488571167, -0.11832498013973236, 0.16479264199733734, 0.04062292352318764, -0.008450517430901527, -0.20127922296524048, -0.24713416397571564, -0.10166658461093903, -0.1423344761133194, 0.08856712281703949, 0.13076099753379822, -0.0714399516582489, 0.25908949971199036, 0.15419475734233856, 0.2448846697807312, -0.1563754379749298, 0.13975253701210022, -0.3300163149833679, -0.31686335802078247, 0.2431919425725937, 0.016353610903024673, 0.04417785629630089, -0.005763359367847443, 0.01321452483534813, 0.14203354716300964, -0.23904739320278168, 0.00040596723556518555, 0.3030936121940613, -0.10987663269042969, 0.23605653643608093, -0.03526230901479721, 0.034141551703214645, 0.2104502022266388, -0.33567795157432556, 0.13425447046756744, 0.12549340724945068, 0.28702807426452637, -0.44363197684288025, 0.1100878193974495, 0.04215836524963379, 0.20801512897014618, 0.07100836932659149, 0.15334436297416687, 0.1693097949028015, -0.3946671187877655, 0.0037215575575828552, 0.20721930265426636, 0.163177952170372, 0.09518078714609146, 0.2361096739768982, 0.5443536043167114, -0.22979041934013367, 0.05863816663622856, -0.055205777287483215, -0.18193145096302032, -0.178349107503891, 0.011928990483283997, -0.1506991982460022, 0.2770531475543976, -0.08040996640920639, -0.16463269293308258, -0.06886892765760422, -0.19951793551445007, 0.2449260652065277, 0.1648692637681961, -0.07886111736297607, -0.09502304345369339, -0.04789523780345917, 0.2671699523925781, -0.009719324298202991, 0.10536658018827438, -0.24239195883274078, -0.12334311008453369, 0.004869615659117699, 0.04077480360865593, -0.2498861700296402, -0.23794680833816528, -0.26513543725013733, -0.3146311342716217, -0.1096804291009903, -0.29989057779312134, 0.11822503805160522, 0.020602285861968994, -0.2783415913581848, -0.26317715644836426, 0.3560766279697418, 0.2780510187149048, 0.12487588822841644, -0.06302177906036377, 0.2743389904499054, 0.24780713021755219, 0.10567683726549149, 0.20663559436798096, 0.5216087698936462, 0.2522510886192322, 0.4706479609012604, -0.22167737782001495, -0.031763706356287, 0.030227290466427803, -0.045972589403390884, -0.23728345334529877, 0.5032393932342529, 0.028466418385505676, 0.2390488088130951, 0.053383197635412216, 0.20612125098705292, -0.1913517862558365, 0.20230688154697418, 0.11693333089351654, 0.03572745621204376, -0.293256014585495, 0.17341327667236328, -0.08882029354572296, 0.05403483659029007, 0.0014770664274692535, 0.1422102302312851, -0.5204792022705078, 0.018835049122571945, 0.20466770231723785, -0.027956392616033554, 0.1461401879787445, -0.2721903324127197, 0.11039499938488007, -0.13163277506828308, 0.23560668528079987, 0.29261210560798645, 0.32629281282424927, -0.27023518085479736, 0.005739867687225342, -0.6387883424758911, 0.14066638052463531, 0.08549217879772186, 0.1015133410692215, 0.20699197053909302, -0.05267444998025894, 0.05178045853972435, -0.07082001119852066, 0.06293437629938126, 0.21572527289390564, -0.26450294256210327, 0.1946752816438675, -0.5525676608085632, -0.3293536901473999, -0.2111411839723587, 0.2391730546951294, -0.10251699388027191, -0.14051882922649384, 0.023868538439273834, -0.15100887417793274, 0.06937124580144882, 0.17843182384967804, -0.0718040019273758, 0.29282239079475403, 0.2606789469718933, 0.18663837015628815, 0.22641517221927643, 0.48682406544685364, 0.12388863414525986, -0.006214763969182968, -0.22205889225006104, 0.0404413565993309, -0.04683682322502136, 0.2719149589538574, 0.03864645957946777, 0.14076508581638336, 0.01479182206094265, -0.18960382044315338, 0.1678965836763382, 0.12221769988536835, 0.14336851239204407, -0.03801605477929115, -0.2138063609600067, 0.06548518687486649, 0.14605584740638733, 0.13981065154075623, -0.047583844512701035, 0.14282479882240295, -0.11313042044639587, 0.2552954852581024, -0.23375506699085236, -0.339769572019577, 0.33699098229408264, -0.32200080156326294, -0.01843314617872238, -0.20393593609333038, 0.18055352568626404, 0.17368504405021667, 0.000484636053442955, -0.445556104183197, -0.2057565450668335, 0.500495970249176, -0.0006249677389860153, -0.09271185100078583, 0.29286912083625793, -0.06155877187848091, 0.08786258101463318, -0.03501347452402115, 0.34990519285202026, 0.04365905374288559, 0.0033149905502796173, -0.0028538070619106293, -0.24170595407485962 ]
https://github.com/huggingface/datasets/issues/2446
`yelp_polarity` is broken
``` File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 233, in <module> configs = get_confs(option) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 604, in wrapped_func return get_or_create_cached_value() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 588, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 148, in get_confs builder_cls = nlp.load.import_main_class(module_path[0], dataset=True) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/datasets/load.py", line 85, in import_main_class module = importlib.import_module(module_path) File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/sasha/.cache/huggingface/modules/datasets_modules/datasets/yelp_polarity/a770787b2526bdcbfc29ac2d9beb8e820fbc15a03afd3ebc4fb9d8529de57544/yelp_polarity.py", line 36, in <module> from datasets.tasks import TextClassification ```
![image](https://user-images.githubusercontent.com/22514219/120828150-c4a35b00-c58e-11eb-8083-a537cee4dbb3.png)
118
`yelp_polarity` is broken ![image](https://user-images.githubusercontent.com/22514219/120828150-c4a35b00-c58e-11eb-8083-a537cee4dbb3.png) ``` File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 233, in <module> configs = get_confs(option) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 604, in wrapped_func return get_or_create_cached_value() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 588, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 148, in get_confs builder_cls = nlp.load.import_main_class(module_path[0], dataset=True) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/datasets/load.py", line 85, in import_main_class module = importlib.import_module(module_path) File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/sasha/.cache/huggingface/modules/datasets_modules/datasets/yelp_polarity/a770787b2526bdcbfc29ac2d9beb8e820fbc15a03afd3ebc4fb9d8529de57544/yelp_polarity.py", line 36, in <module> from datasets.tasks import TextClassification ```
[ -0.10245764255523682, -0.416435569524765, -0.1597159206867218, 0.11063769459724426, 0.27008044719696045, -0.13424359261989594, 0.06204185634851456, 0.3248957395553589, 0.11502416431903839, 0.02086082100868225, -0.07330304384231567, 0.09813601523637772, -0.07752850651741028, 0.08816073834896088, -0.027290724217891693, -0.05470050871372223, -0.06708884984254837, 0.5007212162017822, -0.27986496686935425, -0.10240042209625244, -0.1873738318681717, 0.3047940731048584, 0.046992748975753784, 0.1529836654663086, -0.02151622623205185, -0.09981776028871536, 0.07568220049142838, 0.28076106309890747, -0.219814732670784, -0.32855257391929626, 0.045435309410095215, 0.0923938974738121, -0.21742990612983704, 0.11223742365837097, -0.00011019755038432777, -0.06834663450717926, 0.3514304757118225, -0.049455173313617706, 0.026747673749923706, -0.31092458963394165, 0.05567574501037598, -0.11625418066978455, 0.07161325961351395, -0.17534220218658447, -0.1302851289510727, -0.28522711992263794, 0.006950465962290764, -0.05220348387956619, 0.5125470161437988, 0.21750548481941223, 0.2951674461364746, 0.09695039689540863, 0.07746061682701111, 0.11193244904279709, 0.0685759037733078, 0.23085123300552368, -0.051935434341430664, 0.0755404606461525, -0.1282692551612854, -0.41855186223983765, -0.08518955856561661, 0.379677951335907, 0.04172568768262863, 0.009352697990834713, 0.18165674805641174, -0.23981626331806183, 0.643113911151886, 0.09646668285131454, 0.056174978613853455, 0.09159304201602936, -0.26068586111068726, 0.023008743301033974, 0.11747656017541885, 0.2456570267677307, -0.16484548151493073, -0.41886502504348755, 0.09753166884183884, 0.38911184668540955, -0.24442066252231598, -0.1872091144323349, -0.052721213549375534, -0.09613145142793655, -0.2303684949874878, 0.27709057927131653, -0.0000370517373085022, 0.7835254669189453, -0.0015445137396454811, 0.18229828774929047, 0.18114911019802094, 0.03694586083292961, 0.19546622037887573, 0.3975945711135864, -0.12704643607139587, 0.0670379251241684, -0.05572041496634483, 0.03596925735473633, 0.22673040628433228, 0.15069687366485596, 0.057046785950660706, 0.27226734161376953, 0.3639070689678192, 0.09718974679708481, 0.2167171835899353, 0.13879916071891785, 0.00014431588351726532, 0.1953640878200531, 0.06827448308467865, 0.47452160716056824, 0.27137845754623413, 0.5279785394668579, 0.16390298306941986, 0.14324456453323364, 0.1657562553882599, -0.421659916639328, -0.030152983963489532, 0.11452727019786835, 0.06033124029636383, 0.13035842776298523, -0.22503724694252014, 0.009647854603827, -0.08318644762039185, 0.2637472152709961, 0.2026589810848236, 0.23872703313827515, 0.05683792382478714, 0.26677677035331726, 0.21853701770305634, 0.07693956792354584, -0.06390153616666794, 0.03306709975004196, -0.19906248152256012, 0.34603577852249146, -0.3091927170753479, -0.0692945122718811, 0.07889428734779358, 0.38447365164756775, 0.5319613814353943, -0.1714344322681427, -0.2256486564874649, -0.08708687126636505, -0.0271487794816494, -0.06837491691112518, 0.15192343294620514, 0.2506313920021057, -0.0791388675570488, -0.05421553552150726, 0.23635952174663544, 0.07172594964504242, -0.06635177135467529, -0.13007572293281555, -0.031472042202949524, 0.09405502676963806, -0.19856905937194824, 0.3028070628643036, 0.03911876305937767, 0.030134275555610657, 0.08507362753152847, 0.04002159833908081, 0.26297685503959656, -0.2812218964099884, 0.1904454231262207, -0.27156519889831543, -0.22105099260807037, -0.11432038247585297, 0.07434117794036865, 0.36647099256515503, -0.04160477593541145, -0.40933552384376526, -0.293621301651001, -0.14198362827301025, 0.2234407663345337, 0.18269535899162292, 0.07993306964635849, -0.03529578447341919, -0.21925485134124756, 0.019116759300231934, 0.300532728433609, -0.37749379873275757, -0.18658728897571564, -0.18348544836044312, -0.1630086451768875, -0.07560640573501587, -0.048394687473773956, 0.18196269869804382, -0.0024487078189849854, 0.13283957540988922, 0.1558428406715393, 0.6501134037971497, 0.12104302644729614, 0.11920880526304245, -0.42295873165130615, -0.015573990531265736, 0.21175487339496613, -0.05279373377561569, 0.23837007582187653, -0.035570114850997925, 0.0632929727435112, -0.18812212347984314, 0.11847860366106033, -0.015410427004098892, 0.21858106553554535, 0.24961619079113007, 0.5116145014762878, 0.06741564720869064, 0.08670209348201752, 0.0805797427892685, 0.03773028403520584, -0.07986348867416382, -0.9023963212966919, 0.1307978630065918, -0.30752241611480713, 0.14959801733493805, -0.24953868985176086, -0.13599534332752228, -0.405708372592926, -0.4762878715991974, 0.25745388865470886, 0.16518458724021912, 0.10101532936096191, 0.0820707380771637, 0.10442902147769928, 0.30604252219200134, -0.3019447922706604, 0.08234143257141113, 0.018169725313782692, 0.2572535276412964, -0.2900826632976532, -0.05227639526128769, 0.04599611461162567, 0.20134666562080383, 0.31366434693336487, -0.16863715648651123, -0.17929300665855408, 0.3776596784591675, -0.5558846592903137, 0.4288746118545532, -0.15064728260040283, -0.3552914261817932, 0.2207999974489212, -0.5869690179824829, -0.028009800240397453, 0.13809874653816223, -0.03647592291235924, -0.0319531187415123, 0.1685708910226822, 0.26607292890548706, -0.17664991319179535, 0.16433629393577576, 0.14216728508472443, 0.28420862555503845, 0.16251732409000397, -0.023088395595550537, -0.1731601059436798, -0.30428841710090637, 0.4437304735183716, -0.017507389187812805, 0.1051836907863617, -0.33115339279174805, 0.01717352867126465, 0.019119203090667725, 0.40138372778892517, 0.3117002844810486, 0.1925225853919983, -0.0715920552611351, 0.048675283789634705, -0.19273704290390015, 0.1532043218612671, 0.22706176340579987, 0.33110153675079346, 0.1304067224264145, -0.27818480134010315, 0.09665314853191376, -0.1665709763765335, -0.137836754322052, 0.2107175886631012, 0.04649905860424042, 0.31833818554878235, 0.34070226550102234, 0.32528403401374817, -0.08944132179021835, -0.33407193422317505, -0.19430235028266907, -0.2050069272518158, 0.22857250273227692, 0.022880923002958298, 0.05169826000928879, -0.2642996311187744, -0.056126609444618225, 0.006094066891819239, 0.19653891026973724, -0.02093764767050743, -0.251596063375473, 0.1971224546432495, -0.09670716524124146, -0.23913607001304626, 0.428285151720047, 0.199476420879364, 0.12546727061271667, 0.2627289891242981, -0.17054522037506104, -0.3780844807624817, -0.2816612720489502, -0.03319263458251953, 0.09827378392219543, -0.07437288761138916, -0.048050183802843094, 0.45885786414146423, -0.1241150051355362, -0.0208086296916008, -0.2733250856399536, -0.4662458002567291, 0.06045612320303917, -0.12463796138763428, -0.03235548734664917, 0.1386377513408661, 0.26504307985305786, 0.029109179973602295, 0.06448928266763687, 0.40580159425735474, -0.5469169616699219, -0.12999682128429413, 0.07798474282026291, -0.0843902975320816, 0.014115539379417896, -0.354692667722702, 0.016259312629699707, -0.15196830034255981, -0.48687541484832764, 0.12289749085903168, 0.4273006021976471, 0.11076183617115021, 0.15601274371147156, 0.11296915262937546, -0.11829572170972824, -0.11058327555656433, 0.25935453176498413, -0.10416623950004578, 0.3105354607105255, 0.27500757575035095, -0.38851198554039, -0.2793480157852173, -0.2813335955142975, -0.04148223251104355, 0.5379197597503662, 0.07298478484153748, -0.2579224705696106, -0.08238440006971359, 0.053090229630470276, -0.14295996725559235, -0.22452586889266968, -0.17984308302402496, 0.29562002420425415, 0.056741248816251755, -0.17483627796173096, 0.013333559036254883, 0.13660261034965515, -0.07881403714418411, 0.051062628626823425, 0.25588154792785645, -0.025281783193349838, 0.04379617050290108, 0.018014919012784958, 0.3831222653388977, -0.03964938968420029, -0.05931222066283226, 0.25977954268455505, 0.08446197211742401, 0.37187492847442627, 0.049006830900907516, -0.302309513092041, -0.09092386066913605, 0.2394493669271469, 0.2573049068450928, 0.054187506437301636, -0.023146193474531174, -0.1395312249660492, -0.2728274166584015, 0.1770879030227661, -0.25958186388015747, -0.01926969736814499, -0.26451751589775085, 0.05445210263133049, 0.24266618490219116, 0.09511537849903107, -0.08360542356967926, 0.007883744314312935, -0.18072658777236938, 0.06187787279486656, 0.22656461596488953, -0.3716438412666321, 0.1437586396932602, -0.075644351541996, -0.5033356547355652, -0.051812544465065, 0.24540865421295166, -0.04101046174764633, 0.048940788954496384, -0.18863055109977722, 0.0031234174966812134, 0.11597193777561188, -0.22207091748714447, 0.376777708530426, 0.23768220841884613, 0.0985257551074028, 0.050379302352666855, 0.21140968799591064, -0.32667696475982666, -0.25677046179771423, -0.12790650129318237, 0.13980427384376526, 0.003703668713569641, 0.30341944098472595, -0.24488317966461182, -0.08593326807022095, 0.4820081293582916, -0.13853594660758972, -0.10426179319620132, 0.0710156261920929, -0.3813580870628357, -0.31865614652633667, -0.03041147068142891, -0.06837785989046097, 0.07832176238298416, 0.18015535175800323, 0.003922111354768276, 0.06006133183836937, 0.3741312026977539, -0.09267633408308029, -0.2901074290275574, 0.07837358117103577, 0.2200595736503601, -0.31253454089164734, -0.3215498626232147, 0.0070639438927173615, -0.13494627177715302, -0.2527889609336853, 0.23490013182163239, 0.1567542999982834, 0.04936116933822632, 0.09440489858388901, 0.06774363666772842, -0.20005106925964355, 0.2899402678012848, -0.06454842537641525, -0.04213809221982956, -0.05649212747812271, 0.32628190517425537, 0.2556847035884857, 0.015684157609939575, 0.24307315051555634, -0.025416355580091476, -0.03389747068285942, -0.11778445541858673, 0.29174527525901794, 0.022821012884378433, 0.18350626528263092, 0.20563504099845886, 0.27097973227500916, -0.21174567937850952, 0.08002732694149017, 0.21556437015533447, 0.8698327541351318, 0.12039814889431, 0.2494460940361023, 0.45661461353302, -0.14431647956371307, 0.3979707360267639, -0.30913305282592773, 0.1733836829662323, -0.2170267254114151, 0.7918397784233093, 0.0458684116601944, -0.060183849185705185, 0.20424219965934753, -0.35513293743133545, -0.1539202183485031, 0.2807687520980835, 0.05598039925098419, -0.13741908967494965, -0.09442585706710815, -0.04075751081109047, -0.20886071026325226, -0.05004854127764702, 0.1101367175579071, 0.2160218209028244, -0.35346031188964844, 0.3168382942676544, -0.2780523896217346, -0.010556655004620552, 0.004439417272806168, -0.22022539377212524, -0.3149417042732239, 0.11789459735155106, -0.305887371301651, 0.33308547735214233, 0.15861696004867554, -0.37533777952194214, -0.20431305468082428, 0.1201803982257843, 0.0023953020572662354, 0.14984101057052612, -0.10040871798992157, 0.36819106340408325, 0.0705656036734581, -0.13956321775913239, -0.20487497746944427, 0.3914439380168915, 0.11227619647979736, -0.17728054523468018, -0.1457831859588623, 0.10831139981746674, -0.12311988323926926, -0.17053431272506714, -0.4195895791053772, 0.1231825053691864, 0.24898014962673187, 0.2318020612001419, 0.031411536037921906, -0.129974365234375, -0.21632783114910126, -0.3416886329650879, 0.2031344622373581, -0.10837605595588684, -0.05904173105955124, -0.19644653797149658, 0.3437516987323761, -0.18488657474517822, -0.015850573778152466, 0.148868590593338, -0.08979661017656326, -0.0017371177673339844, 0.2791006565093994, 0.08971384167671204, -0.28567981719970703, -0.35562852025032043, -0.21733567118644714, -0.15369589626789093, -0.3202958405017853, 0.18191944062709808, -0.06845308095216751, -0.36013901233673096, -0.12116387486457825, 0.09103479981422424, -0.03566780686378479, 0.2908214032649994, 0.16321836411952972, -0.31256797909736633, -0.1938587874174118, 0.13378077745437622, -0.2705550491809845, 0.03057272918522358, 0.11450812965631485, 0.17810963094234467, -0.15792696177959442, -0.055305056273937225, -0.36727169156074524, 0.018330803140997887, -0.2803926169872284, -0.01976422220468521, -0.09459908306598663, -0.3092770278453827, 0.04753587767481804, 0.21228818595409393, 0.29526522755622864, 0.3387914299964905, -0.19746899604797363, -0.28685373067855835, -0.11512471735477448, 0.0832904800772667, 0.07682083547115326, -0.28469330072402954, 0.0162925086915493, -0.11602380126714706, -0.020936064422130585, 0.09532865136861801, -0.08492065966129303, 0.08787629753351212, 0.10535883903503418, 0.1731070876121521, -0.4861341416835785, -0.03370196372270584, 0.304329514503479, -0.031798265874385834, -0.265417218208313, 0.05467620864510536, -0.18872278928756714, 0.05606063827872276, 0.07699133455753326, -0.08555995672941208, -0.3580901622772217, 0.05784248560667038, 0.01300753653049469, 0.17600461840629578, 0.24880346655845642, -0.15459485352039337, 0.014413289725780487, -0.4138319492340088, 0.4470161199569702, 0.1585952341556549, -0.3002401292324066, -0.002046966925263405, 0.08836188167333603, 0.2202455699443817, -0.3378833830356598, 0.3136429786682129, -0.23451760411262512, -0.035339128226041794, 0.2800392806529999, 0.0551907941699028, -0.26392248272895813, -0.3170892000198364, 0.11992944777011871, 0.30929210782051086, 0.4165699779987335, -0.5629342794418335, 0.03284445405006409, -0.23199725151062012, -0.10966739058494568, 0.13460862636566162, 0.3232003450393677, 0.12849009037017822, 0.1752018928527832, 0.12408808618783951, -0.257112979888916, -0.04059683531522751, -0.3657490015029907, 0.019105907529592514, -0.016091130673885345, -0.0366421677172184, -0.09101253747940063, 0.13787704706192017, -0.2509678602218628, 0.32283222675323486, 0.08182340115308762, 0.7464497089385986, -0.2874423563480377, -0.03397557511925697, -0.14605814218521118, 0.14543698728084564, -0.1406717300415039, 0.10588173568248749, -0.4547059237957001, -0.1808702051639557, -0.30808961391448975, 0.09740103781223297, 0.2200726419687271, 0.1771288365125656, -0.23838630318641663, 0.22497893869876862, -0.34360456466674805, -0.280671089887619, 0.34940850734710693, 0.030344396829605103, 0.21189436316490173, -0.1712235063314438, 0.08026887476444244, 0.38411712646484375, 0.062484342604875565, -0.2722819745540619, 0.1710565686225891, 0.21068201959133148, 0.23444035649299622, -0.09084846079349518, -0.18043631315231323, -0.1201758086681366, -0.3061049282550812, -0.01511923037469387, 0.1298443228006363, 0.551469624042511, -0.2090161144733429, -0.15168443322181702, 0.25907668471336365, -0.360348641872406, 0.46198299527168274, 0.3421061336994171, 0.3487672209739685, 0.2704687714576721, 0.17141863703727722, -0.3577377498149872, -0.09141817688941956, -0.12377077341079712, -0.11093462258577347, -0.583260178565979, -0.2473856657743454, -0.2743437886238098, 0.1002848744392395, 0.11591140180826187, -0.3735366463661194, 0.10607381165027618, 0.029911329969763756, 0.16523203253746033, 0.334709107875824, -0.3359485864639282, -0.11549437791109085, -0.07285869866609573, -0.25008976459503174, 0.2025321125984192, -0.04339367523789406, -0.04946018010377884, -0.3409719169139862, 0.23016801476478577, -0.298786461353302, 0.04753369465470314, 0.39911311864852905, 0.2826305329799652, 0.044349268078804016, -0.3554225265979767, -0.22995489835739136, 0.19819015264511108, 0.11172313988208771, -0.06013956665992737, 0.24959340691566467, -0.31511372327804565, -0.04920167848467827, -0.26334211230278015, 0.23301559686660767, -0.01527714729309082, -0.1871243417263031, 0.001741727814078331, 0.10918767750263214, 0.03687601536512375, 0.14577394723892212, 0.07549596577882767, -0.1785767376422882, -0.21450966596603394, -0.2647874355316162, -0.31796297430992126, -0.11849766224622726, -0.07433133572340012, -0.08638912439346313, 0.4793863594532013, 0.058931782841682434, -0.5347626805305481, -0.3082462251186371, 0.37835317850112915, -0.14601737260818481, -0.2836260497570038, -0.16165073215961456, 0.31217628717422485, 0.12907543778419495, 0.0019296871032565832, -0.19125205278396606, 0.00030645355582237244, 0.061607152223587036, -0.13692785799503326, -0.579182505607605, -0.4299156665802002, 0.48207607865333557, -0.13735729455947876, -0.26080071926116943, 0.3844522535800934, 0.29483282566070557, 0.2673247158527374, 0.11254587769508362, -0.16521763801574707, 0.1308746635913849, -0.04906545206904411, 0.17089784145355225, -0.15241174399852753, 0.33388519287109375, -0.31316137313842773, -0.07699039578437805, 0.04954628273844719, -0.2198229432106018, 0.30989938974380493, 0.0017399732023477554, 0.13819672167301178, -0.07704488933086395 ]
https://github.com/huggingface/datasets/issues/2444
Sentence Boundaries missing in Dataset: xtreme / udpos
Hi, This is a known issue. More info on this issue can be found in #2061. If you are looking for an open-source contribution, there are step-by-step instructions in the linked issue that you can follow to fix it.
I was browsing through annotation guidelines, as suggested by the datasets introduction. The guidlines saids "There must be exactly one blank line after every sentence, including the last sentence in the file. Empty sentences are not allowed." in the [Sentence Boundaries and Comments section](https://universaldependencies.org/format.html#sentence-boundaries-and-comments) But the sentence boundaries seems not to be represented by huggingface datasets features well. I found out that multiple sentence are concatenated together as a 1D array, without any delimiter. PAN-x, which is another token classification subset from xtreme do represent the sentence boundary using a 2D array. You may compare in PAN-x.en and udpos.English in the explorer: https://huggingface.co/datasets/viewer/?dataset=xtreme
39
Sentence Boundaries missing in Dataset: xtreme / udpos I was browsing through annotation guidelines, as suggested by the datasets introduction. The guidlines saids "There must be exactly one blank line after every sentence, including the last sentence in the file. Empty sentences are not allowed." in the [Sentence Boundaries and Comments section](https://universaldependencies.org/format.html#sentence-boundaries-and-comments) But the sentence boundaries seems not to be represented by huggingface datasets features well. I found out that multiple sentence are concatenated together as a 1D array, without any delimiter. PAN-x, which is another token classification subset from xtreme do represent the sentence boundary using a 2D array. You may compare in PAN-x.en and udpos.English in the explorer: https://huggingface.co/datasets/viewer/?dataset=xtreme Hi, This is a known issue. More info on this issue can be found in #2061. If you are looking for an open-source contribution, there are step-by-step instructions in the linked issue that you can follow to fix it.
[ 0.29437875747680664, -0.3165702819824219, -0.000339653342962265, -0.04292638599872589, 0.2085694968700409, -0.21818330883979797, 0.28615933656692505, -0.2059638798236847, -0.08608443289995193, 0.03881847858428955, -0.13336580991744995, -0.03214401751756668, 0.099128358066082, 0.012327300384640694, -0.03142717853188515, -0.373359739780426, 0.06621410697698593, -0.02486787736415863, -0.08907938003540039, -0.2008090764284134, 0.01728108525276184, 0.19551321864128113, -0.24963659048080444, -0.1431765854358673, -0.9076260328292847, 0.08293436467647552, -0.44161632657051086, -0.10276900976896286, -0.24908383190631866, -0.28521794080734253, 0.40683963894844055, 0.2977806031703949, 0.014664040878415108, 0.19804072380065918, -0.00011928497406188399, -0.243871808052063, 0.008274607360363007, -0.22508499026298523, 0.14758740365505219, -0.11691544950008392, -0.0043432824313640594, -0.3055853545665741, 0.19426269829273224, -0.0991954654455185, -0.16779261827468872, 0.3073951303958893, -0.03755734860897064, -0.27296626567840576, 0.32807672023773193, 0.2558244466781616, 0.047795023769140244, 0.04369400814175606, 0.1891578584909439, -0.17261777818202972, 0.2665708065032959, 0.10963813960552216, 0.046062469482421875, -0.18004173040390015, 0.39440682530403137, -0.09639792889356613, -0.1886887550354004, 0.05284235626459122, -0.07477174699306488, -0.05295472964644432, 0.03260967135429382, -0.013941391371190548, 0.05537744611501694, -0.3024047017097473, -0.08135399222373962, 0.35179048776626587, 0.586341142654419, -0.1634724736213684, -0.4324626624584198, -0.2785463035106659, 0.15345430374145508, -0.042280714958906174, 0.02326226979494095, 0.1487397700548172, 0.01914854347705841, 0.13765788078308105, -0.21439166367053986, -0.007037363946437836, -0.20357336103916168, 0.19724653661251068, -0.4043770134449005, 0.5016332864761353, -0.1200179010629654, -0.25576379895210266, -0.1704627424478531, 0.0702371895313263, 0.30509331822395325, 0.15179932117462158, -0.059709202498197556, -0.04280714690685272, -0.1932375282049179, 0.05603686720132828, -0.05937298387289047, -0.2394414246082306, 0.2700500190258026, 0.11304536461830139, -0.02153690904378891, -0.09206871688365936, -0.02851765602827072, 0.15028491616249084, 0.3564155399799347, 0.04599699378013611, 0.4407726228237152, -0.14414073526859283, 0.10736031085252762, 0.18527062237262726, 0.06245604529976845, -0.11622781306505203, -0.20451514422893524, 0.03796202689409256, 0.1711203008890152, 0.027792513370513916, 0.07684043794870377, -0.22266440093517303, -0.11090540140867233, 0.09102147072553635, -0.17157220840454102, 0.23573894798755646, -0.08434765040874481, 0.11623392254114151, 0.15268154442310333, 0.36138084530830383, -0.12467055022716522, 0.13691234588623047, -0.059339530766010284, -0.5313047766685486, -0.16526153683662415, -0.06799186766147614, -0.16916289925575256, 0.12952527403831482, 0.09169159829616547, 0.20398102700710297, 0.4520843029022217, -0.06675601005554199, 0.20605047047138214, -0.3830922544002533, -0.21010440587997437, -0.19920966029167175, 0.29792138934135437, 0.29833438992500305, 0.09095565974712372, -0.0935402438044548, 0.005769975483417511, 0.027127951383590698, 0.18002283573150635, 0.11530227959156036, -0.03777722269296646, 0.14523331820964813, -0.2178242802619934, 0.028096947818994522, -0.47521132230758667, -0.10522881150245667, 0.020441479980945587, 0.15911470353603363, 0.19589579105377197, 0.21081218123435974, 0.372646689414978, 0.03346666321158409, -0.16732211410999298, 0.05398239567875862, 0.23220381140708923, 0.5055276155471802, -0.4218670725822449, -0.28609734773635864, 0.006702233571559191, 0.10547763109207153, 0.1910513937473297, 0.16018933057785034, 0.24304872751235962, 0.17639076709747314, -0.20688296854496002, 0.47485852241516113, -0.12794479727745056, -0.12479686737060547, -0.1877078264951706, 0.08195959031581879, 0.19853408634662628, 0.10638035088777542, 0.014289304614067078, -0.31894639134407043, 0.76643967628479, 0.20035573840141296, 0.13625049591064453, -0.20443446934223175, 0.3295779526233673, -0.04685695469379425, -0.030329152941703796, 0.05516044795513153, -0.22021366655826569, -0.07891659438610077, -0.08593787252902985, -0.15180790424346924, 0.1531655192375183, 0.2992611527442932, 0.25010594725608826, 0.042401090264320374, 0.2810054421424866, 0.4519963264465332, 0.22740782797336578, 0.30545127391815186, -0.052371349185705185, -0.3569982349872589, -0.3652440011501312, -0.14565806090831757, 0.38762685656547546, 0.20254182815551758, 0.22567708790302277, 0.03260252624750137, -0.0716572180390358, -0.07348378747701645, -0.1509145200252533, -0.45945996046066284, 0.0537528470158577, 0.1306961625814438, -0.1917300671339035, 0.02197931706905365, -0.2497672140598297, 0.15220141410827637, -0.04495522379875183, 0.3213047385215759, 0.024854864925146103, 0.35137903690338135, 0.2706262767314911, -0.4771031439304352, 0.17843890190124512, 0.5872458815574646, -0.07956301420927048, 0.12707914412021637, -0.03344624117016792, 0.4789629578590393, 0.4988962709903717, -0.1589890867471695, -0.13167732954025269, -0.10622696578502655, 0.3002455234527588, -0.5324891209602356, -0.03620564937591553, -0.15944743156433105, -0.127291738986969, -0.06552915275096893, -0.3021329641342163, 0.2023841142654419, 0.35030606389045715, -0.07401613146066666, -0.07714173197746277, 0.2796509563922882, 0.028656063601374626, -0.08428896963596344, -0.47749829292297363, -0.5662646889686584, 0.24871250987052917, -0.13957487046718597, 0.18320119380950928, 0.2994827926158905, -0.2072240263223648, -0.09933578222990036, 0.21111367642879486, -0.050090812146663666, 0.19151073694229126, 0.14777147769927979, -0.1585729718208313, 0.04913008213043213, 0.2867007851600647, -0.01714693009853363, 0.19388937950134277, 0.4177370071411133, 0.12223602831363678, -0.09839871525764465, -0.12284541875123978, -0.1482389122247696, -0.046072058379650116, 0.26292431354522705, -0.17835360765457153, 0.04416801407933235, 0.19962471723556519, 0.15282821655273438, -0.3149126470088959, 0.05744357034564018, -0.1866769790649414, -0.023504270240664482, -0.3852814733982086, -0.4310305416584015, -0.27885884046554565, -0.6325995326042175, 0.2539139986038208, 0.034816253930330276, -0.4936918020248413, -0.2842388153076172, -0.032161131501197815, -0.37422865629196167, 0.03444774076342583, 0.01709599234163761, 0.048423077911138535, 0.2826184630393982, 0.10433493554592133, 0.48375481367111206, -0.01805940270423889, -0.26757732033729553, -0.004258014261722565, -0.05768882483243942, -0.1463288813829422, 0.3795583248138428, -0.05027763545513153, 0.03385569155216217, 0.13381679356098175, -0.28770408034324646, -0.2033986747264862, 0.19548755884170532, 0.0709628164768219, 0.3235010802745819, 0.43267691135406494, -0.06266714632511139, -0.42419373989105225, 0.3033120632171631, 0.15471071004867554, 0.12552857398986816, -0.24961937963962555, -0.09302029013633728, 0.03214532509446144, -0.08657495677471161, -0.14649233222007751, 0.05364058539271355, 0.09804853796958923, -0.20619332790374756, 0.16784942150115967, -0.18358267843723297, -0.05535357445478439, -0.175487220287323, -0.1889680027961731, 0.256367564201355, -0.4381488859653473, -0.019359789788722992, 0.01086200401186943, -0.825408935546875, 0.3866722285747528, -0.19913515448570251, -0.30302855372428894, -0.015431977808475494, 0.09769997000694275, 0.2604309916496277, -0.18154366314411163, -0.2502307891845703, -0.24177253246307373, -0.3236403167247772, 0.21691247820854187, 0.0544670894742012, -0.10119108855724335, 0.10958458483219147, -0.05158553272485733, 0.089227095246315, -0.25533434748649597, -0.16236241161823273, 0.4873218536376953, 0.15394137799739838, 0.1689656525850296, -0.2814294993877411, 0.17017540335655212, 0.28002670407295227, -0.33054834604263306, 0.4690200090408325, 0.22525915503501892, 0.42933180928230286, 0.10592497140169144, 0.3980964720249176, -0.11273651570081711, -0.06632734090089798, 0.12674839794635773, -0.17074021697044373, 0.259926438331604, 0.33508801460266113, 0.24432942271232605, 0.38132938742637634, 0.06839624047279358, -0.1298307180404663, -0.27316200733184814, -0.2126510888338089, -0.18595091998577118, -0.5198614001274109, 0.1279314160346985, -0.22898419201374054, -0.13230709731578827, 0.04805896058678627, -0.046577028930187225, -0.18598394095897675, 0.22323991358280182, 0.5266067981719971, 0.18563756346702576, -0.34167590737342834, 0.6310097575187683, -0.11775893718004227, -0.07512898743152618, 0.2515764832496643, 0.1422964483499527, -0.1750202476978302, 0.07629922032356262, -0.01020117849111557, 0.4444427490234375, 0.4584876298904419, -0.1506921947002411, -0.388031542301178, 0.0155881866812706, -0.07175464928150177, -0.049161769449710846, -0.022276757284998894, -0.12487170100212097, -0.4263612926006317, 0.6463207006454468, 0.24605298042297363, -0.187041237950325, -0.09239932894706726, -0.02110724151134491, 0.03531366214156151, 0.04413311555981636, -0.27551689743995667, -0.09641392529010773, 0.13267558813095093, -0.19474002718925476, -0.08051475137472153, 0.32718828320503235, -0.04772225022315979, 0.16824954748153687, -0.4310177266597748, 0.19798871874809265, -0.4687085449695587, 0.06316134333610535, -0.028627801686525345, 0.2862272560596466, -0.5002980828285217, -0.027489494532346725, 0.353381872177124, 0.030871601775288582, 0.46325618028640747, 0.039220161736011505, -0.3126153349876404, -0.3794099688529968, 0.36038678884506226, -0.6718878149986267, 0.9012412428855896, 0.03274518996477127, 0.35115617513656616, 0.1237366795539856, -0.12612168490886688, 0.0960148274898529, 0.1673155277967453, 0.1320744901895523, 0.1645965576171875, 0.22198674082756042, -0.004733715672045946, -0.1285552829504013, -0.2284504473209381, 0.009747985750436783, 0.2290443629026413, -0.14198489487171173, 0.3926766514778137, -0.20999200642108917, 0.12563951313495636, -0.005379892885684967, 0.8337067365646362, -0.11035743355751038, 0.2992192208766937, -0.21633169054985046, 0.06267310678958893, 0.5165961980819702, 0.2686862349510193, -0.039216700941324234, 0.2749161124229431, 0.022468825802206993, -0.20807065069675446, -0.049342747777700424, 0.2744283676147461, 0.16046079993247986, -0.3019711375236511, 0.30583056807518005, -0.02379579097032547, -0.07821136713027954, 0.18900549411773682, -0.32205063104629517, 0.1228763535618782, -0.2821013033390045, -0.14514490962028503, -0.030212733894586563, -0.07429704070091248, 0.13399219512939453, 0.010851023718714714, -0.04620686545968056, 0.013951566070318222, 0.0954715758562088, -0.4640967845916748, -0.07051438838243484, -0.3318462073802948, -0.12658050656318665, 0.36965206265449524, -0.00867268443107605, -0.07653268426656723, 0.48265811800956726, 0.29451167583465576, 0.2009199857711792, -0.06210274249315262, 0.20801502466201782, 0.5379253029823303, -0.16142791509628296, -0.023122133687138557, 0.1985260248184204, 0.2764621078968048, -0.2877347469329834, -0.29145339131355286, 0.03166269510984421, -0.10448691248893738, -0.12337028980255127, -0.10039901733398438, -0.1945701390504837, 0.057409871369600296, -0.027203600853681564, 0.0505012646317482, -0.16976121068000793, 0.24057218432426453, -0.3615007996559143, 0.047593213617801666, 0.2042318880558014, -0.028542039915919304, -0.3973739743232727, 0.07637091726064682, -0.1453332155942917, -0.2536848485469818, 0.2905168831348419, -0.366950660943985, -0.052404776215553284, 0.290820837020874, 0.4180586636066437, -0.023269206285476685, -0.22492891550064087, 0.23979681730270386, 0.21505442261695862, -0.4241417944431305, -0.0069748638197779655, -0.24161434173583984, -0.011102929711341858, 0.0034764220472425222, 0.35665178298950195, 0.33603090047836304, -0.04112021625041962, -0.09219936281442642, -0.2644578516483307, -0.22111168503761292, -0.07457180321216583, -0.2075248807668686, 0.013085294514894485, -0.06446973979473114, 0.5586350560188293, 0.3201160728931427, -0.03662624955177307, -0.14393626153469086, 0.06255606561899185, -0.23798280954360962, -0.17348700761795044, 0.15566959977149963, -0.2263438105583191, -0.2235223948955536, -0.1376832276582718, -0.006853021681308746, 0.39709001779556274, 0.49991920590400696, -0.07840992510318756, -0.19223599135875702, 0.11742548644542694, 0.003597250208258629, -0.03624783456325531, 0.1459847241640091, 0.538234531879425, -0.270153671503067, -0.12304174900054932, 0.13783717155456543, 0.20362326502799988, 0.07561031728982925, 0.17611677944660187, 0.16191063821315765, 0.07411535084247589, -0.24480466544628143, -0.12106953561306, 0.24367684125900269, -0.19733451306819916, -0.0061690122820436954, -0.02273181825876236, 0.06376238912343979, 0.10731266438961029, 0.16784100234508514, -0.10872039943933487, 0.03378080949187279, -0.04538770020008087, -0.0774206891655922, 0.07306259870529175, -0.10501745343208313, 0.038819342851638794, 0.16842488944530487, -0.08846086263656616, -0.03851376473903656, -0.13983707129955292, 0.21012422442436218, 0.11708690971136093, -0.2189164012670517, 0.10353584587574005, 0.06412674486637115, 0.3692782521247864, 0.01667509600520134, 0.0967756137251854, 0.16671398282051086, -0.016999393701553345, -0.14914746582508087, 0.019667230546474457, -0.019595764577388763, 0.06307776272296906, 0.26110270619392395, 0.4098835289478302, 0.213020458817482, 0.06449245661497116, 0.08117268234491348, 0.0015836041420698166, 0.20167778432369232, 0.2348065823316574, 0.33694833517074585, 0.475145548582077, 0.10611186921596527, 0.3609163761138916, 0.20392510294914246, -0.25652334094047546, -0.11376583576202393, 0.019085049629211426, -0.11515143513679504, -0.05281829088926315, -0.41036441922187805, 0.5589284896850586, 0.12779928743839264, -0.18805938959121704, -0.22633041441440582, 0.31803178787231445, -0.19193419814109802, -0.08376523852348328, -0.10911913216114044, 0.01132173091173172, -0.07967997342348099, -0.0715598613023758, 0.08320587873458862, 0.09455913305282593, -0.0004826560616493225, -0.24781499803066254, 0.028585098683834076, -0.4175792336463928, -0.26834753155708313, -0.20725035667419434, 0.20114022493362427, -0.17428059875965118, 0.42450422048568726, 0.3192594647407532, -0.4063991904258728, 0.00813337042927742, 0.4427728056907654, 0.30214613676071167, 0.09026600420475006, 0.41326650977134705, -0.09823159128427505, 0.04759424179792404, -0.16082528233528137, 0.13777099549770355, 0.2472914308309555, 0.2786760926246643, 0.16761566698551178, 0.24353642761707306, 0.058656103909015656, -0.014170171692967415, 0.2170734405517578, -0.12831930816173553, 0.08818861842155457, -0.3246138095855713, 0.10932456701993942, -0.029885530471801758, -0.1438876986503601, 0.03326849639415741, -0.08110234886407852, -0.41428452730178833, -0.002024940215051174, 0.12216489017009735, -0.17797768115997314, -0.2098807990550995, -0.11734338104724884, -0.01737317442893982, -0.04545428231358528, 0.1623692661523819, 0.5658305287361145, -0.005157120525836945, 0.2236790508031845, -0.48703140020370483, -0.4129178524017334, -0.09917690604925156, 0.019333919510245323, -0.05546833574771881, 0.20445774495601654, -0.11640316247940063, -0.014187730848789215, -0.07050801813602448, -0.24366675317287445, 0.203753262758255, -0.35973963141441345, -0.19586464762687683, -0.6218897700309753, -0.000883784145116806, 0.39712607860565186, 0.0003162696957588196, -0.046267010271549225, 0.4576951861381531, -0.0648171603679657, 0.24820300936698914, -0.11889787018299103, 0.3025878667831421, 0.2950906753540039, -0.011314880102872849, 0.43824082612991333, -0.44883108139038086, 0.0804613009095192, 0.33968794345855713, 0.02214086800813675, 0.08576428145170212, -0.21244922280311584, -0.07405340671539307, 0.04674164205789566, 0.3410717248916626, 0.1519692838191986, 0.3718179166316986, -0.15512533485889435, -0.07524870336055756, 0.10887612402439117, 0.16504448652267456, 0.20373934507369995, -0.21296271681785583, -0.22504489123821259, 0.0826716348528862, -0.06124294549226761, -0.26137882471084595, 0.16541312634944916, -0.28651493787765503, -0.1310977041721344, -0.1278984546661377, 0.053640007972717285, -0.2311439961194992, -0.0159512460231781, -0.13129578530788422, 0.044401783496141434, -0.4656936824321747, -0.0499696284532547, 0.6577658653259277, -0.1784222573041916, -0.898114800453186, -0.19780269265174866, 0.4490502178668976, 0.1846192181110382, -0.49685946106910706, 0.38749393820762634, -0.05227886512875557, -0.03594135493040085, -0.04287246614694595, 0.601366400718689, 0.19808879494667053, -0.19777268171310425, 0.12583909928798676, -0.09928227216005325 ]
https://github.com/huggingface/datasets/issues/2443
Some tests hang on Windows
Hi ! That would be nice indeed to at least have a warning, since we don't handle the max path length limit. Also if we could have an error instead of an infinite loop I'm sure windows users will appreciate that
Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled.
41
Some tests hang on Windows Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled. Hi ! That would be nice indeed to at least have a warning, since we don't handle the max path length limit. Also if we could have an error instead of an infinite loop I'm sure windows users will appreciate that
[ -0.23916448652744293, -0.021761447191238403, -0.11798727512359619, 0.0013237372040748596, 0.3143852949142456, -0.050242830067873, 0.18320368230342865, 0.15665394067764282, 0.1643403172492981, 0.3078765273094177, 0.7059499621391296, -0.09653889387845993, -0.4796689450740814, 0.04251409322023392, -0.1620284616947174, -0.11059819161891937, 0.1247817724943161, -0.12218557298183441, -0.08347801864147186, 0.2735830545425415, -0.5415410995483398, 0.40210336446762085, -0.10298215597867966, 0.24430231750011444, -0.4127778708934784, -0.02452152408659458, -0.17706416547298431, 0.37332484126091003, 0.03867170214653015, -0.6603713631629944, 0.015210004523396492, 0.04785805568099022, 0.14129820466041565, 0.25311240553855896, -0.00011648086365312338, -0.1899031102657318, 0.5350028276443481, 0.2290477156639099, 0.01290818303823471, 0.15234564244747162, 0.05282062292098999, -0.17466923594474792, 0.24792593717575073, -0.10534156858921051, 0.2352500557899475, 0.359432190656662, -0.1607314497232437, -0.030496913939714432, 0.09327836334705353, 0.3737002909183502, 0.10503458231687546, 0.36480292677879333, -0.04949120432138443, -0.08832830935716629, 0.44824114441871643, 0.018904857337474823, -0.2878829836845398, 0.24825932085514069, 0.49594151973724365, -0.45927754044532776, -0.11719956248998642, -0.08808533847332001, 0.09086654335260391, 0.15073637664318085, 0.02292950078845024, -0.058956243097782135, 0.5751325488090515, -0.4512699544429779, -0.20032787322998047, 0.42095747590065, -0.23493200540542603, -0.015687987208366394, -0.2226240485906601, -0.28502532839775085, 0.19350481033325195, -0.40982165932655334, 0.5957502722740173, 0.03561688959598541, -0.1813478320837021, 0.04689577966928482, -0.022190190851688385, -0.14398051798343658, -0.11329738795757294, 0.04605657234787941, -0.22283896803855896, 0.04456627368927002, 0.23100022971630096, 0.05209305137395859, 0.3748272955417633, -0.012059841305017471, 0.15585322678089142, 0.4347131848335266, -0.14413774013519287, -0.2462710291147232, 0.03650511056184769, -0.10122352838516235, 0.14835241436958313, 0.34998276829719543, 0.22547045350074768, 0.10868561267852783, -0.3143649399280548, -0.09780614823102951, 0.5534825325012207, 0.005372922867536545, -0.37630441784858704, -0.14289000630378723, 0.08918365091085434, -0.06769195944070816, 0.4931468367576599, 0.2424604892730713, -0.043093856424093246, 0.21922951936721802, -0.0567031167447567, -0.8042613863945007, 0.07143387198448181, 0.5170308351516724, 0.35847002267837524, -0.36168208718299866, -0.03293842077255249, 0.16622962057590485, -0.18272891640663147, 0.09820124506950378, 0.268848717212677, 0.2686886489391327, 0.22099339962005615, 0.09426668286323547, 0.05553869903087616, 0.14342528581619263, -0.20216546952724457, 0.36939823627471924, 0.13900047540664673, 0.03666253015398979, -0.37737080454826355, 0.10781513154506683, 0.2827775180339813, 0.005059028975665569, 0.21361389756202698, -0.12098316103219986, 0.39654481410980225, -0.04235143959522247, 0.10819458961486816, -0.06751410663127899, 0.09293040633201599, 0.21594610810279846, -0.2991594672203064, -0.07274702191352844, -0.012956216931343079, 0.16517561674118042, -0.26254749298095703, 0.2976722717285156, 0.023538481444120407, -0.45526567101478577, 0.1728266328573227, 0.1255335807800293, -0.2673513889312744, 0.171752467751503, 0.43153831362724304, -0.11969228088855743, -0.19816431403160095, 0.07984992861747742, 0.3290473520755768, -0.36845606565475464, -0.07524658739566803, -0.11856294423341751, 0.1537751704454422, 0.46752071380615234, -0.012181956321001053, -0.010896921157836914, 0.2409820556640625, -0.1799975484609604, -0.07432306557893753, 0.3938126862049103, -0.1296014040708542, 0.06819929927587509, -0.4522510766983032, -0.021678857505321503, -0.056814514100551605, -0.029500816017389297, -0.009467313066124916, 0.038127351552248, -0.2809455990791321, -0.1634591519832611, 0.26820844411849976, -0.14461320638656616, 0.04805644601583481, -0.20255643129348755, 0.04402410611510277, 0.2531569004058838, 0.029131552204489708, 0.16083793342113495, -0.44070982933044434, -0.48725664615631104, 0.4007737636566162, 0.15229173004627228, 0.25654858350753784, -0.36782628297805786, 0.0031310245394706726, 0.2906613349914551, 0.2672809362411499, -0.05434684082865715, -0.39453208446502686, 0.23663786053657532, 0.1527392715215683, 0.16997310519218445, -0.14352735877037048, 0.23486274480819702, 0.04750358313322067, 0.09435708075761795, -0.34767234325408936, -0.07047908008098602, 0.01286577433347702, -0.2680286169052124, 0.05184592306613922, 0.16030852496623993, 0.17900842428207397, 0.05690229684114456, 0.03983417898416519, -0.09995920956134796, 0.337839812040329, 0.16123197972774506, 0.04897257313132286, -0.17570938169956207, -0.6226352453231812, 0.07562790811061859, 0.13848799467086792, 0.0773187056183815, -0.12613233923912048, -0.12712104618549347, -0.08438296616077423, 0.19503982365131378, 0.10328373312950134, -0.1099058985710144, 0.0767369195818901, 0.2410559356212616, 0.14543330669403076, -0.040421560406684875, -0.08460227400064468, 0.4348886013031006, 0.13162115216255188, 0.011070732027292252, 0.012336209416389465, 0.4217393398284912, -0.40753552317619324, 0.07369310408830643, 0.055514778941869736, 0.23902514576911926, -0.3201410174369812, 0.4193180203437805, 0.03744983673095703, -0.25096115469932556, -0.09632878750562668, -0.36030688881874084, -0.4318922758102417, 0.1608763337135315, 0.4325939118862152, 0.25771281123161316, -0.11935634911060333, -0.06448345631361008, -0.05554111301898956, -0.3684888482093811, 0.41657403111457825, -0.00806518830358982, 0.007569335401058197, 0.41145798563957214, 0.23046720027923584, 0.14870598912239075, -0.09042278677225113, -0.07247824221849442, 0.2649039030075073, 0.15985450148582458, -0.03222380205988884, 0.16858334839344025, -0.3454689383506775, -0.2781635820865631, 0.34531089663505554, 0.22359709441661835, -0.14533673226833344, 0.2507610619068146, 0.022672265768051147, -0.12345261126756668, -0.14518874883651733, -0.4776330888271332, -0.031244374811649323, 0.044935937970876694, -0.4879172742366791, -0.1537807732820511, 0.25331735610961914, -0.33965203166007996, -0.163982093334198, -0.33659735321998596, -0.13787557184696198, -0.2301134467124939, 0.24941903352737427, 0.1771194338798523, -0.3231563866138458, 0.12551912665367126, -0.018924370408058167, 0.3794434070587158, 0.10639943182468414, 0.004054773598909378, -0.12838096916675568, 0.1367347538471222, -0.08053882420063019, -0.005955900996923447, 0.329740971326828, -0.16536350548267365, 0.2761061191558838, -0.04371841996908188, -0.17726188898086548, -0.2435232698917389, -0.43693238496780396, -0.02628425508737564, 0.1350608617067337, 0.3849751055240631, 0.28747671842575073, 0.20029857754707336, 0.4496803283691406, -0.3664640784263611, 0.15001991391181946, -0.18944060802459717, 0.3117998540401459, -0.14050689339637756, 0.18571405112743378, 0.0739964172244072, -0.32001563906669617, -0.05317767709493637, 0.0043492428958415985, -0.41966089606285095, 0.3991323709487915, -0.07944634556770325, 0.036679647862911224, 0.07475217431783676, 0.12061867117881775, 0.2620081603527069, -0.18304122984409332, -0.017846878618001938, 0.30868762731552124, -0.20265592634677887, 0.13833869993686676, 0.06187346950173378, -0.19489671289920807, 0.07059209048748016, -0.24186435341835022, -0.43510910868644714, -0.05510929226875305, -0.533349871635437, -0.33592623472213745, -0.3845425844192505, 0.5380303859710693, -0.06201519817113876, -0.2795819938182831, 0.30688631534576416, 0.06037605181336403, -0.14836779236793518, 0.24103841185569763, 0.035451363772153854, 0.0023786425590515137, -0.0745714008808136, 0.34878259897232056, -0.0238351933658123, 0.23835444450378418, -0.15075571835041046, 0.12191794812679291, 0.05349591746926308, 0.2662055194377899, -0.04331643134355545, -0.100169338285923, 0.21810771524906158, -0.1563328504562378, 0.15216487646102905, -0.0021524536423385143, -0.1536778211593628, -0.5739148259162903, 0.14407773315906525, 0.2271137833595276, 0.15185178816318512, 0.3060590922832489, 0.08291840553283691, 0.2084762156009674, -0.3937462866306305, 0.21173910796642303, -0.20445868372917175, 0.07112107425928116, -0.4346150755882263, 0.06749699264764786, 0.2741535007953644, 0.06905248016119003, 0.30965012311935425, 0.4431300163269043, 0.11576347053050995, -0.022689545527100563, 0.2122383564710617, -0.24949786067008972, -0.3500973582267761, -0.17367689311504364, 0.1631729006767273, 0.32194727659225464, -0.36203479766845703, -0.30223894119262695, -0.016350217163562775, -0.38976019620895386, 0.7135555148124695, 0.05954267829656601, -0.011442456394433975, 0.3372000753879547, 0.09890162944793701, 0.0539369061589241, -0.4292016625404358, -0.3051165044307709, -0.023991301655769348, 0.19108161330223083, 0.27573850750923157, 0.14170518517494202, 0.0658017173409462, 0.06888909637928009, 0.3272840976715088, -0.056478142738342285, -0.02123725600540638, -0.25755101442337036, -0.2793651223182678, -0.36621347069740295, 0.5595240592956543, 0.06504759192466736, -0.1544140875339508, -0.4675735831260681, -0.08808942884206772, 0.07606285810470581, -0.3324147164821625, -0.12711010873317719, 0.27506133913993835, 0.14987137913703918, -0.2761973738670349, 0.07943350076675415, -0.0951218456029892, -0.061882130801677704, -0.14731165766716003, -0.018159188330173492, -0.09437547624111176, 0.321931928396225, 0.10560844838619232, -0.29416948556900024, 0.13361480832099915, 0.6162635684013367, -0.24203293025493622, 0.3068229854106903, -0.39428970217704773, 0.6207207441329956, -0.3629668951034546, 0.28473323583602905, 0.5263585448265076, 0.09138084203004837, -0.03751701861619949, 0.22337116301059723, 0.12468983232975006, 0.19918477535247803, -0.13729804754257202, 0.4933132827281952, 0.15119141340255737, -0.3676445484161377, 0.16107410192489624, -0.04753696173429489, 0.8037679195404053, -0.1301327794790268, 0.2636251151561737, 0.2768620550632477, -0.2134627252817154, 0.031633034348487854, 0.2631060481071472, 0.004958690144121647, -0.021256953477859497, -0.05278940498828888, 0.13326261937618256, -0.12130865454673767, 0.40384528040885925, -0.2893591523170471, -0.49491336941719055, -0.009736837819218636, 0.11730456352233887, -0.36826011538505554, -0.30902835726737976, 0.318436861038208, -0.40091216564178467, -0.05958203598856926, -0.2672673165798187, 0.07545924186706543, 0.2497922033071518, 0.13788345456123352, -0.2718994915485382, 0.2237083911895752, 0.37662649154663086, -0.33997708559036255, -0.2614262104034424, -0.16276955604553223, -0.3189668357372284, -0.039944589138031006, -0.17367538809776306, -0.021201156079769135, -0.026819193735718727, -0.23314622044563293, 0.08635319769382477, 0.4869733452796936, -0.1737557053565979, 0.07504944503307343, 0.1375371813774109, -0.2199287712574005, 0.14547930657863617, -0.1300816833972931, 0.04078568145632744, -0.08736331760883331, -0.0885956808924675, -0.16295364499092102, -0.3459847867488861, -0.06650654226541519, -0.3142247200012207, -0.14248386025428772, 0.2073124498128891, -0.17192940413951874, 0.07638928294181824, -0.14347563683986664, -0.2541714310646057, -0.023842688649892807, 0.13972482085227966, -0.07699465751647949, -0.12073003500699997, 0.21941426396369934, -0.1506747454404831, -0.28202229738235474, -0.11345712840557098, -0.18498456478118896, -0.4514194428920746, 0.10199913382530212, 0.3560177981853485, 0.3655838072299957, 0.08734128624200821, -0.22921529412269592, 0.33935239911079407, -0.1949685961008072, -0.2206103503704071, 0.22834058105945587, 0.4495655596256256, -0.09370026737451553, 0.0368119515478611, 0.28414615988731384, 0.3606705665588379, -0.003370329737663269, 0.0020987577736377716, -0.22054523229599, -0.4499719440937042, 0.08226745575666428, -0.05247626081109047, 0.5089624524116516, -0.1496761590242386, 0.038473062217235565, -0.06356538832187653, -0.5542203783988953, -0.26888030767440796, 0.07628167420625687, -0.3174665868282318, -0.056734196841716766, -0.10123387724161148, -0.1626293659210205, 0.22174309194087982, 0.11460940539836884, 0.006160886958241463, 0.06486662477254868, 0.04912663251161575, -0.182201087474823, -0.15305742621421814, 0.08394002914428711, -0.07841350138187408, 0.053830213844776154, 0.34505584836006165, -0.28975731134414673, 0.4671112298965454, 0.09127390384674072, 0.04935053363442421, 0.15384012460708618, 0.03295091539621353, 0.09414151310920715, 0.23653078079223633, 0.08542367070913315, -0.049299418926239014, 0.2130628079175949, -0.10334470868110657, 0.09689448028802872, -0.10439235717058182, 0.2595856487751007, -0.16012047231197357, 0.1574348509311676, -0.06257601082324982, 0.28684699535369873, -0.13717693090438843, -0.03946823626756668, -0.06276007741689682, 0.1878599226474762, -0.19106094539165497, 0.09767874330282211, 0.12493665516376495, 0.28455305099487305, -0.34369003772735596, 0.06116829812526703, 0.2983245253562927, 0.24780499935150146, -0.1053406223654747, 0.0937681496143341, -0.43254345655441284, -0.2716391682624817, 0.07532042264938354, 0.207696795463562, -0.01612495258450508, -0.3263406753540039, 0.2761290967464447, 0.217698335647583, 0.1730790138244629, -0.05939679592847824, -0.20277655124664307, 0.5297366976737976, -0.09086710214614868, -0.08219574391841888, 0.052689217031002045, 0.05111435055732727, 0.1483466923236847, -0.11697733402252197, 0.15640440583229065, 0.430878609418869, -0.020655542612075806, 0.11751703917980194, -0.08750586956739426, -0.09258180856704712, 0.025284234434366226, -0.21105855703353882, 0.18730390071868896, -0.2725265324115753, -0.04034148156642914, 0.49884411692619324, -0.2770444452762604, -0.12101238965988159, -0.27962353825569153, -0.08486795425415039, -0.07676665484905243, -0.3070850968360901, 0.12417349219322205, 0.12490760535001755, 0.017193779349327087, 0.11480224132537842, 0.10188174992799759, 0.041518665850162506, 0.13174596428871155, 0.29581668972969055, 0.046755075454711914, -0.1289888620376587, 0.14417189359664917, -0.04616505652666092, 0.12820744514465332, -0.4147496521472931, -0.019163256511092186, 0.23719482123851776, 0.06287819892168045, 0.17513373494148254, 0.14369280636310577, 0.7410424947738647, 0.1884404718875885, -0.29572755098342896, -0.15814270079135895, -0.18317149579524994, 0.1981002390384674, 0.03842955082654953, 0.3525540232658386, 0.14902473986148834, 0.46849197149276733, 0.11606231331825256, 0.12163595855236053, -0.22201430797576904, 0.4912024736404419, -0.27740252017974854, -0.2572137415409088, -0.08728550374507904, 0.1711493581533432, 0.45288294553756714, -0.09940654039382935, -0.3272871673107147, 0.022356130182743073, -0.36971190571784973, -0.1242758184671402, 0.24121342599391937, -0.12169570475816727, 0.09193108975887299, 0.1452406793832779, 0.04165716469287872, 0.14415957033634186, 0.4421736001968384, 0.4410910904407501, 0.4239456355571747, -0.2546844780445099, 0.024941660463809967, -0.42406129837036133, -0.11572519689798355, -0.2682246267795563, -0.05297049507498741, 0.183055579662323, -0.2452217936515808, -0.3702525794506073, 0.02850250154733658, -0.1508498340845108, 0.08535941690206528, -0.15346373617649078, -0.0207221582531929, -0.35017263889312744, 0.1093713790178299, 0.3746505379676819, -0.0772380605340004, -0.09137215465307236, -0.21153661608695984, 0.29849565029144287, -0.026216037571430206, -0.05543842911720276, 0.06731541454792023, -0.030379951000213623, 0.06938911974430084, 0.43628376722335815, 0.00040902942419052124, 0.09304969757795334, 0.11030863225460052, -0.04639828950166702, -0.10837778449058533, -0.5494908690452576, -0.3835366666316986, 0.11944414675235748, -0.18587630987167358, 0.051429420709609985, 0.04230364412069321, -0.1885930448770523, -0.27670371532440186, -0.2730677127838135, -0.004214627668261528, -0.08065631985664368, 0.03219274803996086, 0.0828680768609047, 0.044916167855262756, 0.17372480034828186, 0.1800948679447174, -0.016712339594960213, 0.4024490714073181, 0.192869633436203, -0.011631179600954056, 0.01119011640548706, -0.27281415462493896, 0.4084325432777405, -0.2736477553844452, -0.2728581726551056, -0.049435246735811234, 0.34328991174697876, -0.20392638444900513, 0.019996007904410362, -0.48673078417778015, -0.17141160368919373, -0.018433574587106705, 0.14843620359897614, -0.3963744044303894, 0.28627604246139526, 0.0007686633616685867, -0.03950322046875954, -0.02595687098801136, 0.06964016705751419, -0.1661192774772644, -0.0036585070192813873, -0.12133954465389252, -0.25002455711364746 ]
https://github.com/huggingface/datasets/issues/2443
Some tests hang on Windows
Unfortunately, I know this problem very well... 😅 I remember having proposed to throw an error instead of hanging in an infinite loop #2220: 60c7d1b6b71469599a27147a08100f594e7a3f84, 8c8ab60018b00463edf1eca500e434ff061546fc but @lhoestq told me: > Note that the filelock module comes from this project that hasn't changed in years - while still being used by ten of thousands of projects: https://github.com/benediktschmitt/py-filelock > > Unless we have proper tests for this, I wouldn't recommend to change it I opened an Issue requesting a warning/error at startup for that case: #2224
Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled.
85
Some tests hang on Windows Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled. Unfortunately, I know this problem very well... 😅 I remember having proposed to throw an error instead of hanging in an infinite loop #2220: 60c7d1b6b71469599a27147a08100f594e7a3f84, 8c8ab60018b00463edf1eca500e434ff061546fc but @lhoestq told me: > Note that the filelock module comes from this project that hasn't changed in years - while still being used by ten of thousands of projects: https://github.com/benediktschmitt/py-filelock > > Unless we have proper tests for this, I wouldn't recommend to change it I opened an Issue requesting a warning/error at startup for that case: #2224
[ -0.1316356658935547, -0.014070235192775726, -0.11839593946933746, 0.009342711418867111, 0.21633316576480865, 0.009574495255947113, 0.2583828568458557, 0.13995538651943207, 0.21939148008823395, 0.19323089718818665, 0.6185333132743835, -0.2044839709997177, -0.456207811832428, -0.07276476174592972, -0.19601291418075562, -0.0045186616480350494, 0.1505008041858673, -0.12351661920547485, -0.09439900517463684, 0.23592202365398407, -0.5354185104370117, 0.31768113374710083, -0.11725291609764099, 0.1979009509086609, -0.5318852663040161, 0.0011335331946611404, -0.2306557297706604, 0.34671512246131897, 0.12025827169418335, -0.5881577730178833, -0.013182234019041061, 0.1594189703464508, 0.09174962341785431, 0.2956959307193756, -0.00012114089622627944, -0.19672784209251404, 0.4859235882759094, 0.2037380337715149, 0.0005868356674909592, 0.11548563838005066, 0.050920143723487854, -0.13301631808280945, 0.13014177978038788, -0.07213246077299118, 0.3160826861858368, 0.1963719129562378, -0.12023532390594482, -0.09642784297466278, 0.1415558159351349, 0.3219185173511505, 0.06398468464612961, 0.24135833978652954, -0.06925535202026367, -0.04514261335134506, 0.5415892601013184, 0.06150706112384796, -0.18697194755077362, 0.3898577392101288, 0.6111074686050415, -0.5240541696548462, -0.20112007856369019, -0.09538964927196503, 0.10215206444263458, 0.047834694385528564, 0.05241766944527626, -0.10592187196016312, 0.6723549962043762, -0.3971512019634247, -0.20647281408309937, 0.3575098216533661, -0.27661797404289246, -0.06874467432498932, -0.2651713490486145, -0.37191683053970337, 0.2571752369403839, -0.4026554226875305, 0.5238240957260132, 0.0008924566209316254, -0.18377035856246948, 0.11814585328102112, 0.04118148609995842, -0.1604117602109909, -0.0762065052986145, 0.05165872722864151, -0.20299839973449707, -0.00859447568655014, 0.2746642529964447, 0.0897674635052681, 0.32466810941696167, -0.0021188370883464813, 0.2055930644273758, 0.31867027282714844, -0.06625449657440186, -0.22839510440826416, 0.0005713663995265961, -0.07414413243532181, 0.15576323866844177, 0.4239681661128998, 0.18526536226272583, 0.06620410084724426, -0.389707088470459, -0.06681792438030243, 0.6030473113059998, -0.018441125750541687, -0.3685915470123291, -0.17892849445343018, 0.12450194358825684, 0.008042694069445133, 0.45003294944763184, 0.23277831077575684, -0.11831304430961609, 0.24386173486709595, -0.026040013879537582, -0.8544862270355225, 0.03157275542616844, 0.5021636486053467, 0.3412608504295349, -0.3400120735168457, -0.04781688004732132, 0.23210282623767853, -0.2983103394508362, 0.07598541676998138, 0.4083693027496338, 0.21984896063804626, 0.25741109251976013, 0.16451400518417358, 0.14857608079910278, 0.14456072449684143, -0.21952033042907715, 0.4130953848361969, 0.14047978818416595, 0.09663459658622742, -0.34391850233078003, 0.2156900018453598, 0.2637861967086792, 0.062028300017118454, 0.12621016800403595, -0.10994281619787216, 0.4001162648200989, -0.07695206254720688, 0.12512677907943726, -0.18276478350162506, 0.1465218961238861, 0.17614465951919556, -0.3164162039756775, -0.09670756757259369, -0.002351522445678711, 0.14278151094913483, -0.12577778100967407, 0.3069714605808258, 0.010535333305597305, -0.38506537675857544, 0.2843337953090668, 0.07927931845188141, -0.3350977897644043, 0.28206416964530945, 0.4276297390460968, -0.1684337556362152, -0.17303466796875, -0.034023988991975784, 0.36129483580589294, -0.44243907928466797, -0.02979646809399128, -0.06275489926338196, 0.03828181326389313, 0.4527541995048523, 0.007492050528526306, 0.022076159715652466, 0.32148560881614685, -0.14285683631896973, -0.17224690318107605, 0.3537984788417816, -0.09914813935756683, 0.16002106666564941, -0.4256168603897095, 0.01604980230331421, -0.03260188549757004, -0.06769978255033493, -0.1579432636499405, -0.012552357278764248, -0.28336620330810547, -0.11631395667791367, 0.26134979724884033, -0.14428886771202087, 0.07339921593666077, -0.2898307740688324, 0.1417185664176941, 0.14910094439983368, 0.06690748780965805, 0.06895056366920471, -0.37610945105552673, -0.4131205081939697, 0.34174489974975586, 0.16010382771492004, 0.20798949897289276, -0.4094275236129761, 0.0172305628657341, 0.4056783616542816, 0.3045521080493927, -0.05479232594370842, -0.3384217619895935, 0.2564546465873718, 0.2818976938724518, 0.1988408863544464, -0.11414413899183273, 0.22939342260360718, -0.03926917910575867, 0.11774199455976486, -0.5058176517486572, -0.18716366589069366, -0.04699483513832092, -0.25237801671028137, 0.07609479874372482, 0.13351231813430786, 0.19800017774105072, 0.14140181243419647, 0.014660540968179703, -0.08600156009197235, 0.26197072863578796, 0.11723864078521729, 0.12116360664367676, -0.13460113108158112, -0.6055216193199158, 0.09558530151844025, 0.10019588470458984, 0.16853377223014832, -0.045049093663692474, -0.23984505236148834, -0.13227121531963348, 0.19783085584640503, 0.1731102466583252, -0.16377417743206024, 0.09019851684570312, 0.1834791600704193, 0.19193820655345917, 0.0020778849720954895, -0.12332422286272049, 0.4388427138328552, 0.16875915229320526, 0.03751024976372719, -0.016796590760350227, 0.32423266768455505, -0.35029545426368713, 0.03916139900684357, -0.013054996728897095, 0.2228696644306183, -0.37268123030662537, 0.38324663043022156, 0.006909247487783432, -0.3006247878074646, -0.1137445718050003, -0.38197097182273865, -0.4186283349990845, 0.10812833905220032, 0.49160587787628174, 0.37340474128723145, -0.028140109032392502, -0.07068930566310883, 0.09034678339958191, -0.4116043448448181, 0.37134769558906555, -0.09943722188472748, 0.005200155079364777, 0.3837336599826813, 0.2857147455215454, 0.11699067801237106, -0.07963010668754578, -0.10889653861522675, 0.3620380759239197, 0.11650844663381577, -0.014817293733358383, 0.1597655713558197, -0.19521430134773254, -0.29536503553390503, 0.29776450991630554, 0.21040627360343933, -0.16786830127239227, 0.3470379114151001, 0.06184260919690132, -0.1153239980340004, -0.040580231696367264, -0.5296564698219299, 0.09517108649015427, 0.049555547535419464, -0.4471701681613922, -0.1198970377445221, 0.195569708943367, -0.2618546187877655, -0.1542724072933197, -0.32075631618499756, -0.10698162019252777, -0.25023844838142395, 0.20799115300178528, 0.2245192527770996, -0.31199711561203003, 0.06643181294202805, -0.05084831267595291, 0.387759268283844, 0.16606014966964722, 0.016803300008177757, -0.09425266832113266, 0.14704284071922302, 0.02329915016889572, -0.05211985111236572, 0.37057557702064514, -0.16869133710861206, 0.2437378615140915, -0.029028933495283127, -0.2418397068977356, -0.2861432135105133, -0.47563207149505615, 0.05319518968462944, 0.12045501917600632, 0.37241318821907043, 0.31835848093032837, 0.2138860821723938, 0.4626654386520386, -0.3509402275085449, 0.120063416659832, -0.2073257565498352, 0.3529948890209198, -0.17233233153820038, 0.14323487877845764, 0.1692574918270111, -0.3495153486728668, 0.05195832997560501, 0.00008590705692768097, -0.3818432688713074, 0.4376591444015503, -0.08736693859100342, 0.015393991023302078, 0.07348398864269257, 0.027739737182855606, 0.35188132524490356, -0.1488555669784546, 0.014037040993571281, 0.33816200494766235, -0.2036547064781189, 0.07368306815624237, 0.13487191498279572, -0.17146147787570953, -0.031096341088414192, -0.25770479440689087, -0.5798017978668213, -0.020601442083716393, -0.5306001305580139, -0.43990054726600647, -0.3137563169002533, 0.5588341951370239, -0.04602400213479996, -0.2840922474861145, 0.28595826029777527, -0.04912777245044708, -0.09651901572942734, 0.19695734977722168, 0.08932755887508392, 0.03272775560617447, -0.03230227530002594, 0.3258374035358429, 0.07193830609321594, 0.2525537312030792, -0.12293680012226105, 0.05670550838112831, 0.09077785909175873, 0.2744390368461609, -0.04980851709842682, -0.02681201510131359, 0.21132934093475342, -0.17810186743736267, 0.1561136096715927, -0.0355604887008667, -0.16751331090927124, -0.555610716342926, 0.17318245768547058, 0.19222798943519592, 0.19232277572155, 0.2859145998954773, -0.02932906337082386, 0.17884764075279236, -0.4784812927246094, 0.2321714460849762, -0.20712146162986755, 0.00868995487689972, -0.41478362679481506, 0.03751913458108902, 0.1523619443178177, 0.0048923976719379425, 0.26276975870132446, 0.4239976406097412, 0.2038237303495407, -0.0822516605257988, 0.3217107355594635, -0.1980765461921692, -0.32157158851623535, -0.11902748048305511, 0.18919998407363892, 0.3703754246234894, -0.3403121829032898, -0.31520840525627136, -0.0356045663356781, -0.475658118724823, 0.7116439342498779, 0.24101509153842926, 0.02690882608294487, 0.3087714612483978, 0.12593960762023926, 0.11960025876760483, -0.4440324306488037, -0.3544291853904724, 0.001620712224394083, 0.2721105217933655, 0.38868311047554016, 0.06627894192934036, 0.005571593530476093, -0.03737620264291763, 0.37530362606048584, -0.07528038322925568, -0.07290919870138168, -0.12450115382671356, -0.18416059017181396, -0.38956403732299805, 0.46912238001823425, 0.10085084289312363, -0.11856379359960556, -0.44598329067230225, -0.018314961344003677, 0.16415798664093018, -0.37950918078422546, -0.11107160151004791, 0.2170252799987793, 0.08827012032270432, -0.2729942500591278, 0.027793750166893005, -0.08325158804655075, -0.03065117448568344, -0.08704514801502228, -0.05248931795358658, -0.059724945574998856, 0.3577674627304077, 0.20499393343925476, -0.3324193060398102, 0.066089928150177, 0.7001743316650391, -0.27076125144958496, 0.3558589816093445, -0.30350810289382935, 0.54603511095047, -0.34871238470077515, 0.22728058695793152, 0.5174640417098999, 0.09434687346220016, -0.037448640912771225, 0.3069044053554535, 0.09110373258590698, 0.23288483917713165, -0.1738637089729309, 0.516790509223938, 0.15298214554786682, -0.39602968096733093, 0.1211368590593338, -0.01663701981306076, 0.8352264761924744, -0.026006929576396942, 0.2238604575395584, 0.2544744610786438, -0.18883353471755981, 0.03542676568031311, 0.24743352830410004, -0.05582312494516373, -0.030939174816012383, -0.19680364429950714, 0.1435757428407669, -0.16113312542438507, 0.47547680139541626, -0.25151729583740234, -0.3428003489971161, -0.0000902859028428793, 0.1569441705942154, -0.4665779173374176, -0.2782799005508423, 0.3115183115005493, -0.42647579312324524, -0.01865854486823082, -0.3455866873264313, 0.017477430403232574, 0.2856176495552063, 0.09439879655838013, -0.31856104731559753, 0.22413939237594604, 0.3486356735229492, -0.3245663046836853, -0.2068626582622528, -0.25781816244125366, -0.2988283932209015, -0.019420195370912552, -0.17552337050437927, -0.00567355751991272, -0.04707808792591095, -0.23954418301582336, 0.05313199758529663, 0.49952471256256104, -0.12787552177906036, 0.011927086859941483, 0.12412786483764648, -0.1470465511083603, 0.16207250952720642, -0.14860479533672333, 0.07110865414142609, -0.07372572273015976, -0.0657803937792778, -0.15102756023406982, -0.30490055680274963, -0.1187242642045021, -0.2922256588935852, -0.1670822650194168, 0.28220945596694946, -0.1781994253396988, 0.0037347283214330673, -0.20815879106521606, -0.32325202226638794, -0.0005246810615062714, 0.0970788300037384, 0.021199923008680344, -0.17664368450641632, 0.21799975633621216, -0.26621851325035095, -0.2962592840194702, -0.1030673086643219, -0.15909481048583984, -0.5041983127593994, 0.008436251431703568, 0.4400085210800171, 0.4161369502544403, 0.0701133981347084, -0.18449193239212036, 0.44533759355545044, -0.18645864725112915, -0.27948418259620667, 0.17281585931777954, 0.4562316834926605, -0.08318135142326355, 0.038524024188518524, 0.2403491884469986, 0.40584003925323486, 0.09949569404125214, 0.0002571418881416321, -0.29463696479797363, -0.4661717712879181, 0.0758160948753357, -0.06430841982364655, 0.4723453223705292, -0.09569323062896729, 0.060074448585510254, -0.08092200011014938, -0.5390077829360962, -0.23477709293365479, 0.13581813871860504, -0.3285689949989319, -0.01680954173207283, -0.1387876272201538, -0.21691709756851196, 0.1695283204317093, 0.10153090953826904, -0.008470680564641953, 0.11249114573001862, 0.06236668676137924, -0.14549235999584198, -0.14968837797641754, 0.10695665329694748, -0.022242851555347443, 0.048972971737384796, 0.31723472476005554, -0.3200664520263672, 0.5094137787818909, 0.10523469746112823, 0.03901166468858719, 0.1349601149559021, 0.09718433022499084, 0.035920947790145874, 0.24253398180007935, 0.10919161140918732, -0.055653396993875504, 0.21726197004318237, -0.07481063902378082, -0.032735422253608704, -0.1311032772064209, 0.2655622363090515, -0.20614928007125854, 0.18689516186714172, -0.22021543979644775, 0.2822437286376953, -0.1155882179737091, -0.04183023422956467, 0.034565720707178116, 0.20167478919029236, -0.12921953201293945, 0.2081945240497589, 0.10832171142101288, 0.2710421085357666, -0.34828320145606995, 0.03153762221336365, 0.33219096064567566, 0.1888282150030136, -0.09790369868278503, 0.10993080586194992, -0.33054235577583313, -0.2849101722240448, 0.04824346676468849, 0.21590307354927063, -0.12431648373603821, -0.34767383337020874, 0.1930435299873352, 0.2405398190021515, 0.14503541588783264, -0.021982111036777496, -0.26966872811317444, 0.6022275686264038, -0.018744375556707382, -0.0526357926428318, 0.08638056367635727, 0.06959942728281021, 0.1505976915359497, -0.14658580720424652, 0.018484406173229218, 0.3359057605266571, -0.1084495410323143, 0.11432486772537231, -0.024317994713783264, -0.12112298607826233, 0.04913061484694481, -0.10189473628997803, 0.177519291639328, -0.2616158723831177, -0.11024913191795349, 0.4556135833263397, -0.26076772809028625, -0.023503350093960762, -0.1751488894224167, 0.011554313823580742, -0.08454763889312744, -0.323919415473938, 0.1808033287525177, 0.15680602192878723, -0.000040881335735321045, 0.027942460030317307, 0.035942256450653076, 0.04307492822408676, 0.012382835149765015, 0.37130653858184814, 0.04844749718904495, -0.032500021159648895, 0.07198618352413177, -0.0767454206943512, 0.13685858249664307, -0.37816011905670166, 0.0038229767233133316, 0.2791755199432373, 0.12895193696022034, 0.25663262605667114, 0.043877050280570984, 0.6962897777557373, 0.14859119057655334, -0.3574942648410797, -0.158842995762825, -0.17334897816181183, 0.19427095353603363, 0.03445536270737648, 0.40905848145484924, 0.18120747804641724, 0.36080190539360046, 0.05171472951769829, 0.10254866629838943, -0.23404614627361298, 0.48835548758506775, -0.18531076610088348, -0.24480506777763367, -0.12385600805282593, 0.180403470993042, 0.47971290349960327, -0.06935885548591614, -0.26630866527557373, 0.061545487493276596, -0.33297836780548096, -0.1397317349910736, 0.15758982300758362, -0.1344192624092102, 0.12066898494958878, 0.26235833764076233, 0.025026943534612656, 0.04356048256158829, 0.30817195773124695, 0.3810088634490967, 0.3903268575668335, -0.2383052408695221, 0.12004394829273224, -0.3823435604572296, -0.09435389190912247, -0.1524958610534668, -0.08723247796297073, 0.19052036106586456, -0.3165164291858673, -0.28180402517318726, -0.00030201300978660583, -0.14786727726459503, 0.04908815026283264, -0.13480129837989807, -0.025695957243442535, -0.348094642162323, 0.152530238032341, 0.4213390350341797, 0.03959400951862335, -0.12258952111005783, -0.1860150396823883, 0.2646530568599701, -0.009741270914673805, -0.07863938063383102, 0.07319049537181854, -0.11518019437789917, 0.046673599630594254, 0.407021164894104, -0.10930299758911133, 0.10199689865112305, 0.12234046310186386, -0.060630135238170624, -0.1871463656425476, -0.5519605875015259, -0.36459875106811523, 0.14716464281082153, -0.1969410479068756, -0.004149943590164185, 0.07915377616882324, -0.20168349146842957, -0.3115653693675995, -0.1854507327079773, 0.04194974899291992, -0.07351726293563843, -0.05772509425878525, 0.04423314332962036, 0.09265294671058655, 0.13340377807617188, 0.17365604639053345, 0.02209889143705368, 0.4676496982574463, 0.18012014031410217, -0.03462396562099457, -0.01105433702468872, -0.2337913066148758, 0.4812087416648865, -0.38903769850730896, -0.2401883453130722, -0.07041492313146591, 0.3887587785720825, -0.2648903429508209, -0.025229675695300102, -0.43793100118637085, -0.11412255465984344, -0.0028231460601091385, 0.11017793416976929, -0.4098554849624634, 0.193003848195076, 0.04655041918158531, -0.021768838167190552, -0.055114880204200745, 0.022919010370969772, -0.14594468474388123, 0.051483750343322754, -0.1566632241010666, -0.21332038938999176 ]
https://github.com/huggingface/datasets/issues/2443
Some tests hang on Windows
@albertvillanova Thanks for additional info on this issue. Yes, I think the best option is to throw an error instead of suppressing it in a loop. I've considered 2 more options, but I don't really like them: 1. create a temporary file with a filename longer than 255 characters on import; if this fails, long paths are not enabled and raise a warning. I'm not sure about this approach because I don't like the idea of creating a temporary file on import for this purpose. 2. check if long paths are enabled with [this code](https://stackoverflow.com/a/46546731/14095927). As mentioned in the comment, this code relies on an undocumented function and Win10-specific.
Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled.
109
Some tests hang on Windows Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled. @albertvillanova Thanks for additional info on this issue. Yes, I think the best option is to throw an error instead of suppressing it in a loop. I've considered 2 more options, but I don't really like them: 1. create a temporary file with a filename longer than 255 characters on import; if this fails, long paths are not enabled and raise a warning. I'm not sure about this approach because I don't like the idea of creating a temporary file on import for this purpose. 2. check if long paths are enabled with [this code](https://stackoverflow.com/a/46546731/14095927). As mentioned in the comment, this code relies on an undocumented function and Win10-specific.
[ -0.2172689586877823, 0.011509716510772705, -0.15492084622383118, 0.09689906239509583, 0.2777681350708008, -0.11498238146305084, 0.29523035883903503, 0.15919229388237, 0.20752446353435516, 0.3304062485694885, 0.5141476392745972, -0.14155621826648712, -0.37055185437202454, 0.0012733396142721176, -0.11122468113899231, 0.012763883918523788, 0.15758302807807922, -0.00908980518579483, -0.11113308370113373, 0.2419542521238327, -0.5817574858665466, 0.2973513603210449, -0.1208924800157547, 0.0697886273264885, -0.4657230079174042, 0.021146228536963463, -0.1338062584400177, 0.2217043936252594, 0.02262350358068943, -0.5973178744316101, -0.04955767095088959, 0.08737345784902573, 0.19969716668128967, 0.3299793004989624, -0.0001158350714831613, -0.1732417345046997, 0.4302375912666321, 0.15975028276443481, -0.00919215939939022, 0.12729869782924652, 0.023097366094589233, -0.25451475381851196, 0.12710875272750854, -0.07327637821435928, 0.2885796129703522, 0.3217962086200714, -0.18925254046916962, -0.09027297794818878, 0.03565554320812225, 0.3643990755081177, 0.09824486821889877, 0.2990233302116394, -0.003133997321128845, -0.029844682663679123, 0.5178440809249878, -0.0710391104221344, -0.26789942383766174, 0.2770673632621765, 0.6322726011276245, -0.45858514308929443, -0.08643756061792374, -0.09310975670814514, 0.1384405940771103, 0.06693766266107559, 0.04774948209524155, -0.08621681481599808, 0.5759893655776978, -0.473173588514328, -0.035852544009685516, 0.4336647093296051, -0.24553000926971436, 0.11366534233093262, -0.26451048254966736, -0.35384199023246765, 0.19018743932247162, -0.403868168592453, 0.6520928144454956, -0.003658209927380085, -0.11528703570365906, -0.008834555745124817, -0.051410552114248276, -0.11130790412425995, -0.11508884280920029, 0.02678685262799263, -0.3807651698589325, -0.016756586730480194, 0.27896201610565186, 0.022445835173130035, 0.2998564839363098, -0.14390772581100464, 0.11761891096830368, 0.2302720695734024, -0.028879735618829727, -0.1442059427499771, -0.025250013917684555, -0.060807760804891586, 0.15307703614234924, 0.3980494439601898, 0.14618706703186035, 0.0952545702457428, -0.24704395234584808, -0.05204503983259201, 0.5046224594116211, -0.011013016104698181, -0.4035007357597351, 0.0011457223445177078, 0.028873465955257416, -0.09973335266113281, 0.4837907552719116, 0.23886638879776, -0.15272198617458344, 0.21032974123954773, -0.10786747187376022, -0.8629801869392395, 0.047598663717508316, 0.4625176787376404, 0.24719183146953583, -0.33697792887687683, -0.07237111777067184, 0.22641004621982574, -0.1641431748867035, 0.12729835510253906, 0.33009472489356995, 0.3593272566795349, 0.20210713148117065, 0.09274866431951523, 0.03936439007520676, 0.09883612394332886, -0.277581125497818, 0.43774938583374023, 0.18016329407691956, 0.05550273507833481, -0.28026461601257324, -0.0411238819360733, 0.3397877514362335, -0.0915285050868988, 0.1394985318183899, -0.13177883625030518, 0.2847776412963867, -0.11435011029243469, 0.04319685697555542, -0.1867535263299942, 0.3103039562702179, 0.1996108591556549, -0.12651191651821136, -0.10073279589414597, -0.05543048307299614, -0.03334806114435196, -0.17008499801158905, 0.24801883101463318, 0.0035548359155654907, -0.3172849714756012, 0.24030862748622894, 0.10770975053310394, -0.3247683048248291, 0.21293377876281738, 0.48973751068115234, -0.19114433228969574, -0.21190842986106873, 0.025680776685476303, 0.28495827317237854, -0.44526273012161255, -0.06739143282175064, -0.07757804542779922, 0.1355927288532257, 0.4370957016944885, -0.16468505561351776, 0.103848397731781, 0.27077922224998474, -0.12795497477054596, -0.08305444568395615, 0.3319160044193268, -0.11236819624900818, 0.061460480093955994, -0.49501657485961914, 0.13283595442771912, -0.026610739529132843, -0.01449139229953289, 0.006882781628519297, -0.018374091014266014, -0.3378443717956543, -0.0011194497346878052, 0.2841237783432007, -0.20059235394001007, 0.15285155177116394, -0.26633819937705994, 0.13963279128074646, 0.3033241033554077, 0.10102225095033646, 0.07065461575984955, -0.2993465065956116, -0.33173248171806335, 0.37806087732315063, 0.14081443846225739, 0.18320192396640778, -0.48350661993026733, 0.06318871676921844, 0.35219109058380127, 0.2053331434726715, -0.10146376490592957, -0.34100577235221863, 0.3710113763809204, 0.2650716304779053, 0.17966945469379425, -0.14015565812587738, 0.2892667055130005, -0.00013592839241027832, 0.1813502013683319, -0.43529683351516724, -0.11655603349208832, 0.08088164031505585, -0.23880816996097565, 0.09498277306556702, 0.19379787147045135, 0.17621195316314697, 0.11128698289394379, 0.061929404735565186, -0.07147231698036194, 0.3773118257522583, 0.1645881086587906, 0.11333434283733368, -0.10226903855800629, -0.5447922348976135, 0.08723396807909012, 0.023313423618674278, 0.11402817070484161, -0.14721420407295227, -0.19059407711029053, -0.035381294786930084, 0.1501612514257431, 0.23231062293052673, -0.14479988813400269, 0.11127540469169617, 0.1464541256427765, 0.16871768236160278, 0.031283870339393616, -0.22119846940040588, 0.41668179631233215, 0.1917727291584015, 0.14760763943195343, -0.01573343761265278, 0.36534106731414795, -0.28273528814315796, 0.029161036014556885, 0.04556306079030037, 0.2608519494533539, -0.35340264439582825, 0.4727433919906616, 0.1586635857820511, -0.2761833071708679, 0.05877659469842911, -0.35943928360939026, -0.4150962829589844, 0.05492208153009415, 0.6074185967445374, 0.2353583574295044, -0.00037044286727905273, -0.00021067261695861816, 0.12121978402137756, -0.28087377548217773, 0.5422959923744202, 0.05685475841164589, -0.03940863907337189, 0.3032362461090088, 0.1459265649318695, 0.1916731595993042, -0.07512930780649185, 0.006737332791090012, 0.2901606857776642, 0.18299882113933563, 0.09019149094820023, 0.09149107336997986, -0.31583911180496216, -0.27743080258369446, 0.4461655020713806, 0.23204359412193298, -0.15079613029956818, 0.30372127890586853, 0.09465919435024261, -0.15971893072128296, -0.06750667095184326, -0.5304832458496094, 0.10287424176931381, -0.02982824109494686, -0.48438820242881775, -0.12317399680614471, 0.11484730243682861, -0.30946916341781616, -0.31279411911964417, -0.3310086727142334, -0.1815257966518402, -0.21089616417884827, 0.21790191531181335, 0.2613312900066376, -0.32237714529037476, 0.18049027025699615, 0.03761863335967064, 0.3314249515533447, 0.08835972845554352, -0.14287088811397552, -0.05277378112077713, 0.222619891166687, -0.0607936829328537, -0.0157807357609272, 0.45391055941581726, -0.27406370639801025, 0.181487575173378, 0.009213490411639214, -0.16292215883731842, -0.2455582320690155, -0.4740956425666809, -0.006396155804395676, 0.02987021394073963, 0.2510577142238617, 0.2609378695487976, 0.2094193994998932, 0.4769948720932007, -0.2721763551235199, 0.09303101152181625, -0.17601409554481506, 0.34801405668258667, 0.010030336678028107, 0.17392976582050323, 0.058061640709638596, -0.3455105721950531, -0.03995303064584732, 0.03829832375049591, -0.354449599981308, 0.34139442443847656, -0.010359589010477066, 0.0404328778386116, 0.17873656749725342, 0.16176673769950867, 0.3300883173942566, -0.08685307204723358, -0.07670384645462036, 0.2947017550468445, -0.1412649154663086, 0.25551483035087585, 0.0037734676152467728, -0.23888720571994781, 0.15783967077732086, -0.18393351137638092, -0.48130857944488525, 0.016640834510326385, -0.45796340703964233, -0.2532840371131897, -0.4618512690067291, 0.5632855892181396, -0.02074221521615982, -0.18932779133319855, 0.4016419053077698, -0.0025793397799134254, -0.1776575893163681, 0.16463792324066162, 0.12194646894931793, 0.025378666818141937, -0.035275258123874664, 0.3957589566707611, -0.04652249813079834, 0.156389057636261, -0.15814368426799774, -0.05142588913440704, 0.0910617858171463, 0.2764056921005249, 0.04241436719894409, -0.07384879142045975, 0.25001460313796997, -0.17534437775611877, 0.1355895847082138, -0.07051509618759155, -0.2777824103832245, -0.5607450604438782, 0.24707064032554626, 0.16762372851371765, 0.12364364415407181, 0.18835125863552094, -0.0788276344537735, 0.3090280592441559, -0.4608133137226105, 0.35424569249153137, -0.1459755003452301, 0.03336339071393013, -0.3284379839897156, 0.012749210000038147, 0.09571422636508942, -0.02034197561442852, 0.13477063179016113, 0.25820672512054443, 0.10352607071399689, -0.08790306001901627, 0.18362493813037872, -0.28399547934532166, -0.42929381132125854, -0.16219864785671234, 0.2014070302248001, 0.40372610092163086, -0.3110535144805908, -0.2601673901081085, -0.0667257308959961, -0.49684780836105347, 0.7077840566635132, 0.07043170183897018, 0.13346996903419495, 0.33197978138923645, 0.008818864822387695, 0.01723914034664631, -0.35560545325279236, -0.37512362003326416, -0.19425152242183685, 0.2851825952529907, 0.35846811532974243, 0.0886966660618782, 0.08286462724208832, -0.019445743411779404, 0.3784441351890564, -0.07002728432416916, 0.0862087830901146, -0.3121834099292755, -0.2375122606754303, -0.34583455324172974, 0.4420393407344818, 0.18341606855392456, -0.03788159042596817, -0.4988885223865509, -0.09892556071281433, 0.0018959436565637589, -0.4247414469718933, -0.029991716146469116, 0.2790246903896332, 0.02391045168042183, -0.1926017701625824, 0.11856479942798615, -0.16900962591171265, -0.055074580013751984, -0.0781913623213768, 0.13086965680122375, -0.14623820781707764, 0.16466856002807617, 0.07140770554542542, -0.39790406823158264, 0.20172429084777832, 0.6667290925979614, -0.22578047215938568, 0.2673369348049164, -0.3896171450614929, 0.499373197555542, -0.4118642807006836, 0.2541936933994293, 0.3653792142868042, 0.2016884982585907, -0.026140667498111725, 0.3741236925125122, 0.112638920545578, 0.21960045397281647, -0.06787426024675369, 0.4350931942462921, 0.16553401947021484, -0.45418581366539, 0.11072393506765366, -0.03577840328216553, 0.7684600353240967, -0.10259564220905304, 0.23611335456371307, 0.19361308217048645, -0.2726583480834961, 0.06358947604894638, 0.1807946115732193, -0.015271689742803574, 0.012165609747171402, -0.17700348794460297, 0.13161994516849518, -0.17375275492668152, 0.4840863049030304, -0.23007823526859283, -0.3916827142238617, -0.01719447411596775, 0.14506983757019043, -0.20433714985847473, -0.27420803904533386, 0.3656717836856842, -0.41385313868522644, -0.18320907652378082, -0.3267264664173126, 0.07170244306325912, 0.26684752106666565, 0.10394905507564545, -0.28775694966316223, 0.2532525062561035, 0.28626227378845215, -0.34190911054611206, -0.13027730584144592, -0.16965728998184204, -0.3729836046695709, -0.019267283380031586, -0.30367404222488403, -0.19887328147888184, -0.05079089105129242, -0.1214195191860199, 0.04585837572813034, 0.49320706725120544, -0.1412709355354309, 0.09208689630031586, 0.15288983285427094, -0.19997885823249817, 0.17360247671604156, -0.17524008452892303, 0.07305661588907242, -0.13102537393569946, -0.08747689425945282, -0.11943046003580093, -0.23508456349372864, 0.031761690974235535, -0.16121388971805573, -0.07621422410011292, 0.17340409755706787, -0.10930564254522324, 0.045687850564718246, -0.19327563047409058, -0.21744202077388763, -0.0917740911245346, 0.13496464490890503, -0.21881021559238434, -0.14721094071865082, 0.2437860071659088, -0.15764595568180084, -0.2920384407043457, -0.15903113782405853, -0.015977151691913605, -0.5558788180351257, 0.09377925097942352, 0.4450945556163788, 0.4163704514503479, -0.027555303648114204, -0.21981307864189148, 0.43104633688926697, -0.2096075713634491, -0.22382313013076782, 0.1515849381685257, 0.45356130599975586, -0.11387283354997635, -0.056317973881959915, 0.3545501232147217, 0.2941826581954956, -0.04644361883401871, -0.03607578203082085, -0.3193821907043457, -0.3624596893787384, -0.014030471444129944, 0.06570816040039062, 0.4530292749404907, -0.15704834461212158, 0.14199338853359222, -0.05501516908407211, -0.4760752022266388, -0.27754661440849304, 0.09291155636310577, -0.4631839692592621, -0.02487083524465561, -0.23166048526763916, -0.18157565593719482, 0.08358028531074524, 0.09254050254821777, 0.011906174942851067, 0.17233340442180634, 0.0727682039141655, -0.20900923013687134, -0.19257694482803345, 0.07408814877271652, -0.05894770473241806, 0.0468999445438385, 0.35451701283454895, -0.3356930613517761, 0.38529545068740845, 0.028208820149302483, 0.043264877051115036, 0.10460575670003891, 0.009073760360479355, 0.037201788276433945, 0.21151013672351837, 0.08098890632390976, -0.05339356139302254, 0.21458324790000916, -0.12685459852218628, 0.1809292733669281, -0.02256019040942192, 0.2321634292602539, -0.2318398803472519, 0.21773743629455566, -0.14350031316280365, 0.24150514602661133, -0.12327821552753448, -0.005157060921192169, -0.006648615002632141, 0.14733004570007324, -0.14549273252487183, 0.08731097728013992, 0.05973881483078003, 0.34790539741516113, -0.3795173168182373, 0.06728199124336243, 0.4205963611602783, 0.21583279967308044, -0.15613320469856262, 0.09573729336261749, -0.354618638753891, -0.3607591688632965, 0.14121057093143463, 0.28105172514915466, -0.01894325017929077, -0.3506760895252228, 0.2932822108268738, 0.15669116377830505, 0.3039094805717468, 0.08905890583992004, -0.27647116780281067, 0.5668203830718994, 0.033731695264577866, -0.02838214859366417, 0.04617477208375931, 0.13554508984088898, 0.1352977156639099, -0.02257154881954193, 0.0025075972080230713, 0.3725322186946869, -0.14319294691085815, 0.21356236934661865, -0.09027170389890671, -0.16066135466098785, 0.019421955570578575, -0.1444692313671112, 0.12915633618831635, -0.17790266871452332, -0.027712896466255188, 0.3827034533023834, -0.3580884337425232, -0.06963246315717697, -0.2955852448940277, 0.053802814334630966, -0.08248071372509003, -0.23889093101024628, 0.07953241467475891, 0.19373956322669983, 0.07496529817581177, 0.16849052906036377, 0.14267325401306152, 0.04732179641723633, 0.06776849925518036, 0.42211639881134033, 0.14137236773967743, -0.0595819354057312, 0.10981865972280502, -0.1941903829574585, 0.14770111441612244, -0.4636535346508026, -0.02681020461022854, 0.2835346460342407, 0.1742487996816635, 0.17007721960544586, 0.04918602854013443, 0.6987285017967224, 0.09578917920589447, -0.24712952971458435, -0.1762968748807907, -0.2665340304374695, 0.2089698314666748, -0.08357010036706924, 0.35678476095199585, 0.0949687585234642, 0.39642560482025146, 0.19784575700759888, 0.10727095603942871, -0.253805935382843, 0.2967762053012848, -0.13872769474983215, -0.3420831859111786, -0.11909821629524231, 0.09367814660072327, 0.49891749024391174, -0.035275064408779144, -0.3549276292324066, -0.06533987075090408, -0.27094101905822754, 0.03724493831396103, 0.21633850038051605, -0.1412048041820526, 0.11568961292505264, 0.2288048416376114, 0.04818101227283478, 0.01987052708864212, 0.39261379837989807, 0.2761417627334595, 0.415498286485672, -0.2311154305934906, -0.05143582820892334, -0.4386858642101288, -0.1502944529056549, -0.3161565661430359, -0.15451323986053467, 0.14502950012683868, -0.2663196623325348, -0.3011600077152252, 0.020701605826616287, -0.09488612413406372, 0.05888862907886505, -0.09728790819644928, 0.010022986680269241, -0.36979493498802185, -0.02558048442006111, 0.34940218925476074, -0.05728410184383392, -0.1743713915348053, -0.1982954442501068, 0.3089752197265625, -0.11502092331647873, -0.044284675270318985, 0.08252418786287308, -0.06229583919048309, 0.04447739198803902, 0.3745497167110443, 0.07112614810466766, 0.042910076677799225, 0.13084830343723297, -0.01885988935828209, -0.06396576762199402, -0.5000757575035095, -0.15293103456497192, 0.16542665660381317, -0.19786235690116882, 0.1462385207414627, -0.019431745633482933, -0.2850460708141327, -0.2424500733613968, -0.1718781590461731, 0.04131632298231125, -0.00249297171831131, 0.1153157576918602, 0.06675896793603897, 0.03968869894742966, 0.25125986337661743, 0.2332681119441986, 0.03521370515227318, 0.49852463603019714, 0.06930533051490784, -0.05667290836572647, -0.06592102348804474, -0.3039145767688751, 0.3496406078338623, -0.2846904993057251, -0.3333357870578766, -0.013377879746258259, 0.4205601215362549, -0.2500231862068176, -0.011279275640845299, -0.3974561393260956, -0.09664875268936157, -0.07822124660015106, 0.13238416612148285, -0.48078933358192444, 0.24506282806396484, -0.005157431587576866, 0.0007847361266613007, -0.10020213574171066, -0.011485613882541656, -0.09529127925634384, 0.13346397876739502, -0.19641752541065216, -0.11091358214616776 ]
https://github.com/huggingface/datasets/issues/2441
DuplicatedKeysError on personal dataset
Hi ! In your dataset script you must be yielding examples like ```python for line in file: ... yield key, {...} ``` Since `datasets` 1.7.0 we enforce the keys to be unique. However it looks like your examples generator creates duplicate keys: at least two examples have key 0. You can fix that by making sure that your keys are unique. For example if you use a counter to define the key of each example, make sure that your counter is not reset to 0 in during examples generation (between two open files for examples). Let me know if you have other questions :)
## Describe the bug Ever since today, I have been getting a DuplicatedKeysError while trying to load my dataset from my own script. Error returned when running this line: `dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py')` Note that my script was working fine with earlier versions of the Datasets library. Cannot say with 100% certainty if I have been doing something wrong with my dataset script this whole time or if this is simply a bug with the new version of datasets. ## Steps to reproduce the bug I cannot provide code to reproduce the error as I am working with my own dataset. I can however provide my script if requested. ## Expected results For my data to be loaded. ## Actual results **DuplicatedKeysError** exception is raised ``` Downloading and preparing dataset good_reads_practice_dataset/main_domain (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/good_reads_practice_dataset/main_domain/1.1.0/64ff7c3fee2693afdddea75002eb6887d4fedc3d812ae3622128c8504ab21655... --------------------------------------------------------------------------- DuplicatedKeysError Traceback (most recent call last) <ipython-input-6-c342ea0dae9d> in <module>() ----> 1 dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py') 5 frames /usr/local/lib/python3.7/dist-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, task, **config_kwargs) 749 try_from_hf_gcs=try_from_hf_gcs, 750 base_path=base_path, --> 751 use_auth_token=use_auth_token, 752 ) 753 /usr/local/lib/python3.7/dist-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) 573 if not downloaded_from_gcs: 574 self._download_and_prepare( --> 575 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 576 ) 577 # Sync info /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 650 try: 651 # Prepare split will record examples associated to the split --> 652 self._prepare_split(split_generator, **prepare_split_kwargs) 653 except OSError as e: 654 raise OSError( /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _prepare_split(self, split_generator) 990 writer.write(example, key) 991 finally: --> 992 num_examples, num_bytes = writer.finalize() 993 994 split_generator.split_info.num_examples = num_examples /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in finalize(self, close_stream) 407 # In case current_examples < writer_batch_size, but user uses finalize() 408 if self._check_duplicates: --> 409 self.check_duplicate_keys() 410 # Re-intializing to empty list for next batch 411 self.hkey_record = [] /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) 347 for hash, key in self.hkey_record: 348 if hash in tmp_record: --> 349 raise DuplicatedKeysError(key) 350 else: 351 tmp_record.add(hash) DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 0 Keys should be unique and deterministic in nature ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.7.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.9 - PyArrow version: 3.0.0
104
DuplicatedKeysError on personal dataset ## Describe the bug Ever since today, I have been getting a DuplicatedKeysError while trying to load my dataset from my own script. Error returned when running this line: `dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py')` Note that my script was working fine with earlier versions of the Datasets library. Cannot say with 100% certainty if I have been doing something wrong with my dataset script this whole time or if this is simply a bug with the new version of datasets. ## Steps to reproduce the bug I cannot provide code to reproduce the error as I am working with my own dataset. I can however provide my script if requested. ## Expected results For my data to be loaded. ## Actual results **DuplicatedKeysError** exception is raised ``` Downloading and preparing dataset good_reads_practice_dataset/main_domain (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/good_reads_practice_dataset/main_domain/1.1.0/64ff7c3fee2693afdddea75002eb6887d4fedc3d812ae3622128c8504ab21655... --------------------------------------------------------------------------- DuplicatedKeysError Traceback (most recent call last) <ipython-input-6-c342ea0dae9d> in <module>() ----> 1 dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py') 5 frames /usr/local/lib/python3.7/dist-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, task, **config_kwargs) 749 try_from_hf_gcs=try_from_hf_gcs, 750 base_path=base_path, --> 751 use_auth_token=use_auth_token, 752 ) 753 /usr/local/lib/python3.7/dist-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) 573 if not downloaded_from_gcs: 574 self._download_and_prepare( --> 575 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 576 ) 577 # Sync info /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 650 try: 651 # Prepare split will record examples associated to the split --> 652 self._prepare_split(split_generator, **prepare_split_kwargs) 653 except OSError as e: 654 raise OSError( /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _prepare_split(self, split_generator) 990 writer.write(example, key) 991 finally: --> 992 num_examples, num_bytes = writer.finalize() 993 994 split_generator.split_info.num_examples = num_examples /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in finalize(self, close_stream) 407 # In case current_examples < writer_batch_size, but user uses finalize() 408 if self._check_duplicates: --> 409 self.check_duplicate_keys() 410 # Re-intializing to empty list for next batch 411 self.hkey_record = [] /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) 347 for hash, key in self.hkey_record: 348 if hash in tmp_record: --> 349 raise DuplicatedKeysError(key) 350 else: 351 tmp_record.add(hash) DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 0 Keys should be unique and deterministic in nature ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.7.0 - Platform: Windows-10-10.0.19041-SP0 - Python version: 3.7.9 - PyArrow version: 3.0.0 Hi ! In your dataset script you must be yielding examples like ```python for line in file: ... yield key, {...} ``` Since `datasets` 1.7.0 we enforce the keys to be unique. However it looks like your examples generator creates duplicate keys: at least two examples have key 0. You can fix that by making sure that your keys are unique. For example if you use a counter to define the key of each example, make sure that your counter is not reset to 0 in during examples generation (between two open files for examples). Let me know if you have other questions :)
[ -0.18643471598625183, -0.05652354657649994, 0.07348446547985077, 0.21938511729240417, 0.14254815876483917, 0.029286399483680725, 0.5267677903175354, 0.22070999443531036, 0.05882309749722481, 0.0872558206319809, -0.17907460033893585, 0.29249346256256104, -0.13538841903209686, -0.12589022517204285, 0.32251736521720886, 0.16445811092853546, 0.029223784804344177, -0.004896074533462524, -0.13788685202598572, 0.05620963126420975, -0.16695114970207214, 0.2724626660346985, -0.015424259006977081, 0.4006582498550415, -0.11224044859409332, 0.018016647547483444, -0.1549708992242813, 0.3373054265975952, 0.15741758048534393, -0.5524033904075623, 0.37234383821487427, 0.11519384384155273, -0.0585307739675045, 0.6388740539550781, -0.00011437700595706701, 0.08932627737522125, 0.36785680055618286, 0.07268040627241135, -0.3368043303489685, -0.2682759165763855, 0.03493308275938034, -0.02517089620232582, 0.18875212967395782, -0.33042770624160767, 0.040253251791000366, -0.22909556329250336, -0.0011711176484823227, -0.3105665445327759, 0.3904743194580078, 0.22927851974964142, 0.21830406785011292, 0.03670649975538254, -0.0755217894911766, -0.17945611476898193, 0.14906585216522217, 0.331662654876709, 0.12215229123830795, 0.2524907886981964, 0.20905856788158417, -0.12186074256896973, 0.0935608446598053, 0.092256560921669, -0.23267684876918793, 0.2715856730937958, 0.4658201336860657, 0.13819681107997894, -0.22776705026626587, -0.038919784128665924, 0.28106817603111267, 0.4387476444244385, 0.45617905259132385, -0.536632239818573, -0.2995789051055908, -0.4711151421070099, 0.17708009481430054, -0.24117040634155273, 0.12271890044212341, -0.022387275472283363, -0.16655868291854858, 0.21514131128787994, -0.1649235188961029, -0.0753316730260849, -0.1069490909576416, 0.03159787505865097, 0.0011806637048721313, -0.12231764197349548, -0.049361761659383774, 0.27119722962379456, 0.12061455845832825, -0.18592005968093872, -0.04206082969903946, -0.08070012181997299, -0.0626298189163208, 0.047909773886203766, -0.12170928716659546, -0.01212695986032486, 0.07193166762590408, -0.035617440938949585, 0.4212903082370758, 0.12607485055923462, 0.16239002346992493, 0.051126278936862946, 0.07215019315481186, 0.01583583652973175, 0.4798836410045624, 0.025782842189073563, 0.08383830636739731, 0.25383856892585754, 0.2858423590660095, 0.12285497784614563, -0.17083345353603363, -0.005733046680688858, -0.037886038422584534, 0.06166122108697891, 0.5174373984336853, -0.04363288730382919, 0.7000394463539124, -0.2715616822242737, -0.2010088562965393, 0.09891340881586075, 0.0076637864112854, -0.1383434534072876, -0.0781497210264206, 0.16663280129432678, 0.09219969063997269, 0.01520315557718277, -0.18036940693855286, 0.04835931956768036, -0.29642102122306824, -0.12433281540870667, -0.10585521161556244, 0.09028148651123047, 0.07107560336589813, -0.03013918735086918, 0.32089823484420776, -0.4846819043159485, 0.1354745477437973, 0.09962740540504456, 0.02248397469520569, -0.3461915850639343, 0.14965716004371643, 0.017934707924723625, -0.1550014317035675, 0.09562057256698608, 0.13653017580509186, 0.37244370579719543, 0.05515468493103981, -0.2492428719997406, -0.1250036656856537, 0.1580289900302887, -0.3686242401599884, -0.4084015190601349, -0.10849238932132721, 0.22309377789497375, -0.2670641541481018, -0.10357056558132172, -0.1620786190032959, 0.055188290774822235, 0.333281934261322, -0.1818750649690628, -0.06626655906438828, -0.25441545248031616, -0.4359380304813385, -0.29305896162986755, -0.04882258176803589, 0.6278381943702698, -0.30012449622154236, -0.08284080028533936, -0.5352848768234253, -0.1706261783838272, -0.2267044186592102, 0.2687508165836334, -0.35899385809898376, 0.5027721524238586, -0.348479300737381, 0.20101220905780792, 0.06684122234582901, -0.345672607421875, -0.6580870747566223, 0.5311327576637268, -0.2746320366859436, 0.32734739780426025, 0.041612014174461365, 0.1276920735836029, 0.46517080068588257, -0.12330730259418488, 0.11209005862474442, -0.17753446102142334, 0.086210235953331, -0.1243482381105423, -0.05742523446679115, -0.16779674589633942, 0.05089758709073067, 0.028860215097665787, 0.09286625683307648, -0.21942412853240967, 0.29834848642349243, 0.0872548371553421, 0.28124645352363586, -0.23831138014793396, -0.03497639298439026, 0.16622047126293182, 0.1789264678955078, 0.07286922633647919, 0.028324291110038757, -0.19414442777633667, -0.43419504165649414, 0.31759515404701233, 0.004058416932821274, -0.32789698243141174, -0.20907755196094513, -0.18176619708538055, -0.4485369026660919, 0.009839188307523727, -0.5775941610336304, 0.0009192004799842834, 0.07143235951662064, 0.2051878422498703, -0.08127911388874054, 0.025860942900180817, -0.18531352281570435, 0.40734565258026123, 0.18221049010753632, 0.08089019358158112, -0.2352643460035324, 0.003949504345655441, -0.022673411294817924, 0.004118205979466438, 0.07362128049135208, 0.07473161071538925, 0.3385286331176758, -0.08153124153614044, -0.125620037317276, 0.4060437083244324, 0.06418365240097046, 0.15427090227603912, -0.18739968538284302, -0.11529447138309479, 0.11793559789657593, -0.15461444854736328, 0.31598928570747375, 0.1982627958059311, 0.2679871916770935, -0.16547735035419464, -0.3924899995326996, 0.385195791721344, 0.009107779711484909, -0.12249550968408585, -0.16563016176223755, -0.0794711709022522, 0.06320378184318542, -0.20100007951259613, -0.02686043083667755, -0.20526239275932312, 0.2908899486064911, -0.2018517553806305, 0.07992717623710632, 0.14023248851299286, -0.1887187361717224, 0.13982908427715302, 0.16790978610515594, -0.1818196177482605, 0.27904239296913147, 0.16384193301200867, -0.044189006090164185, 0.020984183996915817, -0.038685142993927, 0.29991036653518677, 0.5103563666343689, 0.153733029961586, -0.003718804568052292, 0.26416394114494324, -0.12284129112958908, -0.06468033045530319, 0.06965672969818115, -0.04179826378822327, 0.02268270216882229, 0.21883636713027954, 0.06945674121379852, 0.06869067251682281, -0.2538975775241852, 0.045544784516096115, 0.008370352908968925, 0.3561428189277649, -0.44749173521995544, 0.14447878301143646, -0.5289638042449951, -0.0410224124789238, -0.29092076420783997, 0.11541195213794708, 0.06871999800205231, -0.11833148449659348, -0.0059038251638412476, 0.3284444510936737, 0.07636624574661255, -0.06145583093166351, -0.21957744657993317, 0.07376961410045624, -0.15099528431892395, -0.08385997265577316, 0.037496984004974365, -0.10663063824176788, -0.4570360779762268, 0.03936539217829704, 0.4354346990585327, -0.07556755095720291, 0.4688956141471863, 0.10139061510562897, -0.08677151799201965, -0.5481935739517212, -0.18283556401729584, -0.12212066352367401, -0.013588331639766693, 0.1786355972290039, 0.23380285501480103, 0.03477591648697853, 0.11360280215740204, -0.0659087598323822, 0.03440380468964577, -0.14308926463127136, -0.24605078995227814, 0.1748117208480835, -0.10321545600891113, -0.017034387215971947, -0.06060059741139412, -0.40048399567604065, -0.2146548181772232, 0.05893062427639961, 0.2180158793926239, -0.027881233021616936, -0.0025197267532348633, 0.129180908203125, -0.07947815954685211, -0.034478746354579926, 0.07464510947465897, -0.1346055269241333, -0.3363358974456787, -0.17202243208885193, 0.22248035669326782, -0.14923134446144104, -0.3451080620288849, -0.05647158995270729, -0.05090019851922989, 0.0318320095539093, -0.18241222202777863, -0.7195870280265808, -0.019283806905150414, -0.11496126651763916, 0.2436564564704895, -0.2316606342792511, -0.123125359416008, 0.11639933288097382, 0.04508650302886963, 0.021975362673401833, -0.17027691006660461, -0.4202030897140503, -0.1165175512433052, -0.14168384671211243, 0.05352644994854927, 0.17161622643470764, 0.5161117315292358, 0.021546483039855957, 0.39101457595825195, 0.478675901889801, -0.05187315121293068, 0.11981698125600815, -0.09672000259160995, 0.39125892519950867, -0.16305392980575562, -0.5665513873100281, -0.08866313099861145, -0.15951749682426453, -0.09591694921255112, 0.1090451255440712, -0.14120426774024963, -0.05647141486406326, 0.04497895389795303, -0.1053583174943924, -0.40146908164024353, -0.25348082184791565, -0.18941059708595276, -0.07617367058992386, -0.15745607018470764, 0.19375327229499817, 0.2676416337490082, -0.11560416221618652, -0.07873740047216415, 0.13128438591957092, 0.09390300512313843, 0.019574597477912903, 0.020015571266412735, -0.33471474051475525, -0.03183876723051071, -0.5773208737373352, 0.2624216079711914, 0.05077246576547623, 0.28121113777160645, -0.18057556450366974, 0.2767283618450165, 0.15898142755031586, -0.18834923207759857, 0.3186619281768799, -0.17131733894348145, 0.1666196584701538, 0.20841220021247864, -0.321748286485672, -0.33348673582077026, -0.14180946350097656, 0.055330049246549606, 0.3321937918663025, -0.1960078328847885, 0.3390963077545166, -0.30196166038513184, 0.284757524728775, 0.4102036952972412, 0.22611360251903534, -0.3009190857410431, -0.45737209916114807, 0.009146928787231445, -0.6291176676750183, -0.4878900945186615, -0.03782220929861069, -0.05533958226442337, 0.15636099874973297, -0.04426265507936478, 0.06467887759208679, 0.011540323495864868, 0.01883191242814064, 0.2603391408920288, 0.1147318035364151, 0.23037710785865784, 0.06586050242185593, 0.518787145614624, 0.1961693912744522, -0.02777229994535446, 0.27986857295036316, 0.756523609161377, 0.0018241815268993378, -0.2737170457839966, -0.15945705771446228, -0.23902493715286255, -0.07135852426290512, 0.20791095495224, -0.10344391316175461, 0.09777309000492096, 0.22498804330825806, -0.2202138453722, -0.023498985916376114, -0.08520184457302094, 0.19449612498283386, 0.026329174637794495, -0.4011050760746002, -0.3828486502170563, 0.4315967261791229, 0.12998487055301666, -0.16614829003810883, 0.32168540358543396, -0.15091776847839355, -0.06492367386817932, 0.08625245839357376, -0.30260229110717773, 0.5584701895713806, -0.20486898720264435, 0.11036244034767151, 0.11950110644102097, -0.43909597396850586, 0.2995178997516632, -0.02393820509314537, -0.16615578532218933, -0.5218623280525208, -0.10001971572637558, 0.03263382613658905, 0.06577453017234802, 0.09646602720022202, 0.0393105074763298, -0.051423296332359314, 0.3023511469364166, 0.09515529870986938, 0.025383301079273224, 0.017230305820703506, 0.5617966055870056, 0.042826514691114426, -0.09912370145320892, -0.06701669842004776, 0.15669821202754974, -0.18015582859516144, 0.22039225697517395, -0.05331344157457352, 0.019701387733221054, -0.03242364525794983, -0.37043845653533936, -0.5147488117218018, 0.024351514875888824, -0.055423084646463394, 0.4853644371032715, -0.08287915587425232, -0.6532335877418518, 0.17194953560829163, 0.12295463681221008, 0.23829451203346252, 0.06260250508785248, -0.20262621343135834, 0.1107625961303711, -0.08133155852556229, 0.2891863286495209, -0.20484879612922668, -0.24473218619823456, 0.10651390999555588, -0.03386758640408516, -0.4111082851886749, -0.03144057095050812, 0.17271125316619873, -0.14595568180084229, -0.1441902071237564, 0.11455270648002625, 0.2920164465904236, -0.2978407144546509, -0.17868366837501526, -0.1561235636472702, 0.03872446343302727, -0.2815295159816742, 0.05303184315562248, 0.19025875627994537, 0.05536121875047684, 0.16865578293800354, -0.14815358817577362, -0.3456922769546509, -0.05850307270884514, 0.5251169800758362, 0.16140693426132202, -0.21644377708435059, 0.5713971853256226, 0.07848390936851501, -0.011060362681746483, -0.14436332881450653, 0.39104703068733215, 0.21974922716617584, -0.2600574493408203, 0.07514182478189468, -0.17006617784500122, 0.4170725345611572, 0.1211230456829071, -0.10603196918964386, 0.09095491468906403, -0.03738797456026077, 0.013448093086481094, -0.13377082347869873, -0.29237422347068787, -0.03985520452260971, 0.06455686688423157, 0.2733725309371948, 0.3497540056705475, 0.07004748284816742, 0.02104891650378704, 0.008409500122070312, -0.24612215161323547, 0.28401675820350647, 0.38117289543151855, -0.12479382753372192, 0.36892297863960266, 0.08782827109098434, -0.1213930994272232, 0.08272027969360352, 0.12071900069713593, 0.32672959566116333, -0.01824905164539814, -0.1973792314529419, -0.15363793075084686, 0.15979565680027008, -0.07642387598752975, 0.010183843784034252, -0.10526472330093384, -0.19750908017158508, 0.04208607226610184, -0.08299130201339722, 0.26199546456336975, 0.4193260371685028, 0.10659067332744598, 0.21378034353256226, 0.22052747011184692, -0.09964060038328171, -0.18365097045898438, 0.28504478931427, -0.29021522402763367, 0.13086363673210144, 0.1731797456741333, 0.2483043670654297, 0.1261889487504959, 0.03328585624694824, -0.31449463963508606, 0.0719711184501648, 0.14811863005161285, -0.08814902603626251, 0.19949975609779358, -0.48020756244659424, 0.0026393383741378784, 0.21474210917949677, 0.19911441206932068, 0.31381022930145264, -0.35217511653900146, -0.26608166098594666, 0.0199561957269907, 0.1040721908211708, -0.33798888325691223, -0.3375864624977112, 0.3838549852371216, 0.13042166829109192, -0.16273748874664307, 0.36746150255203247, 0.01185796782374382, -0.20654088258743286, -0.1925649791955948, 0.000024685636162757874, 0.528009831905365, -0.15800409018993378, 0.16354994475841522, 0.3557380735874176, -0.13773150742053986, -0.2449374943971634, 0.19908905029296875, 0.04574150964617729, 0.23266103863716125, 0.7291663885116577, -0.31926417350769043, 0.0695519670844078, 0.03886730968952179, 0.299501895904541, 0.1196967214345932, -0.526960015296936, 0.23261171579360962, 0.019915536046028137, -0.14204023778438568, 0.07348363101482391, 0.3483229875564575, 0.24253839254379272, -0.09504024684429169, 0.07660161703824997, -0.3192045986652374, -0.05175558105111122, -0.15972280502319336, -0.1258331537246704, 0.014250900596380234, -0.12574365735054016, 0.02615000307559967, 0.0950641930103302, -0.22269046306610107, -0.10253682732582092, 0.29049819707870483, 0.016455315053462982, -0.48829537630081177, -0.40082454681396484, 0.14081135392189026, 0.0700540766119957, 0.07780709117650986, -0.21780888736248016, 0.1349121779203415, 0.4335052967071533, 0.061366476118564606, 0.2583366334438324, 0.2638993561267853, 0.6102489829063416, 0.13899575173854828, -0.022001825273036957, 0.13258132338523865, -0.15537691116333008, 0.019685441628098488, 0.14983825385570526, 0.15091489255428314, -0.12792176008224487, 0.36271387338638306, 0.3473045527935028, 0.12913860380649567, 0.06030239164829254, 0.25426775217056274, 0.34595987200737, -0.021778471767902374, -0.43544095754623413, 0.1667443811893463, -0.24337103962898254, -0.1651652753353119, -0.162852481007576, 0.3811464309692383, -0.2777808904647827, -0.23510341346263885, 0.5976243615150452, 0.37268856167793274, 0.07398304343223572, -0.20825637876987457, 0.06010514497756958, -0.12046582996845245, 0.16702298820018768, 0.2927011549472809, -0.19818753004074097, -0.2354176789522171, 0.17436175048351288, -0.954021155834198, 0.31241756677627563, -0.5523520708084106, -0.020242959260940552, 0.06632712483406067, 0.20647701621055603, -0.13965380191802979, 0.07771401107311249, 0.3370630741119385, -0.07651256769895554, -0.14253155887126923, 0.28068095445632935, -0.1841123104095459, -0.27372896671295166, 0.2567865252494812, -0.03197873383760452, 0.041811421513557434, -0.2001497745513916, 0.22164462506771088, -0.2371194213628769, 0.001196354627609253, -0.17377449572086334, -0.11263518035411835, 0.13642235100269318, -0.16212952136993408, 0.43712395429611206, 0.16869568824768066, 0.5093702673912048, 0.18697619438171387, -0.10738469660282135, -0.3273394703865051, 0.005386416334658861, -0.1892153024673462, 0.525309681892395, 0.16640913486480713, 0.4103935658931732, 0.018934916704893112, -0.16805490851402283, -0.11647958308458328, 0.17939633131027222, -0.016118468716740608, 0.058255936950445175, -0.09249986708164215, 0.15486082434654236, -0.06966462731361389, 0.0682692900300026, -0.05760079249739647, 0.23116052150726318, -0.050484515726566315, 0.4076501727104187, -0.1823979765176773, -0.5174461007118225, 0.5359559059143066, -0.32461947202682495, -0.1127241849899292, -0.2242869883775711, 0.3191239833831787, -0.27300870418548584, -0.09221656620502472, -0.43962976336479187, 0.1477433741092682, 0.5595072507858276, -0.09030435234308243, 0.061700981110334396, 0.1447771191596985, -0.24877020716667175, 0.13223673403263092, 0.004494167864322662, 0.29021739959716797, -0.008430972695350647, -0.18498028814792633, 0.49087175726890564, -0.1793062388896942 ]
https://github.com/huggingface/datasets/issues/2440
Remove `extended` field from dataset tagger
The tagger also doesn't insert the value for the `size_categories` field automatically, so this should be fixed too
## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite
18
Remove `extended` field from dataset tagger ## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite The tagger also doesn't insert the value for the `size_categories` field automatically, so this should be fixed too
[ -0.04705779254436493, -0.0278826504945755, -0.006331097334623337, 0.22309048473834991, 0.39806848764419556, 0.38461628556251526, 0.3813192546367645, 0.203802689909935, 0.13319271802902222, 0.30706703662872314, 0.34983891248703003, 0.3464968502521515, -0.33761703968048096, 0.010122401639819145, -0.12409558892250061, 0.06166490167379379, 0.18703649938106537, -0.08482004702091217, 0.2828487753868103, 0.17965221405029297, -0.20780779421329498, -0.12804445624351501, -0.015804313123226166, -0.23960842192173004, -0.29038330912590027, 0.0013583097606897354, -0.1328536421060562, -0.02065792679786682, -0.2535719871520996, -0.6862013936042786, 0.41326361894607544, 0.03452048823237419, -0.05563213303685188, 0.13613107800483704, -0.00011895378702320158, -0.0852048397064209, 0.19411006569862366, -0.0051046255975961685, -0.16109846532344818, -0.29432618618011475, 0.011629875749349594, -0.013253998942673206, 0.07713761180639267, -0.14069296419620514, 0.20412838459014893, -0.27001678943634033, -0.2972787916660309, -0.2101825326681137, -0.006412819027900696, 0.3029445707798004, 0.11342267692089081, -0.17249524593353271, -0.22651825845241547, -0.22237472236156464, 0.31006255745887756, 0.12756562232971191, -0.10882969200611115, 0.13226395845413208, 0.4971143901348114, 0.3124467134475708, -0.03720986098051071, 0.478412002325058, -0.019172977656126022, -0.03231262043118477, 0.3561684191226959, -0.15000693500041962, 0.37282493710517883, -0.31214338541030884, 0.2381991744041443, -0.10958754271268845, 0.3060845136642456, -0.4363085925579071, -0.13980695605278015, -0.6247736811637878, -0.031811077147722244, -0.4837253987789154, 0.3642435073852539, -0.19883519411087036, -0.0016443617641925812, -0.12945501506328583, -0.22438307106494904, -0.21472352743148804, -0.0542469322681427, 0.04480206221342087, -0.3654719889163971, 0.4700634181499481, 0.17299868166446686, 0.06218918785452843, 0.1544351428747177, -0.07474938780069351, -0.04897249862551689, 0.08524580299854279, -0.23986122012138367, 0.08579244464635849, -0.008203279227018356, -0.09289582073688507, -0.031139127910137177, -0.08143603056669235, 0.1322944164276123, 0.3225843906402588, -0.20786653459072113, -0.032761819660663605, 0.24052473902702332, 0.13163235783576965, 0.3100029230117798, 0.030764270573854446, 0.043691352009773254, 0.3443267345428467, 0.01643483340740204, 0.14389756321907043, -0.01691553182899952, -0.11152563244104385, 0.08086705207824707, -0.07413750886917114, 0.47037625312805176, 0.1669953465461731, 0.27053922414779663, -0.22358891367912292, -0.23139004409313202, 0.15068766474723816, -0.3144265115261078, 0.10374519228935242, 0.1048625111579895, 0.10043677687644958, 0.007736817933619022, -0.03368479013442993, -0.32466286420822144, 0.36635297536849976, 0.14442914724349976, 0.052187729626894, -0.043612439185380936, 0.1409452110528946, -0.09003417193889618, -0.12793466448783875, 0.35078421235084534, -0.02772676572203636, 0.23962636291980743, 0.18803849816322327, 0.1474272757768631, 0.009965922683477402, -0.1440267711877823, -0.12269063293933868, 0.28041574358940125, 0.3793877065181732, -0.032303258776664734, 0.1165250912308693, 0.22149856388568878, -0.277606725692749, -0.18014174699783325, 0.14135131239891052, -0.27647873759269714, -0.5645542144775391, -0.1676926165819168, 0.2017686665058136, -0.03903745114803314, -0.01943594217300415, -0.24032005667686462, -0.05387328192591667, 0.3568711578845978, -0.04610579088330269, 0.13745853304862976, -0.3215445280075073, -0.06835387647151947, -0.04300045594573021, 0.09622400254011154, 0.30049046874046326, -0.09309452772140503, -0.1085047572851181, -0.5604651570320129, 0.29987451434135437, -0.0664229467511177, -0.25991711020469666, -0.3118375241756439, 0.15938827395439148, -0.3636183440685272, 0.27718037366867065, 0.36235928535461426, -0.5000998973846436, -0.2899022400379181, -0.07872353494167328, -0.12932747602462769, 0.4150390326976776, 0.0940617248415947, -0.18391937017440796, 0.27068859338760376, -0.26144883036613464, -0.11398990452289581, -0.24251453578472137, -0.49825409054756165, -0.10735578089952469, -0.1978638470172882, -0.0011877287179231644, 0.38337045907974243, 0.06498648226261139, 0.36851251125335693, -0.26401177048683167, 0.19883044064044952, 0.2539694309234619, 0.04292835295200348, -0.11364626884460449, 0.04954168200492859, 0.18985231220722198, 0.2255970537662506, -0.05868862569332123, 0.12372814118862152, -0.21385148167610168, -0.43375444412231445, 0.17002826929092407, -0.1862155944108963, 0.05504186078906059, -0.40368151664733887, -0.47275638580322266, -0.3379828929901123, 0.0708443745970726, -0.29647284746170044, -0.27753597497940063, 0.036286018788814545, -0.03339339792728424, -0.05298018455505371, -0.08500060439109802, 0.000882711261510849, -0.12417186051607132, -0.35641294717788696, 0.3598921000957489, 0.058093033730983734, -0.18354375660419464, -0.183225616812706, -0.06995580345392227, -0.27225396037101746, 0.1583753526210785, 0.28307390213012695, -0.17357730865478516, -0.21332013607025146, 0.22775360941886902, 0.33329078555107117, -0.020988628268241882, -0.2749372124671936, 0.5395739674568176, 0.36403465270996094, 0.017427902668714523, -0.16981090605258942, 0.11856363713741302, -0.14067865908145905, -0.13800373673439026, -0.2306801676750183, 0.06821368634700775, -0.20764872431755066, 0.33075860142707825, -0.010280754417181015, -0.11521205306053162, 0.15144072473049164, 0.05752565339207649, -0.1673298180103302, -0.3952558934688568, -0.12569740414619446, -0.27475282549858093, -0.02833579294383526, 0.062176235020160675, 0.17009706795215607, 0.30820146203041077, 0.4491211771965027, 0.4563252627849579, -0.10459370166063309, 0.12779469788074493, -0.1929859220981598, -0.09355419874191284, 0.15545296669006348, 0.37813177704811096, 0.27997857332229614, 0.141123428940773, 0.01644003763794899, 0.33846569061279297, 0.1400483101606369, -0.10879278182983398, 0.4774751365184784, 0.31825387477874756, 0.16584137082099915, 0.4758274555206299, 0.31804969906806946, 0.17663250863552094, -0.11526284366846085, -0.049047600477933884, 0.10069580376148224, 0.27096277475357056, -0.294903963804245, 0.22326350212097168, -0.4055165648460388, -0.3722480833530426, -0.06783679872751236, -0.41625794768333435, -0.33967652916908264, -0.5190809369087219, 0.30213475227355957, 0.11778943240642548, -0.32789528369903564, 0.1806785613298416, -0.24767062067985535, -0.09608812630176544, 0.0339503139257431, -0.15223854780197144, -0.12188945710659027, 0.06459077447652817, -0.258136510848999, -0.008534025400876999, 0.1556767374277115, -0.41642677783966064, 0.40396323800086975, -0.11760306358337402, 0.1496208906173706, -0.3149617910385132, -0.7408571839332581, 0.2484390288591385, -0.07701985538005829, 0.18346361815929413, 0.42929771542549133, -0.3148037791252136, 0.021579284220933914, -0.25927525758743286, 0.2269996702671051, 0.0908663421869278, 0.13762417435646057, 0.031674161553382874, 0.08502697199583054, 0.1913527101278305, -0.33984696865081787, -0.5397553443908691, -0.2005254477262497, -0.16032575070858002, -0.1500421166419983, 0.16500243544578552, 0.08400914818048477, 0.49945369362831116, -0.06462085247039795, -0.2609849274158478, -0.2369149625301361, 0.009203900583088398, -0.09386853873729706, -0.07433103024959564, 0.19629143178462982, -0.03983070328831673, -0.07464012503623962, 0.35037386417388916, -0.13912466168403625, 0.5066395401954651, 0.12604224681854248, -0.24088703095912933, -0.1568247377872467, 0.3411071300506592, 0.354020357131958, -0.05662579834461212, -0.3169091045856476, 0.36612752079963684, 0.20366889238357544, 0.036485932767391205, -0.06016802042722702, 0.141675665974617, 0.18641839921474457, -0.18165767192840576, 0.21060612797737122, -0.3667786419391632, 0.09760022163391113, 0.30183231830596924, 0.3059275150299072, -0.16783049702644348, -0.04976261034607887, 0.25209060311317444, -0.2006794512271881, 0.021390069276094437, -0.13486403226852417, -0.6103516221046448, -0.0721227377653122, -0.19147849082946777, -0.27377158403396606, 0.18631157279014587, -0.12729665637016296, -0.03076312504708767, 0.1952725350856781, 0.1689477413892746, -0.011830925941467285, -0.33450353145599365, 0.1618981510400772, -0.2411802113056183, 0.20181426405906677, 0.17476466298103333, 0.22809183597564697, -0.2410241812467575, -0.18327787518501282, 0.11054234206676483, 0.10328996181488037, 0.3081323504447937, 0.026536591351032257, 0.21594978868961334, -0.3218400180339813, -0.048848964273929596, 0.2912313640117645, 0.3632236123085022, 0.03782641142606735, -0.08779512345790863, 0.06391983479261398, -0.029953673481941223, -0.07495129108428955, 0.4396289587020874, -0.23278941214084625, -0.014469295740127563, 0.3920864462852478, -0.1407584846019745, 0.040379829704761505, -0.2063893973827362, -0.11542549729347229, 0.18100319802761078, 0.1622506082057953, 0.46888336539268494, -0.3142159879207611, -0.03196212649345398, 0.30334848165512085, 0.21845732629299164, -0.10877756029367447, 0.13083511590957642, -0.10258550941944122, -0.19235560297966003, -0.2805975675582886, 0.19680005311965942, 0.08575499057769775, 0.3269475996494293, -0.019606446847319603, -0.016771601513028145, 0.0317767895758152, -0.010499222204089165, 0.16387295722961426, 0.2648707926273346, 0.3135111331939697, -0.2611885070800781, 0.2118150144815445, -0.26839298009872437, 0.4072529971599579, 0.7266285419464111, 0.4322216212749481, 0.06519594043493271, -0.18432241678237915, -0.018970146775245667, -0.3502711057662964, 0.38985133171081543, 0.11543848365545273, -0.1276163011789322, 0.2575131356716156, -0.2796074450016022, 0.05425217002630234, -0.19767747819423676, 0.14810268580913544, 0.3795385956764221, -0.17382533848285675, -0.25944387912750244, -0.3678876757621765, 0.07771129906177521, 0.2639744281768799, -0.00663621723651886, 0.3888727128505707, 0.039035920053720474, -0.5234273076057434, 0.11863814294338226, 0.14505377411842346, 0.8001853227615356, 0.4121474623680115, -0.19157439470291138, 0.1947609782218933, 0.2244766801595688, 0.09110578149557114, -0.4601958394050598, 0.15816839039325714, -0.2717054784297943, -0.1534430980682373, 0.027751555666327477, 0.055697087198495865, 0.47208166122436523, 0.11086732149124146, -0.21563701331615448, 0.07961299270391464, -0.2481335699558258, 0.4691537618637085, -0.15931446850299835, 0.18527661263942719, -0.5069159865379333, -0.2685129642486572, -0.11978092789649963, 0.0491161048412323, -0.07283228635787964, -0.1467597484588623, -0.16705650091171265, -0.02628864347934723, 0.046017806977033615, -0.4585574269294739, -0.1864124834537506, -0.20023870468139648, -0.1889810711145401, -0.1539575606584549, -0.07879890501499176, 0.06194084882736206, 0.33071985840797424, -0.21980857849121094, 0.22946801781654358, 0.29723602533340454, -0.11910867691040039, 0.22144314646720886, -0.04563487321138382, 0.08294747024774551, 0.22139206528663635, -0.17595729231834412, 0.24804890155792236, -0.06227760761976242, 0.12543600797653198, -0.0810699388384819, -0.124632827937603, -0.16298598051071167, -0.1854170858860016, -0.184537872672081, 0.6051137447357178, -0.47120484709739685, 0.014668237417936325, -0.22695660591125488, 0.0826340764760971, -0.44404125213623047, 0.053661372512578964, -0.16145217418670654, -0.11651832610368729, 0.16193366050720215, -0.24145640432834625, -0.20387029647827148, -0.16000621020793915, 0.055460624396800995, 0.04781949147582054, -0.09632056951522827, 0.39797693490982056, -0.09893662482500076, -0.13355788588523865, -0.2292310893535614, -0.028991900384426117, 0.18882907927036285, -0.5756081938743591, 0.10933823138475418, 0.06648533791303635, -0.045509204268455505, -0.023573709651827812, 0.40116429328918457, 0.08634766191244125, 0.11726091802120209, -0.08206595480442047, -0.3288559317588806, -0.24805086851119995, 0.09233047068119049, 0.043036043643951416, 0.0985751748085022, -0.10089637339115143, 0.07362030446529388, -0.14335180819034576, 0.1773618906736374, -0.2430761307477951, -0.06377048790454865, -0.03914956748485565, 0.19724400341510773, -0.19921614229679108, 0.11104994267225266, -0.023222999647259712, -0.19654543697834015, -0.002994084730744362, 0.18980847299098969, 0.005775891710072756, -0.07914228737354279, -0.15694327652454376, 0.2112521082162857, 0.020479705184698105, 0.18216021358966827, 0.21907708048820496, 0.17408110201358795, -0.05877210572361946, -0.12206120789051056, 0.2485523223876953, -0.09442083537578583, 0.12580925226211548, -0.034382306039333344, 0.23733970522880554, 0.2272665798664093, -0.17351965606212616, -0.06324351578950882, -0.06816259026527405, 0.32353895902633667, -0.06650617718696594, 0.2477601021528244, -0.16000254452228546, -0.08534810692071915, -0.030544787645339966, 0.1990443766117096, -0.056181833148002625, -0.1165548637509346, 0.36276379227638245, -0.26271045207977295, 0.11603868007659912, 0.3600442707538605, 0.2566111087799072, 0.1675010621547699, -0.2431182563304901, -0.01446352619677782, -0.025224488228559494, 0.1866101175546646, -0.2930411100387573, -0.1472269892692566, 0.12641315162181854, -0.12743571400642395, 0.08232173323631287, 0.5224342942237854, 0.6653683185577393, -0.07328658550977707, 0.17590850591659546, 0.06789544969797134, 0.8685907125473022, -0.14643129706382751, 0.33436119556427, 0.7550755739212036, -0.27989301085472107, 0.17769837379455566, 0.24749839305877686, 0.05291152745485306, 0.13756033778190613, 0.3602352738380432, -0.2074297070503235, 0.6691167950630188, 0.5490682721138, -0.32216084003448486, 0.1135338619351387, -0.3197208344936371, 0.26064926385879517, 0.17391587793827057, 0.22251242399215698, 0.08612094819545746, 0.18147063255310059, 0.11435504257678986, 0.08865394443273544, -0.4692405164241791, -0.1042802482843399, 0.19619885087013245, -0.25814661383628845, 0.15726116299629211, 0.013673655688762665, -0.31539228558540344, -0.5290753841400146, 0.08691005408763885, -0.07076835632324219, -0.1452489048242569, 0.1395494043827057, -0.15138967335224152, -0.36555516719818115, -0.12866249680519104, -0.06324292719364166, 0.008228138089179993, 0.25471052527427673, -0.3895724415779114, 0.2708713710308075, 0.374264121055603, -0.2127833068370819, 0.17644242942333221, 0.11819591373205185, 0.48058611154556274, 0.13405640423297882, 0.17198987305164337, -0.19565965235233307, -0.25079482793807983, -0.08364500850439072, 0.0430108942091465, 0.2725760042667389, -0.16126637160778046, 0.194010391831398, 0.12534675002098083, 0.06110221892595291, -0.1453900784254074, -0.021572936326265335, 0.1518562138080597, 0.129501610994339, -0.07585880160331726, 0.28873732686042786, 0.28260427713394165, 0.07102882117033005, -0.12000420689582825, 0.11362259089946747, -0.23196196556091309, -0.28845858573913574, 0.5546868443489075, 0.3244500160217285, 0.19622796773910522, -0.30495408177375793, 0.06906130909919739, 0.1938881278038025, 0.15922534465789795, 0.28495165705680847, -0.314540296792984, -0.26213517785072327, -0.04249584302306175, -0.6376391649246216, 0.1383606642484665, -0.06099025532603264, -0.1454482525587082, 0.4037165641784668, -0.07230930775403976, 0.13648134469985962, 0.08127132058143616, 0.30853545665740967, 0.20470115542411804, 0.43656229972839355, 0.10807956755161285, -0.024280104786157608, 0.01646561361849308, 0.15391822159290314, -0.18984545767307281, -0.029233256354928017, -0.21141168475151062, 0.21178500354290009, -0.41181984543800354, 0.019279733300209045, -0.1006443053483963, -0.2203853279352188, 0.39892300963401794, 0.09031645953655243, 0.49344030022621155, 0.046841610223054886, 0.25208622217178345, -0.09620512276887894, -0.12337309867143631, -0.36043480038642883, -0.06038476154208183, -0.2937460243701935, 0.3651179075241089, -0.0357457660138607, 0.35134610533714294, -0.055430397391319275, -0.24722661077976227, -0.36975160241127014, 0.04008442908525467, 0.036364637315273285, -0.11577444523572922, -0.2941094636917114, 0.29275450110435486, -0.1815779209136963, 0.28770604729652405, 0.07636246830224991, 0.03948221728205681, 0.152559295296669, 0.210079163312912, -0.18766935169696808, -0.5920581817626953, 0.5737800598144531, -0.1900605857372284, -0.35464316606521606, -0.4177163243293762, 0.32766059041023254, 0.13192887604236603, -0.18862181901931763, -0.6175742745399475, -0.2775549590587616, 0.42265936732292175, 0.024939920753240585, -0.04034578800201416, 0.18508900701999664, 0.09467270970344543, -0.08416809141635895, -0.0873369574546814, 0.016686979681253433, 0.021702878177165985, 0.12898637354373932, 0.09182797372341156, -0.1965799778699875 ]
https://github.com/huggingface/datasets/issues/2440
Remove `extended` field from dataset tagger
Thanks for reporting. Indeed the `extended` tag doesn't exist. Not sure why we had that in the tagger. The repo of the tagger is here if someone wants to give this a try: https://github.com/huggingface/datasets-tagging Otherwise I can probably fix it next week
## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite
42
Remove `extended` field from dataset tagger ## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite Thanks for reporting. Indeed the `extended` tag doesn't exist. Not sure why we had that in the tagger. The repo of the tagger is here if someone wants to give this a try: https://github.com/huggingface/datasets-tagging Otherwise I can probably fix it next week
[ 0.00031420961022377014, -0.0987943708896637, -0.0033113621175289154, 0.191211998462677, 0.4241892695426941, 0.40577998757362366, 0.37730658054351807, 0.23212487995624542, 0.11827531456947327, 0.2808995246887207, 0.3130054771900177, 0.4294629991054535, -0.2918015122413635, 0.00031016021966934204, -0.0962812528014183, 0.051927946507930756, 0.21927237510681152, -0.06988252699375153, 0.2905517816543579, 0.14988981187343597, -0.1867193728685379, -0.10429602861404419, -0.02170155569911003, -0.22404824197292328, -0.2687336802482605, -0.0041393134742975235, -0.15221457183361053, -0.0004327334463596344, -0.19240786135196686, -0.660916268825531, 0.3868134319782257, 0.07121142745018005, -0.03973100334405899, 0.14082957804203033, -0.00011846777488244697, -0.11255095899105072, 0.24387718737125397, -0.0025302283465862274, -0.1776151806116104, -0.2817537784576416, -0.007693864405155182, 0.03831613063812256, 0.12093549221754074, -0.15559594333171844, 0.14536383748054504, -0.19537660479545593, -0.3327719569206238, -0.21868890523910522, 0.11786308139562607, 0.34513381123542786, 0.12463286519050598, -0.0914977490901947, -0.20983874797821045, -0.18903431296348572, 0.33942174911499023, 0.09093104302883148, -0.09668850153684616, 0.09024778008460999, 0.5893577337265015, 0.30977556109428406, 0.02360464632511139, 0.4658854603767395, -0.04669533669948578, -0.053547944873571396, 0.3191026747226715, -0.18110385537147522, 0.3747122287750244, -0.24245619773864746, 0.20497360825538635, -0.09112357348203659, 0.32239311933517456, -0.40566813945770264, -0.15566416084766388, -0.5504048466682434, -0.0075734686106443405, -0.5235103964805603, 0.39827948808670044, -0.23340590298175812, -0.024390555918216705, -0.09129351377487183, -0.2531805634498596, -0.22121746838092804, -0.047598227858543396, 0.05591303110122681, -0.35109278559684753, 0.40752652287483215, 0.1735144555568695, 0.06536807119846344, 0.14310182631015778, -0.08612145483493805, 0.02075165882706642, 0.08461469411849976, -0.1744767427444458, 0.03379620984196663, 0.03343088924884796, -0.13153569400310516, -0.1024264320731163, -0.13742557168006897, 0.1256539225578308, 0.373998761177063, -0.22337758541107178, -0.009490210562944412, 0.20222733914852142, 0.14534762501716614, 0.34324219822883606, -0.03944147005677223, 0.06467539817094803, 0.33922648429870605, 0.041091300547122955, 0.1974247694015503, -0.04683098942041397, -0.11009008437395096, 0.06272388994693756, -0.044979389756917953, 0.4439435303211212, 0.19497358798980713, 0.2984238862991333, -0.29265671968460083, -0.197029709815979, 0.09699153900146484, -0.370485782623291, 0.14517061412334442, 0.13440129160881042, 0.12673132121562958, 0.054043687880039215, -0.10255559533834457, -0.3116004467010498, 0.31160104274749756, 0.1424890011548996, -0.01136031560599804, -0.03407493233680725, 0.15318913757801056, -0.10160921514034271, -0.10600617527961731, 0.4092155992984772, -0.0865492969751358, 0.26452702283859253, 0.17235952615737915, 0.1397741734981537, -0.02693372219800949, -0.0855332687497139, -0.06963995099067688, 0.319129079580307, 0.3765221834182739, -0.03746837377548218, 0.14721588790416718, 0.21454912424087524, -0.2550092339515686, -0.1550871729850769, 0.13582882285118103, -0.30369454622268677, -0.5740442276000977, -0.15603435039520264, 0.18870005011558533, -0.09663400799036026, -0.0061226338148117065, -0.19458720088005066, -0.13672438263893127, 0.35933947563171387, -0.05590683966875076, 0.13247337937355042, -0.3022395372390747, -0.11359810829162598, 0.007778555154800415, 0.153299942612648, 0.3194817900657654, -0.02980896830558777, -0.06567303091287613, -0.5532763004302979, 0.2635626792907715, -0.11939922720193863, -0.26198580861091614, -0.33197787404060364, 0.11003521829843521, -0.36119943857192993, 0.2333567589521408, 0.2785121202468872, -0.5548006892204285, -0.2303905487060547, -0.037775054574012756, -0.17240804433822632, 0.4368148446083069, 0.03980837017297745, -0.23580940067768097, 0.260669082403183, -0.30761265754699707, -0.10314826667308807, -0.2270415723323822, -0.47276386618614197, -0.16279859840869904, -0.273288756608963, 0.04892657697200775, 0.3657885193824768, 0.05669679120182991, 0.2494952231645584, -0.26550719141960144, 0.15011972188949585, 0.21885879337787628, 0.07007039338350296, -0.11653260886669159, 0.06633300334215164, 0.243631049990654, 0.24963314831256866, -0.002194017171859741, 0.10359449684619904, -0.19650080800056458, -0.40231847763061523, 0.1305839717388153, -0.17836207151412964, 0.023057768121361732, -0.48124051094055176, -0.45917218923568726, -0.3062451183795929, 0.037604764103889465, -0.35347530245780945, -0.3354027569293976, 0.0344674289226532, -0.06308236718177795, -0.0725848376750946, -0.0820656269788742, 0.02346603199839592, -0.14264199137687683, -0.3872591555118561, 0.30707430839538574, 0.008498119190335274, -0.13341368734836578, -0.17110475897789001, -0.04227357357740402, -0.23890186846256256, 0.19581371545791626, 0.33635851740837097, -0.18972066044807434, -0.21880358457565308, 0.25989386439323425, 0.35838958621025085, -0.08791206777095795, -0.19849035143852234, 0.5692502856254578, 0.34283143281936646, -0.10011975467205048, -0.1322917938232422, 0.1385311484336853, -0.15581242740154266, -0.1278756856918335, -0.28621840476989746, 0.08955153077840805, -0.23828749358654022, 0.38041484355926514, -0.013192754238843918, -0.028768189251422882, 0.2370084822177887, 0.056268710643053055, -0.2296646237373352, -0.42930495738983154, -0.1230936050415039, -0.23355333507061005, -0.05644541233778, 0.001982634887099266, 0.13896314799785614, 0.34405601024627686, 0.3959483206272125, 0.4019792079925537, -0.16737809777259827, 0.1014387309551239, -0.19102153182029724, -0.10446643829345703, 0.1607942283153534, 0.3864330053329468, 0.24569764733314514, 0.1284865289926529, -0.022930990904569626, 0.3320827782154083, 0.14048375189304352, -0.11040771752595901, 0.4423738718032837, 0.2740829586982727, 0.1690317541360855, 0.443869024515152, 0.2920733094215393, 0.1619815081357956, -0.05709513649344444, -0.0997476726770401, 0.12826700508594513, 0.27019941806793213, -0.3040618598461151, 0.22501662373542786, -0.43460533022880554, -0.38083118200302124, -0.10633769631385803, -0.4021797776222229, -0.31946080923080444, -0.5558410286903381, 0.29026901721954346, 0.09368441253900528, -0.3065011501312256, 0.28066229820251465, -0.18720853328704834, -0.11698676645755768, 0.006309418007731438, -0.17698153853416443, -0.14441943168640137, 0.014544826000928879, -0.2073560357093811, -0.017189007252454758, 0.1901349127292633, -0.3280123472213745, 0.39189431071281433, -0.08014103025197983, 0.1511206328868866, -0.4546264111995697, -0.6928058862686157, 0.24211087822914124, -0.12028825283050537, 0.21342091262340546, 0.4348095655441284, -0.3150681257247925, 0.05092833936214447, -0.264137327671051, 0.23831939697265625, -0.008994964882731438, 0.15185865759849548, 0.030701767653226852, 0.08897577971220016, 0.15766525268554688, -0.2906534969806671, -0.543624997138977, -0.16081878542900085, -0.1135815978050232, -0.12075987458229065, 0.12973302602767944, 0.05581992119550705, 0.4889587461948395, -0.058484163135290146, -0.20235683023929596, -0.30876681208610535, -0.00783631019294262, -0.10233983397483826, -0.14423294365406036, 0.13790328800678253, -0.09202737361192703, -0.10642699897289276, 0.4192367494106293, -0.09545717388391495, 0.540205717086792, 0.10764122754335403, -0.2199103832244873, -0.15655463933944702, 0.3927101790904999, 0.4241112470626831, -0.056909799575805664, -0.3841506540775299, 0.34866851568222046, 0.21057209372520447, 0.044372670352458954, -0.06488972902297974, 0.11588269472122192, 0.20749828219413757, -0.20825889706611633, 0.23259294033050537, -0.3750942051410675, 0.08650088310241699, 0.24084606766700745, 0.3512166738510132, -0.142556831240654, -0.014541197568178177, 0.18669360876083374, -0.2168247550725937, -0.00016103312373161316, -0.16654285788536072, -0.5890361666679382, -0.13975398242473602, -0.17330560088157654, -0.242723286151886, 0.1731242835521698, -0.14618933200836182, -0.03759539872407913, 0.1774250566959381, 0.1735094040632248, -0.002955477684736252, -0.34570130705833435, 0.13092012703418732, -0.25589385628700256, 0.24805518984794617, 0.1915760040283203, 0.2138013243675232, -0.22688210010528564, -0.19464948773384094, 0.122684046626091, 0.1072448343038559, 0.3399107754230499, 0.00267350347712636, 0.1989872008562088, -0.31842631101608276, -0.03410549461841583, 0.30357450246810913, 0.37709343433380127, 0.11479459702968597, -0.08632517606019974, 0.08641888946294785, -0.00713019073009491, -0.09621483832597733, 0.46475470066070557, -0.2693884074687958, 0.04216977208852768, 0.4391360580921173, -0.19763514399528503, 0.01124807633459568, -0.2105625718832016, -0.13832370936870575, 0.17648304998874664, 0.08706431090831757, 0.566453218460083, -0.22836387157440186, -0.10164321959018707, 0.3886181712150574, 0.2248513251543045, -0.09957437962293625, 0.09205366671085358, -0.09263982623815536, -0.2424953579902649, -0.27010291814804077, 0.1623060405254364, 0.08105731755495071, 0.2958459258079529, -0.07566843926906586, -0.043492455035448074, 0.07183726131916046, 0.042427994310855865, 0.10506483912467957, 0.2345249056816101, 0.3128807842731476, -0.27719926834106445, 0.2501497268676758, -0.21370840072631836, 0.407868891954422, 0.6896818280220032, 0.4112485647201538, -0.07221466302871704, -0.164014995098114, -0.0656764805316925, -0.4268178641796112, 0.3582836985588074, 0.12913183867931366, -0.13795186579227448, 0.3108283281326294, -0.2520999312400818, 0.0059106722474098206, -0.1566772162914276, 0.09536859393119812, 0.3929441273212433, -0.09930675476789474, -0.2628517150878906, -0.4332628846168518, 0.0545973926782608, 0.27359360456466675, 0.008203111588954926, 0.386019229888916, -0.006482668220996857, -0.43961477279663086, 0.12772111594676971, 0.15991953015327454, 0.8890953063964844, 0.35606861114501953, -0.1739722043275833, 0.1735229194164276, 0.228018119931221, 0.10160500556230545, -0.5014364719390869, 0.1365300714969635, -0.26679107546806335, -0.23940987884998322, 0.03212220221757889, 0.050654951483011246, 0.4719637930393219, 0.05005669593811035, -0.21754692494869232, 0.08570418506860733, -0.26002228260040283, 0.47880488634109497, -0.125393345952034, 0.2223035991191864, -0.43446066975593567, -0.23903095722198486, -0.13493381440639496, 0.05853088200092316, -0.07945425808429718, -0.16763874888420105, -0.16149663925170898, -0.037565041333436966, 0.05281868949532509, -0.4639972448348999, -0.16720959544181824, -0.12681859731674194, -0.1354501098394394, -0.09527793526649475, -0.098609060049057, 0.0675143450498581, 0.3694373071193695, -0.2576724588871002, 0.2425047606229782, 0.2825702130794525, -0.16631336510181427, 0.2520090937614441, 0.02066180109977722, 0.008071154356002808, 0.159275621175766, -0.18572506308555603, 0.26943981647491455, -0.10887466371059418, 0.08106151968240738, -0.05531004071235657, -0.12825433909893036, -0.15889805555343628, -0.1465989351272583, -0.19830812513828278, 0.6032130718231201, -0.4415477216243744, 0.016625503078103065, -0.1621665060520172, 0.05220669135451317, -0.4735490381717682, 0.07477478682994843, -0.1701306849718094, -0.17945818603038788, 0.11204425990581512, -0.2498127669095993, -0.20684203505516052, -0.11449189484119415, 0.09620196372270584, 0.024282583966851234, -0.13138237595558167, 0.46999433636665344, -0.03770291805267334, -0.10129355639219284, -0.27871885895729065, -0.028008807450532913, 0.19241492450237274, -0.6166582703590393, 0.1606227308511734, 0.113711878657341, 0.05176475644111633, -0.0011959411203861237, 0.45177289843559265, 0.033244743943214417, 0.10490585118532181, -0.09145358204841614, -0.33057287335395813, -0.2469262331724167, 0.051120273768901825, 0.012712845578789711, 0.08420953154563904, -0.09043614566326141, 0.17688904702663422, -0.12973514199256897, 0.1352156400680542, -0.2654193043708801, -0.005697772838175297, -0.08737725764513016, 0.20006093382835388, -0.12785382568836212, 0.061297304928302765, -0.0018429879564791918, -0.19750814139842987, 0.018512139096856117, 0.18835388123989105, -0.0046713687479496, -0.09467810392379761, -0.14962001144886017, 0.20908521115779877, 0.0016977917402982712, 0.18340438604354858, 0.2538028657436371, 0.18210811913013458, -0.07982316613197327, -0.10731860995292664, 0.20555394887924194, -0.04537753015756607, 0.155174121260643, 0.012437748722732067, 0.2630966901779175, 0.2316504716873169, -0.24438312649726868, -0.07066001743078232, -0.08227746188640594, 0.28969934582710266, -0.06469649076461792, 0.2060537338256836, -0.2416515350341797, -0.09960731118917465, -0.006517586763948202, 0.2077779769897461, -0.11569878458976746, -0.06703513860702515, 0.3926120102405548, -0.25219714641571045, 0.11101265251636505, 0.3472042679786682, 0.22885386645793915, 0.20763570070266724, -0.3032683730125427, -0.02649598941206932, -0.001669655553996563, 0.18507814407348633, -0.27085164189338684, -0.10503295809030533, 0.17755195498466492, -0.1248033419251442, 0.05841320380568504, 0.4639508128166199, 0.6760464906692505, -0.11835379898548126, 0.19801826775074005, 0.07461259514093399, 0.8444793820381165, -0.2484198659658432, 0.36392343044281006, 0.7368881106376648, -0.20643067359924316, 0.15315376222133636, 0.1691211462020874, 0.08382021635770798, 0.09748817980289459, 0.32698190212249756, -0.24334415793418884, 0.6369714736938477, 0.548329770565033, -0.2806740403175354, 0.13149413466453552, -0.3452029526233673, 0.3214642405509949, 0.15747106075286865, 0.2007056027650833, 0.12414152920246124, 0.10724844038486481, 0.21551093459129333, 0.07064078748226166, -0.4382078945636749, -0.11553171277046204, 0.24469208717346191, -0.21830254793167114, 0.12944677472114563, 0.029390297830104828, -0.276700496673584, -0.5507528781890869, 0.10267558693885803, -0.060092125087976456, -0.11930134892463684, 0.10656219720840454, -0.12506641447544098, -0.36609750986099243, -0.16285383701324463, -0.02419446036219597, 0.0017165951430797577, 0.2560478448867798, -0.34037259221076965, 0.25004130601882935, 0.3928287625312805, -0.1883886158466339, 0.16986671090126038, 0.03636656701564789, 0.4413486123085022, 0.09432753920555115, 0.20494861900806427, -0.17479000985622406, -0.26603254675865173, -0.05794449523091316, 0.14275383949279785, 0.3077870309352875, -0.10791684687137604, 0.20480142533779144, 0.15202651917934418, 0.06307880580425262, -0.13800692558288574, -0.05149872228503227, 0.1939498633146286, 0.21174514293670654, -0.03839618340134621, 0.22151920199394226, 0.3344196081161499, 0.02795977145433426, -0.18960116803646088, 0.13485099375247955, -0.2584948241710663, -0.2611386775970459, 0.5472015142440796, 0.361782968044281, 0.16231948137283325, -0.224213108420372, 0.07378210127353668, 0.15454219281673431, 0.15964648127555847, 0.28707587718963623, -0.2660979926586151, -0.3241260349750519, -0.086848683655262, -0.5948207974433899, 0.16103112697601318, -0.06577661633491516, -0.1399642676115036, 0.36892610788345337, -0.07424446195363998, 0.09757710993289948, 0.04777171090245247, 0.2893301844596863, 0.1838383972644806, 0.3929617702960968, 0.08172300457954407, -0.002513088285923004, 0.01648416742682457, 0.20305831730365753, -0.16962364315986633, -0.008499646559357643, -0.16751056909561157, 0.14125311374664307, -0.32664522528648376, 0.012719914317131042, -0.08096671849489212, -0.28278690576553345, 0.39165425300598145, 0.07675085961818695, 0.4173843562602997, 0.04743765667080879, 0.2677127718925476, -0.06136667728424072, -0.1450713574886322, -0.36035898327827454, -0.08936981111764908, -0.27285006642341614, 0.3768961429595947, 0.020665816962718964, 0.25329500436782837, -0.04036018252372742, -0.1949862390756607, -0.4056086540222168, 0.049612827599048615, 0.014926783740520477, -0.12891598045825958, -0.3502373695373535, 0.26592665910720825, -0.14789167046546936, 0.3055541217327118, 0.06788098812103271, 0.06937885284423828, 0.1584334671497345, 0.1978628933429718, -0.2647053897380829, -0.5059029459953308, 0.6478759050369263, -0.1815769076347351, -0.3230546712875366, -0.36159226298332214, 0.3531632721424103, 0.08317194879055023, -0.19007165729999542, -0.6228549480438232, -0.32559141516685486, 0.42355096340179443, 0.019849296659231186, -0.09010925889015198, 0.20492109656333923, 0.09260097146034241, -0.022501006722450256, -0.07973410189151764, 0.00003273040056228638, 0.07590635865926743, 0.1838483065366745, 0.08895619213581085, -0.169491708278656 ]
https://github.com/huggingface/datasets/issues/2434
Extend QuestionAnsweringExtractive template to handle nested columns
this is also the case for the following datasets and configurations: * `mlqa` with config `mlqa-translate-train.ar`
Currently the `QuestionAnsweringExtractive` task template and `preprare_for_task` only support "flat" features. We should extend the functionality to cover QA datasets like: * `iapp_wiki_qa_squad` * `parsinlu_reading_comprehension` where the nested features differ with those from `squad` and trigger an `ArrowNotImplementedError`: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) <ipython-input-12-50e5b8f69c20> in <module> ----> 1 ds.prepare_for_task("question-answering-extractive")[0] ~/git/datasets/src/datasets/arrow_dataset.py in prepare_for_task(self, task) 1436 # We found a template so now flush `DatasetInfo` to skip the template update in `DatasetInfo.__post_init__` 1437 dataset.info.task_templates = None -> 1438 dataset = dataset.cast(features=template.features) 1439 return dataset 1440 ~/git/datasets/src/datasets/arrow_dataset.py in cast(self, features, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, num_proc) 977 format = self.format 978 dataset = self.with_format("arrow") --> 979 dataset = dataset.map( 980 lambda t: t.cast(schema), 981 batched=True, ~/git/datasets/src/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) 1600 1601 if num_proc is None or num_proc == 1: -> 1602 return self._map_single( 1603 function=function, 1604 with_indices=with_indices, ~/git/datasets/src/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 176 } 177 # apply actual function --> 178 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 179 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 180 # re-apply format to the output ~/git/datasets/src/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/git/datasets/src/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, desc) 1940 ) # Something simpler? 1941 try: -> 1942 batch = apply_function_on_filtered_inputs( 1943 batch, 1944 indices, ~/git/datasets/src/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1836 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1837 processed_inputs = ( -> 1838 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1839 ) 1840 if update_data is None: ~/git/datasets/src/datasets/arrow_dataset.py in <lambda>(t) 978 dataset = self.with_format("arrow") 979 dataset = dataset.map( --> 980 lambda t: t.cast(schema), 981 batched=True, 982 batch_size=batch_size, ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/compute.py in cast(arr, target_type, safe) 241 else: 242 options = CastOptions.unsafe(target_type) --> 243 return call_function("cast", [arr], options) 244 245 ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from struct<answer_end: list<item: int32>, answer_start: list<item: int32>, text: list<item: string>> to struct using function cast_struct ```
16
Extend QuestionAnsweringExtractive template to handle nested columns Currently the `QuestionAnsweringExtractive` task template and `preprare_for_task` only support "flat" features. We should extend the functionality to cover QA datasets like: * `iapp_wiki_qa_squad` * `parsinlu_reading_comprehension` where the nested features differ with those from `squad` and trigger an `ArrowNotImplementedError`: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) <ipython-input-12-50e5b8f69c20> in <module> ----> 1 ds.prepare_for_task("question-answering-extractive")[0] ~/git/datasets/src/datasets/arrow_dataset.py in prepare_for_task(self, task) 1436 # We found a template so now flush `DatasetInfo` to skip the template update in `DatasetInfo.__post_init__` 1437 dataset.info.task_templates = None -> 1438 dataset = dataset.cast(features=template.features) 1439 return dataset 1440 ~/git/datasets/src/datasets/arrow_dataset.py in cast(self, features, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, num_proc) 977 format = self.format 978 dataset = self.with_format("arrow") --> 979 dataset = dataset.map( 980 lambda t: t.cast(schema), 981 batched=True, ~/git/datasets/src/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) 1600 1601 if num_proc is None or num_proc == 1: -> 1602 return self._map_single( 1603 function=function, 1604 with_indices=with_indices, ~/git/datasets/src/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 176 } 177 # apply actual function --> 178 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 179 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 180 # re-apply format to the output ~/git/datasets/src/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/git/datasets/src/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, desc) 1940 ) # Something simpler? 1941 try: -> 1942 batch = apply_function_on_filtered_inputs( 1943 batch, 1944 indices, ~/git/datasets/src/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1836 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1837 processed_inputs = ( -> 1838 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1839 ) 1840 if update_data is None: ~/git/datasets/src/datasets/arrow_dataset.py in <lambda>(t) 978 dataset = self.with_format("arrow") 979 dataset = dataset.map( --> 980 lambda t: t.cast(schema), 981 batched=True, 982 batch_size=batch_size, ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/compute.py in cast(arr, target_type, safe) 241 else: 242 options = CastOptions.unsafe(target_type) --> 243 return call_function("cast", [arr], options) 244 245 ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from struct<answer_end: list<item: int32>, answer_start: list<item: int32>, text: list<item: string>> to struct using function cast_struct ``` this is also the case for the following datasets and configurations: * `mlqa` with config `mlqa-translate-train.ar`
[ -0.40049833059310913, -0.33743369579315186, -0.07841550558805466, 0.21249321103096008, 0.06230125576257706, -0.06053979694843292, 0.34271863102912903, 0.6537567973136902, 0.2787891924381256, 0.16443133354187012, -0.3850083649158478, 0.8013214468955994, 0.09380548447370529, 0.11165273934602737, -0.22402970492839813, -0.14656361937522888, 0.028561949729919434, 0.19052723050117493, -0.06909331679344177, 0.10114899277687073, -0.31788504123687744, 0.19348806142807007, -0.2012186348438263, 0.10280638188123703, 0.21941111981868744, -0.22825270891189575, -0.03533865883946419, 0.08848313987255096, 0.2185593545436859, -0.10916271805763245, 0.3539460599422455, 0.27104106545448303, 0.06407801061868668, -0.016841255128383636, -0.00011182509479112923, -0.023893464356660843, -0.07580594718456268, -0.05314590781927109, -0.21266676485538483, 0.1347668319940567, -0.22129875421524048, -0.25789159536361694, 0.037570200860500336, -0.31218060851097107, -0.1900653839111328, -0.20977279543876648, -0.07425487041473389, -0.02948947064578533, 0.47233104705810547, -0.013534918427467346, 0.17077580094337463, 0.3534001111984253, 0.22694580256938934, -0.1244797483086586, 0.12674322724342346, -0.09338204562664032, -0.443198561668396, -0.07823053002357483, 0.5466858148574829, 0.03004002384841442, 0.016938723623752594, 0.36524102091789246, -0.03437097370624542, 0.10791492462158203, 0.0238967202603817, -0.05285966396331787, 0.328634113073349, -0.12299981713294983, 0.011109661310911179, 0.4290268123149872, -0.021707363426685333, -0.1874401569366455, -0.20824185013771057, -0.3809460997581482, 0.012356385588645935, -0.21880260109901428, -0.009345859289169312, -0.23224900662899017, -0.3328905403614044, 0.18136201798915863, 0.3615429401397705, -0.4655226767063141, -0.34316644072532654, -0.0921163260936737, 0.0644313395023346, 0.31150418519973755, 0.001411539502441883, -0.07993776351213455, -0.14018845558166504, -0.1510990858078003, 0.12871789932250977, -0.009626805782318115, -0.02964826300740242, 0.1576337069272995, -0.509965181350708, -0.4060969054698944, 0.10717122256755829, -0.5747672319412231, 0.11264846473932266, 0.38618040084838867, 0.4989234507083893, 0.1735466718673706, 0.027955781668424606, 0.206945538520813, 0.15082888305187225, 0.1981993466615677, 0.08593261986970901, 0.19236578047275543, -0.059865400195121765, 0.5967299938201904, -0.10924480855464935, -0.19339734315872192, -0.11672499775886536, -0.08518249541521072, 0.1492389291524887, 0.08388866484165192, 0.552002489566803, -0.0021331310272216797, -0.34676045179367065, 0.042719416320323944, 0.03449300676584244, -0.07304634898900986, -0.23219998180866241, 0.12890413403511047, 0.026929166167974472, 0.27370861172676086, -0.41610288619995117, 0.33546215295791626, -0.10774285346269608, 0.03157435730099678, -0.018787527456879616, -0.17108789086341858, 0.25399067997932434, 0.3146187663078308, 0.112018883228302, 0.13116775453090668, 0.05254782736301422, -0.043061647564172745, 0.43047285079956055, -0.047894056886434555, 0.20824800431728363, 0.0399068146944046, 0.19745375216007233, 0.11080063879489899, -0.2531924247741699, -0.28530973196029663, 0.2229161411523819, -0.012600906193256378, -0.10322452336549759, 0.33453285694122314, -0.18716898560523987, -0.27165499329566956, -0.2834215462207794, 0.13542652130126953, -0.14754505455493927, -0.018651358783245087, -0.015271805226802826, 0.3522074222564697, 0.1309848129749298, -0.11894853413105011, 0.2892566919326782, -0.13865794241428375, -0.1265508383512497, -0.2178003191947937, 0.2230321764945984, -0.09894275665283203, -0.2481730878353119, 0.034081920981407166, -0.28191301226615906, 0.007752107456326485, -0.15413659811019897, 0.1380896121263504, 0.11559969186782837, 0.19120612740516663, -0.09048635512590408, 0.2903516888618469, 0.1303347498178482, -0.4194323718547821, -0.1716722995042801, 0.1422039419412613, -0.1727181375026703, 0.4925251007080078, 0.0901336595416069, -0.21797101199626923, 0.37182116508483887, -0.1345774233341217, -0.09325672686100006, 0.1010202094912529, -0.07551359385251999, -0.26200124621391296, -0.22813406586647034, -0.276845782995224, 0.05529963970184326, 0.22450561821460724, -0.04048189893364906, -0.02396491914987564, -0.28057846426963806, -0.24035941064357758, 0.24653378129005432, -0.21619001030921936, 0.07403673976659775, -0.2727038264274597, 0.6029757857322693, -0.24775297939777374, 0.11034243553876877, -0.5407897233963013, -0.7725903987884521, 0.07967118173837662, -0.34215080738067627, 0.12534886598587036, -0.22140343487262726, -0.13514886796474457, -0.27532532811164856, 0.10952336341142654, -0.38609999418258667, -0.3508320748806, 0.11976449191570282, -0.17784053087234497, -0.11925998330116272, -0.3336224853992462, -0.11270137131214142, -0.18881294131278992, 0.13443154096603394, 0.18126319348812103, -0.1693033128976822, 0.08540239930152893, 0.19004487991333008, 0.009713458828628063, -0.024960866197943687, 0.45964720845222473, -0.056981056928634644, 0.029183752834796906, 0.04989049583673477, 0.09806133806705475, 0.04281751811504364, -0.05267027020454407, 0.018058493733406067, -0.12376628816127777, -0.17015618085861206, -0.22581899166107178, 0.044246237725019455, 0.17316222190856934, 0.04198687896132469, -0.06070230156183243, -0.13481375575065613, 0.635497510433197, 0.22117306292057037, 0.6569631695747375, -0.15596085786819458, -0.12902295589447021, 0.09434925019741058, -0.04983655735850334, -0.06294220685958862, -0.2428586184978485, -0.22873853147029877, 0.23193520307540894, -0.08827579021453857, -0.4189499318599701, -0.3073643445968628, 0.581782877445221, 0.08106553554534912, 0.13742266595363617, 0.0011099129915237427, -0.11100728064775467, -0.06736976653337479, -0.04047321528196335, 0.25429072976112366, -0.2399124652147293, 0.31413719058036804, 0.3139423727989197, -0.06544965505599976, 0.0390540286898613, -0.09229782968759537, -0.09444586932659149, 0.20097681879997253, -0.03937201201915741, -0.10341499745845795, 0.4231424331665039, 0.45797014236450195, -0.2617943286895752, -0.18432626128196716, -0.039627332240343094, -0.15883304178714752, -0.05721794068813324, -0.10928711295127869, 0.01838473416864872, -0.08353838324546814, 0.12030214816331863, -0.011767393909394741, 0.10219290107488632, 0.15707723796367645, -0.27790844440460205, 0.4337158799171448, 0.2168111652135849, -0.27028006315231323, 0.39336392283439636, -0.018180949613451958, 0.4547275900840759, 0.09142109006643295, -0.2880817651748657, -0.3084331750869751, -0.301066517829895, 0.18931296467781067, 0.22799310088157654, -0.10818511992692947, -0.18136988580226898, 0.1264743208885193, 0.13059470057487488, 0.20212848484516144, -0.3754134476184845, -0.36954906582832336, 0.08022957295179367, -0.17468392848968506, 0.4358968734741211, -0.0005787834525108337, 0.2324521392583847, -0.0349891372025013, -0.42271754145622253, 0.3027729392051697, 0.3596455156803131, -0.12452856451272964, 0.007156966254115105, -0.055078744888305664, 0.15737630426883698, -0.05986929312348366, -0.5525562167167664, 0.12794657051563263, -0.45976656675338745, 0.3000282049179077, -0.02598097361624241, 0.248427152633667, 0.02559145912528038, 0.1529376059770584, -0.10027891397476196, -0.32392847537994385, -0.15222837030887604, -0.1322709619998932, 0.1444748193025589, 0.4026346504688263, -0.3067209720611572, 0.08583000302314758, -0.3118077218532562, -0.2724568247795105, 0.482321172952652, 0.12479668110609055, -0.09172741323709488, -0.17882312834262848, 0.05603089928627014, 0.5228129029273987, 0.11358381807804108, -0.19828230142593384, 0.22395196557044983, 0.15211306512355804, -0.06106080859899521, 0.054688602685928345, 0.20734389126300812, 0.3603228032588959, 0.060163095593452454, -0.062417395412921906, -0.02705731987953186, 0.28107336163520813, -0.13445991277694702, 0.6102374196052551, 0.10613824427127838, 0.6012281179428101, 0.33980533480644226, -0.052801959216594696, 0.11664526164531708, -0.12365958839654922, -0.22036968171596527, 0.11736321449279785, -0.017034247517585754, 0.011971857398748398, 0.2393423467874527, 0.18654364347457886, -0.2366124838590622, 0.10212419927120209, -0.09936605393886566, 0.10556361824274063, -0.4779638350009918, 0.21012155711650848, -0.07254191488027573, 0.33335810899734497, 0.052525896579027176, 0.06940693408250809, -0.30754369497299194, -0.10932867228984833, 0.09986798465251923, -0.019115358591079712, 0.18726684153079987, -0.39703118801116943, -0.07829637825489044, -0.2667006254196167, -0.1847986876964569, 0.39766401052474976, 0.22877384722232819, 0.1634255051612854, 0.0757727324962616, -0.48149818181991577, 0.049424730241298676, -0.016509907320141792, 0.23412758111953735, -0.09810945391654968, -0.19529393315315247, 0.3137221336364746, -0.09294956922531128, -0.34379342198371887, -0.25014153122901917, -0.25662559270858765, -0.1055375337600708, -0.2314048558473587, 0.7485194802284241, -0.5161656737327576, -0.07895231246948242, 0.18449313938617706, 0.007182614877820015, -0.31185317039489746, -0.15994738042354584, 0.09131304919719696, -0.20916035771369934, -0.24500365555286407, 0.2980198860168457, 0.13312934339046478, 0.3195584714412689, 0.05493920296430588, -0.17451277375221252, -0.2765750288963318, -0.040503986179828644, 0.07796761393547058, 0.4612745940685272, 0.030845025554299355, -0.3243046998977661, 0.17892037332057953, -0.05412270873785019, -0.23054239153862, -0.04118123650550842, 0.2416391670703888, -0.3083820939064026, -0.32283738255500793, -0.22239071130752563, -0.24646587669849396, 0.3405137360095978, 0.2358870953321457, -0.22080740332603455, 0.4975653886795044, -0.2715396285057068, 0.11510226130485535, -0.00581198837608099, -0.14234791696071625, 0.16117160022258759, 0.21257589757442474, 0.06848561018705368, -0.260802686214447, 0.15505525469779968, 0.11960193514823914, -0.32884618639945984, 0.024494849145412445, -0.061708733439445496, -0.10905346274375916, 0.11714653670787811, 0.07024350017309189, 0.6974754929542542, 0.30315762758255005, 0.0221205186098814, 0.6793622970581055, -0.16260740160942078, 0.12024495750665665, -0.14934483170509338, 0.053249701857566833, -0.20230399072170258, -0.20831692218780518, 0.09382028877735138, 0.059417907148599625, 0.1532101333141327, 0.22207851707935333, -0.1507142037153244, 0.2946803867816925, -0.007793605327606201, 0.16057677567005157, 0.11853911727666855, -0.07010256499052048, -0.11481636017560959, -0.12142793834209442, -0.2685713469982147, 0.019021976739168167, -0.10668960213661194, -0.3126925528049469, 0.15208396315574646, -0.17843464016914368, 0.14983239769935608, -0.14424005150794983, -0.23095007240772247, 0.09501148015260696, -0.2048008292913437, -0.1369016170501709, 0.28752803802490234, -0.5032083988189697, 0.4567987322807312, -0.27575743198394775, -0.10875226557254791, -0.11358191072940826, -0.13411547243595123, -0.018543075770139694, 0.22594419121742249, 0.09067405015230179, -0.12441804260015488, -0.2219095081090927, 0.37695878744125366, -0.0928608775138855, -0.07820527255535126, 0.0012887343764305115, 0.07857417315244675, 0.040658071637153625, -0.26154476404190063, 0.2578836977481842, 0.19815614819526672, -0.20647571980953217, -0.26519712805747986, -0.19593480229377747, 0.14224368333816528, -0.4721253514289856, 0.11419124901294708, -0.21257032454013824, -0.06381210684776306, 0.2251412570476532, 0.23770509660243988, -0.12819798290729523, 0.1455715149641037, -0.029327459633350372, 0.32283738255500793, 0.024381302297115326, 0.5570511817932129, 0.10778266191482544, -0.08799929916858673, -0.38935282826423645, -0.0960671678185463, 0.3653009235858917, -0.39255663752555847, 0.41290464997291565, 0.13177068531513214, -0.15983141958713531, -0.14780190587043762, 0.27870067954063416, 0.07472115755081177, -0.13256090879440308, -0.21928173303604126, -0.22875148057937622, -0.08149601519107819, 0.38537901639938354, -0.1765209287405014, 0.18502625823020935, 0.08246539533138275, -0.07146427035331726, -0.35420113801956177, 0.4459697902202606, -0.3408142924308777, -0.009748473763465881, 0.0725129097700119, -0.03752791881561279, -0.06216501444578171, 0.038114409893751144, 0.24866214394569397, 0.2622762620449066, 0.09626460820436478, 0.049906663596630096, -0.13498671352863312, -0.272643119096756, -0.18215851485729218, 0.13336730003356934, -0.05701041966676712, 0.07498366385698318, -0.07206100225448608, 0.14337460696697235, 0.016869325190782547, -0.13457351922988892, 0.14968593418598175, -0.4678489863872528, -0.01202632486820221, 0.24407054483890533, 0.11795061081647873, 0.023643087595701218, -0.32572126388549805, 0.34570395946502686, 0.06269973516464233, 0.080716073513031, -0.022113341838121414, -0.0019439123570919037, -0.26625630259513855, -0.04572172835469246, 0.21391242742538452, 0.3572966456413269, 0.37490206956863403, 0.19532769918441772, 0.22807970643043518, 0.2977217435836792, -0.35769209265708923, -0.41513481736183167, -0.18244178593158722, 0.24063792824745178, 0.18086384236812592, -0.12920019030570984, -0.12010077387094498, 0.22771592438220978, -0.3833829462528229, 0.09655509144067764, 0.34123027324676514, -0.25444474816322327, 0.36186590790748596, 0.3307241201400757, -0.006531134247779846, -0.18824902176856995, 0.1555596888065338, 0.19997051358222961, -0.00987775344401598, -0.11162620782852173, -0.05198090523481369, 0.561661422252655, 0.23583467304706573, -0.05438414588570595, 0.5195074081420898, -0.12141072750091553, 0.2474181056022644, 0.05034813657402992, -0.06185344606637955, 0.1451205015182495, 0.48577046394348145, -0.019189175218343735, 0.4051705300807953, 0.03452261909842491, -0.19920878112316132, -0.05641146004199982, 0.3465833067893982, 0.07927867025136948, 0.2575397491455078, 0.4537780284881592, 0.3087073266506195, 0.10583191365003586, -0.04258217662572861, 0.19206514954566956, -0.1651948094367981, -0.34349170327186584, -0.19436919689178467, -0.2801075875759125, -0.20884083211421967, -0.3808356523513794, -0.18244369328022003, -0.1929716318845749, 0.41274505853652954, -0.19612161815166473, 0.184238463640213, 0.08783522993326187, 0.3296383321285248, 0.2366625964641571, 0.1715804636478424, -0.014072738587856293, 0.34266579151153564, 0.4159706234931946, 0.0234648697078228, 0.12760692834854126, 0.40663713216781616, 0.20093873143196106, -0.05996507406234741, -0.3517584800720215, -0.18422940373420715, -0.35211485624313354, -0.1823285073041916, 0.0067701153457164764, 0.2215094417333603, -0.12024499475955963, 0.1417790949344635, 0.38048383593559265, 0.1290813535451889, -0.1590755432844162, 0.12624387443065643, 0.11789299547672272, 0.006152496673166752, -0.3411141633987427, 0.39597225189208984, 0.00828375481069088, -0.29341527819633484, 0.11771716177463531, -0.2684544026851654, -0.15869036316871643, -0.0155189773067832, 0.1246444582939148, -0.1417151391506195, -0.037487197667360306, -0.010892614722251892, 0.06751444935798645, -0.14794281125068665, 0.2800036072731018, 0.11339408159255981, -0.12684035301208496, -0.1358681619167328, 0.08246511220932007, -0.4051435887813568, 0.3420459032058716, 0.06837479770183563, -0.17108310759067535, 0.22797119617462158, 0.0964198112487793, 0.14935548603534698, 0.4303808808326721, -0.003787800669670105, -0.04717244952917099, -0.13610020279884338, 0.38100865483283997, -0.8327495455741882, 0.0307475496083498, 0.5487802624702454, 0.05356637388467789, 0.1971004456281662, -0.2480858564376831, 0.02021341770887375, 0.48556894063949585, -0.04762328788638115, 0.12412343919277191, -0.08673112839460373, 0.22546285390853882, -0.3691394627094269, 0.18610158562660217, 0.17313021421432495, 0.12377974390983582, -0.050639521330595016, -0.13436776399612427, -0.02937682345509529, -0.033365603536367416, -0.2019149363040924, 0.13739953935146332, 0.17589978873729706, 0.346050888299942, 0.03477570414543152, -0.20254793763160706, 0.1435958296060562, 0.23186682164669037, -0.08116631209850311, -0.27452021837234497, -0.18307755887508392, 0.3552871644496918, 0.11647234112024307, -0.13052141666412354, -0.23727472126483917, 0.1530248522758484, 0.14249418675899506, 0.04705892503261566, -0.15310698747634888, -0.5564717650413513, 0.4793992340564728, 0.01705383136868477, -0.6013737320899963, 0.10093319416046143, 0.15217655897140503, 0.024998173117637634, -0.18624387681484222, -0.46379944682121277, -0.039159029722213745, 0.31386950612068176, -0.012470904737710953, 0.1759585738182068, 0.33203861117362976, 0.0188718531280756, -0.012106690555810928, -0.31109336018562317, 0.3736269772052765, 0.18670117855072021, 0.01916477270424366, -0.5798614621162415, -0.26185423135757446 ]
https://github.com/huggingface/datasets/issues/2434
Extend QuestionAnsweringExtractive template to handle nested columns
The current task API is somewhat deprecated (we plan to align it with `train eval index` at some point), so I think we can close this issue.
Currently the `QuestionAnsweringExtractive` task template and `preprare_for_task` only support "flat" features. We should extend the functionality to cover QA datasets like: * `iapp_wiki_qa_squad` * `parsinlu_reading_comprehension` where the nested features differ with those from `squad` and trigger an `ArrowNotImplementedError`: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) <ipython-input-12-50e5b8f69c20> in <module> ----> 1 ds.prepare_for_task("question-answering-extractive")[0] ~/git/datasets/src/datasets/arrow_dataset.py in prepare_for_task(self, task) 1436 # We found a template so now flush `DatasetInfo` to skip the template update in `DatasetInfo.__post_init__` 1437 dataset.info.task_templates = None -> 1438 dataset = dataset.cast(features=template.features) 1439 return dataset 1440 ~/git/datasets/src/datasets/arrow_dataset.py in cast(self, features, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, num_proc) 977 format = self.format 978 dataset = self.with_format("arrow") --> 979 dataset = dataset.map( 980 lambda t: t.cast(schema), 981 batched=True, ~/git/datasets/src/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) 1600 1601 if num_proc is None or num_proc == 1: -> 1602 return self._map_single( 1603 function=function, 1604 with_indices=with_indices, ~/git/datasets/src/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 176 } 177 # apply actual function --> 178 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 179 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 180 # re-apply format to the output ~/git/datasets/src/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/git/datasets/src/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, desc) 1940 ) # Something simpler? 1941 try: -> 1942 batch = apply_function_on_filtered_inputs( 1943 batch, 1944 indices, ~/git/datasets/src/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1836 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1837 processed_inputs = ( -> 1838 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1839 ) 1840 if update_data is None: ~/git/datasets/src/datasets/arrow_dataset.py in <lambda>(t) 978 dataset = self.with_format("arrow") 979 dataset = dataset.map( --> 980 lambda t: t.cast(schema), 981 batched=True, 982 batch_size=batch_size, ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/compute.py in cast(arr, target_type, safe) 241 else: 242 options = CastOptions.unsafe(target_type) --> 243 return call_function("cast", [arr], options) 244 245 ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from struct<answer_end: list<item: int32>, answer_start: list<item: int32>, text: list<item: string>> to struct using function cast_struct ```
27
Extend QuestionAnsweringExtractive template to handle nested columns Currently the `QuestionAnsweringExtractive` task template and `preprare_for_task` only support "flat" features. We should extend the functionality to cover QA datasets like: * `iapp_wiki_qa_squad` * `parsinlu_reading_comprehension` where the nested features differ with those from `squad` and trigger an `ArrowNotImplementedError`: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) <ipython-input-12-50e5b8f69c20> in <module> ----> 1 ds.prepare_for_task("question-answering-extractive")[0] ~/git/datasets/src/datasets/arrow_dataset.py in prepare_for_task(self, task) 1436 # We found a template so now flush `DatasetInfo` to skip the template update in `DatasetInfo.__post_init__` 1437 dataset.info.task_templates = None -> 1438 dataset = dataset.cast(features=template.features) 1439 return dataset 1440 ~/git/datasets/src/datasets/arrow_dataset.py in cast(self, features, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, num_proc) 977 format = self.format 978 dataset = self.with_format("arrow") --> 979 dataset = dataset.map( 980 lambda t: t.cast(schema), 981 batched=True, ~/git/datasets/src/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) 1600 1601 if num_proc is None or num_proc == 1: -> 1602 return self._map_single( 1603 function=function, 1604 with_indices=with_indices, ~/git/datasets/src/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 176 } 177 # apply actual function --> 178 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 179 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 180 # re-apply format to the output ~/git/datasets/src/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/git/datasets/src/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, desc) 1940 ) # Something simpler? 1941 try: -> 1942 batch = apply_function_on_filtered_inputs( 1943 batch, 1944 indices, ~/git/datasets/src/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1836 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1837 processed_inputs = ( -> 1838 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1839 ) 1840 if update_data is None: ~/git/datasets/src/datasets/arrow_dataset.py in <lambda>(t) 978 dataset = self.with_format("arrow") 979 dataset = dataset.map( --> 980 lambda t: t.cast(schema), 981 batched=True, 982 batch_size=batch_size, ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/compute.py in cast(arr, target_type, safe) 241 else: 242 options = CastOptions.unsafe(target_type) --> 243 return call_function("cast", [arr], options) 244 245 ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from struct<answer_end: list<item: int32>, answer_start: list<item: int32>, text: list<item: string>> to struct using function cast_struct ``` The current task API is somewhat deprecated (we plan to align it with `train eval index` at some point), so I think we can close this issue.
[ -0.40049833059310913, -0.33743369579315186, -0.07841550558805466, 0.21249321103096008, 0.06230125576257706, -0.06053979694843292, 0.34271863102912903, 0.6537567973136902, 0.2787891924381256, 0.16443133354187012, -0.3850083649158478, 0.8013214468955994, 0.09380548447370529, 0.11165273934602737, -0.22402970492839813, -0.14656361937522888, 0.028561949729919434, 0.19052723050117493, -0.06909331679344177, 0.10114899277687073, -0.31788504123687744, 0.19348806142807007, -0.2012186348438263, 0.10280638188123703, 0.21941111981868744, -0.22825270891189575, -0.03533865883946419, 0.08848313987255096, 0.2185593545436859, -0.10916271805763245, 0.3539460599422455, 0.27104106545448303, 0.06407801061868668, -0.016841255128383636, -0.00011182509479112923, -0.023893464356660843, -0.07580594718456268, -0.05314590781927109, -0.21266676485538483, 0.1347668319940567, -0.22129875421524048, -0.25789159536361694, 0.037570200860500336, -0.31218060851097107, -0.1900653839111328, -0.20977279543876648, -0.07425487041473389, -0.02948947064578533, 0.47233104705810547, -0.013534918427467346, 0.17077580094337463, 0.3534001111984253, 0.22694580256938934, -0.1244797483086586, 0.12674322724342346, -0.09338204562664032, -0.443198561668396, -0.07823053002357483, 0.5466858148574829, 0.03004002384841442, 0.016938723623752594, 0.36524102091789246, -0.03437097370624542, 0.10791492462158203, 0.0238967202603817, -0.05285966396331787, 0.328634113073349, -0.12299981713294983, 0.011109661310911179, 0.4290268123149872, -0.021707363426685333, -0.1874401569366455, -0.20824185013771057, -0.3809460997581482, 0.012356385588645935, -0.21880260109901428, -0.009345859289169312, -0.23224900662899017, -0.3328905403614044, 0.18136201798915863, 0.3615429401397705, -0.4655226767063141, -0.34316644072532654, -0.0921163260936737, 0.0644313395023346, 0.31150418519973755, 0.001411539502441883, -0.07993776351213455, -0.14018845558166504, -0.1510990858078003, 0.12871789932250977, -0.009626805782318115, -0.02964826300740242, 0.1576337069272995, -0.509965181350708, -0.4060969054698944, 0.10717122256755829, -0.5747672319412231, 0.11264846473932266, 0.38618040084838867, 0.4989234507083893, 0.1735466718673706, 0.027955781668424606, 0.206945538520813, 0.15082888305187225, 0.1981993466615677, 0.08593261986970901, 0.19236578047275543, -0.059865400195121765, 0.5967299938201904, -0.10924480855464935, -0.19339734315872192, -0.11672499775886536, -0.08518249541521072, 0.1492389291524887, 0.08388866484165192, 0.552002489566803, -0.0021331310272216797, -0.34676045179367065, 0.042719416320323944, 0.03449300676584244, -0.07304634898900986, -0.23219998180866241, 0.12890413403511047, 0.026929166167974472, 0.27370861172676086, -0.41610288619995117, 0.33546215295791626, -0.10774285346269608, 0.03157435730099678, -0.018787527456879616, -0.17108789086341858, 0.25399067997932434, 0.3146187663078308, 0.112018883228302, 0.13116775453090668, 0.05254782736301422, -0.043061647564172745, 0.43047285079956055, -0.047894056886434555, 0.20824800431728363, 0.0399068146944046, 0.19745375216007233, 0.11080063879489899, -0.2531924247741699, -0.28530973196029663, 0.2229161411523819, -0.012600906193256378, -0.10322452336549759, 0.33453285694122314, -0.18716898560523987, -0.27165499329566956, -0.2834215462207794, 0.13542652130126953, -0.14754505455493927, -0.018651358783245087, -0.015271805226802826, 0.3522074222564697, 0.1309848129749298, -0.11894853413105011, 0.2892566919326782, -0.13865794241428375, -0.1265508383512497, -0.2178003191947937, 0.2230321764945984, -0.09894275665283203, -0.2481730878353119, 0.034081920981407166, -0.28191301226615906, 0.007752107456326485, -0.15413659811019897, 0.1380896121263504, 0.11559969186782837, 0.19120612740516663, -0.09048635512590408, 0.2903516888618469, 0.1303347498178482, -0.4194323718547821, -0.1716722995042801, 0.1422039419412613, -0.1727181375026703, 0.4925251007080078, 0.0901336595416069, -0.21797101199626923, 0.37182116508483887, -0.1345774233341217, -0.09325672686100006, 0.1010202094912529, -0.07551359385251999, -0.26200124621391296, -0.22813406586647034, -0.276845782995224, 0.05529963970184326, 0.22450561821460724, -0.04048189893364906, -0.02396491914987564, -0.28057846426963806, -0.24035941064357758, 0.24653378129005432, -0.21619001030921936, 0.07403673976659775, -0.2727038264274597, 0.6029757857322693, -0.24775297939777374, 0.11034243553876877, -0.5407897233963013, -0.7725903987884521, 0.07967118173837662, -0.34215080738067627, 0.12534886598587036, -0.22140343487262726, -0.13514886796474457, -0.27532532811164856, 0.10952336341142654, -0.38609999418258667, -0.3508320748806, 0.11976449191570282, -0.17784053087234497, -0.11925998330116272, -0.3336224853992462, -0.11270137131214142, -0.18881294131278992, 0.13443154096603394, 0.18126319348812103, -0.1693033128976822, 0.08540239930152893, 0.19004487991333008, 0.009713458828628063, -0.024960866197943687, 0.45964720845222473, -0.056981056928634644, 0.029183752834796906, 0.04989049583673477, 0.09806133806705475, 0.04281751811504364, -0.05267027020454407, 0.018058493733406067, -0.12376628816127777, -0.17015618085861206, -0.22581899166107178, 0.044246237725019455, 0.17316222190856934, 0.04198687896132469, -0.06070230156183243, -0.13481375575065613, 0.635497510433197, 0.22117306292057037, 0.6569631695747375, -0.15596085786819458, -0.12902295589447021, 0.09434925019741058, -0.04983655735850334, -0.06294220685958862, -0.2428586184978485, -0.22873853147029877, 0.23193520307540894, -0.08827579021453857, -0.4189499318599701, -0.3073643445968628, 0.581782877445221, 0.08106553554534912, 0.13742266595363617, 0.0011099129915237427, -0.11100728064775467, -0.06736976653337479, -0.04047321528196335, 0.25429072976112366, -0.2399124652147293, 0.31413719058036804, 0.3139423727989197, -0.06544965505599976, 0.0390540286898613, -0.09229782968759537, -0.09444586932659149, 0.20097681879997253, -0.03937201201915741, -0.10341499745845795, 0.4231424331665039, 0.45797014236450195, -0.2617943286895752, -0.18432626128196716, -0.039627332240343094, -0.15883304178714752, -0.05721794068813324, -0.10928711295127869, 0.01838473416864872, -0.08353838324546814, 0.12030214816331863, -0.011767393909394741, 0.10219290107488632, 0.15707723796367645, -0.27790844440460205, 0.4337158799171448, 0.2168111652135849, -0.27028006315231323, 0.39336392283439636, -0.018180949613451958, 0.4547275900840759, 0.09142109006643295, -0.2880817651748657, -0.3084331750869751, -0.301066517829895, 0.18931296467781067, 0.22799310088157654, -0.10818511992692947, -0.18136988580226898, 0.1264743208885193, 0.13059470057487488, 0.20212848484516144, -0.3754134476184845, -0.36954906582832336, 0.08022957295179367, -0.17468392848968506, 0.4358968734741211, -0.0005787834525108337, 0.2324521392583847, -0.0349891372025013, -0.42271754145622253, 0.3027729392051697, 0.3596455156803131, -0.12452856451272964, 0.007156966254115105, -0.055078744888305664, 0.15737630426883698, -0.05986929312348366, -0.5525562167167664, 0.12794657051563263, -0.45976656675338745, 0.3000282049179077, -0.02598097361624241, 0.248427152633667, 0.02559145912528038, 0.1529376059770584, -0.10027891397476196, -0.32392847537994385, -0.15222837030887604, -0.1322709619998932, 0.1444748193025589, 0.4026346504688263, -0.3067209720611572, 0.08583000302314758, -0.3118077218532562, -0.2724568247795105, 0.482321172952652, 0.12479668110609055, -0.09172741323709488, -0.17882312834262848, 0.05603089928627014, 0.5228129029273987, 0.11358381807804108, -0.19828230142593384, 0.22395196557044983, 0.15211306512355804, -0.06106080859899521, 0.054688602685928345, 0.20734389126300812, 0.3603228032588959, 0.060163095593452454, -0.062417395412921906, -0.02705731987953186, 0.28107336163520813, -0.13445991277694702, 0.6102374196052551, 0.10613824427127838, 0.6012281179428101, 0.33980533480644226, -0.052801959216594696, 0.11664526164531708, -0.12365958839654922, -0.22036968171596527, 0.11736321449279785, -0.017034247517585754, 0.011971857398748398, 0.2393423467874527, 0.18654364347457886, -0.2366124838590622, 0.10212419927120209, -0.09936605393886566, 0.10556361824274063, -0.4779638350009918, 0.21012155711650848, -0.07254191488027573, 0.33335810899734497, 0.052525896579027176, 0.06940693408250809, -0.30754369497299194, -0.10932867228984833, 0.09986798465251923, -0.019115358591079712, 0.18726684153079987, -0.39703118801116943, -0.07829637825489044, -0.2667006254196167, -0.1847986876964569, 0.39766401052474976, 0.22877384722232819, 0.1634255051612854, 0.0757727324962616, -0.48149818181991577, 0.049424730241298676, -0.016509907320141792, 0.23412758111953735, -0.09810945391654968, -0.19529393315315247, 0.3137221336364746, -0.09294956922531128, -0.34379342198371887, -0.25014153122901917, -0.25662559270858765, -0.1055375337600708, -0.2314048558473587, 0.7485194802284241, -0.5161656737327576, -0.07895231246948242, 0.18449313938617706, 0.007182614877820015, -0.31185317039489746, -0.15994738042354584, 0.09131304919719696, -0.20916035771369934, -0.24500365555286407, 0.2980198860168457, 0.13312934339046478, 0.3195584714412689, 0.05493920296430588, -0.17451277375221252, -0.2765750288963318, -0.040503986179828644, 0.07796761393547058, 0.4612745940685272, 0.030845025554299355, -0.3243046998977661, 0.17892037332057953, -0.05412270873785019, -0.23054239153862, -0.04118123650550842, 0.2416391670703888, -0.3083820939064026, -0.32283738255500793, -0.22239071130752563, -0.24646587669849396, 0.3405137360095978, 0.2358870953321457, -0.22080740332603455, 0.4975653886795044, -0.2715396285057068, 0.11510226130485535, -0.00581198837608099, -0.14234791696071625, 0.16117160022258759, 0.21257589757442474, 0.06848561018705368, -0.260802686214447, 0.15505525469779968, 0.11960193514823914, -0.32884618639945984, 0.024494849145412445, -0.061708733439445496, -0.10905346274375916, 0.11714653670787811, 0.07024350017309189, 0.6974754929542542, 0.30315762758255005, 0.0221205186098814, 0.6793622970581055, -0.16260740160942078, 0.12024495750665665, -0.14934483170509338, 0.053249701857566833, -0.20230399072170258, -0.20831692218780518, 0.09382028877735138, 0.059417907148599625, 0.1532101333141327, 0.22207851707935333, -0.1507142037153244, 0.2946803867816925, -0.007793605327606201, 0.16057677567005157, 0.11853911727666855, -0.07010256499052048, -0.11481636017560959, -0.12142793834209442, -0.2685713469982147, 0.019021976739168167, -0.10668960213661194, -0.3126925528049469, 0.15208396315574646, -0.17843464016914368, 0.14983239769935608, -0.14424005150794983, -0.23095007240772247, 0.09501148015260696, -0.2048008292913437, -0.1369016170501709, 0.28752803802490234, -0.5032083988189697, 0.4567987322807312, -0.27575743198394775, -0.10875226557254791, -0.11358191072940826, -0.13411547243595123, -0.018543075770139694, 0.22594419121742249, 0.09067405015230179, -0.12441804260015488, -0.2219095081090927, 0.37695878744125366, -0.0928608775138855, -0.07820527255535126, 0.0012887343764305115, 0.07857417315244675, 0.040658071637153625, -0.26154476404190063, 0.2578836977481842, 0.19815614819526672, -0.20647571980953217, -0.26519712805747986, -0.19593480229377747, 0.14224368333816528, -0.4721253514289856, 0.11419124901294708, -0.21257032454013824, -0.06381210684776306, 0.2251412570476532, 0.23770509660243988, -0.12819798290729523, 0.1455715149641037, -0.029327459633350372, 0.32283738255500793, 0.024381302297115326, 0.5570511817932129, 0.10778266191482544, -0.08799929916858673, -0.38935282826423645, -0.0960671678185463, 0.3653009235858917, -0.39255663752555847, 0.41290464997291565, 0.13177068531513214, -0.15983141958713531, -0.14780190587043762, 0.27870067954063416, 0.07472115755081177, -0.13256090879440308, -0.21928173303604126, -0.22875148057937622, -0.08149601519107819, 0.38537901639938354, -0.1765209287405014, 0.18502625823020935, 0.08246539533138275, -0.07146427035331726, -0.35420113801956177, 0.4459697902202606, -0.3408142924308777, -0.009748473763465881, 0.0725129097700119, -0.03752791881561279, -0.06216501444578171, 0.038114409893751144, 0.24866214394569397, 0.2622762620449066, 0.09626460820436478, 0.049906663596630096, -0.13498671352863312, -0.272643119096756, -0.18215851485729218, 0.13336730003356934, -0.05701041966676712, 0.07498366385698318, -0.07206100225448608, 0.14337460696697235, 0.016869325190782547, -0.13457351922988892, 0.14968593418598175, -0.4678489863872528, -0.01202632486820221, 0.24407054483890533, 0.11795061081647873, 0.023643087595701218, -0.32572126388549805, 0.34570395946502686, 0.06269973516464233, 0.080716073513031, -0.022113341838121414, -0.0019439123570919037, -0.26625630259513855, -0.04572172835469246, 0.21391242742538452, 0.3572966456413269, 0.37490206956863403, 0.19532769918441772, 0.22807970643043518, 0.2977217435836792, -0.35769209265708923, -0.41513481736183167, -0.18244178593158722, 0.24063792824745178, 0.18086384236812592, -0.12920019030570984, -0.12010077387094498, 0.22771592438220978, -0.3833829462528229, 0.09655509144067764, 0.34123027324676514, -0.25444474816322327, 0.36186590790748596, 0.3307241201400757, -0.006531134247779846, -0.18824902176856995, 0.1555596888065338, 0.19997051358222961, -0.00987775344401598, -0.11162620782852173, -0.05198090523481369, 0.561661422252655, 0.23583467304706573, -0.05438414588570595, 0.5195074081420898, -0.12141072750091553, 0.2474181056022644, 0.05034813657402992, -0.06185344606637955, 0.1451205015182495, 0.48577046394348145, -0.019189175218343735, 0.4051705300807953, 0.03452261909842491, -0.19920878112316132, -0.05641146004199982, 0.3465833067893982, 0.07927867025136948, 0.2575397491455078, 0.4537780284881592, 0.3087073266506195, 0.10583191365003586, -0.04258217662572861, 0.19206514954566956, -0.1651948094367981, -0.34349170327186584, -0.19436919689178467, -0.2801075875759125, -0.20884083211421967, -0.3808356523513794, -0.18244369328022003, -0.1929716318845749, 0.41274505853652954, -0.19612161815166473, 0.184238463640213, 0.08783522993326187, 0.3296383321285248, 0.2366625964641571, 0.1715804636478424, -0.014072738587856293, 0.34266579151153564, 0.4159706234931946, 0.0234648697078228, 0.12760692834854126, 0.40663713216781616, 0.20093873143196106, -0.05996507406234741, -0.3517584800720215, -0.18422940373420715, -0.35211485624313354, -0.1823285073041916, 0.0067701153457164764, 0.2215094417333603, -0.12024499475955963, 0.1417790949344635, 0.38048383593559265, 0.1290813535451889, -0.1590755432844162, 0.12624387443065643, 0.11789299547672272, 0.006152496673166752, -0.3411141633987427, 0.39597225189208984, 0.00828375481069088, -0.29341527819633484, 0.11771716177463531, -0.2684544026851654, -0.15869036316871643, -0.0155189773067832, 0.1246444582939148, -0.1417151391506195, -0.037487197667360306, -0.010892614722251892, 0.06751444935798645, -0.14794281125068665, 0.2800036072731018, 0.11339408159255981, -0.12684035301208496, -0.1358681619167328, 0.08246511220932007, -0.4051435887813568, 0.3420459032058716, 0.06837479770183563, -0.17108310759067535, 0.22797119617462158, 0.0964198112487793, 0.14935548603534698, 0.4303808808326721, -0.003787800669670105, -0.04717244952917099, -0.13610020279884338, 0.38100865483283997, -0.8327495455741882, 0.0307475496083498, 0.5487802624702454, 0.05356637388467789, 0.1971004456281662, -0.2480858564376831, 0.02021341770887375, 0.48556894063949585, -0.04762328788638115, 0.12412343919277191, -0.08673112839460373, 0.22546285390853882, -0.3691394627094269, 0.18610158562660217, 0.17313021421432495, 0.12377974390983582, -0.050639521330595016, -0.13436776399612427, -0.02937682345509529, -0.033365603536367416, -0.2019149363040924, 0.13739953935146332, 0.17589978873729706, 0.346050888299942, 0.03477570414543152, -0.20254793763160706, 0.1435958296060562, 0.23186682164669037, -0.08116631209850311, -0.27452021837234497, -0.18307755887508392, 0.3552871644496918, 0.11647234112024307, -0.13052141666412354, -0.23727472126483917, 0.1530248522758484, 0.14249418675899506, 0.04705892503261566, -0.15310698747634888, -0.5564717650413513, 0.4793992340564728, 0.01705383136868477, -0.6013737320899963, 0.10093319416046143, 0.15217655897140503, 0.024998173117637634, -0.18624387681484222, -0.46379944682121277, -0.039159029722213745, 0.31386950612068176, -0.012470904737710953, 0.1759585738182068, 0.33203861117362976, 0.0188718531280756, -0.012106690555810928, -0.31109336018562317, 0.3736269772052765, 0.18670117855072021, 0.01916477270424366, -0.5798614621162415, -0.26185423135757446 ]
https://github.com/huggingface/datasets/issues/2431
DuplicatedKeysError when trying to load adversarial_qa
Thanks for reporting ! #2433 fixed the issue, thanks @mariosasko :) We'll do a patch release soon of the library. In the meantime, you can use the fixed version of adversarial_qa by adding `script_version="master"` in `load_dataset`
## Describe the bug A clear and concise description of what the bug is. ## Steps to reproduce the bug ```python dataset = load_dataset('adversarial_qa', 'adversarialQA') ``` ## Expected results The dataset should be loaded into memory ## Actual results >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature > > >During handling of the above exception, another exception occurred: > >DuplicatedKeysError Traceback (most recent call last) > >/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) > 347 for hash, key in self.hkey_record: > 348 if hash in tmp_record: >--> 349 raise DuplicatedKeysError(key) > 350 else: > 351 tmp_record.add(hash) > >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.109+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0
36
DuplicatedKeysError when trying to load adversarial_qa ## Describe the bug A clear and concise description of what the bug is. ## Steps to reproduce the bug ```python dataset = load_dataset('adversarial_qa', 'adversarialQA') ``` ## Expected results The dataset should be loaded into memory ## Actual results >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature > > >During handling of the above exception, another exception occurred: > >DuplicatedKeysError Traceback (most recent call last) > >/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) > 347 for hash, key in self.hkey_record: > 348 if hash in tmp_record: >--> 349 raise DuplicatedKeysError(key) > 350 else: > 351 tmp_record.add(hash) > >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.109+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0 Thanks for reporting ! #2433 fixed the issue, thanks @mariosasko :) We'll do a patch release soon of the library. In the meantime, you can use the fixed version of adversarial_qa by adding `script_version="master"` in `load_dataset`
[ -0.1690555363893509, 0.024538859724998474, 0.01731255277991295, 0.2362532913684845, 0.24999813735485077, -0.22990405559539795, 0.36077436804771423, 0.22385671734809875, 0.05966577306389809, 0.10771922022104263, 0.13624955713748932, 0.5518657565116882, -0.10715994238853455, -0.16836979985237122, 0.16261737048625946, 0.051719292998313904, -0.03796597570180893, 0.18830391764640808, 0.03928162157535553, 0.028761379420757294, -0.301176518201828, 0.37794509530067444, -0.1012481227517128, 0.32410740852355957, 0.03593538701534271, -0.06791108846664429, -0.10332073271274567, 0.1514308601617813, 0.21377407014369965, -0.4177417755126953, 0.07006833702325821, -0.01870950311422348, -0.11666560918092728, 0.48115986585617065, -0.00010524407844059169, 0.14410242438316345, 0.28890323638916016, 0.10355916619300842, -0.09133714437484741, -0.1600610762834549, 0.018509045243263245, -0.10719816386699677, 0.1912548542022705, -0.19243884086608887, 0.12623992562294006, -0.47528496384620667, 0.013160664588212967, -0.30067235231399536, 0.5054063200950623, 0.12015528231859207, 0.3179469108581543, 0.09031865000724792, 0.26293277740478516, -0.17106510698795319, 0.11951737850904465, -0.18688438832759857, -0.17424166202545166, 0.11961795389652252, -0.03035876154899597, 0.03720380365848541, 0.25267261266708374, 0.2869952619075775, -0.010384513065218925, 0.0183802992105484, 0.44122958183288574, -0.01517528761178255, 0.2555159628391266, 0.13745704293251038, 0.3210972249507904, 0.34236225485801697, 0.29009804129600525, -0.4888223707675934, -0.21427160501480103, -0.0686698630452156, 0.34862905740737915, -0.23743987083435059, 0.23601773381233215, 0.027807436883449554, -0.27091264724731445, -0.05387229099869728, 0.397607684135437, -0.14725367724895477, -0.04343239217996597, -0.10630573332309723, 0.16025982797145844, 0.1248757541179657, -0.021796640008687973, 0.16934645175933838, 0.3264654576778412, -0.10231953859329224, 0.045952193439006805, 0.03151293098926544, -0.21171534061431885, -0.03381335362792015, -0.4873887300491333, 0.11386483907699585, -0.07845931500196457, -0.09312088042497635, 0.27007046341896057, 0.048496685922145844, 0.5127916932106018, -0.011501718312501907, 0.08257558941841125, 0.12352301925420761, 0.12811410427093506, 0.24941392242908478, 0.168625146150589, 0.2489650994539261, 0.21128156781196594, 0.09334523975849152, -0.23499368131160736, 0.024731595069169998, -0.08346950262784958, -0.38519981503486633, 0.6409912705421448, 0.05596037209033966, 0.3691558241844177, -0.06365154683589935, -0.24888601899147034, 0.1071043387055397, -0.36690574884414673, -0.05921177938580513, -0.2935505509376526, 0.3391610085964203, 0.19584153592586517, 0.017490694299340248, -0.13584014773368835, 0.2525436282157898, -0.20603236556053162, 0.2294732630252838, -0.21197929978370667, -0.11002808809280396, -0.06190519407391548, -0.11726263910531998, 0.04000065103173256, -0.11785392463207245, 0.2964860796928406, -0.0017161676660180092, -0.002642132341861725, -0.27034851908683777, 0.36624953150749207, 0.021024679765105247, -0.2416965663433075, 0.2553779184818268, 0.1975593864917755, 0.12918682396411896, 0.04584376513957977, -0.37928861379623413, -0.10681097209453583, 0.09932246059179306, -0.0052411556243896484, -0.051238466054201126, -0.012753257527947426, 0.2953703701496124, 0.14969979226589203, 0.08622777462005615, -0.012327775359153748, -0.0367015115916729, 0.1766478270292282, -0.07522161304950714, 0.05858394876122475, -0.012180551886558533, -0.16472288966178894, -0.4422146677970886, 0.09684213995933533, 0.4755464792251587, -0.3256644606590271, -0.1278252899646759, -0.32804882526397705, -0.08490955829620361, -0.278379887342453, 0.23025965690612793, -0.2746444642543793, 0.04135480895638466, -0.20596207678318024, 0.07045857608318329, 0.25425565242767334, -0.4608035087585449, -0.4768512547016144, 0.31876492500305176, -0.30311325192451477, 0.1834324151277542, 0.1363980621099472, 0.15537016093730927, 0.14485007524490356, 0.058086030185222626, -0.016993708908557892, 0.0008213259279727936, 0.16612830758094788, -0.12492489069700241, -0.2674148678779602, -0.3802100718021393, 0.11707454919815063, -0.1609797477722168, 0.04192915931344032, -0.2055484652519226, 0.17786718904972076, -0.41747960448265076, 0.3148234784603119, -0.09830282628536224, 0.02293267846107483, 0.07286550104618073, 0.24749018251895905, -0.061742186546325684, 0.2550155818462372, 0.024097304791212082, -0.3038272261619568, 0.251642107963562, -0.2327650487422943, -0.16943630576133728, -0.25575071573257446, -0.22665509581565857, -0.2787438929080963, 0.1975635588169098, -0.5176184773445129, -0.16665105521678925, 0.25985050201416016, 0.2048998773097992, -0.11569322645664215, 0.22341899573802948, -0.07291561365127563, 0.07278777658939362, 0.1837254762649536, 0.031081294640898705, -0.2157280296087265, -0.1280270218849182, -0.2033463716506958, -0.002543228678405285, 0.15910059213638306, 0.1641196608543396, 0.105100616812706, -0.021129993721842766, -0.0315849632024765, 0.37451252341270447, -0.24198594689369202, 0.1823241114616394, -0.007116943597793579, -0.013490259647369385, 0.07615546882152557, -0.3286633789539337, 0.26997867226600647, 0.14864523708820343, 0.29554513096809387, -0.10448628664016724, 0.2927987575531006, 0.2971183657646179, -0.0134967602789402, 0.20148338377475739, -0.03663967177271843, 0.040882207453250885, 0.25380900502204895, -0.1656627506017685, 0.06260647624731064, -0.053619734942913055, 0.11300528049468994, 0.01004674844443798, 0.034861061722040176, -0.002144642174243927, -0.03308113291859627, 0.21479091048240662, 0.23010772466659546, -0.02213873714208603, 0.30430519580841064, 0.031896479427814484, -0.22521129250526428, 0.09492278844118118, -0.11883147060871124, 0.5473527312278748, 0.41368746757507324, 0.14605894684791565, -0.313482403755188, -0.0018699578940868378, -0.11622094362974167, -0.20873817801475525, 0.3943377435207367, -0.17124393582344055, 0.2710686922073364, 0.236128568649292, 0.08730631321668625, 0.021922951564192772, -0.3811851441860199, 0.03869137540459633, 0.08174833655357361, 0.22716031968593597, -0.14836207032203674, 0.09673307090997696, -0.23661601543426514, 0.23623183369636536, -0.12680523097515106, 0.010837004519999027, -0.023907039314508438, -0.21162083745002747, 0.09580493718385696, -0.11824294924736023, -0.04916601628065109, 0.25512170791625977, -0.09014780819416046, 0.12807469069957733, -0.11185560375452042, 0.13023494184017181, 0.06858678162097931, -0.2182474136352539, -0.3099149465560913, 0.13672727346420288, 0.2610577344894409, -0.07852142304182053, 0.4030056893825531, 0.08045202493667603, -0.03422999009490013, -0.18529276549816132, -0.19125111401081085, -0.03995542228221893, -0.04970911145210266, 0.2836412489414215, 0.1351197510957718, -0.07471436262130737, -0.19416122138500214, -0.40770015120506287, 0.2535792589187622, -0.255289763212204, -0.17633359134197235, 0.335787296295166, -0.015126309357583523, 0.004934607073664665, -0.17343033850193024, -0.4460122287273407, -0.19231562316417694, -0.1484011709690094, 0.294708788394928, 0.06457427144050598, 0.1293049305677414, 0.0227048359811306, 0.22466044127941132, 0.04282492399215698, -0.10314755141735077, 0.12165152281522751, -0.2890101373195648, 0.16079439222812653, 0.1138412207365036, -0.17031241953372955, -0.3239607512950897, 0.05296707525849342, -0.10171251744031906, 0.36044448614120483, -0.13045568764209747, -0.6014341711997986, -0.2104378342628479, -0.2563963532447815, 0.12943120300769806, -0.05154126137495041, 0.09780170768499374, 0.22138963639736176, 0.2180902510881424, -0.20453216135501862, 0.022892720997333527, -0.11761544644832611, 0.46471554040908813, -0.5940791368484497, -0.012985460460186005, 0.015021591447293758, 0.5313711762428284, -0.06932603567838669, 0.5452747941017151, 0.21734346449375153, 0.0534125417470932, 0.1459403932094574, -0.09115014225244522, 0.3452012538909912, -0.12229662388563156, -0.29794254899024963, -0.2957180142402649, -0.04432164132595062, 0.22697512805461884, 0.07034892588853836, -0.07130168378353119, -0.13288384675979614, 0.09966591000556946, 0.06372329592704773, -0.525039792060852, -0.4105527698993683, -0.050464846193790436, -0.36861932277679443, -0.049964539706707, 0.1251637488603592, 0.13964501023292542, -0.11962707340717316, -0.042543984949588776, 0.2148648351430893, 0.11390814185142517, -0.049842678010463715, -0.23720455169677734, -0.11859485507011414, -0.12305847555398941, -0.4492265582084656, 0.29017382860183716, -0.1970186084508896, 0.3927428722381592, -0.028311440721154213, -0.03959933668375015, 0.20693939924240112, -0.3311931788921356, 0.5487363338470459, -0.10063952952623367, -0.04378353804349899, 0.14232365787029266, 0.00448261946439743, -0.31037911772727966, -0.06755059957504272, -0.005320504307746887, 0.08213493227958679, -0.3869895935058594, 0.14759042859077454, -0.4015748202800751, 0.3250816762447357, -0.027114592492580414, 0.071688212454319, -0.45443931221961975, -0.25664398074150085, -0.3444775640964508, -0.37236493825912476, -0.5866625308990479, -0.011852949857711792, -0.2461760938167572, 0.26843997836112976, -0.04860915243625641, -0.07428637146949768, -0.1318247765302658, -0.22408035397529602, 0.14184395968914032, 0.18569406867027283, 0.32974961400032043, -0.07833144813776016, 0.40841636061668396, 0.1614058017730713, -0.26445427536964417, 0.06689010560512543, 0.4830089211463928, -0.04351818189024925, -0.2060808539390564, -0.21938887238502502, -0.35094374418258667, 0.036179862916469574, 0.21548016369342804, -0.2175707370042801, 0.38572263717651367, -0.2800895571708679, -0.12888839840888977, 0.06253961473703384, -0.3895275592803955, 0.331703245639801, -0.012844698503613472, 0.18932375311851501, -0.20719268918037415, 0.16520249843597412, -0.012696291320025921, -0.31413108110427856, 0.24521172046661377, 0.1695789098739624, -0.09038352966308594, 0.5747085809707642, -0.14885938167572021, 0.8625910878181458, -0.19677646458148956, 0.18312661349773407, 0.21623334288597107, -0.43814462423324585, 0.2829999327659607, 0.02539607137441635, -0.06769628822803497, -0.5362504124641418, -0.2563016712665558, 0.2176162451505661, 0.024692576378583908, -0.04977545142173767, -0.02396991103887558, -0.23050354421138763, 0.060466598719358444, -0.21469570696353912, -0.08999721705913544, 0.03695664554834366, 0.1902626007795334, -0.2748839259147644, 0.028241654857993126, -0.1978779286146164, 0.19518804550170898, 0.0725918859243393, -0.0656854659318924, 0.04617469012737274, -0.07357157766819, 0.21399655938148499, -0.42124634981155396, -0.3048992455005646, 0.17530056834220886, -0.25288766622543335, 0.2598186731338501, 0.08019692450761795, -0.3079209625720978, 0.16047556698322296, 0.24783170223236084, 0.2872769236564636, 0.1719994992017746, 0.03518672287464142, 0.24889345467090607, 0.20836913585662842, 0.1343955546617508, -0.19625678658485413, -0.18688203394412994, -0.018694186583161354, -0.1554926186800003, -0.34021130204200745, 0.3303755223751068, 0.1148402988910675, -0.3770141005516052, -0.07816021144390106, 0.1308063566684723, 0.06119374930858612, 0.20265820622444153, 0.06812778115272522, -0.0313434898853302, -0.08674343675374985, -0.2570919096469879, 0.2101154327392578, 0.15919923782348633, -0.09143425524234772, 0.13209648430347443, -0.05966122820973396, -0.25350257754325867, 0.11932915449142456, 0.22771286964416504, 0.2914986312389374, 0.15223456919193268, 0.708936333656311, 0.040351469069719315, 0.06340629607439041, -0.3153805136680603, -0.14329345524311066, 0.24555297195911407, -0.6300362348556519, 0.24360577762126923, 0.022350335493683815, 0.029890000820159912, 0.051381297409534454, 0.1311260610818863, 0.09828883409500122, 0.08462855219841003, 0.022114437073469162, -0.34442901611328125, -0.10538897663354874, 0.09573780000209808, -0.005434952676296234, 0.10408042371273041, 0.033886924386024475, -0.11157789826393127, -0.21469120681285858, 0.4263209402561188, -0.395603746175766, 0.2180330455303192, 0.073500856757164, -0.09794686734676361, -0.4599560797214508, -0.11429993063211441, 0.1551908254623413, 0.24822072684764862, 0.20720680058002472, 0.32629120349884033, -0.11630243062973022, -0.30464106798171997, -0.16200070083141327, 0.11911475658416748, -0.12365982681512833, 0.01346098817884922, -0.07716472446918488, -0.3239644169807434, 0.13203033804893494, 0.08804604411125183, 0.2979101240634918, -0.00933741219341755, -0.10276417434215546, -0.04215170443058014, 0.2517242729663849, 0.19040583074092865, -0.16968408226966858, 0.18363776803016663, -0.509712815284729, 0.13675905764102936, 0.13452813029289246, 0.13113220036029816, -0.1236746683716774, -0.09081156551837921, -0.08265773206949234, 0.11353128403425217, -0.03962700068950653, 0.14629924297332764, 0.23339742422103882, -0.23410893976688385, -0.22009295225143433, 0.018202606588602066, 0.22215738892555237, 0.17980679869651794, -0.2681427001953125, -0.16400909423828125, -0.030690308660268784, 0.30197495222091675, -0.39294061064720154, -0.21684317290782928, -0.18735182285308838, -0.06358562409877777, -0.017659861594438553, 0.18505984544754028, 0.18850953876972198, -0.48813673853874207, -0.07437562942504883, 0.21501410007476807, 0.13490836322307587, -0.35363978147506714, 0.04075106605887413, 0.24817989766597748, -0.14429907500743866, -0.13786417245864868, 0.2240297645330429, -0.12031055986881256, 0.21579182147979736, 0.3417680263519287, -0.4048337936401367, 0.11805576831102371, -0.00686466321349144, 0.042453669011592865, 0.11012768000364304, -0.324989378452301, 0.3864816427230835, 0.15368540585041046, -0.13355423510074615, 0.037590522319078445, 0.30256783962249756, 0.6008810997009277, 0.03198809176683426, 0.13809919357299805, -0.39529547095298767, 0.033575452864170074, -0.23697689175605774, -0.21000656485557556, -0.1946091651916504, -0.1895807534456253, -0.34058308601379395, -0.03221411630511284, -0.09242847561836243, 0.09093151986598969, 0.23152710497379303, -0.026940874755382538, -0.3150288462638855, -0.2569417357444763, 0.2479463517665863, 0.15728327631950378, 0.22488057613372803, -0.24772191047668457, 0.09303705394268036, 0.4507550597190857, -0.036763995885849, -0.01889561489224434, 0.3361514210700989, 0.37895455956459045, 0.13914676010608673, -0.23165109753608704, 0.23613786697387695, 0.02265002205967903, 0.08116479963064194, 0.0013856980949640274, 0.250535786151886, 0.13450928032398224, 0.2800767421722412, 0.18203285336494446, 0.19207653403282166, -0.20056436955928802, 0.09315808117389679, 0.38531070947647095, 0.23453330993652344, -0.004891172982752323, 0.10363456606864929, -0.3479993939399719, -0.027267906814813614, -0.1613023281097412, 0.4776093661785126, -0.29018348455429077, -0.024458225816488266, 0.2981216013431549, 0.02158287540078163, -0.0813906118273735, -0.7242830395698547, 0.15110662579536438, -0.11521987617015839, 0.3489241302013397, 0.29449793696403503, -0.029227547347545624, -0.3234563171863556, 0.08517251908779144, -0.7443157434463501, 0.5754791498184204, -0.3601241111755371, 0.2356720268726349, -0.03572678938508034, 0.20459431409835815, -0.02865120768547058, -0.07412728667259216, 0.2015181928873062, 0.44172799587249756, -0.3314487338066101, 0.28706955909729004, -0.359957218170166, -0.13028620183467865, 0.27691733837127686, -0.20323869585990906, 0.10330469906330109, -0.4686330258846283, 0.032417312264442444, -0.5130488872528076, 0.15357741713523865, -0.030011817812919617, -0.2659943103790283, 0.24870765209197998, -0.041246987879276276, 0.45485174655914307, 0.1663014143705368, 0.14765982329845428, -0.03290025517344475, -0.3738212287425995, -0.19411954283714294, -0.06351172924041748, -0.20922929048538208, 0.14700300991535187, 0.46819907426834106, 0.15025074779987335, 0.001209508627653122, 0.056317828595638275, -0.09632372111082077, 0.30036109685897827, -0.06929339468479156, 0.03201262652873993, -0.2587636411190033, 0.2795174717903137, -0.0043115802109241486, -0.02462249994277954, 0.05379103496670723, 0.18902167677879333, 0.012757968157529831, 0.23427681624889374, -0.23208558559417725, -0.4410299062728882, 0.34005850553512573, -0.21760201454162598, -0.006342759355902672, 0.018297240138053894, 0.3659907877445221, -0.07192348688840866, -0.07383707910776138, -0.45089438557624817, 0.14184662699699402, 0.3347361385822296, 0.05277879908680916, -0.04554178565740585, 0.05645618215203285, -0.06700924038887024, 0.009156592190265656, -0.03209155797958374, 0.273019939661026, 0.07109826803207397, -0.07799865305423737, 0.31317996978759766, -0.26893579959869385 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
It should probably work out of the box to save structured data. If you want to show an example we can help you.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
23
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. It should probably work out of the box to save structured data. If you want to show an example we can help you.
[ -0.27392423152923584, 0.03891567885875702, -0.03910224512219429, 0.24922962486743927, 0.17654657363891602, -0.11061852425336838, -0.04225827381014824, 0.058887071907520294, 0.03854626417160034, 0.15754814445972443, -0.18959978222846985, 0.41915059089660645, -0.4267219305038452, 0.6438040137290955, -0.14794422686100006, -0.2593744695186615, 0.2712559998035431, 0.03879169374704361, 0.2738684415817261, 0.024801500141620636, -0.1155967265367508, 0.054164230823516846, 0.03341257572174072, -0.06291857361793518, -0.2414860725402832, -0.4833354651927948, -0.15598958730697632, 0.0525338351726532, -0.3321603536605835, -0.46020713448524475, 0.19387367367744446, -0.10488854348659515, 0.34381353855133057, 0.209662526845932, -0.00011998663103440776, -0.05531235784292221, 0.15164561569690704, -0.1994684487581253, -0.05663079768419266, -0.2451011687517166, -0.05661200359463692, -0.27534347772598267, 0.2017228603363037, -0.4001506567001343, -0.033503610640764236, -0.4654901325702667, 0.052240096032619476, -0.25734061002731323, 0.37981921434402466, 0.12493396550416946, 0.11008743196725845, -0.09838871657848358, 0.35700127482414246, 0.18815752863883972, 0.12998108565807343, 0.571572482585907, -0.12081057578325272, 0.36072838306427, 0.013202942907810211, 0.18534763157367706, 0.4580910801887512, -0.0051270537078380585, -0.14308801293373108, -0.15770813822746277, 0.29004767537117004, -0.02490268275141716, -0.03086370974779129, -0.4098471403121948, -0.11168956011533737, 0.13818633556365967, 0.7237485647201538, -0.4365122318267822, -0.23310092091560364, -0.1412200629711151, -0.19591151177883148, -0.11568593233823776, -0.017556197941303253, 0.15292906761169434, -0.20703516900539398, 0.2562130391597748, 0.21396362781524658, -0.3798542022705078, -0.3587096333503723, 0.47342395782470703, -0.05593473091721535, 0.2613537311553955, -0.09143111109733582, 0.12736466526985168, -0.14215151965618134, -0.11187219619750977, 0.054921939969062805, -0.12483659386634827, 0.13207495212554932, 0.08863727003335953, -0.020379330962896347, -0.07587379217147827, -0.480171799659729, 0.2287081778049469, 0.028725333511829376, 0.3036394715309143, 0.0697169303894043, 0.016896534711122513, 0.3490335941314697, 0.2395000457763672, 0.4757235646247864, -0.14421290159225464, 0.047144580632448196, 0.3832101821899414, 0.4966684579849243, -0.3662722706794739, 0.040667299181222916, -0.17848902940750122, -0.2933405935764313, 0.12139714509248734, 0.4435192942619324, -0.3187877833843231, 0.557876467704773, 0.007951218634843826, -0.1359264850616455, 0.04462309554219246, -0.19696977734565735, 0.09672839194536209, -0.021695666015148163, 0.3609924018383026, -0.2775351405143738, 0.07324925065040588, -0.1412932276725769, 0.5445888042449951, 0.04547750949859619, 0.2662030756473541, 0.13820937275886536, 0.014985114336013794, 0.021870609372854233, 0.0009211841970682144, 0.1089768260717392, -0.19865179061889648, 0.08251699060201645, 0.08255660533905029, -0.13880454003810883, -0.2052009552717209, 0.0733288899064064, -0.3362773656845093, 0.288662850856781, 0.1905331015586853, -0.018004631623625755, 0.1952153593301773, -0.10863800346851349, -0.25779056549072266, -0.08382872492074966, 0.21245700120925903, -0.2254009246826172, -0.5140503644943237, -0.5806314945220947, 0.05287395045161247, -0.22831575572490692, -0.2235741913318634, -0.3237855136394501, 0.13717541098594666, 0.44591838121414185, -0.029016397893428802, -0.033198051154613495, -0.16836626827716827, -0.14646577835083008, -0.585050642490387, 0.05673699080944061, -0.23508180677890778, -0.47847220301628113, 0.09912703931331635, -0.3251683712005615, -0.07442496716976166, 0.1291409134864807, 0.42734625935554504, -0.05960136651992798, 0.3404158651828766, 0.035729750990867615, 0.413852334022522, 0.6987689733505249, -0.27771416306495667, -0.41481664776802063, -0.08190056681632996, 0.4841582775115967, 0.004097728058695793, -0.12890535593032837, 0.3573926091194153, 0.5263538360595703, -0.10225964337587357, -0.30433934926986694, 0.09968020766973495, -0.0032446924597024918, -0.0020727161318063736, -0.14998607337474823, 0.015973186120390892, 0.3745211958885193, 0.044203709810972214, -0.13732966780662537, -0.25392642617225647, 0.2561988830566406, -0.20045819878578186, 0.13854487240314484, 0.019222430884838104, 0.09507954865694046, 0.10070885717868805, 0.538398802280426, 0.5469770431518555, 0.09075899422168732, -0.33367785811424255, -0.31270071864128113, 0.07217089086771011, -0.22953420877456665, -0.3084796071052551, -0.5126116275787354, -0.304850697517395, -0.22863221168518066, 0.2266467660665512, -0.1705740988254547, 0.027936814352869987, -0.0004071071743965149, -0.1398177593946457, -0.09014636278152466, 0.2064347118139267, -0.3856295347213745, 0.05087626725435257, -0.018888501450419426, 0.00897049531340599, 0.10108499228954315, 0.27014151215553284, -0.19491928815841675, -0.5788186192512512, 0.09395688772201538, 0.2997940480709076, -0.010896630585193634, 0.04670149087905884, -0.01754249818623066, 0.3709220290184021, 0.17929120361804962, -0.14323018491268158, -0.37491148710250854, 0.17126566171646118, 0.027915429323911667, -0.3871050477027893, 0.0973692536354065, 0.13929560780525208, 0.22262313961982727, 0.033736057579517365, -0.13293996453285217, 0.26016128063201904, 0.3219934105873108, -0.12017437070608139, -0.15625570714473724, 0.1346735656261444, 0.16265259683132172, 0.11944921314716339, -0.07083931565284729, -0.01427365094423294, -0.16856741905212402, -0.07780638337135315, 0.05430831387639046, 0.1200314536690712, -0.7086871862411499, 0.07113417237997055, 0.4323033392429352, -0.0024226289242506027, 0.5254660844802856, -0.05957500636577606, -0.04011192172765732, -0.15022407472133636, 0.28233441710472107, -0.03111233189702034, 0.2100045382976532, 0.05625971406698227, -0.17076456546783447, -0.08017144352197647, -0.048939287662506104, -0.07599691301584244, 0.06492657214403152, 0.12038027495145798, 0.38466665148735046, 0.16393296420574188, 0.15073943138122559, -0.034177880734205246, -0.08597360551357269, 0.21789008378982544, -0.18139617145061493, 0.0015845578163862228, -0.34971335530281067, 0.18408367037773132, -0.1545984447002411, -0.45079901814460754, 0.09123911708593369, -0.2079918086528778, -0.14767147600650787, -0.23144471645355225, -0.02281082049012184, 0.023764649406075478, 0.012191973626613617, 0.16200628876686096, 0.4222956895828247, 0.216582253575325, -0.13184280693531036, -0.3234272003173828, -0.2239547222852707, -0.3585413694381714, -0.15640833973884583, -0.011780111119151115, 0.05982407182455063, 0.16753129661083221, 0.4270928204059601, -0.03992452472448349, 0.21721908450126648, -0.3474116921424866, -0.2564813494682312, -0.024716459214687347, -0.06372232735157013, 0.008833435364067554, 0.05501514673233032, 0.3775036931037903, -0.10457119345664978, -0.1879953294992447, -0.08851394802331924, -0.15725423395633698, -0.11575448513031006, 0.061034709215164185, -0.108199343085289, -0.06421048939228058, 0.10987643897533417, -0.13945415616035461, -0.8664668202400208, -0.16142822802066803, 0.3969891667366028, 0.3282333314418793, 0.06132104992866516, -0.0835258811712265, -0.002131911925971508, -0.11998724192380905, -0.13328595459461212, 0.007742536254227161, -0.03129185736179352, -0.3910389244556427, 0.6375258564949036, -0.30822497606277466, -0.4324340224266052, 0.2933846712112427, -0.07179778814315796, 0.12577567994594574, -0.08820953220129013, 0.11328598856925964, 0.3267560601234436, -0.05153290182352066, 0.44758641719818115, 0.057489775121212006, -0.025993680581450462, 0.2197536677122116, 0.04803605377674103, 0.1845581978559494, -0.10095584392547607, 0.1890585571527481, 0.28273674845695496, 0.12727710604667664, 0.3218657374382019, -0.07990676164627075, 0.13033819198608398, 0.011507458984851837, 0.2465849667787552, 0.044885408133268356, -0.0933632105588913, 0.4398345351219177, -0.13368390500545502, 0.3183670938014984, 0.010838784277439117, 0.006936738267540932, -0.004059663042426109, -0.1631755828857422, 0.009018685668706894, 0.09222471714019775, 0.08891439437866211, -0.29525506496429443, -0.06449344754219055, -0.21971102058887482, 0.010910529643297195, -0.15305711328983307, 0.13311061263084412, -0.5054296851158142, 0.2884158790111542, -0.1327303946018219, -0.1492352932691574, 0.06922779977321625, -0.18359902501106262, 0.018534978851675987, 0.2247162163257599, 0.0847117155790329, 0.2152620404958725, 0.02409418299794197, 0.045317329466342926, -0.4616931080818176, 0.19958408176898956, 0.23599553108215332, -0.0015278859063982964, -0.1771089732646942, -0.013153914362192154, 0.2584998607635498, 0.13620281219482422, 0.004395678639411926, -0.044617898762226105, -0.31113457679748535, -0.1692453920841217, 0.05058503895998001, -0.40300628542900085, 0.13201989233493805, -0.0676536113023758, 0.051620397716760635, 0.06471019983291626, 0.3190653324127197, -0.37501195073127747, -0.033099349588155746, -0.14128348231315613, 0.26243939995765686, -0.3222719132900238, -0.13761723041534424, -0.1584223210811615, -0.23957040905952454, -0.45913058519363403, -0.2636270821094513, 0.39541009068489075, -0.12997056543827057, 0.15754708647727966, -0.1445968747138977, -0.3792843818664551, 0.041169263422489166, -0.17119894921779633, -0.05699921399354935, 0.4456483721733093, -0.45135846734046936, -0.2031848281621933, 0.2764328122138977, 0.2749667167663574, 0.2852407693862915, 0.39524567127227783, 0.05855717882514, -0.340438574552536, -0.1505056619644165, 0.06882808357477188, 0.3938484489917755, -0.29417428374290466, -0.282728374004364, -0.033174820244312286, -0.11877933144569397, -0.08801303803920746, -0.26904433965682983, -0.1278580278158188, 0.2524329423904419, 0.033047549426555634, -0.7303056120872498, -0.5065047740936279, 0.3701464831829071, 0.1977503001689911, -0.044138893485069275, -0.08192713558673859, 0.22674722969532013, -0.10441741347312927, 0.5230236053466797, 0.33694541454315186, 0.9222274422645569, -0.12366470694541931, 0.3628590404987335, 0.3219562768936157, -0.4654831886291504, 0.3435900807380676, -0.04975791275501251, -0.24878354370594025, -0.3438926041126251, 0.33215436339378357, -0.17021451890468597, 0.07359588146209717, 0.27915385365486145, 0.11888822913169861, -0.3840115964412689, 0.04358643665909767, -0.25473666191101074, -0.2646395266056061, -0.0553690567612648, 0.41553303599357605, -0.07750935852527618, 0.08239051699638367, -0.3506850004196167, 0.06964904814958572, 0.045790188014507294, 0.08938460797071457, -0.12003105878829956, -0.03155386447906494, -0.2052198052406311, 0.0014492608606815338, -0.16730377078056335, -0.19215327501296997, -0.00013741478323936462, 0.3817145824432373, 0.11539885401725769, -0.37773001194000244, 0.20356345176696777, 0.5662431716918945, 0.24308805167675018, -0.04027044400572777, -0.22802966833114624, 0.027331363409757614, 0.09482046961784363, -0.09055468440055847, 0.1944991946220398, -0.07957261055707932, 0.4053027927875519, -0.14972490072250366, -0.19207629561424255, 0.02983066439628601, -0.06058681383728981, -0.236545130610466, -0.3173156976699829, -0.038899220526218414, -0.0682000070810318, -0.20139922201633453, 0.03089095652103424, -0.45975321531295776, -0.06011296063661575, 0.04144424572587013, 0.06024225428700447, 0.37515443563461304, 0.16380681097507477, 0.4845047891139984, -0.10385334491729736, 0.0526890903711319, -0.0722566545009613, 0.09058227390050888, 0.004654727876186371, 0.2955244183540344, 0.3351478576660156, -0.0535706989467144, -0.2657908797264099, -0.1244487538933754, 0.4560086131095886, 0.036650434136390686, -0.10684894025325775, 0.18457414209842682, 0.10272926092147827, 0.1321050077676773, -0.28730225563049316, 0.5487671494483948, 0.157710000872612, -0.4202432930469513, -0.14821256697177887, -0.30576884746551514, -0.4151206910610199, 0.17101825773715973, 0.19287236034870148, 0.2847708463668823, 0.03465653210878372, 0.10726580023765564, 0.12120431661605835, 0.0023184306919574738, -0.18167267739772797, -0.0584644079208374, -0.11077053099870682, 0.13966405391693115, 0.18996790051460266, 0.09819357097148895, -0.030961772426962852, -0.204658642411232, -0.04337542504072189, -0.1228901594877243, 0.14592717587947845, -0.07174059748649597, -0.17594510316848755, 0.1962183266878128, 0.0762234479188919, -0.13570702075958252, 0.08268868178129196, -0.3776552081108093, -0.08990833163261414, 0.21897298097610474, -0.17230379581451416, 0.3705012798309326, -0.05606947839260101, 0.1345967948436737, 0.09783496707677841, 0.0006533786654472351, 0.03822816163301468, 0.13719645142555237, -0.19009748101234436, 0.1095949187874794, -0.20907728374004364, 0.19864533841609955, -0.012024685740470886, -0.1980125457048416, 0.23650868237018585, 0.11155077815055847, 0.2743532657623291, -0.18839383125305176, 0.38603106141090393, -0.22599615156650543, 0.054921042174100876, -0.2953666150569916, 0.34574297070503235, 0.2153710126876831, -0.06795886158943176, 0.12848679721355438, 0.30976632237434387, 0.0269792377948761, -0.2391415685415268, 0.0055600423365831375, 0.01934051886200905, -0.16142548620700836, -0.14011986553668976, 0.120120570063591, 0.21924442052841187, 0.4591214060783386, -0.7182409763336182, -0.07129418849945068, 0.1516190469264984, 0.059244465082883835, 0.12265141308307648, 0.05773698166012764, -0.14259059727191925, 0.01600242406129837, 0.18986082077026367, 0.3188079595565796, 0.1759219765663147, 0.4872875213623047, -0.09771836549043655, 0.17297780513763428, 0.4726816713809967, -0.10428090393543243, 0.5654822587966919, -0.03889830783009529, -0.11389307677745819, -0.4172443747520447, 0.020184069871902466, -0.13449746370315552, 0.3396233022212982, 0.40900367498397827, 0.16179299354553223, -0.2944789230823517, 0.11167158931493759, 0.5377636551856995, 0.010621730238199234, -0.09983311593532562, -0.15287873148918152, -0.049504559487104416, 0.027122654020786285, -0.3353942334651947, -0.3285278379917145, -0.4493318200111389, 0.11673617362976074, 0.3489612936973572, 0.19128459692001343, -0.3651033043861389, 0.4992554783821106, -0.03786671906709671, 0.2248038351535797, -0.02097843401134014, 0.23312577605247498, -0.22170089185237885, -0.08111944794654846, -0.14143097400665283, 0.1262819617986679, 0.500813364982605, 0.28051334619522095, -0.13801509141921997, 0.3987891376018524, -0.1735534816980362, -0.2531890571117401, 0.03046271577477455, 0.008387481793761253, 0.15206971764564514, 0.18895207345485687, 0.4188028872013092, -0.006960839033126831, 0.07028337568044662, 0.14991195499897003, 0.11957957595586777, 0.2691442668437958, -0.021923929452896118, 0.42897310853004456, -0.20667868852615356, -0.28543806076049805, -0.02602875605225563, -0.0637114867568016, -0.197092205286026, -0.2187039852142334, 0.3100641071796417, 0.08672599494457245, 0.22496947646141052, -0.28305816650390625, 0.012339185923337936, 0.06351570785045624, 0.5647820830345154, 0.1533934324979782, 0.6376801133155823, 0.04312131181359291, -0.08379264175891876, -0.45236507058143616, -0.11759521812200546, -0.05851395055651665, -0.16680777072906494, 0.06359697878360748, 0.06684332340955734, -0.024545028805732727, 0.42977046966552734, 0.17525088787078857, 0.4556047022342682, -0.021262649446725845, 0.1491662859916687, -0.13505442440509796, -0.03802463784813881, -0.11256955564022064, 0.16050934791564941, 0.01138022169470787, -0.03998414799571037, 0.3054420053958893, -0.09129861742258072, 0.035563088953495026, -0.1888398975133896, -0.06399218738079071, -0.025122687220573425, -0.3501342236995697, 0.3043224513530731, -0.03993985801935196, 0.22144491970539093, 0.04272785037755966, 0.14904050529003143, 0.3592248857021332, -0.021291909739375114, -0.23754625022411346, 0.3152909278869629, 0.05871443822979927, 0.2484666109085083, -0.30702319741249084, 0.26424849033355713, -0.04967154935002327, -0.1571844071149826, -0.18610484898090363, -0.038818687200546265, -0.1620769500732422, 0.0006382660940289497, 0.11513178795576096, 0.0066861496306955814, -0.06553491950035095, 0.07165667414665222, -0.25072941184043884, 0.038283705711364746, -0.35480886697769165, -0.13653257489204407, 0.5200732350349426, -0.003820374608039856, -0.16971519589424133, 0.06506314128637314, -0.010188132524490356, 0.3891576826572418, 0.1384933888912201, -0.40025854110717773, 0.029943205416202545, 0.38849779963493347, -0.13153555989265442, 0.03175566717982292, 0.08540375530719757, 0.19755543768405914, -0.019527778029441833, -0.08317291736602783, 0.5987552404403687, -0.08187147974967957, 0.20102007687091827, 0.014474265277385712, -0.37076687812805176 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
An example of a toy dataset is like: ```json [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] ``` We can use the friendship relation to build a directional graph, and a user node can be represented using the articles written by himself. And the relationship between articles can be built when the article has read by the same user. This dataset can be used to model the heterogeneous relationship between users and articles, and this graph can be used to build recommendation systems to recommend articles to the user, or potential friends to the user.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
131
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. An example of a toy dataset is like: ```json [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] ``` We can use the friendship relation to build a directional graph, and a user node can be represented using the articles written by himself. And the relationship between articles can be built when the article has read by the same user. This dataset can be used to model the heterogeneous relationship between users and articles, and this graph can be used to build recommendation systems to recommend articles to the user, or potential friends to the user.
[ -0.2233349233865738, 0.10357533395290375, -0.05503038316965103, 0.2552999258041382, 0.16647513210773468, -0.08834881335496902, -0.042041677981615067, 0.048924174159765244, 0.13168807327747345, 0.01729986071586609, -0.1817377507686615, 0.3413712978363037, -0.4227154552936554, 0.5882757306098938, -0.20041537284851074, -0.25589093565940857, 0.22011341154575348, -0.04271654784679413, 0.32999423146247864, 0.077202707529068, -0.0972132757306099, -0.004565348848700523, 0.1638394296169281, -0.05923962593078613, -0.2459128051996231, -0.5715221762657166, -0.15946468710899353, 0.04773707687854767, -0.35423776507377625, -0.48082610964775085, 0.26153725385665894, -0.06210408732295036, 0.2797878086566925, 0.16290612518787384, -0.0001194890501210466, 0.05578207969665527, 0.12241339683532715, -0.1544819474220276, -0.08683378994464874, -0.3309617042541504, 0.005676735192537308, -0.29812100529670715, 0.21524831652641296, -0.36028972268104553, 0.014138348400592804, -0.5223192572593689, 0.04537828266620636, -0.40323206782341003, 0.46038544178009033, 0.08648118376731873, 0.11607158184051514, -0.11062457412481308, 0.33211374282836914, 0.2047652006149292, 0.14179769158363342, 0.6720960140228271, -0.1498086154460907, 0.3692043721675873, 0.015367843210697174, 0.1761930137872696, 0.41215404868125916, -0.05364425852894783, -0.13961298763751984, -0.16961519420146942, 0.32642683386802673, 0.009213531389832497, -0.025215625762939453, -0.3577061891555786, -0.11326984316110611, 0.14208048582077026, 0.5881971120834351, -0.39218902587890625, -0.26035863161087036, -0.2230055034160614, -0.25093191862106323, -0.0681217759847641, -0.015137448906898499, 0.11420591920614243, -0.21543240547180176, 0.23175093531608582, 0.16756471991539001, -0.3765948414802551, -0.2405543178319931, 0.5173790454864502, 0.004085227847099304, 0.22438204288482666, -0.08174986392259598, 0.14351555705070496, -0.15065491199493408, -0.20288920402526855, 0.05542227253317833, -0.23901435732841492, 0.16576431691646576, 0.01977931149303913, 0.01261519268155098, -0.09692052006721497, -0.41187945008277893, 0.14229369163513184, 0.09046996384859085, 0.25319093465805054, 0.11316511034965515, 0.0034747812896966934, 0.24984487891197205, 0.2128656804561615, 0.508919894695282, -0.1791360229253769, 0.05637986212968826, 0.38061827421188354, 0.37176811695098877, -0.31546130776405334, 0.048529017716646194, -0.17783930897712708, -0.2879609167575836, 0.17981070280075073, 0.4373399019241333, -0.32254189252853394, 0.518997848033905, 0.07926590740680695, -0.15706010162830353, 0.0459628626704216, -0.1656925231218338, 0.1057722344994545, 0.026003533974289894, 0.3263944089412689, -0.2364591807126999, 0.1145995557308197, -0.12729069590568542, 0.5873838663101196, 0.08556126058101654, 0.3219811022281647, 0.1119707003235817, -0.007231233641505241, 0.019674163311719894, 0.017033416777849197, 0.11549903452396393, -0.08981072902679443, 0.09133769571781158, 0.04450063034892082, -0.23103655874729156, -0.2699970304965973, 0.08204597234725952, -0.3541989028453827, 0.2971455156803131, 0.1638869345188141, -0.0560779795050621, 0.19630025327205658, -0.0513298325240612, -0.3526574969291687, -0.07809250801801682, 0.12397411465644836, -0.2141680121421814, -0.4256948232650757, -0.504012942314148, 0.0581175722181797, -0.3150155544281006, -0.21322324872016907, -0.367465615272522, 0.18153512477874756, 0.48649001121520996, -0.021723872050642967, -0.1316983997821808, -0.15535752475261688, -0.21244502067565918, -0.5415155291557312, 0.0038443952798843384, -0.1813926249742508, -0.4119336009025574, 0.04497068375349045, -0.4088262617588043, 0.02432332932949066, 0.06720592081546783, 0.44114935398101807, -0.08257107436656952, 0.34439799189567566, 0.0977899506688118, 0.4067668914794922, 0.6312232613563538, -0.21619945764541626, -0.4147624671459198, -0.05242348462343216, 0.3830609917640686, 0.11831749230623245, -0.14051416516304016, 0.3945298194885254, 0.5097453594207764, -0.10033203661441803, -0.2299244999885559, 0.10216394811868668, -0.03212842345237732, 0.012686150148510933, -0.1281440705060959, -0.0780198723077774, 0.3725042939186096, 0.061257075518369675, -0.1228095293045044, -0.27981534600257874, 0.24933242797851562, -0.19876033067703247, 0.07869665324687958, 0.068767249584198, 0.1506732851266861, 0.15838582813739777, 0.5065505504608154, 0.49460548162460327, -0.014091065153479576, -0.3567606806755066, -0.4202127158641815, 0.07018205523490906, -0.12026720494031906, -0.35147610306739807, -0.5534552335739136, -0.3246554732322693, -0.22329390048980713, 0.21713410317897797, -0.18798194825649261, 0.10658583045005798, 0.03593771904706955, -0.0916215181350708, -0.14379927515983582, 0.14423641562461853, -0.29928725957870483, 0.026218019425868988, 0.0541749969124794, 0.028867116197943687, 0.04947143793106079, 0.32675719261169434, -0.13883446156978607, -0.536104679107666, 0.14190888404846191, 0.2938564419746399, 0.016047172248363495, 0.06543515622615814, 0.020452190190553665, 0.34422567486763, 0.20591840147972107, -0.15875346958637238, -0.2881811559200287, 0.2673158347606659, 0.02074347995221615, -0.3377418518066406, 0.09949375689029694, 0.09640081226825714, 0.24549439549446106, 0.014928564429283142, -0.1673007309436798, 0.30994099378585815, 0.32286906242370605, -0.009983830153942108, -0.15815836191177368, 0.14046113193035126, 0.11891056597232819, 0.142523393034935, -0.0679238885641098, -0.062370024621486664, -0.20314233005046844, -0.051823507994413376, 0.05496940389275551, 0.1553438901901245, -0.6136969327926636, 0.12488485872745514, 0.44675686955451965, 0.10836964845657349, 0.5621823072433472, 0.03288072347640991, 0.0033149272203445435, -0.17033126950263977, 0.2184520810842514, 0.03796530142426491, 0.2161807119846344, 0.0516936220228672, -0.18558521568775177, -0.11053133755922318, -0.011699880473315716, -0.03490028902888298, 0.02825111150741577, 0.15449213981628418, 0.4188006818294525, 0.15111948549747467, 0.236650288105011, 0.011726880446076393, -0.02664431557059288, 0.15442033112049103, -0.18493980169296265, -0.004222545772790909, -0.36727192997932434, 0.23064802587032318, -0.19607388973236084, -0.2586524188518524, 0.0719427540898323, -0.21187256276607513, -0.17059549689292908, -0.2689160704612732, -0.038374774158000946, 0.038353126496076584, -0.08270806074142456, 0.10733179748058319, 0.4270686209201813, 0.1616070717573166, -0.19021134078502655, -0.38463327288627625, -0.13115599751472473, -0.45015278458595276, -0.1093699112534523, -0.013879629783332348, 0.13026510179042816, 0.16115115582942963, 0.43587374687194824, -0.02094930410385132, 0.2071596086025238, -0.29878467321395874, -0.28610849380493164, -0.1119457334280014, -0.08640188723802567, -0.00022243335843086243, 0.03336137905716896, 0.32843416929244995, -0.16270597279071808, -0.22329577803611755, -0.03541640192270279, -0.0906159058213234, -0.10394717007875443, 0.05547875910997391, -0.0491633377969265, -0.08255297690629959, 0.16101926565170288, -0.1338106393814087, -0.8484684824943542, -0.1657429188489914, 0.42613208293914795, 0.29237592220306396, 0.04079968482255936, -0.08938883990049362, 0.04106905311346054, -0.1693548560142517, -0.14456906914710999, -0.0015501352027058601, -0.005745380185544491, -0.3910813629627228, 0.5569656491279602, -0.29710817337036133, -0.3576732277870178, 0.21223682165145874, -0.14627154171466827, 0.028863724321126938, -0.020575283095240593, 0.09494936466217041, 0.4115857183933258, -0.05948856472969055, 0.42413052916526794, 0.1043306216597557, -0.1644161343574524, 0.2474939525127411, 0.13279719650745392, 0.18010996282100677, -0.06423868983983994, 0.13865435123443604, 0.3372529447078705, 0.09334585070610046, 0.24919083714485168, -0.10278598219156265, 0.08819662034511566, 0.029903408139944077, 0.243665412068367, 0.05516458675265312, -0.2277395874261856, 0.40771645307540894, -0.07598385959863663, 0.2586168348789215, -0.007771767675876617, -0.02843281626701355, -0.06586424261331558, -0.17337355017662048, 0.051830828189849854, 0.056867387145757675, 0.08842241019010544, -0.2805773913860321, -0.016142090782523155, -0.16585621237754822, -0.007808525115251541, -0.19660593569278717, 0.16107025742530823, -0.5294158458709717, 0.30781516432762146, -0.08158203214406967, -0.15122929215431213, 0.0007498934864997864, -0.18900540471076965, -0.07806719839572906, 0.21921023726463318, 0.034545257687568665, 0.22829414904117584, -0.013134490698575974, 0.029068658128380775, -0.43620020151138306, 0.18979638814926147, 0.2685631513595581, 0.048255555331707, -0.1776031255722046, 0.03001456707715988, 0.17555657029151917, 0.13540519773960114, -0.03946352005004883, -0.08138596266508102, -0.272946298122406, -0.17633475363254547, 0.03112783282995224, -0.40627554059028625, 0.19256411492824554, -0.03988060727715492, 0.0657268688082695, 0.031127242371439934, 0.4377598464488983, -0.4519425928592682, -0.027210388332605362, -0.18015597760677338, 0.25426292419433594, -0.3058663308620453, -0.18967659771442413, -0.11227574199438095, -0.22210270166397095, -0.40850168466567993, -0.2553930878639221, 0.40438348054885864, -0.08421149849891663, 0.10506526380777359, -0.14197158813476562, -0.3992535173892975, 0.11595559865236282, -0.12268348038196564, -0.1181737631559372, 0.4155302345752716, -0.4326835870742798, -0.13478131592273712, 0.26523715257644653, 0.29920005798339844, 0.3488847017288208, 0.38283613324165344, 0.16069190204143524, -0.2972445487976074, -0.1748633086681366, 0.053942982107400894, 0.3107571303844452, -0.29418715834617615, -0.188286691904068, -0.054066069424152374, -0.041889920830726624, -0.09921593964099884, -0.28981032967567444, -0.08343920856714249, 0.2686803340911865, -0.01048783864825964, -0.6994726061820984, -0.4712933897972107, 0.37356314063072205, 0.15488046407699585, -0.043987665325403214, -0.1446903795003891, 0.1700032502412796, -0.14917567372322083, 0.5449374318122864, 0.3925795257091522, 0.8639628887176514, -0.1372971385717392, 0.36364638805389404, 0.2922455966472626, -0.4893288016319275, 0.40835684537887573, -0.07653196901082993, -0.3226093053817749, -0.3465975821018219, 0.3702886998653412, -0.16709350049495697, 0.07978345453739166, 0.2839084267616272, 0.1858796924352646, -0.3257010579109192, 0.03426852449774742, -0.2680806815624237, -0.23596727848052979, -0.030756087973713875, 0.4318488538265228, -0.022159093990921974, 0.06074494495987892, -0.29213187098503113, 0.08059120178222656, -0.06784546375274658, -0.00007696077227592468, -0.10685809701681137, -0.04244788736104965, -0.31131383776664734, 0.01734762266278267, -0.22586914896965027, -0.2482302188873291, 0.009115241467952728, 0.3994216322898865, 0.12479686737060547, -0.36012887954711914, 0.2805287539958954, 0.4910922944545746, 0.2668822407722473, 0.010550137609243393, -0.20032484829425812, 0.010885395109653473, 0.02446712553501129, -0.11121788620948792, 0.24105222523212433, -0.178482323884964, 0.3344794809818268, -0.1055416613817215, -0.20187795162200928, -0.0601704940199852, -0.031182866543531418, -0.11873064190149307, -0.27162593603134155, -0.0526387095451355, -0.12258589267730713, -0.25898459553718567, -0.010638868436217308, -0.4220397472381592, -0.08799947798252106, -0.0030056126415729523, 0.058530572801828384, 0.3459264039993286, 0.19456061720848083, 0.3843895494937897, -0.12215721607208252, 0.07462091743946075, -0.04835179075598717, 0.13504718244075775, -0.013857953250408173, 0.3325589597225189, 0.36328792572021484, -0.05496889352798462, -0.2740262746810913, -0.15619519352912903, 0.4622800350189209, 0.09589077532291412, -0.0743359848856926, 0.15196265280246735, 0.08078518509864807, 0.05214652419090271, -0.3380199372768402, 0.4268670976161957, 0.10664357244968414, -0.3751501142978668, -0.0491340234875679, -0.34428879618644714, -0.3983801305294037, 0.2167149931192398, 0.1597573161125183, 0.2631758749485016, -0.00890326127409935, 0.10211464762687683, 0.046464718878269196, 0.03767280653119087, -0.1907520294189453, -0.028624312952160835, -0.11031623929738998, 0.13037660717964172, 0.11219876259565353, 0.03859991580247879, -0.041078269481658936, -0.25204262137413025, -0.020174317061901093, -0.13459545373916626, 0.11237095296382904, -0.08530643582344055, -0.15132606029510498, 0.16846491396427155, 0.1194574311375618, -0.12560029327869415, 0.07267642766237259, -0.31889045238494873, -0.10452401638031006, 0.19035689532756805, -0.2234046459197998, 0.38061612844467163, -0.03459569066762924, 0.1050267145037651, 0.008300930261611938, 0.0254155732691288, 0.06912259012460709, 0.14725425839424133, -0.20520243048667908, 0.09945213049650192, -0.21126538515090942, 0.18870508670806885, 0.021415485069155693, -0.22673176229000092, 0.2309464067220688, 0.14606522023677826, 0.26072630286216736, -0.1214081272482872, 0.43737146258354187, -0.24862976372241974, 0.008723106235265732, -0.19714917242527008, 0.3064258396625519, 0.23605169355869293, -0.039349257946014404, 0.15934742987155914, 0.19765019416809082, 0.056928083300590515, -0.15679410099983215, 0.026764867827296257, 0.10819956660270691, -0.11269140243530273, -0.09679673612117767, 0.17122510075569153, 0.13996809720993042, 0.5176047682762146, -0.7192397117614746, -0.09994592517614365, 0.17775958776474, 0.0955880731344223, 0.19798685610294342, -0.0007531456649303436, -0.044962070882320404, -0.03236781433224678, 0.1952228993177414, 0.32570070028305054, 0.2375147044658661, 0.42223989963531494, -0.06294704228639603, 0.15410922467708588, 0.49201229214668274, -0.0420316644012928, 0.5321181416511536, -0.06035199016332626, -0.08985981345176697, -0.3307672441005707, 0.09039127826690674, -0.11685312539339066, 0.3019031286239624, 0.37686946988105774, 0.19336839020252228, -0.3365647494792938, 0.10378003865480423, 0.5163173079490662, 0.022125255316495895, -0.15338784456253052, -0.20204472541809082, -0.03883618116378784, -0.10575763881206512, -0.3559311032295227, -0.3709658682346344, -0.5535495281219482, 0.04855262115597725, 0.25320982933044434, 0.2285642772912979, -0.45099014043807983, 0.555263102054596, 0.001884501427412033, 0.20110684633255005, -0.02494588866829872, 0.22274406254291534, -0.12537387013435364, -0.12108373641967773, -0.08365841209888458, 0.09068067371845245, 0.4870859384536743, 0.22880709171295166, -0.21576516330242157, 0.42973563075065613, -0.18820466101169586, -0.3056252896785736, -0.022948533296585083, 0.0028566010296344757, 0.08766480535268784, 0.21053031086921692, 0.4193350672721863, 0.03058626316487789, 0.044811610132455826, 0.14240694046020508, 0.11010709404945374, 0.3276670575141907, -0.048761289566755295, 0.48617491126060486, -0.2393779456615448, -0.29327690601348877, 0.0763852447271347, -0.08130838721990585, -0.13690495491027832, -0.27327218651771545, 0.3981997072696686, 0.08158918470144272, 0.27306830883026123, -0.3055601418018341, 0.025610432028770447, 0.009254904463887215, 0.6038176417350769, 0.0910225659608841, 0.529861569404602, -0.021741557866334915, -0.04806331545114517, -0.3787652850151062, -0.1793808937072754, -0.11869044601917267, -0.18832355737686157, 0.10576719045639038, 0.09313572198152542, -0.04063338786363602, 0.4481937289237976, 0.029793396592140198, 0.5166378617286682, -0.09007322788238525, 0.13248097896575928, -0.17796075344085693, -0.04115557298064232, -0.11224716901779175, 0.1276654452085495, 0.10435846447944641, -0.07690071314573288, 0.24959085881710052, -0.02890300750732422, 0.03447823226451874, -0.196800097823143, -0.04196600988507271, -0.0598190538585186, -0.4242296516895294, 0.2686575651168823, 0.013955429196357727, 0.22151502966880798, 0.10190362483263016, 0.10357487946748734, 0.2701399326324463, -0.010720957070589066, -0.2577408254146576, 0.4326905310153961, 0.017345627769827843, 0.4144567847251892, -0.3793775737285614, 0.35947129130363464, -0.01739102602005005, -0.2136911302804947, -0.1642681062221527, -0.05648019164800644, -0.1417870670557022, 0.008839186280965805, 0.13837522268295288, 0.05674280971288681, -0.030434589833021164, 0.1238713264465332, -0.22121009230613708, 0.12015743553638458, -0.26318520307540894, -0.1337823122739792, 0.47904542088508606, 0.13747908174991608, -0.1566675752401352, 0.18652066588401794, -0.010089144110679626, 0.46526017785072327, 0.07858213037252426, -0.3664718568325043, 0.05681135505437851, 0.406655490398407, -0.1128985658288002, 0.03617563471198082, 0.004963205195963383, 0.15605320036411285, -0.06109398603439331, -0.07280591130256653, 0.5850741863250732, -0.1229250505566597, 0.21367144584655762, 0.06216629967093468, -0.3391146659851074 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
Hi, you can do the following to load this data into a `Dataset`: ```python from datasets import Dataset examples = [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] keys = examples[0].keys() values = [ex.values() for ex in examples] dataset = Dataset.from_dict({k: list(v) for k, v in zip(keys, zip(*values))}) ``` Let us know if this works for you.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
93
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. Hi, you can do the following to load this data into a `Dataset`: ```python from datasets import Dataset examples = [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] keys = examples[0].keys() values = [ex.values() for ex in examples] dataset = Dataset.from_dict({k: list(v) for k, v in zip(keys, zip(*values))}) ``` Let us know if this works for you.
[ -0.28566867113113403, 0.04891219735145569, -0.036923475563526154, 0.295473575592041, 0.17613095045089722, -0.09251783043146133, 0.0076429396867752075, 0.09410916268825531, 0.1752268671989441, 0.035999953746795654, -0.22664876282215118, 0.4146479666233063, -0.4315076768398285, 0.6326940655708313, -0.16800382733345032, -0.1835949420928955, 0.2540253698825836, -0.0057014524936676025, 0.28156203031539917, 0.06755559146404266, -0.11435247212648392, 0.021000681445002556, 0.09421126544475555, -0.10120661556720734, -0.24025119841098785, -0.48432448506355286, -0.13839654624462128, 0.10614275932312012, -0.2759394943714142, -0.5049469470977783, 0.26285454630851746, -0.0757848471403122, 0.3589753210544586, 0.22964298725128174, -0.00012121970939915627, 0.029349960386753082, 0.15412524342536926, -0.15829172730445862, -0.1681705266237259, -0.27608054876327515, -0.0338868610560894, -0.38625964522361755, 0.22240135073661804, -0.35207781195640564, 0.026503819972276688, -0.5047534704208374, -0.06311482936143875, -0.43870848417282104, 0.43967705965042114, 0.10202091187238693, 0.10481016337871552, -0.095322385430336, 0.2954246997833252, 0.18992166221141815, 0.058985114097595215, 0.6107457280158997, -0.13728274405002594, 0.38340941071510315, 0.00415358692407608, 0.14109455049037933, 0.4431876540184021, -0.010214442387223244, -0.20976337790489197, -0.1612377017736435, 0.32010626792907715, 0.01713198982179165, -0.029172584414482117, -0.3698992431163788, -0.13520798087120056, 0.16602227091789246, 0.5845981240272522, -0.3652300536632538, -0.29832568764686584, -0.3096185028553009, -0.228136345744133, -0.1148664578795433, 0.003970146179199219, 0.11020001024007797, -0.19817404448986053, 0.28074172139167786, 0.22018234431743622, -0.3308596909046173, -0.18074487149715424, 0.48498719930648804, -0.061100371181964874, 0.14617466926574707, -0.11929582059383392, 0.14196285605430603, -0.12277399003505707, -0.18038330972194672, 0.09963901340961456, -0.262288361787796, 0.21157866716384888, 0.054036080837249756, -0.0296066515147686, -0.041472937911748886, -0.3642188608646393, 0.12439565360546112, 0.06350484490394592, 0.2624095678329468, 0.10648024082183838, -0.013125121593475342, 0.24165049195289612, 0.20264369249343872, 0.44574952125549316, -0.20232973992824554, 0.07073885202407837, 0.403211385011673, 0.28887662291526794, -0.26164695620536804, 0.04396777227520943, -0.1640574038028717, -0.35006341338157654, 0.08127225935459137, 0.4830954670906067, -0.34073176980018616, 0.546766996383667, 0.031803715974092484, -0.19896380603313446, 0.05675714835524559, -0.2073792815208435, 0.09300541132688522, -0.005970166064798832, 0.33410224318504333, -0.21971847116947174, 0.17381641268730164, -0.11308638751506805, 0.605710506439209, 0.09689582139253616, 0.26780927181243896, 0.06948021799325943, -0.05942424014210701, 0.03339506313204765, 0.03295024484395981, 0.14192405343055725, -0.19070914387702942, 0.045240215957164764, 0.06793588399887085, -0.19667677581310272, -0.30199506878852844, 0.009788377210497856, -0.3076043128967285, 0.3215048313140869, 0.17868544161319733, -0.000793997198343277, 0.24413536489009857, 0.05546952784061432, -0.3334331512451172, -0.0856919214129448, 0.16011664271354675, -0.24566718935966492, -0.4013804495334625, -0.47040075063705444, 0.04643912613391876, -0.2703108787536621, -0.20092646777629852, -0.42333462834358215, 0.1407179981470108, 0.4591408371925354, -0.027031421661376953, -0.1629067361354828, -0.18514418601989746, -0.2272673100233078, -0.5391334891319275, 0.06163643300533295, -0.13013191521167755, -0.49105289578437805, 0.023860983550548553, -0.41318342089653015, 0.033468641340732574, 0.08803807944059372, 0.41296735405921936, -0.06443946063518524, 0.3483414053916931, 0.03598298877477646, 0.3879743814468384, 0.6230748891830444, -0.24502046406269073, -0.445557564496994, -0.01232806034386158, 0.40372180938720703, 0.148911252617836, -0.17651566863059998, 0.3048384487628937, 0.5396370887756348, -0.08554065227508545, -0.2140927016735077, 0.1027066558599472, 0.002444641664624214, 0.011791685596108437, -0.1402403861284256, -0.045989006757736206, 0.41482627391815186, 0.07514098286628723, -0.17318080365657806, -0.211593896150589, 0.1960124522447586, -0.28319403529167175, 0.13023197650909424, 0.09189970791339874, 0.13418790698051453, 0.17187628149986267, 0.4094119071960449, 0.5433164238929749, 0.004291533026844263, -0.32946425676345825, -0.3844676613807678, 0.11485355347394943, -0.12754949927330017, -0.32569408416748047, -0.5862289071083069, -0.2956012487411499, -0.2968480885028839, 0.26549237966537476, -0.22534780204296112, 0.10461731255054474, 0.023385994136333466, -0.1460322141647339, -0.15922224521636963, 0.1599627584218979, -0.31972169876098633, 0.033986397087574005, 0.006549285724759102, 0.03290649130940437, 0.08613370358943939, 0.3561074733734131, -0.09284356236457825, -0.5181423425674438, 0.1240738183259964, 0.2805194556713104, 0.07069945335388184, 0.10269013792276382, -0.04184394329786301, 0.2740919888019562, 0.23307207226753235, -0.22997353971004486, -0.33697330951690674, 0.2312614917755127, -0.022167956456542015, -0.3557393252849579, 0.1260831505060196, 0.12929250299930573, 0.2492380440235138, -0.025110185146331787, -0.1084318682551384, 0.3343934118747711, 0.27631691098213196, 0.017638757824897766, -0.24071264266967773, 0.19015762209892273, 0.12519700825214386, 0.1463831663131714, -0.08318768441677094, -0.09664139896631241, -0.23154251277446747, -0.029972795397043228, 0.03973009064793587, 0.12986649572849274, -0.5606172680854797, 0.07129266858100891, 0.3628564476966858, 0.055230747908353806, 0.4966154098510742, 0.006489858031272888, -0.028109349310398102, -0.12602567672729492, 0.23445387184619904, 0.034313369542360306, 0.24399015307426453, 0.044807858765125275, -0.18894806504249573, -0.12319964915513992, 0.0325145423412323, -0.03258803114295006, 0.03981494903564453, 0.17069491744041443, 0.4787932336330414, 0.17933325469493866, 0.13534602522850037, 0.07057861238718033, -0.0077467188239097595, 0.15291032195091248, -0.18686051666736603, 0.021574338898062706, -0.3932468593120575, 0.25974151492118835, -0.1891775280237198, -0.34116536378860474, 0.07172521203756332, -0.17984403669834137, -0.11243398487567902, -0.2484556883573532, -0.12681807577610016, 0.05199344828724861, -0.012092981487512589, 0.18028073012828827, 0.4102579653263092, 0.15161602199077606, -0.11778946965932846, -0.46254217624664307, -0.14616522192955017, -0.40687090158462524, -0.10813706368207932, -0.02905411273241043, 0.11828345060348511, 0.1293032318353653, 0.37373220920562744, -0.037515588104724884, 0.2248944640159607, -0.2988061308860779, -0.19500574469566345, -0.1388469934463501, -0.07497420907020569, -0.054515331983566284, -0.002495691180229187, 0.37136512994766235, -0.14019469916820526, -0.14462046325206757, -0.01663881354033947, -0.10917235910892487, -0.06999959796667099, 0.09439612179994583, -0.041567690670490265, -0.0403396300971508, 0.20531794428825378, -0.05935157090425491, -0.8583179712295532, -0.15646831691265106, 0.3328516483306885, 0.343587726354599, 0.03377506881952286, -0.07367396354675293, 0.10390470921993256, -0.15375164151191711, -0.1172202080488205, -0.035496994853019714, -0.015531999990344048, -0.26808708906173706, 0.6005046367645264, -0.24759726226329803, -0.3712282180786133, 0.21665352582931519, -0.1438215970993042, 0.06007225811481476, -0.014224275946617126, 0.08750741183757782, 0.4726676940917969, -0.04644044488668442, 0.42934083938598633, 0.028301695361733437, -0.12365573644638062, 0.29869091510772705, 0.13699477910995483, 0.18805374205112457, -0.015102609992027283, 0.1769080013036728, 0.2579631805419922, 0.0381057932972908, 0.16375815868377686, -0.05981947481632233, 0.15147191286087036, 0.018788453191518784, 0.24789758026599884, 0.11972203850746155, -0.1546410322189331, 0.4252411127090454, -0.1102481260895729, 0.2781703770160675, -0.026138491928577423, -0.10247137397527695, -0.1288134753704071, -0.15068963170051575, 0.04488039016723633, 0.04613639786839485, 0.08398879319429398, -0.21246621012687683, -0.028828701004385948, -0.1592273861169815, -0.031937070190906525, -0.19744433462619781, 0.1420324742794037, -0.5685589909553528, 0.31770169734954834, -0.07780841737985611, -0.12057136744260788, -0.013799663633108139, -0.18911999464035034, -0.0773550420999527, 0.19082051515579224, 0.09615881741046906, 0.20222342014312744, -0.00885353609919548, 0.15805234014987946, -0.3908390402793884, 0.2159329056739807, 0.24221199750900269, 0.05267156660556793, -0.16139696538448334, -0.009830154478549957, 0.18054036796092987, 0.20016509294509888, -0.03327344357967377, -0.05044581741094589, -0.25605881214141846, -0.133578822016716, 0.03294108808040619, -0.5067495703697205, 0.11843480169773102, -0.010011211037635803, 0.02548607811331749, 0.030040154233574867, 0.3673708438873291, -0.41278165578842163, -0.01619943045079708, -0.16948293149471283, 0.3126724660396576, -0.31798815727233887, -0.2013419270515442, -0.1354961395263672, -0.19277802109718323, -0.5086795091629028, -0.27295181155204773, 0.4607399106025696, -0.0016775326803326607, 0.042837806046009064, -0.11048050224781036, -0.4287120997905731, 0.10295119136571884, -0.11345197260379791, -0.1434391289949417, 0.4799450635910034, -0.437767893075943, -0.1277347207069397, 0.28685611486434937, 0.20022109150886536, 0.3274329900741577, 0.44426947832107544, 0.09144708514213562, -0.401863157749176, -0.18655595183372498, 0.06298366189002991, 0.2902643382549286, -0.30984655022621155, -0.23683302104473114, -0.05951669067144394, -0.043276362121105194, -0.1370958536863327, -0.3614165186882019, -0.10339156538248062, 0.2624726891517639, -0.0037974384613335133, -0.7144718170166016, -0.5395757555961609, 0.41257670521736145, 0.19707238674163818, -0.027718886733055115, -0.026600368320941925, 0.15303966403007507, -0.1341238021850586, 0.5577988624572754, 0.2633267939090729, 0.8369049429893494, -0.17082267999649048, 0.3860083520412445, 0.37094518542289734, -0.3662647604942322, 0.31032031774520874, 0.03484842926263809, -0.36619722843170166, -0.37330323457717896, 0.3256160616874695, -0.1508176177740097, 0.043566953390836716, 0.2262844443321228, 0.23618696630001068, -0.2926366925239563, 0.044780436903238297, -0.3811261057853699, -0.23709431290626526, 0.016040604561567307, 0.3597186803817749, -0.009549012407660484, 0.03254329413175583, -0.33725306391716003, 0.07827911525964737, -0.03095431625843048, 0.09693004190921783, -0.09891916066408157, 0.004898278042674065, -0.3105248808860779, 0.0184316448867321, -0.23105862736701965, -0.19156146049499512, 0.02783416584134102, 0.39828336238861084, 0.10251018404960632, -0.3914259076118469, 0.25622424483299255, 0.5818540453910828, 0.17344225943088531, -0.004855114966630936, -0.1794058084487915, 0.024577848613262177, 0.053972262889146805, -0.10810039192438126, 0.27034103870391846, -0.15113702416419983, 0.3229629099369049, -0.08096884191036224, -0.18215411901474, 0.02235214039683342, -0.011441845446825027, -0.14209090173244476, -0.17291435599327087, -0.00795072317123413, -0.04972733557224274, -0.35647082328796387, -0.06621549278497696, -0.4418884515762329, -0.026637384667992592, 0.01212797686457634, 0.043893128633499146, 0.35392463207244873, 0.1604401022195816, 0.3738447427749634, -0.11172248423099518, 0.08171543478965759, -0.004521835595369339, 0.15243668854236603, -0.05437697470188141, 0.2796644866466522, 0.37781012058258057, -0.039572324603796005, -0.27249646186828613, -0.13585349917411804, 0.503056526184082, 0.03167523816227913, -0.09700687974691391, 0.20960599184036255, 0.11030253767967224, 0.12787486612796783, -0.31325897574424744, 0.46844395995140076, 0.11654702574014664, -0.33607566356658936, -0.029169747605919838, -0.3738363981246948, -0.3828909695148468, 0.1973920315504074, 0.13450993597507477, 0.25691524147987366, 0.032769277691841125, 0.058601249009370804, 0.013056682422757149, -0.041090548038482666, -0.17508116364479065, 0.007868616841733456, -0.05047386512160301, 0.055277012288570404, 0.17550627887248993, 0.049528419971466064, -0.02233460731804371, -0.24218975007534027, -0.006071740761399269, -0.15272052586078644, 0.1510724276304245, -0.08591008186340332, -0.16042396426200867, 0.18657127022743225, 0.08946985006332397, -0.16862374544143677, 0.08244737237691879, -0.3796800971031189, -0.1631350815296173, 0.13915976881980896, -0.2217635065317154, 0.4110216796398163, -0.030909918248653412, 0.10009294003248215, 0.11530138552188873, 0.02486361563205719, -0.03799695894122124, 0.224134624004364, -0.3059082329273224, 0.10761553049087524, -0.2326216846704483, 0.16719107329845428, 0.061952441930770874, -0.1668601930141449, 0.1264883130788803, 0.1814887672662735, 0.2913070619106293, -0.17051222920417786, 0.4657719135284424, -0.3192030191421509, 0.08737881481647491, -0.19960063695907593, 0.31230276823043823, 0.24666491150856018, -0.12090440094470978, 0.10898363590240479, 0.22647374868392944, 0.04900440573692322, -0.1823289841413498, 0.04797891154885292, 0.0929597020149231, -0.09542366117238998, -0.11767950654029846, 0.20029732584953308, 0.12029054760932922, 0.4316859841346741, -0.7079564332962036, -0.07727550715208054, 0.13306833803653717, 0.06259460747241974, 0.19398997724056244, 0.0485740564763546, 0.031231436878442764, -0.013181064277887344, 0.2086905837059021, 0.30579856038093567, 0.18724176287651062, 0.43616586923599243, -0.06575518101453781, 0.11673996597528458, 0.42636922001838684, -0.08230391144752502, 0.47785696387290955, -0.17406994104385376, -0.07761700451374054, -0.3145119547843933, -0.0231839120388031, -0.11254898458719254, 0.3007282316684723, 0.3824789524078369, 0.12449107319116592, -0.3221505284309387, 0.12140714377164841, 0.48452919721603394, -0.004323083907365799, -0.08352498710155487, -0.13074278831481934, -0.024563275277614594, -0.053714558482170105, -0.3768722414970398, -0.36020249128341675, -0.5454347729682922, 0.006299570202827454, 0.29376065731048584, 0.22274598479270935, -0.47009432315826416, 0.49528470635414124, 0.056502554565668106, 0.2026817947626114, -0.00801488384604454, 0.163649320602417, -0.15670205652713776, -0.03960318863391876, -0.018450215458869934, 0.072421595454216, 0.5308017730712891, 0.20710061490535736, -0.17744776606559753, 0.4039844572544098, -0.14850173890590668, -0.2613714933395386, 0.0007311832159757614, -0.05353432893753052, 0.0601244680583477, 0.2574846148490906, 0.43662962317466736, 0.037191711366176605, 0.043902020901441574, 0.02375595085322857, 0.08996400237083435, 0.26526525616645813, -0.06440716981887817, 0.5160332918167114, -0.2475356161594391, -0.2820347547531128, -0.01118377223610878, -0.020445160567760468, -0.06237480789422989, -0.24699603021144867, 0.43209853768348694, 0.1445879191160202, 0.25695839524269104, -0.26724937558174133, 0.02039589360356331, 0.028981562703847885, 0.5063237547874451, 0.11822088807821274, 0.6070608496665955, -0.037514470517635345, -0.03133893758058548, -0.4656194746494293, -0.12908867001533508, -0.13421763479709625, -0.22494107484817505, 0.12774932384490967, 0.07060503214597702, -0.036685071885585785, 0.501250147819519, 0.04559827595949173, 0.4711264967918396, -0.029916154220700264, 0.16298167407512665, -0.12187765538692474, -0.12084251642227173, -0.11373426020145416, 0.135222926735878, 0.060131728649139404, -0.10078027844429016, 0.22585272789001465, -0.09116172045469284, 0.05198640376329422, -0.2024911642074585, -0.08396865427494049, -0.06879013776779175, -0.37748345732688904, 0.24900825321674347, -0.03974335640668869, 0.29314014315605164, 0.11436083167791367, 0.10870141535997391, 0.27038413286209106, -0.023246629163622856, -0.27241528034210205, 0.4581117630004883, -0.02685144916176796, 0.3115202486515045, -0.38281065225601196, 0.36034640669822693, -0.038287945091724396, -0.21425151824951172, -0.13535332679748535, -0.08595883101224899, -0.17419759929180145, 0.030895033851265907, 0.15187376737594604, 0.1291859894990921, -0.030015520751476288, 0.08150649815797806, -0.21362978219985962, 0.16777567565441132, -0.2586873769760132, -0.1427021622657776, 0.5019134283065796, 0.10706260800361633, -0.16889917850494385, 0.21499314904212952, 0.01029319316148758, 0.40402886271476746, 0.13075928390026093, -0.3111591041088104, 0.03070918470621109, 0.4374919831752777, -0.11015204340219498, 0.06013602390885353, 0.05763820558786392, 0.13472983241081238, -0.03298080712556839, -0.11605697870254517, 0.5957217216491699, -0.13415572047233582, 0.25203970074653625, 0.02688491716980934, -0.341614305973053 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
Thank you so much, and that works! I also have a question that if the dataset is very large, that cannot be loaded into the memory. How to create the Dataset?
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
31
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. Thank you so much, and that works! I also have a question that if the dataset is very large, that cannot be loaded into the memory. How to create the Dataset?
[ -0.2723237872123718, 0.007755741477012634, -0.03358426317572594, 0.33133572340011597, 0.147417813539505, -0.07705587893724442, -0.06608238816261292, 0.012047495692968369, 0.07527071237564087, 0.12298785150051117, -0.17316266894340515, 0.31338053941726685, -0.43195444345474243, 0.5779836773872375, -0.0695672333240509, -0.2389577031135559, 0.27621492743492126, 0.07609105110168457, 0.21646510064601898, -0.006268545985221863, -0.11674172431230545, -0.014483654871582985, 0.06241925060749054, -0.1413789540529251, -0.284481406211853, -0.49803927540779114, -0.1976488083600998, 0.1711289882659912, -0.4135596454143524, -0.4989907741546631, 0.20107528567314148, -0.0681336373090744, 0.31380772590637207, 0.28755366802215576, -0.0001202715648105368, -0.09889247268438339, 0.15174806118011475, -0.21393802762031555, -0.08759462833404541, -0.21765603125095367, -0.06265335530042648, -0.34945398569107056, 0.185626819729805, -0.3744630217552185, 0.04881257563829422, -0.46177899837493896, 0.08959832042455673, -0.24552419781684875, 0.38029026985168457, 0.21230275928974152, 0.10834544897079468, -0.10206706821918488, 0.33372756838798523, 0.13877330720424652, 0.22448748350143433, 0.553614616394043, -0.1602344810962677, 0.34496408700942993, 0.020334690809249878, 0.18498684465885162, 0.38432300090789795, -0.1057034432888031, -0.13187168538570404, -0.1821807473897934, 0.39732927083969116, -0.0415191724896431, -0.0887693539261818, -0.4944136440753937, -0.08419819921255112, 0.19480380415916443, 0.7593108415603638, -0.4477230906486511, -0.22669443488121033, -0.16081714630126953, -0.2214413285255432, -0.09483228623867035, 0.010896682739257812, 0.24653473496437073, -0.24182789027690887, 0.21716062724590302, 0.12569230794906616, -0.41893377900123596, -0.3556170165538788, 0.4478444457054138, -0.06397164613008499, 0.2398029863834381, -0.07032956928014755, 0.13059774041175842, -0.11457103490829468, -0.08669066429138184, 0.07029195874929428, -0.16380220651626587, 0.10057257115840912, 0.156936377286911, -0.007792476564645767, -0.099370077252388, -0.43927961587905884, 0.24446764588356018, 0.13117176294326782, 0.2988361120223999, 0.09620822966098785, -0.04428127408027649, 0.32543009519577026, 0.20300152897834778, 0.456365704536438, -0.12953506410121918, -0.03433143347501755, 0.3509792983531952, 0.47083139419555664, -0.4111914336681366, 0.07932084798812866, -0.146135151386261, -0.3257578909397125, 0.12134582549333572, 0.45966091752052307, -0.3857610821723938, 0.45073699951171875, 0.01867608353495598, -0.06748795509338379, 0.0762668251991272, -0.14224770665168762, 0.08387958258390427, -0.02007979154586792, 0.37462159991264343, -0.2849634885787964, 0.03564428165555, -0.18206505477428436, 0.5128690004348755, -0.001685185357928276, 0.2907339632511139, 0.10760454088449478, 0.035864394158124924, -0.039598286151885986, 0.07305704802274704, 0.17750973999500275, -0.15936055779457092, 0.12619265913963318, 0.10048519819974899, -0.16804766654968262, -0.17450951039791107, 0.11696358025074005, -0.3805243968963623, 0.2957402467727661, 0.25883397459983826, 0.016045648604631424, 0.18121246993541718, -0.15021279454231262, -0.20762567222118378, -0.09219671785831451, 0.2719936668872833, -0.1546025276184082, -0.5398169755935669, -0.5330716967582703, 0.05460122972726822, -0.27300578355789185, -0.18329812586307526, -0.3185444474220276, 0.15311084687709808, 0.420840859413147, -0.03682180121541023, -0.012400709092617035, -0.16303566098213196, -0.1278659552335739, -0.6147214770317078, 0.08565187454223633, -0.12552140653133392, -0.4851512312889099, 0.12290126085281372, -0.32476314902305603, -0.09877169132232666, 0.1090564951300621, 0.45211073756217957, -0.07078719884157181, 0.3401068449020386, 0.05631133168935776, 0.3587875962257385, 0.7113131880760193, -0.21807870268821716, -0.4243233799934387, -0.07029911875724792, 0.4794398546218872, -0.005862237885594368, -0.05798008292913437, 0.3966944217681885, 0.5118684768676758, -0.04802905023097992, -0.3228684961795807, 0.13007348775863647, -0.051529183983802795, -0.04041598364710808, -0.1537344753742218, -0.007845984771847725, 0.3993907570838928, 0.05817927047610283, -0.062441710382699966, -0.24508509039878845, 0.2789309620857239, -0.15952642261981964, 0.07474595308303833, -0.0010719075798988342, 0.10936666280031204, 0.10449657589197159, 0.46326303482055664, 0.5171387195587158, 0.09174416214227676, -0.29767709970474243, -0.36712896823883057, 0.0860743299126625, -0.2413826733827591, -0.238493412733078, -0.437557578086853, -0.28097838163375854, -0.23249942064285278, 0.18450671434402466, -0.15356113016605377, 0.013343600556254387, -0.031526803970336914, -0.1356746405363083, 0.023483462631702423, 0.1594971865415573, -0.410489946603775, 0.09245770424604416, -0.039307065308094025, 0.01627599447965622, 0.05468101054430008, 0.24086563289165497, -0.15736404061317444, -0.578139066696167, 0.10610722005367279, 0.301720529794693, -0.06896276026964188, 0.041680462658405304, 0.011188162490725517, 0.3606560528278351, 0.20744214951992035, -0.17658723890781403, -0.3877708315849304, 0.21464884281158447, 0.0640985444188118, -0.3676767647266388, 0.19830536842346191, 0.07482291758060455, 0.25332364439964294, -0.02154943346977234, -0.1256418526172638, 0.20049446821212769, 0.2751399874687195, -0.10846807807683945, -0.07671628892421722, 0.04661568999290466, 0.15862220525741577, 0.11102613806724548, -0.04139919951558113, 0.0030370354652404785, -0.12522204220294952, -0.030183009803295135, 0.16594700515270233, 0.1786603480577469, -0.6875723004341125, 0.02520821988582611, 0.43188396096229553, -0.003764428198337555, 0.4825689196586609, -0.036364465951919556, -0.10582231730222702, -0.18324348330497742, 0.25555619597435, -0.054923564195632935, 0.24523095786571503, 0.06513875722885132, -0.16342803835868835, -0.06540978699922562, -0.0574193000793457, -0.13170650601387024, 0.038265153765678406, 0.11370539665222168, 0.41227734088897705, 0.18309098482131958, 0.16182462871074677, -0.0466056652367115, -0.16627252101898193, 0.1843383014202118, -0.15084168314933777, 0.002388419583439827, -0.30807191133499146, 0.14320366084575653, -0.06451746821403503, -0.41577258706092834, 0.06532110273838043, -0.15959425270557404, -0.20171910524368286, -0.1290532797574997, 0.006043542176485062, 0.052684199064970016, 0.052001822739839554, 0.10465040057897568, 0.41181373596191406, 0.29886192083358765, -0.12283781915903091, -0.2645307779312134, -0.21011245250701904, -0.32975560426712036, -0.1263042688369751, -0.01124771498143673, 0.06759908050298691, 0.14805272221565247, 0.47149211168289185, -0.04068402945995331, 0.23070712387561798, -0.30624788999557495, -0.19263222813606262, -0.0408773347735405, -0.1002945601940155, 0.024245601147413254, 0.007803246378898621, 0.3974916934967041, -0.06430227309465408, -0.18733181059360504, -0.06525001674890518, -0.20468077063560486, -0.14425067603588104, 0.030259937047958374, -0.11697375774383545, -0.08286245167255402, 0.12137345969676971, -0.17768701910972595, -0.8541562557220459, -0.19058702886104584, 0.42020756006240845, 0.37761080265045166, 0.0883551612496376, -0.09260139614343643, 0.04425763338804245, -0.06917475163936615, -0.11015889793634415, 0.04762670397758484, -0.04838185757398605, -0.4029605984687805, 0.6650781035423279, -0.363849937915802, -0.46889540553092957, 0.29048365354537964, -0.10852978378534317, 0.12453027069568634, -0.013535609468817711, -0.03700568526983261, 0.40827807784080505, -0.12978100776672363, 0.4020395278930664, 0.059895701706409454, 0.02740035206079483, 0.24369673430919647, 0.00907227210700512, 0.17972908914089203, -0.09241607040166855, 0.11975494027137756, 0.21417421102523804, 0.13472320139408112, 0.3456884026527405, -0.05616211146116257, 0.15803572535514832, -0.03286677971482277, 0.3319846987724304, 0.06101827695965767, -0.0342557467520237, 0.41592875123023987, -0.12190089374780655, 0.3614271581172943, -0.04652010649442673, 0.006681766360998154, 0.055217303335666656, -0.14596149325370789, -0.01113094575703144, 0.10585242509841919, 0.111834816634655, -0.3828299641609192, -0.049801573157310486, -0.18836522102355957, 0.015854809433221817, -0.0781417042016983, 0.17245961725711823, -0.47918784618377686, 0.2654161751270294, -0.15131601691246033, -0.15741269290447235, 0.022454842925071716, -0.19816967844963074, -0.06305324286222458, 0.1586485058069229, 0.09357214719057083, 0.2189330756664276, -0.05220561474561691, -0.005063227377831936, -0.49386662244796753, 0.13054899871349335, 0.23287822306156158, 0.02228045091032982, -0.14476990699768066, -0.026936355978250504, 0.2809050679206848, 0.13498805463314056, 0.1031433567404747, -0.04454059898853302, -0.33156251907348633, -0.10954262316226959, 0.05177997797727585, -0.43851104378700256, 0.16589635610580444, -0.06298796087503433, 0.06762657314538956, 0.04516102373600006, 0.2955593168735504, -0.3560393452644348, -0.014020553790032864, -0.12161046266555786, 0.3484959006309509, -0.36107903718948364, -0.17941004037857056, -0.15703117847442627, -0.2636583149433136, -0.4634799659252167, -0.2246435582637787, 0.3272731602191925, -0.0851486548781395, 0.2009488046169281, -0.16073258221149445, -0.3252100348472595, 0.0007555652409791946, -0.1558561772108078, -0.02210431732237339, 0.41089296340942383, -0.4057786464691162, -0.1393279880285263, 0.3009975254535675, 0.254001259803772, 0.3001538813114166, 0.4777844548225403, 0.011661985889077187, -0.2712300419807434, -0.09291119873523712, 0.08717723935842514, 0.41727739572525024, -0.25927498936653137, -0.21915790438652039, -0.051810868084430695, -0.11362127959728241, -0.08230230212211609, -0.344452440738678, -0.06574545055627823, 0.20505808293819427, -0.045936278998851776, -0.7719857692718506, -0.5602840185165405, 0.38691699504852295, 0.22029180824756622, 0.020353376865386963, -0.04325804114341736, 0.21194115281105042, -0.12325391173362732, 0.5424811244010925, 0.31516921520233154, 0.9842791557312012, -0.20493482053279877, 0.41048192977905273, 0.312467098236084, -0.37155604362487793, 0.3692464530467987, -0.12943367660045624, -0.24020497500896454, -0.35244908928871155, 0.3045668601989746, -0.15246883034706116, -0.00046761706471443176, 0.2512143850326538, 0.12520036101341248, -0.3326057493686676, 0.036688338965177536, -0.23550111055374146, -0.21961736679077148, -0.07064086198806763, 0.52620929479599, -0.09471064060926437, 0.0324646458029747, -0.3172357976436615, 0.06774874776601791, 0.07419630140066147, 0.00609603151679039, -0.11727562546730042, 0.013398993760347366, -0.1907140016555786, 0.026357054710388184, -0.2165493220090866, -0.21703651547431946, -0.05631457641720772, 0.32950228452682495, 0.07047459483146667, -0.43144750595092773, 0.19007623195648193, 0.5449607372283936, 0.2234725058078766, 0.030778825283050537, -0.21263067424297333, 0.04200638830661774, 0.06306822597980499, -0.16717278957366943, 0.18413090705871582, -0.046541862189769745, 0.42240312695503235, -0.17942553758621216, -0.1933523416519165, 0.054154057055711746, -0.10878471285104752, -0.23363099992275238, -0.34415704011917114, -0.06601376831531525, -0.013721585273742676, -0.19896908104419708, 0.026766527444124222, -0.44724559783935547, -0.04177737236022949, 0.03147253766655922, 0.05675625428557396, 0.3994981646537781, 0.16304610669612885, 0.4689699113368988, -0.1131034642457962, 0.020066864788532257, -0.14554715156555176, 0.06734666228294373, 0.08987051248550415, 0.27266862988471985, 0.2975694239139557, 0.018256518989801407, -0.2582915723323822, -0.12583020329475403, 0.4669543504714966, 0.13853341341018677, -0.13837166130542755, 0.19229218363761902, 0.11180667579174042, 0.09847718477249146, -0.32361340522766113, 0.5095866322517395, 0.20697596669197083, -0.39881783723831177, -0.15800529718399048, -0.25536829233169556, -0.4718835949897766, 0.2013966143131256, 0.183630108833313, 0.32842251658439636, 0.05829569697380066, 0.0409693717956543, 0.13042427599430084, 0.10565848648548126, -0.18357202410697937, -0.04391300678253174, -0.0952204167842865, 0.15195709466934204, 0.17143429815769196, 0.08048564940690994, -0.06007308512926102, -0.21758176386356354, -0.057182326912879944, -0.12201738357543945, 0.0932595357298851, -0.0788312777876854, -0.1427464783191681, 0.21282781660556793, 0.12669995427131653, -0.1882384568452835, 0.05653199180960655, -0.43849772214889526, -0.08791521191596985, 0.15475687384605408, -0.08573988080024719, 0.3494836390018463, -0.08727194368839264, 0.04257506504654884, 0.12634576857089996, -0.015261635184288025, -0.03181886672973633, 0.2016221433877945, -0.17149731516838074, 0.1312600076198578, -0.15594254434108734, 0.15546685457229614, 0.033812470734119415, -0.23134832084178925, 0.25182852149009705, 0.11075744032859802, 0.28070905804634094, -0.21828678250312805, 0.3831954002380371, -0.21932150423526764, 0.05984032526612282, -0.2706257700920105, 0.3563506305217743, 0.3107169270515442, -0.05948995053768158, 0.16929517686367035, 0.32964205741882324, 0.01680472120642662, -0.19652895629405975, -0.023487024009227753, -0.002879967913031578, -0.14995133876800537, -0.11493958532810211, 0.1819024235010147, 0.20693263411521912, 0.39824992418289185, -0.7131305932998657, -0.047753576189279556, 0.16025488078594208, 0.06738191843032837, 0.08533550798892975, 0.04668046161532402, -0.1553274244070053, -0.014355506747961044, 0.20132580399513245, 0.37558215856552124, 0.15600384771823883, 0.5233578085899353, -0.048421554267406464, 0.21996505558490753, 0.4708998203277588, -0.08663421869277954, 0.5086178183555603, -0.060633935034275055, -0.128753662109375, -0.33660051226615906, 0.030263490974903107, -0.16792529821395874, 0.257403701543808, 0.39140141010284424, 0.16235272586345673, -0.29517662525177, 0.08790905028581619, 0.4683949649333954, -0.0019765347242355347, -0.09396795928478241, -0.12164760380983353, -0.11849386990070343, 0.04277290403842926, -0.2274581789970398, -0.34523192048072815, -0.5257748961448669, 0.12539924681186676, 0.28452369570732117, 0.15029650926589966, -0.3566369116306305, 0.5748618841171265, -0.015289530158042908, 0.13356336951255798, -0.023406298831105232, 0.2750993072986603, -0.16286714375019073, -0.10516500473022461, -0.1668439656496048, 0.14931385219097137, 0.46870070695877075, 0.3185723125934601, -0.1878051608800888, 0.40997517108917236, -0.1455453634262085, -0.2621716260910034, -0.008776366710662842, 0.08081479370594025, 0.1458849459886551, 0.19134709239006042, 0.38246968388557434, -0.011754349805414677, 0.05043450742959976, 0.12335638701915741, 0.13790340721607208, 0.17803338170051575, -0.03109513781964779, 0.4093838334083557, -0.22343993186950684, -0.28806477785110474, 0.013332003727555275, -0.0031946152448654175, -0.2659609317779541, -0.1953137069940567, 0.37894853949546814, 0.03262655436992645, 0.20024225115776062, -0.32585033774375916, 0.009409794583916664, -0.00006135553121566772, 0.6366891264915466, 0.18907397985458374, 0.6842784881591797, 0.0008039111271500587, -0.11005543917417526, -0.43940842151641846, -0.07878593355417252, -0.1487986296415329, -0.1403140127658844, 0.04419422522187233, 0.11813080310821533, -0.07634200900793076, 0.4245956540107727, 0.14327676594257355, 0.428259015083313, -0.048007261008024216, 0.1388755738735199, -0.08443155884742737, -0.05263390764594078, -0.119391530752182, 0.19636189937591553, -0.026860257610678673, -0.06029360368847847, 0.35455402731895447, -0.19764479994773865, 0.002176828682422638, -0.18624044954776764, -0.033030927181243896, 0.026043053716421127, -0.3248855471611023, 0.35007336735725403, -0.036929212510585785, 0.2633863687515259, 0.06435034424066544, 0.11546055227518082, 0.31983691453933716, -0.02967970259487629, -0.2034388780593872, 0.3049364387989044, 0.1073155403137207, 0.24168357253074646, -0.38683658838272095, 0.2544582188129425, -0.025442024692893028, -0.12010112404823303, -0.2326819747686386, 0.014172847382724285, -0.12134913355112076, -0.023602880537509918, 0.08227052539587021, -0.007476205937564373, 0.006853074766695499, 0.09090618044137955, -0.2743729054927826, -0.027585269883275032, -0.2920650243759155, -0.10416892915964127, 0.48389241099357605, 0.022296719253063202, -0.1679777055978775, 0.01806008815765381, -0.040505558252334595, 0.42243367433547974, 0.12095728516578674, -0.422933965921402, 0.096700020134449, 0.3826311528682709, -0.12757164239883423, -0.044939566403627396, 0.10416579246520996, 0.15811535716056824, -0.03966879844665527, -0.09489257633686066, 0.6039984226226807, -0.1448589563369751, 0.12852147221565247, 0.03278452530503273, -0.40272819995880127 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
If your dataset doesn't fit in memory, store it in a local file and load it from there. Check out [this chapter](https://huggingface.co/docs/datasets/master/loading_datasets.html#from-local-files) in the docs for more info.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
28
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. If your dataset doesn't fit in memory, store it in a local file and load it from there. Check out [this chapter](https://huggingface.co/docs/datasets/master/loading_datasets.html#from-local-files) in the docs for more info.
[ -0.23781046271324158, -0.16622908413410187, 0.03302152454853058, 0.37800610065460205, 0.2134668081998825, -0.09449569880962372, -0.08194169402122498, 0.005801498889923096, 0.23068004846572876, 0.1115746945142746, -0.3286619186401367, 0.27271440625190735, -0.4143143594264984, 0.7541990876197815, 0.03441270440816879, -0.21241754293441772, 0.24682408571243286, -0.009474046528339386, 0.21309714019298553, 0.07278656959533691, -0.14706000685691833, 0.07665998488664627, 0.12248377501964569, -0.06557425856590271, -0.3424079716205597, -0.46351128816604614, -0.14451657235622406, 0.22163552045822144, -0.2589559257030487, -0.43068331480026245, 0.2377922683954239, -0.02324536070227623, 0.3134656250476837, 0.2755078971385956, -0.00012717834033537656, 0.01923207938671112, 0.14399299025535583, -0.19806982576847076, -0.15017080307006836, -0.22639910876750946, -0.010565701872110367, -0.26257801055908203, 0.20625384151935577, -0.2558060884475708, -0.02497478947043419, -0.4207354485988617, 0.019548654556274414, -0.2141062468290329, 0.4344227910041809, 0.0629911869764328, 0.05103209987282753, 0.08885832875967026, 0.296344131231308, 0.1291370540857315, 0.0012456253170967102, 0.7133286595344543, -0.09151746332645416, 0.4353257417678833, -0.08112527430057526, 0.13371938467025757, 0.40627071261405945, 0.03240310400724411, -0.1193135678768158, -0.16969847679138184, 0.41986173391342163, 0.032790325582027435, -0.10764484852552414, -0.2930716276168823, -0.07996899634599686, 0.19583702087402344, 0.5325227379798889, -0.38147133588790894, -0.2554703652858734, -0.40101295709609985, -0.18333958089351654, -0.15778848528862, 0.1092294454574585, 0.10167689621448517, -0.21824702620506287, 0.2751449644565582, 0.07966731488704681, -0.43163782358169556, -0.2243957668542862, 0.46262335777282715, -0.030558979138731956, 0.13907116651535034, -0.21822980046272278, 0.13484251499176025, -0.009732019156217575, -0.1697133332490921, -0.15911896526813507, -0.21669287979602814, 0.1530638337135315, 0.10461040586233139, 0.021998826414346695, -0.049446865916252136, -0.398491233587265, 0.3054513931274414, 0.1760905683040619, 0.2698925733566284, 0.03971625119447708, 0.04871869087219238, 0.14195621013641357, 0.17736542224884033, 0.4741600453853607, -0.13920161128044128, 0.028949014842510223, 0.29294413328170776, 0.4270744323730469, -0.14795435965061188, 0.0825607031583786, -0.17161238193511963, -0.24513743817806244, 0.16867753863334656, 0.29073992371559143, -0.44518348574638367, 0.573255717754364, -0.009440455585718155, -0.14988259971141815, 0.026444125920534134, -0.04969793185591698, 0.09833869338035583, 0.03928087279200554, 0.41195279359817505, -0.24856500327587128, 0.07632359862327576, -0.08225511014461517, 0.5677542090415955, 0.08062924444675446, 0.18162842094898224, 0.06758268177509308, -0.10558764636516571, 0.058666620403528214, 0.18839529156684875, 0.11953996121883392, -0.30430224537849426, 0.14314770698547363, 0.049328748136758804, -0.11750832200050354, -0.22987952828407288, -0.10517389327287674, -0.2983851134777069, 0.25035858154296875, 0.18748275935649872, -0.03473611921072006, 0.2177911102771759, 0.026480548083782196, -0.2510606646537781, -0.061452582478523254, 0.07111833989620209, -0.1817570924758911, -0.547261655330658, -0.4872514009475708, -0.017264604568481445, -0.29634571075439453, -0.18256190419197083, -0.4947400987148285, 0.21539606153964996, 0.40368250012397766, -0.030451718717813492, -0.07725206762552261, -0.038174696266651154, -0.36115893721580505, -0.48732122778892517, 0.19175654649734497, -0.013066783547401428, -0.3687562346458435, -0.07046697288751602, -0.27642831206321716, -0.06379261612892151, 0.03656327724456787, 0.5089983344078064, -0.06152179464697838, 0.38085368275642395, -0.02185782603919506, 0.31726568937301636, 0.6162869334220886, -0.29006344079971313, -0.351999968290329, -0.04383162781596184, 0.34472882747650146, 0.1639663279056549, -0.14312905073165894, 0.2556547522544861, 0.4974554479122162, -0.058879315853118896, -0.20753052830696106, 0.0913294330239296, -0.015441616997122765, -0.010645370930433273, -0.177781879901886, -0.08886031806468964, 0.359682559967041, 0.05040774866938591, -0.15550245344638824, -0.14893385767936707, 0.20176179707050323, -0.2562267482280731, 0.16238555312156677, 0.05183359235525131, 0.1262310892343521, 0.15395832061767578, 0.4118930399417877, 0.6746776700019836, -0.0025750300846993923, -0.38067182898521423, -0.476690411567688, 0.14353299140930176, -0.08690008521080017, -0.2942623198032379, -0.4281318783760071, -0.33495384454727173, -0.27207309007644653, 0.20780044794082642, -0.1555909961462021, 0.04908544570207596, -0.08907490968704224, -0.12260611355304718, -0.030337637290358543, 0.24661608040332794, -0.4448169767856598, 0.16913048923015594, -0.06413310021162033, 0.10976030677556992, -0.055586155503988266, 0.302822083234787, -0.06434845179319382, -0.5284367203712463, 0.11002995073795319, 0.33560627698898315, -0.023681864142417908, 0.05388985946774483, -0.007475759834051132, 0.39500439167022705, 0.10245779901742935, -0.11472609639167786, -0.26654869318008423, 0.22494162619113922, 0.077311210334301, -0.30180779099464417, 0.0808287039399147, 0.018889471888542175, 0.2364879697561264, 0.06766019016504288, -0.15509596467018127, 0.2655342221260071, 0.29254671931266785, -0.034726522862911224, -0.1800355315208435, 0.08375522494316101, 0.05685234069824219, 0.17951859533786774, -0.053577639162540436, -0.1041107177734375, -0.0837022066116333, -0.14603643119335175, 0.1154143214225769, 0.20129528641700745, -0.747604489326477, 0.08179038763046265, 0.4663316309452057, -0.01827927492558956, 0.4762846529483795, 0.059847865253686905, -0.08265090733766556, -0.1684434711933136, 0.24195243418216705, -0.11100076884031296, 0.2505154311656952, 0.020501025021076202, -0.1729888916015625, -0.03283323347568512, -0.023280400782823563, -0.037964507937431335, -0.04230012744665146, 0.14551684260368347, 0.376114159822464, 0.13780033588409424, 0.1253286898136139, 0.008727772161364555, -0.1385638564825058, 0.2837541401386261, -0.22590453922748566, 0.016491994261741638, -0.46217814087867737, 0.16325515508651733, -0.19305109977722168, -0.42352741956710815, -0.006029210053384304, -0.10840728133916855, -0.31350812315940857, -0.1574716567993164, -0.10684370994567871, 0.13749779760837555, 0.0040070898830890656, 0.12235134094953537, 0.3831161558628082, 0.3042137920856476, -0.14374276995658875, -0.2974487245082855, -0.23998227715492249, -0.28234219551086426, -0.09407102316617966, -0.10376031696796417, 0.11341484636068344, 0.1871296465396881, 0.4331100583076477, -0.15672960877418518, 0.16982266306877136, -0.30874985456466675, -0.1628100872039795, -0.022444486618041992, -0.16058965027332306, 0.055426232516765594, 0.0662362203001976, 0.3839927315711975, -0.17759718000888824, -0.13324904441833496, 0.08932667970657349, -0.19247132539749146, -0.12307877838611603, 0.038236916065216064, -0.03540325164794922, -0.007213274482637644, 0.1521921157836914, 0.02536335214972496, -0.756342351436615, -0.18864236772060394, 0.5028293132781982, 0.2522121071815491, 0.02389725297689438, -0.02963370457291603, -0.01923060044646263, -0.04031458869576454, -0.33162572979927063, 0.019433122128248215, -0.0847092941403389, -0.471601665019989, 0.55660080909729, -0.29128751158714294, -0.4345385730266571, 0.2250979244709015, -0.02941783517599106, -0.0016179531812667847, -0.10362929105758667, 0.03563830256462097, 0.22697502374649048, -0.09871645271778107, 0.3692935109138489, 0.03682593256235123, -0.014281252399086952, 0.28455936908721924, -0.00027893343940377235, 0.24003826081752777, -0.023768631741404533, 0.05090286210179329, 0.2991064190864563, 0.13581828773021698, 0.24950408935546875, -0.03811649978160858, 0.18256917595863342, -0.029886677861213684, 0.3044145107269287, 0.119466632604599, -0.08982858061790466, 0.3953664302825928, -0.15844523906707764, 0.44511187076568604, -0.03114958107471466, -0.09322325885295868, 0.046521350741386414, -0.13611766695976257, 0.14882412552833557, 0.13009630143642426, 0.15217536687850952, 0.030148757621645927, -0.022737283259630203, -0.1833893209695816, 0.005299068987369537, -0.21691317856311798, 0.14093178510665894, -0.3431183695793152, 0.2971622347831726, -0.062543585896492, -0.13784511387348175, 0.024535968899726868, -0.2161642611026764, -0.024380743503570557, 0.3769987225532532, 0.14439189434051514, 0.2630928158760071, -0.0981370359659195, 0.09224839508533478, -0.4891057014465332, 0.20302990078926086, 0.2482055425643921, -0.03799784556031227, -0.25324752926826477, -0.025131706148386, 0.2564842700958252, 0.2246563732624054, 0.12203062325716019, 0.0435849130153656, -0.2990807890892029, -0.2979094386100769, -0.11017026007175446, -0.5257940292358398, 0.1900991052389145, 0.006958078593015671, 0.000711116474121809, 0.007541388273239136, 0.4951514005661011, -0.45994308590888977, -0.17852580547332764, -0.11285620927810669, 0.33271268010139465, -0.35609322786331177, -0.1817072629928589, -0.25156641006469727, -0.22212910652160645, -0.5160812139511108, -0.21602746844291687, 0.42485809326171875, -0.051717475056648254, 0.13939739763736725, -0.1036180853843689, -0.3414808511734009, 0.07143989205360413, -0.13537856936454773, -0.09086732566356659, 0.4022268056869507, -0.3095940053462982, -0.15470005571842194, 0.456851989030838, 0.2821013331413269, 0.23656879365444183, 0.4839625060558319, 0.02339022420346737, -0.44145530462265015, -0.20410680770874023, 0.1150660291314125, 0.353012353181839, -0.1686897575855255, -0.19339993596076965, -0.016523443162441254, 0.05355691909790039, -0.04362887144088745, -0.4761085510253906, -0.006321648135781288, 0.2209942489862442, 0.11451950669288635, -0.7278289198875427, -0.4517306983470917, 0.4075701832771301, 0.1989433467388153, 0.02329365164041519, -0.08695247769355774, 0.38621193170547485, -0.10884013772010803, 0.45110875368118286, 0.1713707149028778, 0.9206197261810303, -0.30425745248794556, 0.4588990807533264, 0.3918350040912628, -0.37486690282821655, 0.4236668348312378, -0.016182171180844307, -0.2834758758544922, -0.2926482856273651, 0.29581761360168457, -0.20138707756996155, 0.1244739294052124, 0.2746736407279968, 0.029748324304819107, -0.237852081656456, 0.1377847045660019, -0.19442218542099, -0.15482068061828613, -0.07231924682855606, 0.38333258032798767, -0.08240336179733276, -0.04995915666222572, -0.47279372811317444, -0.008290288969874382, -0.04441853612661362, 0.1927436888217926, -0.08332410454750061, 0.035411275923252106, -0.17818139493465424, -0.03542065620422363, -0.22673451900482178, -0.324577659368515, -0.09478303045034409, 0.218537837266922, 0.23556415736675262, -0.4162788391113281, 0.1968206763267517, 0.558738112449646, 0.2532035708427429, -0.02427462860941887, -0.24527275562286377, -0.06153515353798866, -0.06942635029554367, -0.13008363544940948, 0.10392286628484726, -0.12818923592567444, 0.3510265648365021, -0.09883033484220505, -0.15662649273872375, -0.04910954833030701, -0.0027276240289211273, -0.1514802873134613, -0.24723267555236816, -0.06947708129882812, -0.19157783687114716, -0.3497973382472992, -0.04842471703886986, -0.48305726051330566, 0.0785323828458786, -0.020978761836886406, -0.004174619913101196, 0.38058745861053467, 0.15687307715415955, 0.24812152981758118, -0.055227067321538925, 0.05447104573249817, -0.06891907751560211, 0.20198944211006165, -0.20975056290626526, 0.2892906665802002, 0.334926038980484, -0.02494525909423828, -0.25344616174697876, -0.0643787831068039, 0.45658594369888306, 0.1960137039422989, -0.20847338438034058, 0.17386052012443542, 0.18874524533748627, 0.08732135593891144, -0.3712579011917114, 0.5464471578598022, 0.1676831841468811, -0.48923468589782715, 0.006876658648252487, -0.2661753296852112, -0.4534216821193695, 0.24660271406173706, 0.17061905562877655, 0.2125743329524994, 0.14329075813293457, 0.15799927711486816, 0.0639653205871582, 0.04031185433268547, -0.12877227365970612, -0.018794424831867218, -0.10398568958044052, 0.05105099081993103, 0.3722292184829712, 0.04204101115465164, 0.10126599669456482, -0.2688124477863312, -0.08405556529760361, -0.12873461842536926, 0.1210712417960167, -0.01331247203052044, -0.1868758648633957, 0.2314409762620926, 0.0717603787779808, -0.17214970290660858, 0.06605540215969086, -0.3535119891166687, -0.050274234265089035, 0.07265724241733551, -0.07817477732896805, 0.433177649974823, 0.02008531615138054, 0.05936324968934059, 0.009809546172618866, 0.029324263334274292, 0.0489458367228508, 0.231612429022789, -0.15966781973838806, 0.11000543087720871, -0.22219984233379364, 0.05647626519203186, -0.07087360322475433, -0.18992197513580322, 0.21870741248130798, 0.18535201251506805, 0.3831460475921631, -0.1810683310031891, 0.3984711468219757, -0.2720329165458679, -0.003176264464855194, -0.2061007171869278, 0.38054296374320984, 0.23121564090251923, -0.06320243328809738, 0.17230650782585144, 0.3253191411495209, -0.05988410860300064, -0.1709197461605072, 0.06864961981773376, 0.14017702639102936, -0.13942797482013702, -0.12769798934459686, 0.2266843020915985, 0.12919028103351593, 0.4667307734489441, -0.7082305550575256, -0.05972917377948761, 0.11125833541154861, 0.10407284647226334, 0.11302734911441803, -0.022320616990327835, -0.01937221735715866, -0.000589713454246521, 0.2922585606575012, 0.43020299077033997, 0.2038753777742386, 0.4065983295440674, -0.058456532657146454, 0.1299312561750412, 0.23785117268562317, 0.05185369774699211, 0.5463644862174988, -0.20189735293388367, -0.14006735384464264, -0.29654011130332947, 0.013312585651874542, -0.12726595997810364, 0.1368790864944458, 0.5901454091072083, 0.009080251678824425, -0.39947509765625, 0.07551898807287216, 0.5644209384918213, 0.0026345662772655487, -0.15136376023292542, -0.03624297305941582, -0.03942771255970001, 0.0034654736518859863, -0.2722335755825043, -0.28769874572753906, -0.5580125451087952, 0.1271229237318039, 0.24223263561725616, 0.22799110412597656, -0.44843095541000366, 0.3282665014266968, 0.06885086745023727, 0.25190529227256775, 0.040461745113134384, 0.24939316511154175, -0.19196493923664093, -0.07186275720596313, -0.017217732965946198, 0.21162919700145721, 0.4467218816280365, 0.151314839720726, -0.09923149645328522, 0.4285168945789337, -0.19031772017478943, -0.17839887738227844, 0.0021039973944425583, 0.005738286301493645, 0.10071804374456406, 0.186393141746521, 0.4147549867630005, -0.03482595458626747, 0.09071866422891617, 0.026691263541579247, -0.01934269443154335, 0.2751915454864502, -0.16506525874137878, 0.5213031768798828, -0.29833984375, -0.20284533500671387, -0.06677432358264923, -0.06712234765291214, -0.21313178539276123, -0.043593935668468475, 0.34835654497146606, 0.06392316520214081, 0.253743439912796, -0.25837352871894836, -0.023773685097694397, 0.10268503427505493, 0.5535258650779724, 0.21628782153129578, 0.5189979672431946, 0.06877204030752182, -0.057701580226421356, -0.4912763833999634, -0.12564659118652344, -0.057212065905332565, -0.1838509887456894, 0.030806338414549828, 0.002973053604364395, -0.07278212159872055, 0.394672155380249, 0.09615671634674072, 0.42370104789733887, -0.01053577195852995, 0.030910074710845947, -0.03586767241358757, -0.10615575313568115, -0.28308916091918945, 0.10567595809698105, 0.0646325871348381, -0.05371848866343498, 0.3075626790523529, -0.04297934100031853, -0.08011636883020401, -0.12112973630428314, 0.08816418051719666, -0.2088938057422638, -0.4123041331768036, 0.2223677784204483, 0.009239424020051956, 0.26386791467666626, 0.10345012694597244, 0.04527895897626877, 0.2686208188533783, -0.04658963903784752, -0.27270182967185974, 0.38223233819007874, -0.0694517195224762, 0.2768939435482025, -0.4674038290977478, 0.2228345423936844, -0.14843584597110748, -0.0775289535522461, -0.04803501069545746, -0.04369824007153511, -0.1375497281551361, 0.034894466400146484, 0.029729671776294708, -0.02442602813243866, 0.17547403275966644, 0.1926557719707489, -0.24060946702957153, 0.033207520842552185, -0.25249022245407104, -0.06865507364273071, 0.5929347276687622, 0.02244643121957779, -0.11514514684677124, 0.1116814985871315, 0.043940700590610504, 0.5603389143943787, -0.047389157116413116, -0.5693662762641907, 0.007265552878379822, 0.3408534824848175, -0.06362515687942505, 0.04886835440993309, 0.07117913663387299, 0.08670644462108612, -0.0900593101978302, -0.12791599333286285, 0.6649683713912964, -0.0832025408744812, 0.21701212227344513, 0.1679086536169052, -0.2830289602279663 ]
https://github.com/huggingface/datasets/issues/2424
load_from_disk and save_to_disk are not compatible with each other
Hi, `load_dataset` returns an instance of `DatasetDict` if `split` is not specified, so instead of `Dataset.load_from_disk`, use `DatasetDict.load_from_disk` to load the dataset from disk.
## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
24
load_from_disk and save_to_disk are not compatible with each other ## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in> Hi, `load_dataset` returns an instance of `DatasetDict` if `split` is not specified, so instead of `Dataset.load_from_disk`, use `DatasetDict.load_from_disk` to load the dataset from disk.
[ -0.17922338843345642, -0.22525136172771454, -0.10319429636001587, 0.4437655806541443, 0.17004646360874176, -0.005665086209774017, 0.28807172179222107, 0.35633131861686707, 0.340751051902771, 0.07646210491657257, 0.07303120195865631, 0.37538987398147583, 0.08483585715293884, 0.15540426969528198, -0.13507376611232758, -0.039157941937446594, 0.27475979924201965, 0.04800691083073616, 0.24219903349876404, -0.11502490937709808, -0.2098628133535385, 0.40054982900619507, -0.20328186452388763, -0.07340039312839508, -0.14468349516391754, -0.006205109879374504, -0.233403280377388, 0.3358607292175293, 0.3330039978027344, 0.08279437571763992, 0.29477787017822266, -0.2153792381286621, 0.08169945329427719, 0.553249180316925, -0.0001212123388540931, 0.011238433420658112, 0.16089847683906555, -0.22918766736984253, -0.26928576827049255, -0.6934787034988403, -0.14589948952198029, -0.2548476755619049, 0.06686411798000336, -0.3095524311065674, 0.14611327648162842, -0.06183568015694618, -0.04370103031396866, -0.28181564807891846, 0.5196693539619446, 0.13740713894367218, 0.11334571242332458, 0.13895025849342346, 0.17794756591320038, -0.27033185958862305, -0.07862699776887894, 0.49760591983795166, 0.0025211889296770096, 0.3422202467918396, 0.14311163127422333, -0.13927581906318665, 0.1311553567647934, -0.050151120871305466, -0.3340204954147339, -0.16186372935771942, 0.29245251417160034, 0.26861870288848877, 0.28716424107551575, -0.398980975151062, -0.013145972043275833, 0.10117556154727936, 0.4063551723957062, -0.1671675145626068, -0.33118635416030884, -0.3169543743133545, -0.3207164406776428, 0.07089229673147202, 0.47825750708580017, 0.05735161900520325, -0.36608004570007324, 0.16956108808517456, -0.12492258101701736, -0.32151705026626587, 0.00828281044960022, 0.37368494272232056, -0.04334582760930061, -0.0029225125908851624, -0.07874865084886551, 0.06958167999982834, 0.2542455792427063, 0.07421685010194778, 0.31825220584869385, -0.4341987073421478, 0.20934279263019562, 0.07514998316764832, -0.19675277173519135, -0.030596770346164703, -0.16925090551376343, -0.43867769837379456, -0.19107979536056519, 0.389523983001709, 0.2439083307981491, -0.16185146570205688, -0.40919482707977295, 0.3818175792694092, 0.462797075510025, 0.25502732396125793, 0.1295376718044281, 0.2542567253112793, 0.2904808521270752, 0.06705231964588165, -0.0025621242821216583, 0.08276054263114929, 0.24433910846710205, -0.3209075331687927, 0.3263378441333771, -0.16819268465042114, 0.3287457823753357, -0.13333575427532196, -0.3826581537723541, -0.04834694787859917, -0.20595067739486694, -0.09661821275949478, -0.02881550043821335, 0.1742832213640213, 0.1753857284784317, 0.3235180974006653, 0.23302732408046722, 0.3827495574951172, -0.17264507710933685, 0.42031681537628174, -0.1407727301120758, -0.005314864218235016, 0.1534058004617691, 0.19776380062103271, 0.1375180184841156, -0.13640834391117096, 0.16925252974033356, 0.11274213343858719, -0.024959467351436615, -0.14978908002376556, -0.09999184310436249, -0.37210237979888916, 0.14909717440605164, 0.18335704505443573, 0.33557450771331787, 0.14565491676330566, 0.10027611255645752, -0.3618369698524475, -0.2376323640346527, 0.27976831793785095, -0.4703735113143921, -0.1679827868938446, 0.08496880531311035, 0.1425001323223114, -0.2271609902381897, 0.0532756969332695, -0.6181439161300659, -0.005442831665277481, 0.23292449116706848, -0.33233705163002014, 0.03481301665306091, -0.13266272842884064, -0.1655644327402115, -0.49538204073905945, 0.3575296103954315, 0.25331413745880127, -0.3116637170314789, -0.06616552919149399, -0.1282549798488617, -0.10012249648571014, 0.040177859365940094, 0.38604164123535156, -0.05866705998778343, 0.3588564991950989, -0.3923349678516388, 0.130244642496109, 0.5517640113830566, -0.5543699860572815, -0.329723984003067, 0.4475792646408081, -0.17108455300331116, -0.07194093614816666, 0.009696491062641144, 0.14792737364768982, 0.20117871463298798, -0.15953563153743744, 0.29841554164886475, 0.40970706939697266, 0.029023949056863785, -0.03778580576181412, -0.3559073805809021, -0.17302392423152924, 0.11899557709693909, 0.14873307943344116, -0.03164167329668999, 0.12943005561828613, 0.17490708827972412, 0.07356233894824982, 0.29862385988235474, 0.011952605098485947, 0.11106055229902267, 0.3724384307861328, 0.3932015299797058, -0.043102867901325226, -0.11161404103040695, -0.13947930932044983, -0.7380242943763733, 0.21571215987205505, 0.2114942967891693, -0.3154177963733673, -0.007851645350456238, 0.14179471135139465, -0.06051773205399513, -0.16064220666885376, -0.16239401698112488, 0.11121360957622528, -0.019043123349547386, -0.029529593884944916, 0.14802415668964386, 0.06335094571113586, -0.2396693378686905, 0.235897496342659, 0.2464088350534439, 0.0769226923584938, -0.24993757903575897, 0.6901507377624512, -0.09678054600954056, -0.3731456398963928, -0.09136535227298737, -0.04245736449956894, 0.3784249722957611, -0.04632274806499481, -0.12587526440620422, 0.42838287353515625, 0.06841769069433212, 0.3490026593208313, -0.36994150280952454, -0.22952057421207428, 0.14260347187519073, 0.11246013641357422, 0.014156697317957878, 0.33628174662590027, 0.1857883781194687, -0.22803449630737305, -0.38083726167678833, 0.1877964437007904, -0.22508694231510162, 0.30047234892845154, 0.19145213067531586, 0.06349572539329529, 0.10035713016986847, -0.11190608143806458, 0.18524910509586334, -0.23595552146434784, 0.18716244399547577, -0.19026991724967957, 0.206802636384964, -0.2088870108127594, -0.185078963637352, 0.092237189412117, 0.36528223752975464, -0.053681548684835434, 0.234203040599823, -0.017595596611499786, 0.025188449770212173, -0.07469186186790466, -0.05909661948680878, 0.46349844336509705, 0.7871450781822205, 0.04222962260246277, 0.07955302298069, -0.005473192781209946, 0.0074960836209356785, -0.22540652751922607, 0.18154564499855042, 0.0908006802201271, 0.37214726209640503, 0.4131387174129486, 0.05005856603384018, 0.07829851657152176, 0.016435381025075912, -0.17714901268482208, -0.13689586520195007, 0.004048687405884266, -0.3926258683204651, 0.06149410456418991, -0.17276206612586975, 0.13911110162734985, -0.41207370162010193, -0.09629330784082413, -0.12344826757907867, -0.4050312042236328, -0.2254335731267929, 0.6340551376342773, -0.06694423407316208, -0.17253516614437103, 0.17667259275913239, 0.02528516948223114, -0.19962114095687866, -0.23023484647274017, -0.2482907474040985, 0.11435926705598831, -0.20804822444915771, -0.0911775678396225, 0.21681103110313416, 0.06594426929950714, 0.22704800963401794, -0.18471646308898926, -0.20073406398296356, -0.22447219491004944, 0.008644834160804749, 0.056339845061302185, -0.04819971323013306, 0.17430980503559113, 0.005166985094547272, 0.16909313201904297, 0.11446225643157959, -0.37554842233657837, 0.1989772468805313, -0.15846149623394012, -0.2648601830005646, 0.16046470403671265, 0.28264299035072327, -0.13553497195243835, -0.22026653587818146, -0.3173786401748657, -0.4011372923851013, -0.4135327637195587, 0.19169290363788605, -0.015806112438440323, 0.11275143176317215, -0.35471323132514954, 0.1864437609910965, 0.05538808926939964, 0.27796798944473267, -0.041472479701042175, -0.12462732940912247, -0.12930871546268463, 0.4934220016002655, -0.16117241978645325, -0.24326379597187042, 0.09106728434562683, 0.1499757617712021, 0.0022744163870811462, 0.04168391600251198, -0.3326737880706787, -0.07485994696617126, -0.08553706109523773, 0.11376680433750153, -0.2176435887813568, 0.06364767253398895, 0.29875877499580383, -0.01728152483701706, 0.05346936732530594, -0.08401614427566528, -0.3136727511882782, 0.14906704425811768, 0.2166643738746643, 0.17629723250865936, -0.07576153427362442, 0.39401084184646606, 0.07018071413040161, 0.36717861890792847, 0.2821439504623413, 0.06827980279922485, 0.2314014583826065, 0.19762903451919556, 0.2039627581834793, -0.21187523007392883, -0.36516672372817993, -0.21725650131702423, -0.12560626864433289, -0.33466577529907227, -0.13962341845035553, -0.019187122583389282, -0.07283973693847656, -0.26613563299179077, -0.22521232068538666, -0.48997876048088074, -0.30139023065567017, -0.10969877243041992, 0.07583928108215332, 0.06447181105613708, -0.14558300375938416, 0.24309274554252625, -0.06477566063404083, 0.08843313902616501, 0.0669175237417221, 0.45289474725723267, 0.2329871654510498, 0.01326979510486126, -0.38720688223838806, -0.28019800782203674, 0.035410549491643906, 0.35892254114151, -0.023155298084020615, 0.09431999921798706, -0.2866736650466919, -0.12085158377885818, -0.12313954532146454, -0.18817093968391418, 0.8430711627006531, -0.04358205199241638, 0.15728448331356049, 0.24606353044509888, -0.1343018263578415, -0.3283996284008026, 0.03818684443831444, 0.18853650987148285, 0.07699446380138397, 0.18445535004138947, 0.8155304193496704, -0.027224384248256683, -0.10243364423513412, -0.10371005535125732, 0.23249462246894836, -0.27884653210639954, -0.4167487919330597, -0.05613744631409645, -0.1679394543170929, -0.4362303614616394, -0.28662264347076416, -0.006636377424001694, 0.09942078590393066, -0.19103486835956573, -0.20379993319511414, 0.03561113774776459, -0.19700881838798523, 0.12860676646232605, -0.19809585809707642, 0.48451754450798035, -0.4603370130062103, 0.15815119445323944, 0.12505394220352173, -0.11782482266426086, 0.5534564852714539, 0.4204622507095337, -0.07178312540054321, -0.24051642417907715, 0.11739417910575867, -0.23979848623275757, 0.12633904814720154, 0.28207069635391235, -0.019095106050372124, -0.2404930591583252, 0.030033063143491745, 0.029202498495578766, -0.27401939034461975, -0.32620903849601746, 0.12339770793914795, -0.24383531510829926, -0.20247291028499603, -0.456846684217453, 0.33336174488067627, 0.20426848530769348, -0.058780401945114136, -0.027716264128684998, -0.05991971492767334, -0.23257899284362793, 0.5505390763282776, -0.2199416160583496, 0.9964280128479004, 0.13992196321487427, 0.13356897234916687, 0.2671433985233307, -0.28953075408935547, 0.2396448701620102, -0.12394458800554276, 0.02499224990606308, -0.30025243759155273, 0.07632019370794296, -0.17773491144180298, -0.34038209915161133, 0.016216836869716644, 0.3958282470703125, -0.28031378984451294, 0.3586617410182953, -0.2020864486694336, -0.024778243154287338, -0.23300741612911224, 0.09099262952804565, -0.17956243455410004, -0.1530534029006958, -0.4331519305706024, 0.08243325352668762, 0.13172286748886108, 0.3334018588066101, 0.09914911538362503, -0.2072182595729828, -0.42108577489852905, -0.01866559498012066, -0.16021618247032166, 0.2978708744049072, 0.0030853706412017345, 0.4448384642601013, -0.11950555443763733, -0.40971237421035767, -0.07250593602657318, 0.5926668643951416, 0.34668999910354614, -0.15976868569850922, -0.1727648228406906, -0.17319555580615997, 0.036187343299388885, 0.3085710406303406, -0.17411813139915466, -0.3145914077758789, 0.5150315761566162, -0.04445355385541916, -0.0975140929222107, -0.08070830255746841, -0.09468859434127808, -0.295665442943573, -0.2916203737258911, 0.11406706273555756, -0.1707691103219986, -0.15104056894779205, -0.3946334719657898, 0.05684612691402435, 0.10677823424339294, -0.3121572732925415, 0.062382783740758896, 0.17753884196281433, 0.14909152686595917, 0.0456077978014946, -0.35203123092651367, -0.06006047874689102, 0.025652728974819183, 0.6200674176216125, -0.03984785079956055, 0.02948591858148575, 0.2415604293346405, -0.07912863045930862, -0.0901852548122406, -0.22991237044334412, 0.2913437783718109, 0.056661952286958694, -0.31139615178108215, 0.48322513699531555, -0.40031206607818604, 0.08232156932353973, -0.17404678463935852, 0.16111086308956146, 0.22156542539596558, -0.11699434369802475, 0.008323006331920624, -0.46076294779777527, -0.2677718698978424, 0.24944524466991425, 0.3027377128601074, 0.09543941169977188, 0.18617084622383118, -0.12880611419677734, -0.050603508949279785, -0.08342006802558899, -0.1854325234889984, 0.13112731277942657, -0.011755403131246567, -0.08334959298372269, -0.014141861349344254, -0.012418586760759354, 0.07493815571069717, -0.3090169429779053, 0.016139360144734383, -0.15022721886634827, -0.0030727507546544075, -0.0983646810054779, -0.06459136307239532, 0.16234132647514343, 0.12861493229866028, 0.06385011225938797, -0.22787222266197205, -0.36258524656295776, 0.23528027534484863, -0.20459887385368347, 0.2090548723936081, 0.27924612164497375, 0.04173349589109421, 0.10912732034921646, 0.08754529058933258, 0.3675718605518341, -0.2056933045387268, 0.17472046613693237, -0.12768934667110443, 0.23383702337741852, -0.01798136718571186, 0.07524357736110687, -0.017666714265942574, -0.013982556760311127, -0.6035295128822327, -0.08250454813241959, 0.11569863557815552, 0.3541325628757477, 0.2102700173854828, -0.27704185247421265, -0.04569004476070404, -0.09753235429525375, 0.39810171723365784, 0.30707794427871704, -0.28932878375053406, 0.2781085669994354, -0.017938857898116112, 0.13505332171916962, 0.14294572174549103, -0.15800662338733673, 0.0837232768535614, -0.09053617715835571, -0.19288912415504456, 0.06219732388854027, -0.17120042443275452, 0.000684686005115509, -0.4752076268196106, 0.11934880167245865, 0.583020806312561, -0.2806251049041748, 0.14968258142471313, 0.4546428322792053, 0.07548169791698456, 0.5349246263504028, -0.16440139710903168, -0.13423936069011688, 0.1947258561849594, 0.3073858618736267, 0.09799376130104065, 0.25077342987060547, 0.24162527918815613, 0.11354537308216095, 0.25608357787132263, -0.2981274425983429, -0.09536758065223694, -0.11298957467079163, -0.16573560237884521, 0.0248740091919899, 0.13502684235572815, 0.09024028480052948, -0.5479131937026978, -0.05680133029818535, -0.1020679697394371, -0.02238130196928978, -0.11223969608545303, 0.015486707910895348, 0.0265098437666893, -0.2203855812549591, 0.10936261713504791, -0.04535738378763199, -0.02455523982644081, -0.15339912474155426, 0.10828162729740143, 0.2340095192193985, -0.08375692367553711, 0.23010173439979553, 0.04367715120315552, 0.14657637476921082, -0.043339528143405914, -0.15696005523204803, -0.007298843935132027, 0.11564982682466507, -0.23022788763046265, -0.1400013417005539, 0.13828250765800476, 0.522479236125946, 0.485874742269516, -0.12187382578849792, -0.09378742426633835, 0.16718357801437378, -0.23024863004684448, -0.024268873035907745, 0.09593915194272995, -0.20987147092819214, 0.2996826767921448, 0.2823512554168701, 0.22547097504138947, -0.010632568039000034, 0.21512629091739655, 0.248884379863739, 0.4378121495246887, -0.22191743552684784, 0.7030799984931946, -0.275386244058609, -0.25164514780044556, 0.06553365290164948, -0.19387006759643555, -0.222129225730896, -0.23101453483104706, 0.055173490196466446, 0.09686509519815445, 0.2961735129356384, 0.18330641090869904, 0.052160829305648804, 0.23601366579532623, 0.02859204076230526, 0.10931175202131271, -0.2365081012248993, -0.21591816842556, 0.18892128765583038, -0.48640188574790955, 0.08849335461854935, 0.15617090463638306, 0.08703630417585373, -0.2600172162055969, 0.19714519381523132, 0.06866616755723953, 0.03300502151250839, 0.11197513341903687, 0.023981476202607155, 0.14655423164367676, 0.3653162121772766, -0.1289297491312027, -0.20466703176498413, 0.11959555745124817, -0.03336228430271149, 0.1753515601158142, -0.4723130464553833, 0.3102142810821533, 0.06574924290180206, -0.015060622245073318, -0.02240711823105812, 0.08428816497325897, 0.07710641622543335, 0.3313022255897522, 0.3999200463294983, 0.14387980103492737, 0.2604221701622009, -0.119651198387146, -0.22544439136981964, -0.06172293797135353, 0.09086746722459793, -0.0903901681303978, 0.3285108506679535, -0.20516735315322876, 0.6097774505615234, -0.45825693011283875, 0.12161785364151001, -0.37518081068992615, 0.019744329154491425, -0.22295516729354858, -0.13048329949378967, -0.29567331075668335, 0.16774408519268036, 0.009138889610767365, 0.12321452051401138, 0.5432205200195312, 0.16873250901699066, -0.12204784154891968, 0.2851129472255707, -0.32222920656204224, -0.0790838822722435, 0.3124600946903229, -0.04199609160423279, -0.14286905527114868, -0.027419444173574448, 0.2287316769361496, 0.20623484253883362, 0.26954615116119385, -0.44396403431892395, -0.3900858461856842, 0.367389053106308, -0.14512422680854797, -0.13679713010787964, 0.1274525374174118, -0.10712189972400665, -0.09765936434268951, 0.04417463764548302, 0.2825455069541931, 0.2658175826072693, -0.4070364236831665, 0.27631211280822754, -0.2208060920238495 ]
https://github.com/huggingface/datasets/issues/2424
load_from_disk and save_to_disk are not compatible with each other
Though I see a stream of issues open by people lost between datasets and datasets dicts so maybe there is here something that could be better in terms of UX. Could be better error handling or something else smarter to even avoid said errors but maybe we should think about this. Reopening to use this issue as a discussion place but feel free to open a new open if you prefer @lhoestq @albertvillanova
## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
73
load_from_disk and save_to_disk are not compatible with each other ## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in> Though I see a stream of issues open by people lost between datasets and datasets dicts so maybe there is here something that could be better in terms of UX. Could be better error handling or something else smarter to even avoid said errors but maybe we should think about this. Reopening to use this issue as a discussion place but feel free to open a new open if you prefer @lhoestq @albertvillanova
[ -0.17932865023612976, -0.14159801602363586, -0.10552380979061127, 0.5006899237632751, 0.23257911205291748, -0.03824661299586296, 0.2578229010105133, 0.29034483432769775, 0.3386763036251068, 0.09910717606544495, 0.1047390028834343, 0.3404802083969116, 0.07601656764745712, 0.18512345850467682, -0.21642495691776276, -0.046750105917453766, 0.30204877257347107, -0.018378809094429016, 0.1567266434431076, -0.044947706162929535, -0.15279176831245422, 0.28742408752441406, -0.16352984309196472, -0.05758437514305115, -0.17195317149162292, -0.047943197190761566, -0.1967134326696396, 0.34078097343444824, 0.3019944429397583, 0.04616883024573326, 0.27322643995285034, -0.2321474552154541, 0.15894925594329834, 0.5605934858322144, -0.00011912413174286485, -0.027794983237981796, 0.19333922863006592, -0.1634419560432434, -0.34070995450019836, -0.6506851315498352, -0.19440895318984985, -0.2385561168193817, 0.06499539315700531, -0.27685898542404175, 0.1821874976158142, -0.01385777723044157, -0.05382223427295685, -0.3102641701698303, 0.5078191161155701, 0.09638296067714691, 0.14653822779655457, 0.10024656355381012, 0.19202494621276855, -0.21282364428043365, -0.037671253085136414, 0.5029977560043335, -0.000701218843460083, 0.3070381283760071, 0.2560760974884033, -0.20465967059135437, 0.12969620525836945, -0.004798314068466425, -0.3322281241416931, -0.1897919625043869, 0.26661232113838196, 0.26112815737724304, 0.32665807008743286, -0.42108187079429626, -0.03278730809688568, 0.1346203237771988, 0.4311966300010681, -0.16128364205360413, -0.39769992232322693, -0.37014177441596985, -0.25445377826690674, 0.14558924734592438, 0.4366273880004883, 0.005638186354190111, -0.37362539768218994, 0.21221472322940826, -0.13392066955566406, -0.3855874240398407, -0.030291114002466202, 0.3730509281158447, 0.005806133151054382, 0.028720516711473465, -0.052511122077703476, 0.03667134791612625, 0.22157199680805206, 0.058258987963199615, 0.35830631852149963, -0.4107930362224579, 0.18271039426326752, 0.03937814012169838, -0.24945266544818878, -0.06911168992519379, -0.15333431959152222, -0.4124200940132141, -0.15397417545318604, 0.3790571093559265, 0.25611650943756104, -0.1636751890182495, -0.3973771035671234, 0.37281543016433716, 0.5320215225219727, 0.2313525229692459, 0.11680955439805984, 0.231473907828331, 0.30843156576156616, 0.10476984828710556, -0.021019771695137024, 0.05297939479351044, 0.23073036968708038, -0.33755287528038025, 0.30264514684677124, -0.10471516102552414, 0.33735233545303345, -0.19664447009563446, -0.406213641166687, -0.009761367924511433, -0.19947966933250427, -0.08948998153209686, -0.043800197541713715, 0.15083540976047516, 0.1162971556186676, 0.3933482766151428, 0.20991025865077972, 0.32661664485931396, -0.12267373502254486, 0.37890592217445374, -0.10727950930595398, -0.01829548180103302, 0.10818052291870117, 0.24280324578285217, 0.01423681527376175, -0.06315499544143677, 0.10863122344017029, 0.12454982846975327, -0.009879261255264282, -0.13322824239730835, -0.0954657793045044, -0.34376731514930725, 0.12772716581821442, 0.1409401297569275, 0.2713591456413269, 0.1469074934720993, 0.038245826959609985, -0.4243357181549072, -0.18788465857505798, 0.2419469654560089, -0.4898732304573059, -0.1394294649362564, -0.017427487298846245, 0.16735906898975372, -0.15371249616146088, 0.056657180190086365, -0.6717963814735413, -0.023199964314699173, 0.15843737125396729, -0.3381965160369873, 0.05640600249171257, -0.03691849112510681, -0.09731943905353546, -0.5008746385574341, 0.27214911580085754, 0.27716898918151855, -0.3709772825241089, -0.004724729806184769, -0.12147418409585953, -0.043364811688661575, 0.02537354826927185, 0.4278506934642792, -0.07592504471540451, 0.33266767859458923, -0.42979738116264343, 0.08540292084217072, 0.504235029220581, -0.6016658544540405, -0.3212788999080658, 0.5045103430747986, -0.13118810951709747, -0.043403685092926025, 0.07582412660121918, 0.16834236681461334, 0.21899758279323578, -0.22200825810432434, 0.2906538248062134, 0.4203118085861206, -0.046928972005844116, -0.048142701387405396, -0.4034247398376465, -0.22355714440345764, 0.13171608746051788, 0.14836226403713226, -0.03578515723347664, 0.11207294464111328, 0.15244168043136597, -0.0020955922082066536, 0.30854544043540955, -0.0010439977049827576, 0.05776430666446686, 0.3298604488372803, 0.4671285152435303, -0.08283814787864685, -0.18645454943180084, -0.13802027702331543, -0.7963289618492126, 0.20841071009635925, 0.2326536774635315, -0.2737748324871063, 0.0200376957654953, 0.09049525856971741, 0.006242778152227402, -0.12953998148441315, -0.13728787004947662, 0.0810043066740036, 0.006401024758815765, -0.08787637948989868, 0.12609583139419556, 0.03375716879963875, -0.2200847566127777, 0.23248764872550964, 0.15516476333141327, 0.09825930744409561, -0.23156443238258362, 0.6826292872428894, -0.1194998249411583, -0.32527750730514526, -0.09095308184623718, -0.05212695151567459, 0.28960108757019043, -0.030951401218771935, -0.11500250548124313, 0.38085174560546875, 0.024857809767127037, 0.4010756015777588, -0.28164854645729065, -0.10128419101238251, 0.17687024176120758, 0.12650984525680542, -0.013036226853728294, 0.33601948618888855, 0.19405528903007507, -0.16945597529411316, -0.3583263158798218, 0.15332232415676117, -0.23509033024311066, 0.3569946885108948, 0.1710188090801239, 0.08870670944452286, 0.044547125697135925, -0.15226073563098907, 0.15972726047039032, -0.21378038823604584, 0.188740536570549, -0.18670715391635895, 0.26054656505584717, -0.1405666619539261, -0.1402636468410492, 0.1336382031440735, 0.3338996171951294, -0.030389374122023582, 0.24597406387329102, 0.010736711323261261, 0.04798661172389984, -0.0385260134935379, -0.00958116166293621, 0.4764663279056549, 0.798513650894165, 0.08333306759595871, 0.04708125814795494, 0.02004021778702736, 0.008747518062591553, -0.2281491756439209, 0.18115872144699097, 0.15275925397872925, 0.4110864996910095, 0.40886619687080383, 0.07980188727378845, 0.1150384470820427, 0.10261858254671097, -0.245300754904747, -0.24656593799591064, 0.01969257928431034, -0.41227224469184875, 0.062038250267505646, -0.19486165046691895, 0.056352607905864716, -0.38620808720588684, -0.04607616364955902, -0.16313736140727997, -0.45212292671203613, -0.17306800186634064, 0.5514715313911438, -0.199345663189888, -0.17092031240463257, 0.12643590569496155, 0.0667562186717987, -0.284828245639801, -0.14171552658081055, -0.2706848680973053, 0.04501422494649887, -0.22852998971939087, -0.07032911479473114, 0.3768829107284546, 0.013541748747229576, 0.2489430159330368, -0.15801234543323517, -0.15886320173740387, -0.2698636054992676, -0.0948808416724205, 0.03727233037352562, 0.04661490023136139, 0.2869648039340973, -0.029170051217079163, 0.17433448135852814, 0.16453851759433746, -0.3916127383708954, 0.18120285868644714, -0.1359606832265854, -0.2781125009059906, 0.09608588367700577, 0.24827054142951965, -0.10107021778821945, -0.12354479730129242, -0.3715135455131531, -0.41183578968048096, -0.45681965351104736, 0.10004030168056488, -0.04652582108974457, 0.08833862841129303, -0.35743021965026855, 0.23746734857559204, -0.03975077345967293, 0.2538008987903595, 0.011484714224934578, -0.11091667413711548, -0.2015266716480255, 0.3960466682910919, -0.0928209200501442, -0.22739596664905548, 0.04145431891083717, 0.15615570545196533, 0.05111114680767059, 0.023217827081680298, -0.3708789348602295, -0.15396498143672943, -0.06235860288143158, 0.06705845892429352, -0.1709105372428894, 0.07927525788545609, 0.30465608835220337, 0.03845761716365814, 0.021289663389325142, -0.023946741595864296, -0.2883482277393341, 0.06512103229761124, 0.20943236351013184, 0.22476062178611755, -0.0381385013461113, 0.37640073895454407, 0.08368834853172302, 0.3308733105659485, 0.2706696093082428, 0.07176169753074646, 0.26841676235198975, 0.19242800772190094, 0.2364753782749176, -0.18339312076568604, -0.34874898195266724, -0.1726328283548355, -0.13266924023628235, -0.3924682140350342, -0.1421627700328827, -0.011923583224415779, -0.02976277284324169, -0.3161028027534485, -0.2475089579820633, -0.5281932353973389, -0.32197991013526917, -0.032100774347782135, 0.0037492625415325165, -0.035591207444667816, -0.11235955357551575, 0.23735502362251282, 0.010193239897489548, 0.11771925538778305, 0.15739794075489044, 0.4070904850959778, 0.2495688498020172, 0.01492888480424881, -0.3812522292137146, -0.3094474971294403, 0.07060440629720688, 0.3708423376083374, 0.0020470258314162493, 0.12343218177556992, -0.2986414432525635, -0.17732864618301392, -0.125261589884758, -0.11860286444425583, 0.7820262908935547, -0.18330344557762146, 0.02545035071671009, 0.14668862521648407, -0.14052926003932953, -0.2576368451118469, 0.037525374442338943, 0.1946364790201187, 0.016662580892443657, 0.13486288487911224, 0.8020756244659424, -0.044289927929639816, -0.13531076908111572, -0.09122202545404434, 0.2376186102628708, -0.28587257862091064, -0.39512962102890015, -0.027236416935920715, -0.09481604397296906, -0.452478289604187, -0.30638331174850464, -0.02014700323343277, 0.011005429551005363, -0.18267609179019928, -0.1882510930299759, -0.06938428431749344, -0.1406564712524414, 0.11996249109506607, -0.18226797878742218, 0.41626232862472534, -0.5548483729362488, 0.15753842890262604, 0.14343780279159546, -0.03213054686784744, 0.6181355714797974, 0.4264187514781952, -0.12062409520149231, -0.2985323667526245, 0.06960031390190125, -0.19324928522109985, 0.16751663386821747, 0.3233312964439392, -0.00355135858990252, -0.31491729617118835, -0.021011214703321457, 0.05553600937128067, -0.33146947622299194, -0.39603492617607117, 0.08456460386514664, -0.11231106519699097, -0.25353243947029114, -0.38519036769866943, 0.30093756318092346, 0.29381483793258667, -0.11849051713943481, -0.05050226300954819, -0.027962379157543182, -0.22613194584846497, 0.6079071760177612, -0.12745711207389832, 1.1012152433395386, 0.17300061881542206, 0.20651914179325104, 0.20375868678092957, -0.3399905562400818, 0.3108731806278229, -0.1348888874053955, -0.044805146753787994, -0.3215376138687134, 0.10350817441940308, -0.18030619621276855, -0.32373273372650146, 0.021997366100549698, 0.3883429765701294, -0.20201881229877472, 0.4719237983226776, -0.24641698598861694, 0.026270393282175064, -0.21038107573986053, 0.11278022825717926, -0.20258362591266632, -0.11933973431587219, -0.48215436935424805, 0.08729967474937439, 0.13932649791240692, 0.2534201443195343, 0.01685403659939766, -0.19101135432720184, -0.4468173384666443, 0.03472207486629486, -0.15733429789543152, 0.28457170724868774, 0.029433272778987885, 0.4148925542831421, -0.0706738531589508, -0.41612106561660767, -0.041797615587711334, 0.6158405542373657, 0.368353009223938, -0.10171778500080109, -0.1701793074607849, -0.1532873511314392, -0.03335217386484146, 0.3466129004955292, -0.11875693500041962, -0.3605042099952698, 0.6040202975273132, -0.010860560461878777, -0.09631934016942978, -0.04741925746202469, -0.09034224599599838, -0.24794524908065796, -0.40369078516960144, 0.08124245703220367, -0.14052586257457733, -0.14672204852104187, -0.36419838666915894, -0.01882612705230713, 0.12045824527740479, -0.31353360414505005, 0.08661071956157684, 0.1802167296409607, 0.20718686282634735, 0.10892637073993683, -0.22207818925380707, -0.046101801097393036, 0.03435645252466202, 0.5484598278999329, -0.0815238207578659, 0.011291928589344025, 0.14192932844161987, -0.0924001932144165, -0.13859209418296814, -0.24987861514091492, 0.3250657618045807, 0.10751732438802719, -0.3133609890937805, 0.4331635534763336, -0.3652236759662628, 0.038978978991508484, -0.20603111386299133, 0.07274079322814941, 0.2630290389060974, -0.13150671124458313, -0.026427341625094414, -0.4607173204421997, -0.23946252465248108, 0.32854163646698, 0.3012678027153015, 0.13964679837226868, 0.05973625183105469, -0.24156560003757477, -0.11029655486345291, -0.10800434648990631, -0.22418776154518127, 0.09028467535972595, -0.06595711410045624, -0.1217612475156784, 0.013754378072917461, -0.013251028954982758, 0.021770820021629333, -0.3241369426250458, 0.03642388433218002, -0.16028043627738953, 0.029896562919020653, -0.10782192647457123, -0.011218809522688389, 0.14919447898864746, 0.15445706248283386, 0.10181491076946259, -0.16343086957931519, -0.3246351480484009, 0.2782616913318634, -0.21767975389957428, 0.1702611893415451, 0.2939697206020355, 0.06960234045982361, 0.0768548920750618, 0.06917956471443176, 0.31630825996398926, -0.20977923274040222, 0.3629971146583557, -0.09156450629234314, 0.3446459174156189, -0.053718872368335724, 0.06380648165941238, 0.027291150763630867, -0.017449088394641876, -0.477908194065094, -0.017168574035167694, 0.18121576309204102, 0.4025023281574249, 0.21777155995368958, -0.23601917922496796, -0.01667921245098114, 0.03499606251716614, 0.3909662961959839, 0.3330208659172058, -0.25174474716186523, 0.2638548016548157, 0.051059313118457794, 0.16760005056858063, 0.13984495401382446, -0.15395960211753845, 0.09191450476646423, -0.15046489238739014, -0.21483299136161804, 0.06737495213747025, -0.18216389417648315, -0.0023591741919517517, -0.41558516025543213, 0.09697241336107254, 0.5428464412689209, -0.29987382888793945, 0.053036805242300034, 0.3338724970817566, 0.05357426777482033, 0.4518009126186371, -0.13163286447525024, -0.18569855391979218, 0.20756053924560547, 0.2608272135257721, 0.03707827627658844, 0.23472173511981964, 0.2281680405139923, 0.11645078659057617, 0.28937363624572754, -0.2608206272125244, -0.02473575994372368, -0.07421782612800598, -0.20268931984901428, -0.07642536610364914, 0.14368881285190582, 0.033262744545936584, -0.3727566599845886, -0.07606330513954163, 0.03622821718454361, -0.015693213790655136, -0.11215025931596756, 0.04829099401831627, 0.026550672948360443, -0.2150343358516693, 0.09691810607910156, -0.04289288818836212, -0.0720706582069397, -0.21116913855075836, 0.14609624445438385, 0.2383222132921219, -0.07367435097694397, 0.16334952414035797, 0.08155862987041473, 0.15950995683670044, -0.0003994256258010864, -0.1480986475944519, -0.03801105171442032, 0.12112084031105042, -0.19412729144096375, -0.17133183777332306, 0.19595476984977722, 0.6128459572792053, 0.46584460139274597, -0.19907884299755096, -0.08437802642583847, 0.1803435981273651, -0.18350709974765778, -0.06405510753393173, 0.11935096234083176, -0.25071290135383606, 0.28123801946640015, 0.29197463393211365, 0.25417351722717285, -0.03425266221165657, 0.20774345099925995, 0.1241118460893631, 0.3720482289791107, -0.26564285159111023, 0.6274999976158142, -0.26443541049957275, -0.22411048412322998, 0.03269054740667343, -0.14884907007217407, -0.23403626680374146, -0.3127301335334778, 0.09638984501361847, 0.032401494681835175, 0.27869316935539246, 0.14120130240917206, 0.07486604899168015, 0.21651498973369598, 0.03329860791563988, 0.22455912828445435, -0.15202629566192627, -0.24591940641403198, 0.269098162651062, -0.5443851947784424, 0.09252575039863586, 0.18712571263313293, 0.09943003952503204, -0.2845582365989685, 0.19640088081359863, 0.09754820913076401, 0.13879241049289703, 0.13201992213726044, 0.07298655807971954, 0.11941499263048172, 0.35439810156822205, -0.23893873393535614, -0.21825306117534637, 0.17160968482494354, -0.13184785842895508, 0.15205003321170807, -0.4748723804950714, 0.2885642349720001, 0.08727182447910309, -0.011305086314678192, -0.04929768294095993, 0.17281712591648102, 0.09743480384349823, 0.29439759254455566, 0.414699524641037, 0.17153824865818024, 0.2707881033420563, -0.11504517495632172, -0.24799175560474396, 0.01208537071943283, 0.01660909503698349, -0.11235057562589645, 0.3540954291820526, -0.19549110531806946, 0.5083063840866089, -0.45847269892692566, 0.057874422520399094, -0.394374281167984, -0.018865415826439857, -0.24881601333618164, -0.06724704802036285, -0.3928897976875305, 0.1923329383134842, 0.06259121745824814, 0.16290855407714844, 0.441137433052063, 0.10496209561824799, -0.10429243743419647, 0.289852499961853, -0.2736344337463379, -0.12441007792949677, 0.2987196445465088, 0.08689205348491669, -0.08970989286899567, -0.040232300758361816, 0.21445608139038086, 0.2227746546268463, 0.2226887345314026, -0.3981018662452698, -0.4122733473777771, 0.34796398878097534, -0.16556286811828613, -0.09558448195457458, 0.17233523726463318, -0.056851793080568314, -0.03646651655435562, 0.03126313164830208, 0.2184518426656723, 0.18301823735237122, -0.3039121627807617, 0.35308369994163513, -0.19258491694927216 ]
https://github.com/huggingface/datasets/issues/2424
load_from_disk and save_to_disk are not compatible with each other
We should probably improve the error message indeed. Also note that there exists a function `load_from_disk` that can load a Dataset or a DatasetDict. Under the hood it calls either `Dataset.load_from_disk` or `DatasetDict.load_from_disk`: ```python from datasets import load_from_disk dataset_dict = load_from_disk("path/to/dataset/dict") single_dataset = load_from_disk("path/to/single/dataset") ```
## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
45
load_from_disk and save_to_disk are not compatible with each other ## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in> We should probably improve the error message indeed. Also note that there exists a function `load_from_disk` that can load a Dataset or a DatasetDict. Under the hood it calls either `Dataset.load_from_disk` or `DatasetDict.load_from_disk`: ```python from datasets import load_from_disk dataset_dict = load_from_disk("path/to/dataset/dict") single_dataset = load_from_disk("path/to/single/dataset") ```
[ -0.21142861247062683, -0.19184550642967224, -0.10800391435623169, 0.4175552725791931, 0.17884160578250885, 0.009406454861164093, 0.2517888844013214, 0.35985711216926575, 0.3484731912612915, 0.12817110121250153, 0.09062964469194412, 0.3500768542289734, 0.06756219267845154, 0.12341462820768356, -0.12047731876373291, -0.03711269795894623, 0.23966896533966064, 0.043148159980773926, 0.24993371963500977, -0.10753494501113892, -0.1955869197845459, 0.3563710153102875, -0.13997125625610352, -0.03684394806623459, -0.14062505960464478, -0.04932989180088043, -0.18324583768844604, 0.35291358828544617, 0.329156756401062, 0.0321100689470768, 0.3073035180568695, -0.15630066394805908, 0.06932996213436127, 0.5561495423316956, -0.00012118939775973558, 0.0506666898727417, 0.17384123802185059, -0.20018352568149567, -0.3015095293521881, -0.6945694088935852, -0.11871372163295746, -0.2993367612361908, 0.1153072640299797, -0.31854236125946045, 0.1460937261581421, -0.0933302640914917, -0.04109027236700058, -0.2919645309448242, 0.5449645519256592, 0.12921220064163208, 0.10880668461322784, 0.13603322207927704, 0.21616722643375397, -0.22477887570858002, -0.07335365563631058, 0.5043622851371765, 0.01448834128677845, 0.36837220191955566, 0.16026893258094788, -0.12265980243682861, 0.14360150694847107, -0.007756264880299568, -0.34987860918045044, -0.15794627368450165, 0.29688528180122375, 0.2928350269794464, 0.3333086669445038, -0.4449428915977478, -0.07701891660690308, 0.1268189400434494, 0.37590476870536804, -0.1877383291721344, -0.3891632556915283, -0.3483690023422241, -0.23385687172412872, 0.05525211989879608, 0.4390166699886322, 0.04214475303888321, -0.3749608099460602, 0.15070192515850067, -0.08703114837408066, -0.3912682831287384, -0.0318068191409111, 0.35214561223983765, -0.013760488480329514, -0.005134575068950653, -0.01478468906134367, 0.08227969706058502, 0.2828969657421112, 0.0774768739938736, 0.3303997218608856, -0.42700523138046265, 0.21169178187847137, 0.074473537504673, -0.24193839728832245, -0.024022061377763748, -0.18621227145195007, -0.4937497675418854, -0.1886003315448761, 0.3319094181060791, 0.27414587140083313, -0.12719634175300598, -0.44498705863952637, 0.3601478040218353, 0.4342705011367798, 0.2644772529602051, 0.12946434319019318, 0.27895069122314453, 0.2962294816970825, 0.07289282977581024, 0.02353719249367714, 0.09318657219409943, 0.22097158432006836, -0.35979828238487244, 0.27012309432029724, -0.09949010610580444, 0.32926714420318604, -0.12434446811676025, -0.400761216878891, -0.03728106990456581, -0.18683689832687378, -0.1043991968035698, -0.012822761200368404, 0.16637974977493286, 0.16778765618801117, 0.37578707933425903, 0.24940191209316254, 0.348086953163147, -0.14793609082698822, 0.41279667615890503, -0.10951796919107437, 0.016551757231354713, 0.20487958192825317, 0.21104905009269714, 0.103695809841156, -0.14204011857509613, 0.17546673119068146, 0.06092444807291031, -0.005059622228145599, -0.11451297253370285, -0.08567532896995544, -0.39815983176231384, 0.13778704404830933, 0.18611164391040802, 0.33353564143180847, 0.1661635935306549, 0.0975964218378067, -0.3431737422943115, -0.2430257797241211, 0.26100316643714905, -0.4517630934715271, -0.1967010647058487, 0.0310486052185297, 0.13108961284160614, -0.18514159321784973, 0.05827692151069641, -0.6198500394821167, -0.016968663781881332, 0.18024811148643494, -0.3511142134666443, -0.01589362323284149, -0.14644625782966614, -0.1892220377922058, -0.482500821352005, 0.37193167209625244, 0.28328949213027954, -0.31650683283805847, -0.034856803715229034, -0.09436057507991791, -0.1288658231496811, 0.053967803716659546, 0.4559873342514038, -0.07920868694782257, 0.43095412850379944, -0.37088415026664734, 0.07495753467082977, 0.5811283588409424, -0.6331637501716614, -0.3446842133998871, 0.48484307527542114, -0.18426567316055298, -0.011326540261507034, 0.016518451273441315, 0.15371489524841309, 0.21927525103092194, -0.15672217309474945, 0.3526000380516052, 0.4051528573036194, 0.04135667905211449, -0.028178395703434944, -0.36948105692863464, -0.19134950637817383, 0.12924724817276, 0.1685737520456314, -0.07303260266780853, 0.09816659986972809, 0.12955117225646973, 0.04675457626581192, 0.3483133614063263, 0.0012234337627887726, 0.094943568110466, 0.36257457733154297, 0.4391656517982483, -0.055737048387527466, -0.18109311163425446, -0.08538217842578888, -0.7521965503692627, 0.22911691665649414, 0.1643962264060974, -0.2637031376361847, -0.06648215651512146, 0.11668238043785095, -0.0023820186033844948, -0.14354674518108368, -0.1489107608795166, 0.11930371820926666, -0.024761324748396873, -0.031530313193798065, 0.14203299582004547, 0.04650060459971428, -0.23702947795391083, 0.2715097963809967, 0.1500968188047409, 0.07164224237203598, -0.19335046410560608, 0.6443467140197754, -0.09329889714717865, -0.34947195649147034, -0.05432291328907013, -0.05314277857542038, 0.3440527021884918, -0.070836640894413, -0.14617550373077393, 0.41691601276397705, 0.03704876825213432, 0.35516661405563354, -0.3490382730960846, -0.21833942830562592, 0.17532046139240265, 0.16946686804294586, -0.0041924696415662766, 0.32943323254585266, 0.18125031888484955, -0.22284170985221863, -0.405994713306427, 0.14398635923862457, -0.20434938371181488, 0.3077222406864166, 0.1737818419933319, 0.062466979026794434, 0.11205406486988068, -0.056676577776670456, 0.17430128157138824, -0.21749544143676758, 0.1451803594827652, -0.1665927618741989, 0.2363591343164444, -0.182937353849411, -0.19366362690925598, 0.055703673511743546, 0.33063897490501404, -0.06224001944065094, 0.21264782547950745, 0.0016046054661273956, 0.08500208705663681, -0.0840708315372467, -0.07447686791419983, 0.47445347905158997, 0.7585262656211853, 0.06461869925260544, 0.03315053507685661, -0.007240166887640953, -0.03444767743349075, -0.2042890340089798, 0.19933122396469116, 0.07641151547431946, 0.41823986172676086, 0.40307503938674927, 0.01335463672876358, 0.11448771506547928, 0.04064042866230011, -0.264181911945343, -0.136801078915596, 0.04758201539516449, -0.4155179560184479, 0.010882077738642693, -0.13397616147994995, 0.11058460921049118, -0.43695858120918274, -0.06781981140375137, -0.09709426760673523, -0.4311991035938263, -0.2040606439113617, 0.6053653359413147, -0.12867489457130432, -0.10618613660335541, 0.21254704892635345, 0.020337462425231934, -0.21960848569869995, -0.2715376317501068, -0.205503910779953, 0.0993707999587059, -0.19676080346107483, -0.10581058263778687, 0.24199743568897247, 0.09368957579135895, 0.19494813680648804, -0.18395884335041046, -0.21001064777374268, -0.2731391191482544, -0.008273288607597351, 0.059586301445961, -0.04741658270359039, 0.18411539494991302, 0.016511596739292145, 0.22556698322296143, 0.14445583522319794, -0.42295095324516296, 0.20885635912418365, -0.1901487112045288, -0.2385508120059967, 0.09260634332895279, 0.2182629555463791, -0.15169258415699005, -0.20540231466293335, -0.33216604590415955, -0.45885470509529114, -0.43981921672821045, 0.17182418704032898, -0.05436000972986221, 0.15660592913627625, -0.3143666088581085, 0.24420711398124695, 0.035168953239917755, 0.2324005514383316, 0.013631541281938553, -0.07563827931880951, -0.19409425556659698, 0.4806295931339264, -0.14208847284317017, -0.2508004903793335, 0.051271092146635056, 0.19741284847259521, 0.040130991488695145, 0.04721023514866829, -0.3657921552658081, -0.12092340737581253, -0.08640428632497787, 0.09409688413143158, -0.21447867155075073, 0.06916208565235138, 0.26594722270965576, 0.028500838205218315, 0.043696023523807526, -0.026832275092601776, -0.3267620801925659, 0.1331760585308075, 0.21651402115821838, 0.15866747498512268, -0.03980091214179993, 0.42209959030151367, 0.0351589061319828, 0.3567744493484497, 0.2694927752017975, 0.03913777321577072, 0.1881525069475174, 0.1792059689760208, 0.21343466639518738, -0.18842345476150513, -0.3604230284690857, -0.2073596566915512, -0.1219458281993866, -0.3263211250305176, -0.16095130145549774, -0.049917012453079224, -0.03790219873189926, -0.2592143714427948, -0.22965273261070251, -0.5250450372695923, -0.3166353106498718, -0.050738513469696045, 0.03218434751033783, 0.059485308825969696, -0.14493431150913239, 0.22346055507659912, -0.05565953627228737, 0.1530025601387024, 0.10523298382759094, 0.42501068115234375, 0.2477373480796814, -0.011132773011922836, -0.3744659125804901, -0.27949512004852295, 0.0033861398696899414, 0.3654211163520813, -0.012446881271898746, 0.10253304243087769, -0.2650882303714752, -0.08471960574388504, -0.13809245824813843, -0.16892589628696442, 0.8337208032608032, -0.048009052872657776, 0.11632045358419418, 0.2054235339164734, -0.14294996857643127, -0.3742009997367859, 0.03577506169676781, 0.19665704667568207, 0.08135899156332016, 0.17717130482196808, 0.8088900446891785, -0.06563743203878403, -0.14277973771095276, -0.09961782395839691, 0.262983500957489, -0.3095369040966034, -0.38268107175827026, -0.04861938953399658, -0.17730697989463806, -0.4840146601200104, -0.259153813123703, -0.04248595982789993, 0.10256797075271606, -0.16661913692951202, -0.20447367429733276, 0.030509281903505325, -0.1813812553882599, 0.12074591219425201, -0.16733503341674805, 0.5097064971923828, -0.43876245617866516, 0.1563759297132492, 0.16262994706630707, -0.10625068843364716, 0.5962852239608765, 0.42339232563972473, -0.11890964210033417, -0.2646346986293793, 0.09149468690156937, -0.21107327938079834, 0.14221051335334778, 0.3218804597854614, 0.00814746879041195, -0.2362222671508789, 0.054218340665102005, 0.06704092770814896, -0.245741069316864, -0.3020389676094055, 0.11881447583436966, -0.19248990714550018, -0.2191024124622345, -0.518520712852478, 0.3012197017669678, 0.2540457546710968, -0.0829501748085022, -0.05017479509115219, -0.03752770274877548, -0.21991664171218872, 0.5497974753379822, -0.17132878303527832, 1.020889401435852, 0.10003148019313812, 0.14883343875408173, 0.2642287015914917, -0.3185461759567261, 0.3059229552745819, -0.14946532249450684, 0.012864943593740463, -0.2513437569141388, 0.0981440469622612, -0.13809800148010254, -0.30051979422569275, -0.0005256012082099915, 0.40052300691604614, -0.26485440135002136, 0.3912699818611145, -0.1632886677980423, -0.04965287819504738, -0.23588724434375763, 0.21597227454185486, -0.12437144666910172, -0.19384795427322388, -0.48189038038253784, 0.06062983721494675, 0.12608104944229126, 0.31041672825813293, 0.09203260391950607, -0.20862509310245514, -0.38216903805732727, -0.025888537988066673, -0.16225707530975342, 0.27116620540618896, -0.046501390635967255, 0.4824005365371704, -0.15423715114593506, -0.40390485525131226, -0.04761163517832756, 0.5758296251296997, 0.2975662350654602, -0.12533038854599, -0.17785754799842834, -0.18355925381183624, 0.02056729793548584, 0.30252382159233093, -0.20650604367256165, -0.3314889371395111, 0.5029808878898621, -0.06432663649320602, -0.15009666979312897, -0.04604034870862961, -0.13781575858592987, -0.3255539536476135, -0.2770251929759979, 0.08021245896816254, -0.1919633001089096, -0.10684128850698471, -0.39819246530532837, 0.06143505126237869, 0.09498654305934906, -0.3091369569301605, 0.049655891954898834, 0.21822898089885712, 0.11669822037220001, 0.054291702806949615, -0.28795748949050903, -0.09379696100950241, 0.05471760779619217, 0.5448533296585083, -0.01717839390039444, -0.0035188235342502594, 0.2803349792957306, -0.09818330407142639, -0.06586360931396484, -0.22705700993537903, 0.2269715666770935, 0.06643592566251755, -0.2888089120388031, 0.45071154832839966, -0.3576383590698242, 0.08798520267009735, -0.20164187252521515, 0.16615808010101318, 0.2737419307231903, -0.06111375242471695, -0.005541905760765076, -0.4276253283023834, -0.28932222723960876, 0.2825799286365509, 0.2939668595790863, 0.1758795976638794, 0.1567590832710266, -0.15299531817436218, -0.06036732345819473, -0.06239542365074158, -0.1899171769618988, 0.08350155502557755, -0.005391355603933334, -0.12602968513965607, 0.01722525618970394, 0.011472012847661972, 0.07907439768314362, -0.309906929731369, 0.026355376467108727, -0.17114564776420593, 0.025552237406373024, -0.07796406745910645, -0.02539026364684105, 0.16462767124176025, 0.08813615143299103, 0.08965080976486206, -0.2134760469198227, -0.3668818473815918, 0.26194480061531067, -0.20761333405971527, 0.2229597121477127, 0.29962944984436035, 0.04831285774707794, 0.09062729775905609, 0.08743282407522202, 0.3761311173439026, -0.22902226448059082, 0.20953302085399628, -0.1292048543691635, 0.22332657873630524, 0.027826856821775436, 0.0835724025964737, -0.0008781803771853447, -0.03249484300613403, -0.5418757200241089, -0.08311643451452255, 0.14821438491344452, 0.3846338391304016, 0.15144452452659607, -0.22087018191814423, -0.06763599812984467, -0.04531044512987137, 0.3868579864501953, 0.3088824152946472, -0.27213698625564575, 0.24738164246082306, -0.02926548570394516, 0.13239452242851257, 0.11707113683223724, -0.17980638146400452, 0.026299137622117996, -0.10832985490560532, -0.18153584003448486, 0.06455738842487335, -0.15947969257831573, 0.027242004871368408, -0.455382764339447, 0.12638446688652039, 0.5783300995826721, -0.2782413363456726, 0.13463148474693298, 0.34110158681869507, 0.05922987684607506, 0.47412461042404175, -0.20064961910247803, -0.1741560995578766, 0.21489989757537842, 0.30663877725601196, 0.022748518735170364, 0.2576083242893219, 0.2274409830570221, 0.12066613137722015, 0.2622337341308594, -0.2492770254611969, -0.06302961707115173, -0.0845090001821518, -0.24485325813293457, -0.019285105168819427, 0.14950519800186157, 0.027885202318429947, -0.528380811214447, -0.08368700742721558, -0.060507453978061676, -0.0044037774205207825, -0.103755883872509, -0.003800543025135994, -0.012848012149333954, -0.2140306532382965, 0.12865905463695526, -0.060546062886714935, 0.004768919199705124, -0.17626795172691345, 0.10501692444086075, 0.23811353743076324, -0.09786289930343628, 0.24654418230056763, 0.06453303247690201, 0.17376461625099182, -0.001564808189868927, -0.13584156334400177, -0.008242534473538399, 0.16376885771751404, -0.2731030285358429, -0.165635347366333, 0.1954282522201538, 0.5575494766235352, 0.5093076229095459, -0.07901662588119507, -0.06526151299476624, 0.15760165452957153, -0.19759276509284973, -0.04503553733229637, 0.04958837106823921, -0.20581713318824768, 0.2743483781814575, 0.30956679582595825, 0.2349817156791687, -0.016288483515381813, 0.21239206194877625, 0.2283770740032196, 0.4528608024120331, -0.21240869164466858, 0.7002599239349365, -0.23162147402763367, -0.2523342967033386, 0.04324711114168167, -0.1375974416732788, -0.2326693832874298, -0.2715757489204407, 0.07294338941574097, 0.10441645979881287, 0.2638136148452759, 0.19112683832645416, 0.05248121917247772, 0.2173950970172882, 0.0901612713932991, 0.15938903391361237, -0.18636223673820496, -0.2668263614177704, 0.22661720216274261, -0.54967200756073, 0.06571350991725922, 0.13543924689292908, 0.07488040626049042, -0.24962007999420166, 0.21570517122745514, 0.06731300055980682, 0.07218754291534424, 0.1537308245897293, 0.02268371544778347, 0.09637012332677841, 0.30049651861190796, -0.1831519603729248, -0.1540471613407135, 0.12838494777679443, -0.028338102623820305, 0.18518225848674774, -0.4644732177257538, 0.26577723026275635, 0.0602811761200428, -0.01766660064458847, -0.0461481511592865, 0.11655507981777191, 0.0930098444223404, 0.3153388798236847, 0.4169466495513916, 0.14848437905311584, 0.27611351013183594, -0.15645559132099152, -0.26383301615715027, -0.06819309294223785, 0.06500226259231567, -0.0887397974729538, 0.36372220516204834, -0.1543532758951187, 0.6169582605361938, -0.44310659170150757, 0.08004042506217957, -0.41589853167533875, 0.01720544882118702, -0.2374826818704605, -0.16237787902355194, -0.283134788274765, 0.1799572855234146, 0.05469105392694473, 0.11580241471529007, 0.5101560354232788, 0.11925315856933594, -0.0878797173500061, 0.2665169835090637, -0.35817962884902954, -0.07547532767057419, 0.34433507919311523, -0.010597152635455132, -0.08008034527301788, -0.06810030341148376, 0.23781970143318176, 0.16395917534828186, 0.3511957824230194, -0.47445783019065857, -0.3576361835002899, 0.36632591485977173, -0.11556262522935867, -0.17435653507709503, 0.12754452228546143, -0.09256471693515778, -0.10262180864810944, 0.037768278270959854, 0.2736038565635681, 0.18865254521369934, -0.418712317943573, 0.19851379096508026, -0.2418084591627121 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
It actually seems to happen all the time in above configuration: * the function `filter_by_duration` correctly loads cached processed dataset * the function `prepare_dataset` is always reexecuted I end up solving the issue by saving to disk my dataset at the end but I'm still wondering if it's a bug or limitation here.
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
53
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No It actually seems to happen all the time in above configuration: * the function `filter_by_duration` correctly loads cached processed dataset * the function `prepare_dataset` is always reexecuted I end up solving the issue by saving to disk my dataset at the end but I'm still wondering if it's a bug or limitation here.
[ -0.2978542447090149, -0.04235486686229706, -0.07583057135343552, 0.4236164689064026, -0.07194645702838898, -0.027688875794410706, 0.23264138400554657, 0.35400390625, 0.2089606076478958, -0.0697675496339798, 0.0410519540309906, 0.18866561353206635, -0.28496962785720825, -0.2252904772758484, 0.11287032067775726, 0.2975528836250305, 0.052803635597229004, 0.11804212629795074, -0.10905729234218597, -0.15407916903495789, -0.015063995495438576, 0.2576178014278412, -0.04692354425787926, -0.09365306794643402, -0.2029935121536255, 0.10558205842971802, 0.02628200314939022, 0.13408151268959045, 0.09218045324087143, -0.27403971552848816, 0.5368281602859497, 0.09205672144889832, 0.13503634929656982, 0.5165358781814575, -0.00012106732174288481, 0.14664390683174133, 0.28590649366378784, -0.21573911607265472, -0.21815252304077148, -0.12804384529590607, -0.27888253331184387, -0.08327988535165787, -0.1238183081150055, -0.23005801439285278, -0.012047475203871727, 0.012214185670018196, -0.048112235963344574, -0.8536035418510437, 0.45994436740875244, 0.06610371917486191, 0.15654437243938446, -0.1820605993270874, -0.37966805696487427, 0.12594054639339447, 0.038267385214567184, -0.07413771748542786, 0.02057289145886898, 0.14913739264011383, 0.13223165273666382, -0.09458107501268387, -0.04124817997217178, 0.5044326186180115, -0.08291374146938324, -0.05812394991517067, 0.001679256558418274, 0.05388231202960014, 0.23300614953041077, -0.19520986080169678, 0.14594019949436188, 0.10849626362323761, 0.1963788866996765, -0.21240118145942688, -0.35019534826278687, -0.272781640291214, -0.3075910210609436, -0.21352118253707886, 0.32521650195121765, -0.15558360517024994, 0.14686736464500427, 0.1651790589094162, -0.609132707118988, -0.012385832145810127, 0.19131407141685486, -0.026544593274593353, -0.019741974771022797, -0.11297088861465454, -0.1681927889585495, 0.15201598405838013, 0.10837620496749878, -0.032003067433834076, 0.27457916736602783, -0.16574391722679138, -0.005322549492120743, 0.4561801254749298, -0.06966054439544678, 0.20847868919372559, 0.30966487526893616, 0.06381826847791672, -0.039825282990932465, 0.2631068229675293, 0.17517249286174774, 0.10681100934743881, -0.03458600118756294, -0.06441207230091095, 0.13061892986297607, 0.2133263200521469, 0.2404887080192566, 0.25229641795158386, -0.04967375844717026, -0.11468993872404099, -0.5343165397644043, 0.058686088770627975, -0.1254802644252777, -0.2830505967140198, 0.7806973457336426, 0.17872190475463867, -0.06201206520199776, -0.4015013575553894, 0.06464055180549622, 0.04148287698626518, -0.4251524806022644, -0.35264986753463745, 0.14821083843708038, 0.42278391122817993, -0.22410337626934052, 0.23589688539505005, -0.037868648767471313, -0.13864538073539734, -0.2654687762260437, 0.15462036430835724, -0.1668415367603302, -0.20380979776382446, -0.38844847679138184, 0.17960022389888763, 0.3731366693973541, -0.40052011609077454, 0.27015718817710876, 0.08726420998573303, 0.060493867844343185, -0.274897038936615, 0.16519708931446075, -0.13406546413898468, 0.5168506503105164, 0.0657958835363388, 0.005364280194044113, 0.2182987481355667, 0.15906478464603424, 0.03786395490169525, -0.22425606846809387, 0.10186782479286194, -0.5072757601737976, -0.13045962154865265, 0.31867557764053345, 0.0764244943857193, -0.23963376879692078, 0.3016882538795471, -0.20983737707138062, 0.264423668384552, 0.3779599368572235, -0.33550578355789185, -0.1166515126824379, -0.2069755494594574, -0.2666149437427521, -0.47855237126350403, 0.4195537567138672, 0.6090722680091858, -0.29462364315986633, -0.3102107048034668, -0.1382863074541092, -0.028103869408369064, -0.05990774184465408, 0.06828853487968445, -0.27635177969932556, 0.09926721453666687, -0.3678853213787079, 0.02616415172815323, 0.49277201294898987, -0.3572141230106354, -0.4876311719417572, 0.047447916120290756, 0.250859797000885, 0.5972857475280762, -0.08021176606416702, -0.14638210833072662, 0.1930469274520874, -0.22662846744060516, 0.28265124559402466, 0.11323236674070358, 0.021367307752370834, -0.1429443657398224, -0.16659758985042572, -0.10392893105745316, 0.14726603031158447, -0.12597306072711945, 0.3338220715522766, 0.16216200590133667, 0.1865675151348114, -0.12450027465820312, 0.13040974736213684, -0.04702504351735115, -0.018656136468052864, 0.31942182779312134, -0.08834047615528107, -0.046556249260902405, 0.12333841621875763, -0.2534306049346924, -0.30302509665489197, 0.4161663353443146, -0.27704083919525146, -0.5969231128692627, 0.028956875205039978, 0.04846920073032379, -0.20763033628463745, -0.06451983749866486, -0.17082005739212036, -0.24341806769371033, 0.03165174275636673, 0.2297227531671524, 0.22840246558189392, -0.02109954133629799, -0.05451832339167595, 0.5442659854888916, 0.010277407243847847, -0.27405017614364624, -0.24336637556552887, 0.1692321002483368, 0.25763434171676636, -0.17161321640014648, -0.3055514395236969, 0.08769211918115616, 0.3064356744289398, -0.14919063448905945, -0.1570720374584198, 0.16958929598331451, 0.059494778513908386, 0.201369047164917, -0.2249583601951599, 0.2929282784461975, -0.16005393862724304, -0.12229612469673157, 0.15848328173160553, 0.028426462784409523, -0.041613418608903885, -0.16369611024856567, -0.023924648761749268, 0.32783907651901245, 0.16893087327480316, 0.0020599663257598877, 0.05164988338947296, -0.1860271394252777, 0.18950951099395752, -0.10541248321533203, -0.11753493547439575, -0.2751550078392029, 0.15478552877902985, -0.18861187994480133, 0.4881468415260315, 0.23946313560009003, 0.08603671193122864, 0.17198625206947327, 0.4886363744735718, 0.2141721397638321, 0.13402071595191956, -0.05347897857427597, -0.31662648916244507, -0.17914509773254395, -0.18317101895809174, 0.0051267631351947784, 0.1620589941740036, -0.0005773779121227562, -0.021061580628156662, -0.02335158921778202, 0.01799336075782776, 0.2533576786518097, 0.07798892259597778, -0.23412813246250153, 0.34701284766197205, 0.14445774257183075, 0.11984878778457642, 0.035920631140470505, -0.17442667484283447, 0.045837510377168655, 0.12112078815698624, -0.04108636826276779, -0.46686887741088867, 0.13646437227725983, -0.3292939364910126, 0.27197960019111633, -0.24520280957221985, -0.0638304129242897, 0.028657419607043266, -0.22461801767349243, -0.19197432696819305, 0.3194692134857178, 0.28801870346069336, 0.21441060304641724, -0.3410937786102295, 0.1146630123257637, -0.18947289884090424, -0.1603948324918747, -0.010080255568027496, -0.11313475668430328, -0.348911315202713, -0.008692733943462372, 0.1438349038362503, -0.20550206303596497, 0.20750156044960022, -0.025598488748073578, -0.14011193811893463, -0.26771053671836853, -0.3595719039440155, 0.09351232647895813, 0.2070465385913849, 0.34555718302726746, -0.2412908375263214, -0.09006722271442413, -0.20699408650398254, -0.06373872607946396, 0.17087310552597046, -0.23139113187789917, -0.14288429915905, -0.06841858476400375, -0.005726470611989498, 0.08650512248277664, 0.09386354684829712, -0.4032764434814453, -0.3004498779773712, 0.06979775428771973, -0.10724906623363495, -0.08476309478282928, 0.03768627345561981, 0.07339037209749222, -0.14411915838718414, -0.21604366600513458, -0.03278689831495285, -0.049537189304828644, -0.42203760147094727, -0.417878657579422, 0.2509204149246216, -0.23217052221298218, 0.036944013088941574, -0.1274864673614502, -0.12137007713317871, -0.00140385702252388, 0.5802031755447388, -0.3909652829170227, 0.16545714437961578, -0.009616022929549217, 0.05026386305689812, 0.0005160421133041382, -0.13757815957069397, 0.4444175064563751, 0.19671235978603363, 0.15417169034481049, -0.24199295043945312, -0.41170138120651245, 0.03495727479457855, -0.07052941620349884, 0.2873360514640808, 0.12383303791284561, 0.1701887547969818, -0.020132144913077354, 1.0965392589569092, 0.3184100091457367, -0.2103506177663803, 0.06612317264080048, -0.04073634743690491, 0.26429951190948486, -0.010916680097579956, -0.3952401280403137, -0.16543960571289062, -0.1520674228668213, -0.19277971982955933, 0.0578005425632, 0.06328657269477844, -0.3083133399486542, -0.040037352591753006, 0.2140314280986786, -0.7177141308784485, -0.20804446935653687, 0.28595295548439026, -0.6640017032623291, 0.27851220965385437, 0.15919829905033112, 0.17277595400810242, -0.5495755076408386, 0.06869173049926758, 0.08213512599468231, -0.14909592270851135, 0.5069202780723572, 0.007301718462258577, -0.16759513318538666, 0.1631203591823578, 0.03673207387328148, 0.16538065671920776, 0.26244422793388367, 0.22165217995643616, -0.12357424199581146, -0.0967763289809227, -0.22733043134212494, -0.05362377688288689, 0.44563233852386475, -0.6023889780044556, 0.29666391015052795, 0.383420467376709, -0.3278227746486664, -0.16313622891902924, -0.22921554744243622, 0.12757454812526703, 0.37741944193840027, 0.17381525039672852, 0.2964751124382019, -0.02953927591443062, 0.16229550540447235, -0.07849068939685822, 0.1458640992641449, -0.2814040184020996, -0.04928018897771835, -0.045585617423057556, 0.13524380326271057, 0.14197342097759247, -0.036529622972011566, -0.22726304829120636, -0.02170765958726406, -0.05170166492462158, -0.05307876318693161, -0.4242401719093323, 0.07396815717220306, 0.25550398230552673, 0.3246225416660309, 0.5262854099273682, 0.062468718737363815, 0.43907397985458374, 0.27417129278182983, 0.03510076180100441, -0.0851442813873291, 0.5787378549575806, -0.2023313194513321, -0.19988209009170532, 0.009701723232865334, 0.2453024983406067, -0.11760623008012772, 0.0950472503900528, -0.38509881496429443, -0.19491180777549744, 0.168532133102417, -0.11467441916465759, -0.10574717074632645, -0.16606009006500244, 0.05552481859922409, 0.281884104013443, -0.5762341618537903, -0.6871485710144043, 0.40591853857040405, 0.4733216464519501, -0.4103277325630188, 0.7267811298370361, -0.5869186520576477, -0.2629712224006653, 0.20956403017044067, -0.18466314673423767, 0.7170373797416687, -0.218681201338768, -0.09955750405788422, -0.09233022481203079, 0.30790072679519653, -0.039301902055740356, -0.17248986661434174, -0.04001671075820923, -0.27097898721694946, -0.1853228211402893, -0.1254701465368271, -0.2476440668106079, 0.08484779298305511, 0.27757659554481506, 0.0025101862847805023, 0.3366931974887848, -0.24149121344089508, 0.4807325601577759, 0.018430685624480247, -0.09305089712142944, 0.17149701714515686, -0.06028107926249504, -0.30471864342689514, 0.11556950211524963, 0.07779203355312347, 0.17580881714820862, -0.059441789984703064, -0.05844481289386749, -0.11472649872303009, -0.06742264330387115, -0.3334653973579407, 0.25480538606643677, -0.61930912733078, 0.40701645612716675, -0.11859604716300964, -0.13812358677387238, -0.11806750297546387, 0.11568300426006317, 0.16506509482860565, 0.08377940952777863, -0.04017556458711624, 0.2410152554512024, 0.32645943760871887, 0.17914998531341553, 0.04176679998636246, -0.1866990625858307, 0.13898833096027374, 0.09576361626386642, -0.10712756216526031, 0.1587902158498764, -0.15443047881126404, -0.37526172399520874, -0.1760043352842331, 0.18447130918502808, 0.009122386574745178, -0.014729751273989677, -0.2240321785211563, 0.2788907587528229, 0.26172295212745667, 0.11547276377677917, 0.05109243839979172, 0.25831669569015503, 0.1049681231379509, 0.3374638557434082, -0.1267133504152298, -0.29268181324005127, 0.03194567561149597, 0.5468701124191284, 0.19485828280448914, -0.17405882477760315, 0.272388219833374, -0.17556369304656982, -0.04219482094049454, -0.033501967787742615, -0.32430365681648254, 0.1044904962182045, -0.290693998336792, 0.08634615689516068, -0.3525417149066925, 0.13696782290935516, 0.29562902450561523, -0.1516818106174469, 0.17728570103645325, 0.24084162712097168, -0.10966716706752777, -0.37954747676849365, -0.06409348547458649, -0.031176045536994934, -0.05997592583298683, 0.07217396795749664, 0.11838055402040482, -0.2975931465625763, -0.12805108726024628, 0.3315073847770691, -0.2037171721458435, 0.14262084662914276, 0.13883699476718903, 0.061269551515579224, -0.07429225742816925, 0.2138420045375824, 0.2881692945957184, -0.27103957533836365, -0.020649805665016174, 0.06421753764152527, -0.3246041536331177, -0.09577164053916931, -0.10542964935302734, 0.11952181160449982, -0.23743197321891785, 0.12653706967830658, -0.09611650556325912, -0.04526147246360779, 0.25350430607795715, -0.25838473439216614, 0.17694294452667236, 0.4429429769515991, 0.24725106358528137, -0.12137296050786972, 0.03626621514558792, -0.23719573020935059, -0.19844487309455872, 0.264401912689209, -0.19558849930763245, -0.00017390400171279907, 0.0041384282521903515, 0.3197753131389618, 0.002001605462282896, -0.0661248192191124, -0.17957468330860138, -0.16801297664642334, -0.004073403775691986, 0.1874288022518158, 0.37165364623069763, -0.15245980024337769, 0.1358596533536911, 0.13586536049842834, 0.229644775390625, 0.21645905077457428, -0.13118277490139008, 0.025959892198443413, 0.006481167860329151, 0.1072961762547493, -0.0830920934677124, 0.0035992758348584175, 0.31721240282058716, 0.16025440394878387, -0.13532355427742004, 0.2786390483379364, 0.10401542484760284, -0.0837676003575325, 0.2344512790441513, 0.03863351792097092, 0.3939882814884186, -0.3727238178253174, 0.39576268196105957, 0.21920424699783325, 0.2516991198062897, 0.14526621997356415, 0.1796540915966034, 0.11626516282558441, 0.0013627037405967712, 0.2567724287509918, 0.17827968299388885, 0.3827572762966156, 0.20700955390930176, 0.07899589091539383, -0.15745705366134644, -0.58705735206604, -0.035201821476221085, 0.3819713592529297, -0.3661758601665497, 0.5012774467468262, 0.028172623366117477, 0.05899595469236374, 0.16341839730739594, -0.316251277923584, -0.3057076930999756, 0.3864520192146301, -0.014520622789859772, -0.2368500977754593, 0.1871301531791687, -0.2024395763874054, 0.07624039053916931, 0.03899429365992546, -0.007976740598678589, 0.042783886194229126, 0.503010094165802, 0.16964833438396454, -0.221239373087883, -0.013547530397772789, -0.18846827745437622, 0.11449595540761948, 0.42676210403442383, -0.11685585975646973, 0.14672847092151642, -0.063942551612854, -0.1349024921655655, 0.04717552289366722, 0.3376619219779968, 0.4609372317790985, 0.2616268992424011, 0.11347843706607819, 0.07904547452926636, 0.4846383035182953, 0.1015988290309906, -0.2699873745441437, 0.3003549575805664, -0.0987125039100647, -0.23259715735912323, 0.15142181515693665, 0.1502109318971634, -0.09258964657783508, 0.24299904704093933, -0.20071984827518463, 0.3491632640361786, -0.26652729511260986, 0.06343208253383636, -0.133999302983284, 0.26279038190841675, -0.0019665956497192383, 0.18111485242843628, -0.04900636896491051, -0.19750149548053741, 0.7122181057929993, 0.1442074477672577, 0.2382027804851532, 0.009711294434964657, 0.05152692645788193, 0.2391054481267929, 0.16208533942699432, 0.36635735630989075, 0.05844623222947121, -0.1798635870218277, -0.05939936637878418, -0.6679869294166565, 0.017486773431301117, -0.3761492669582367, 0.21788254380226135, -0.08901140093803406, 0.21330317854881287, 0.2604070007801056, -0.08634687215089798, 0.24042850732803345, 0.0012781955301761627, 0.13346827030181885, 0.24449239671230316, -0.4332607090473175, -0.21564511954784393, -0.18346340954303741, 0.050126813352108, 0.0466088131070137, -0.4305881857872009, 0.02288731187582016, -0.05635615810751915, 0.07014671713113785, 0.04670877754688263, -0.23738956451416016, 0.19583258032798767, -0.112088143825531, 0.6440414190292358, 0.1405758559703827, 0.31960171461105347, -0.06745520234107971, 0.0807405635714531, -0.3065146803855896, -0.10407298058271408, 0.19975975155830383, 0.23398268222808838, -0.08200588822364807, 0.28142717480659485, -0.36912915110588074, 0.022073209285736084, -0.2654202878475189, -0.061853598803281784, 0.15815286338329315, 0.004935387521982193, -0.04189342260360718, -0.17688028514385223, 0.02340342104434967, 0.122774638235569, 0.1063581183552742, 0.5370635390281677, -0.19480302929878235, 0.3811495304107666, 0.012668870389461517, -0.08435419946908951, 0.2367664873600006, -0.5975601673126221, -0.05924035981297493, -0.12382646650075912, 0.28514814376831055, -0.12927183508872986, -0.07411229610443115, -0.2619340717792511, -0.033284224569797516, 0.49348336458206177, -0.20052236318588257, 0.003207642585039139, 0.07302692532539368, -0.0920792669057846, 0.2536213994026184, -0.12442861497402191, 0.07576606422662735, 0.10356039553880692, -0.07844004034996033, 0.07039384543895721, -0.20117993652820587 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
Hi ! The hash used for caching `map` results is the fingerprint of the resulting dataset. It is computed using three things: - the old fingerprint of the dataset - the hash of the function - the hash of the other parameters passed to `map` You can compute the hash of your function (or any python object) with ```python from datasets.fingerprint import Hasher my_func = lambda x: x + 1 print(Hasher.hash(my_func)) ``` If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it.
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
94
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No Hi ! The hash used for caching `map` results is the fingerprint of the resulting dataset. It is computed using three things: - the old fingerprint of the dataset - the hash of the function - the hash of the other parameters passed to `map` You can compute the hash of your function (or any python object) with ```python from datasets.fingerprint import Hasher my_func = lambda x: x + 1 print(Hasher.hash(my_func)) ``` If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it.
[ -0.2978542447090149, -0.04235486686229706, -0.07583057135343552, 0.4236164689064026, -0.07194645702838898, -0.027688875794410706, 0.23264138400554657, 0.35400390625, 0.2089606076478958, -0.0697675496339798, 0.0410519540309906, 0.18866561353206635, -0.28496962785720825, -0.2252904772758484, 0.11287032067775726, 0.2975528836250305, 0.052803635597229004, 0.11804212629795074, -0.10905729234218597, -0.15407916903495789, -0.015063995495438576, 0.2576178014278412, -0.04692354425787926, -0.09365306794643402, -0.2029935121536255, 0.10558205842971802, 0.02628200314939022, 0.13408151268959045, 0.09218045324087143, -0.27403971552848816, 0.5368281602859497, 0.09205672144889832, 0.13503634929656982, 0.5165358781814575, -0.00012106732174288481, 0.14664390683174133, 0.28590649366378784, -0.21573911607265472, -0.21815252304077148, -0.12804384529590607, -0.27888253331184387, -0.08327988535165787, -0.1238183081150055, -0.23005801439285278, -0.012047475203871727, 0.012214185670018196, -0.048112235963344574, -0.8536035418510437, 0.45994436740875244, 0.06610371917486191, 0.15654437243938446, -0.1820605993270874, -0.37966805696487427, 0.12594054639339447, 0.038267385214567184, -0.07413771748542786, 0.02057289145886898, 0.14913739264011383, 0.13223165273666382, -0.09458107501268387, -0.04124817997217178, 0.5044326186180115, -0.08291374146938324, -0.05812394991517067, 0.001679256558418274, 0.05388231202960014, 0.23300614953041077, -0.19520986080169678, 0.14594019949436188, 0.10849626362323761, 0.1963788866996765, -0.21240118145942688, -0.35019534826278687, -0.272781640291214, -0.3075910210609436, -0.21352118253707886, 0.32521650195121765, -0.15558360517024994, 0.14686736464500427, 0.1651790589094162, -0.609132707118988, -0.012385832145810127, 0.19131407141685486, -0.026544593274593353, -0.019741974771022797, -0.11297088861465454, -0.1681927889585495, 0.15201598405838013, 0.10837620496749878, -0.032003067433834076, 0.27457916736602783, -0.16574391722679138, -0.005322549492120743, 0.4561801254749298, -0.06966054439544678, 0.20847868919372559, 0.30966487526893616, 0.06381826847791672, -0.039825282990932465, 0.2631068229675293, 0.17517249286174774, 0.10681100934743881, -0.03458600118756294, -0.06441207230091095, 0.13061892986297607, 0.2133263200521469, 0.2404887080192566, 0.25229641795158386, -0.04967375844717026, -0.11468993872404099, -0.5343165397644043, 0.058686088770627975, -0.1254802644252777, -0.2830505967140198, 0.7806973457336426, 0.17872190475463867, -0.06201206520199776, -0.4015013575553894, 0.06464055180549622, 0.04148287698626518, -0.4251524806022644, -0.35264986753463745, 0.14821083843708038, 0.42278391122817993, -0.22410337626934052, 0.23589688539505005, -0.037868648767471313, -0.13864538073539734, -0.2654687762260437, 0.15462036430835724, -0.1668415367603302, -0.20380979776382446, -0.38844847679138184, 0.17960022389888763, 0.3731366693973541, -0.40052011609077454, 0.27015718817710876, 0.08726420998573303, 0.060493867844343185, -0.274897038936615, 0.16519708931446075, -0.13406546413898468, 0.5168506503105164, 0.0657958835363388, 0.005364280194044113, 0.2182987481355667, 0.15906478464603424, 0.03786395490169525, -0.22425606846809387, 0.10186782479286194, -0.5072757601737976, -0.13045962154865265, 0.31867557764053345, 0.0764244943857193, -0.23963376879692078, 0.3016882538795471, -0.20983737707138062, 0.264423668384552, 0.3779599368572235, -0.33550578355789185, -0.1166515126824379, -0.2069755494594574, -0.2666149437427521, -0.47855237126350403, 0.4195537567138672, 0.6090722680091858, -0.29462364315986633, -0.3102107048034668, -0.1382863074541092, -0.028103869408369064, -0.05990774184465408, 0.06828853487968445, -0.27635177969932556, 0.09926721453666687, -0.3678853213787079, 0.02616415172815323, 0.49277201294898987, -0.3572141230106354, -0.4876311719417572, 0.047447916120290756, 0.250859797000885, 0.5972857475280762, -0.08021176606416702, -0.14638210833072662, 0.1930469274520874, -0.22662846744060516, 0.28265124559402466, 0.11323236674070358, 0.021367307752370834, -0.1429443657398224, -0.16659758985042572, -0.10392893105745316, 0.14726603031158447, -0.12597306072711945, 0.3338220715522766, 0.16216200590133667, 0.1865675151348114, -0.12450027465820312, 0.13040974736213684, -0.04702504351735115, -0.018656136468052864, 0.31942182779312134, -0.08834047615528107, -0.046556249260902405, 0.12333841621875763, -0.2534306049346924, -0.30302509665489197, 0.4161663353443146, -0.27704083919525146, -0.5969231128692627, 0.028956875205039978, 0.04846920073032379, -0.20763033628463745, -0.06451983749866486, -0.17082005739212036, -0.24341806769371033, 0.03165174275636673, 0.2297227531671524, 0.22840246558189392, -0.02109954133629799, -0.05451832339167595, 0.5442659854888916, 0.010277407243847847, -0.27405017614364624, -0.24336637556552887, 0.1692321002483368, 0.25763434171676636, -0.17161321640014648, -0.3055514395236969, 0.08769211918115616, 0.3064356744289398, -0.14919063448905945, -0.1570720374584198, 0.16958929598331451, 0.059494778513908386, 0.201369047164917, -0.2249583601951599, 0.2929282784461975, -0.16005393862724304, -0.12229612469673157, 0.15848328173160553, 0.028426462784409523, -0.041613418608903885, -0.16369611024856567, -0.023924648761749268, 0.32783907651901245, 0.16893087327480316, 0.0020599663257598877, 0.05164988338947296, -0.1860271394252777, 0.18950951099395752, -0.10541248321533203, -0.11753493547439575, -0.2751550078392029, 0.15478552877902985, -0.18861187994480133, 0.4881468415260315, 0.23946313560009003, 0.08603671193122864, 0.17198625206947327, 0.4886363744735718, 0.2141721397638321, 0.13402071595191956, -0.05347897857427597, -0.31662648916244507, -0.17914509773254395, -0.18317101895809174, 0.0051267631351947784, 0.1620589941740036, -0.0005773779121227562, -0.021061580628156662, -0.02335158921778202, 0.01799336075782776, 0.2533576786518097, 0.07798892259597778, -0.23412813246250153, 0.34701284766197205, 0.14445774257183075, 0.11984878778457642, 0.035920631140470505, -0.17442667484283447, 0.045837510377168655, 0.12112078815698624, -0.04108636826276779, -0.46686887741088867, 0.13646437227725983, -0.3292939364910126, 0.27197960019111633, -0.24520280957221985, -0.0638304129242897, 0.028657419607043266, -0.22461801767349243, -0.19197432696819305, 0.3194692134857178, 0.28801870346069336, 0.21441060304641724, -0.3410937786102295, 0.1146630123257637, -0.18947289884090424, -0.1603948324918747, -0.010080255568027496, -0.11313475668430328, -0.348911315202713, -0.008692733943462372, 0.1438349038362503, -0.20550206303596497, 0.20750156044960022, -0.025598488748073578, -0.14011193811893463, -0.26771053671836853, -0.3595719039440155, 0.09351232647895813, 0.2070465385913849, 0.34555718302726746, -0.2412908375263214, -0.09006722271442413, -0.20699408650398254, -0.06373872607946396, 0.17087310552597046, -0.23139113187789917, -0.14288429915905, -0.06841858476400375, -0.005726470611989498, 0.08650512248277664, 0.09386354684829712, -0.4032764434814453, -0.3004498779773712, 0.06979775428771973, -0.10724906623363495, -0.08476309478282928, 0.03768627345561981, 0.07339037209749222, -0.14411915838718414, -0.21604366600513458, -0.03278689831495285, -0.049537189304828644, -0.42203760147094727, -0.417878657579422, 0.2509204149246216, -0.23217052221298218, 0.036944013088941574, -0.1274864673614502, -0.12137007713317871, -0.00140385702252388, 0.5802031755447388, -0.3909652829170227, 0.16545714437961578, -0.009616022929549217, 0.05026386305689812, 0.0005160421133041382, -0.13757815957069397, 0.4444175064563751, 0.19671235978603363, 0.15417169034481049, -0.24199295043945312, -0.41170138120651245, 0.03495727479457855, -0.07052941620349884, 0.2873360514640808, 0.12383303791284561, 0.1701887547969818, -0.020132144913077354, 1.0965392589569092, 0.3184100091457367, -0.2103506177663803, 0.06612317264080048, -0.04073634743690491, 0.26429951190948486, -0.010916680097579956, -0.3952401280403137, -0.16543960571289062, -0.1520674228668213, -0.19277971982955933, 0.0578005425632, 0.06328657269477844, -0.3083133399486542, -0.040037352591753006, 0.2140314280986786, -0.7177141308784485, -0.20804446935653687, 0.28595295548439026, -0.6640017032623291, 0.27851220965385437, 0.15919829905033112, 0.17277595400810242, -0.5495755076408386, 0.06869173049926758, 0.08213512599468231, -0.14909592270851135, 0.5069202780723572, 0.007301718462258577, -0.16759513318538666, 0.1631203591823578, 0.03673207387328148, 0.16538065671920776, 0.26244422793388367, 0.22165217995643616, -0.12357424199581146, -0.0967763289809227, -0.22733043134212494, -0.05362377688288689, 0.44563233852386475, -0.6023889780044556, 0.29666391015052795, 0.383420467376709, -0.3278227746486664, -0.16313622891902924, -0.22921554744243622, 0.12757454812526703, 0.37741944193840027, 0.17381525039672852, 0.2964751124382019, -0.02953927591443062, 0.16229550540447235, -0.07849068939685822, 0.1458640992641449, -0.2814040184020996, -0.04928018897771835, -0.045585617423057556, 0.13524380326271057, 0.14197342097759247, -0.036529622972011566, -0.22726304829120636, -0.02170765958726406, -0.05170166492462158, -0.05307876318693161, -0.4242401719093323, 0.07396815717220306, 0.25550398230552673, 0.3246225416660309, 0.5262854099273682, 0.062468718737363815, 0.43907397985458374, 0.27417129278182983, 0.03510076180100441, -0.0851442813873291, 0.5787378549575806, -0.2023313194513321, -0.19988209009170532, 0.009701723232865334, 0.2453024983406067, -0.11760623008012772, 0.0950472503900528, -0.38509881496429443, -0.19491180777549744, 0.168532133102417, -0.11467441916465759, -0.10574717074632645, -0.16606009006500244, 0.05552481859922409, 0.281884104013443, -0.5762341618537903, -0.6871485710144043, 0.40591853857040405, 0.4733216464519501, -0.4103277325630188, 0.7267811298370361, -0.5869186520576477, -0.2629712224006653, 0.20956403017044067, -0.18466314673423767, 0.7170373797416687, -0.218681201338768, -0.09955750405788422, -0.09233022481203079, 0.30790072679519653, -0.039301902055740356, -0.17248986661434174, -0.04001671075820923, -0.27097898721694946, -0.1853228211402893, -0.1254701465368271, -0.2476440668106079, 0.08484779298305511, 0.27757659554481506, 0.0025101862847805023, 0.3366931974887848, -0.24149121344089508, 0.4807325601577759, 0.018430685624480247, -0.09305089712142944, 0.17149701714515686, -0.06028107926249504, -0.30471864342689514, 0.11556950211524963, 0.07779203355312347, 0.17580881714820862, -0.059441789984703064, -0.05844481289386749, -0.11472649872303009, -0.06742264330387115, -0.3334653973579407, 0.25480538606643677, -0.61930912733078, 0.40701645612716675, -0.11859604716300964, -0.13812358677387238, -0.11806750297546387, 0.11568300426006317, 0.16506509482860565, 0.08377940952777863, -0.04017556458711624, 0.2410152554512024, 0.32645943760871887, 0.17914998531341553, 0.04176679998636246, -0.1866990625858307, 0.13898833096027374, 0.09576361626386642, -0.10712756216526031, 0.1587902158498764, -0.15443047881126404, -0.37526172399520874, -0.1760043352842331, 0.18447130918502808, 0.009122386574745178, -0.014729751273989677, -0.2240321785211563, 0.2788907587528229, 0.26172295212745667, 0.11547276377677917, 0.05109243839979172, 0.25831669569015503, 0.1049681231379509, 0.3374638557434082, -0.1267133504152298, -0.29268181324005127, 0.03194567561149597, 0.5468701124191284, 0.19485828280448914, -0.17405882477760315, 0.272388219833374, -0.17556369304656982, -0.04219482094049454, -0.033501967787742615, -0.32430365681648254, 0.1044904962182045, -0.290693998336792, 0.08634615689516068, -0.3525417149066925, 0.13696782290935516, 0.29562902450561523, -0.1516818106174469, 0.17728570103645325, 0.24084162712097168, -0.10966716706752777, -0.37954747676849365, -0.06409348547458649, -0.031176045536994934, -0.05997592583298683, 0.07217396795749664, 0.11838055402040482, -0.2975931465625763, -0.12805108726024628, 0.3315073847770691, -0.2037171721458435, 0.14262084662914276, 0.13883699476718903, 0.061269551515579224, -0.07429225742816925, 0.2138420045375824, 0.2881692945957184, -0.27103957533836365, -0.020649805665016174, 0.06421753764152527, -0.3246041536331177, -0.09577164053916931, -0.10542964935302734, 0.11952181160449982, -0.23743197321891785, 0.12653706967830658, -0.09611650556325912, -0.04526147246360779, 0.25350430607795715, -0.25838473439216614, 0.17694294452667236, 0.4429429769515991, 0.24725106358528137, -0.12137296050786972, 0.03626621514558792, -0.23719573020935059, -0.19844487309455872, 0.264401912689209, -0.19558849930763245, -0.00017390400171279907, 0.0041384282521903515, 0.3197753131389618, 0.002001605462282896, -0.0661248192191124, -0.17957468330860138, -0.16801297664642334, -0.004073403775691986, 0.1874288022518158, 0.37165364623069763, -0.15245980024337769, 0.1358596533536911, 0.13586536049842834, 0.229644775390625, 0.21645905077457428, -0.13118277490139008, 0.025959892198443413, 0.006481167860329151, 0.1072961762547493, -0.0830920934677124, 0.0035992758348584175, 0.31721240282058716, 0.16025440394878387, -0.13532355427742004, 0.2786390483379364, 0.10401542484760284, -0.0837676003575325, 0.2344512790441513, 0.03863351792097092, 0.3939882814884186, -0.3727238178253174, 0.39576268196105957, 0.21920424699783325, 0.2516991198062897, 0.14526621997356415, 0.1796540915966034, 0.11626516282558441, 0.0013627037405967712, 0.2567724287509918, 0.17827968299388885, 0.3827572762966156, 0.20700955390930176, 0.07899589091539383, -0.15745705366134644, -0.58705735206604, -0.035201821476221085, 0.3819713592529297, -0.3661758601665497, 0.5012774467468262, 0.028172623366117477, 0.05899595469236374, 0.16341839730739594, -0.316251277923584, -0.3057076930999756, 0.3864520192146301, -0.014520622789859772, -0.2368500977754593, 0.1871301531791687, -0.2024395763874054, 0.07624039053916931, 0.03899429365992546, -0.007976740598678589, 0.042783886194229126, 0.503010094165802, 0.16964833438396454, -0.221239373087883, -0.013547530397772789, -0.18846827745437622, 0.11449595540761948, 0.42676210403442383, -0.11685585975646973, 0.14672847092151642, -0.063942551612854, -0.1349024921655655, 0.04717552289366722, 0.3376619219779968, 0.4609372317790985, 0.2616268992424011, 0.11347843706607819, 0.07904547452926636, 0.4846383035182953, 0.1015988290309906, -0.2699873745441437, 0.3003549575805664, -0.0987125039100647, -0.23259715735912323, 0.15142181515693665, 0.1502109318971634, -0.09258964657783508, 0.24299904704093933, -0.20071984827518463, 0.3491632640361786, -0.26652729511260986, 0.06343208253383636, -0.133999302983284, 0.26279038190841675, -0.0019665956497192383, 0.18111485242843628, -0.04900636896491051, -0.19750149548053741, 0.7122181057929993, 0.1442074477672577, 0.2382027804851532, 0.009711294434964657, 0.05152692645788193, 0.2391054481267929, 0.16208533942699432, 0.36635735630989075, 0.05844623222947121, -0.1798635870218277, -0.05939936637878418, -0.6679869294166565, 0.017486773431301117, -0.3761492669582367, 0.21788254380226135, -0.08901140093803406, 0.21330317854881287, 0.2604070007801056, -0.08634687215089798, 0.24042850732803345, 0.0012781955301761627, 0.13346827030181885, 0.24449239671230316, -0.4332607090473175, -0.21564511954784393, -0.18346340954303741, 0.050126813352108, 0.0466088131070137, -0.4305881857872009, 0.02288731187582016, -0.05635615810751915, 0.07014671713113785, 0.04670877754688263, -0.23738956451416016, 0.19583258032798767, -0.112088143825531, 0.6440414190292358, 0.1405758559703827, 0.31960171461105347, -0.06745520234107971, 0.0807405635714531, -0.3065146803855896, -0.10407298058271408, 0.19975975155830383, 0.23398268222808838, -0.08200588822364807, 0.28142717480659485, -0.36912915110588074, 0.022073209285736084, -0.2654202878475189, -0.061853598803281784, 0.15815286338329315, 0.004935387521982193, -0.04189342260360718, -0.17688028514385223, 0.02340342104434967, 0.122774638235569, 0.1063581183552742, 0.5370635390281677, -0.19480302929878235, 0.3811495304107666, 0.012668870389461517, -0.08435419946908951, 0.2367664873600006, -0.5975601673126221, -0.05924035981297493, -0.12382646650075912, 0.28514814376831055, -0.12927183508872986, -0.07411229610443115, -0.2619340717792511, -0.033284224569797516, 0.49348336458206177, -0.20052236318588257, 0.003207642585039139, 0.07302692532539368, -0.0920792669057846, 0.2536213994026184, -0.12442861497402191, 0.07576606422662735, 0.10356039553880692, -0.07844004034996033, 0.07039384543895721, -0.20117993652820587 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
> If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it. Yes I think that was the issue. For the hash of the function: * does it consider just the name or the actual code of the function * does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here)
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
70
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No > If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it. Yes I think that was the issue. For the hash of the function: * does it consider just the name or the actual code of the function * does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here)
[ -0.2978542447090149, -0.04235486686229706, -0.07583057135343552, 0.4236164689064026, -0.07194645702838898, -0.027688875794410706, 0.23264138400554657, 0.35400390625, 0.2089606076478958, -0.0697675496339798, 0.0410519540309906, 0.18866561353206635, -0.28496962785720825, -0.2252904772758484, 0.11287032067775726, 0.2975528836250305, 0.052803635597229004, 0.11804212629795074, -0.10905729234218597, -0.15407916903495789, -0.015063995495438576, 0.2576178014278412, -0.04692354425787926, -0.09365306794643402, -0.2029935121536255, 0.10558205842971802, 0.02628200314939022, 0.13408151268959045, 0.09218045324087143, -0.27403971552848816, 0.5368281602859497, 0.09205672144889832, 0.13503634929656982, 0.5165358781814575, -0.00012106732174288481, 0.14664390683174133, 0.28590649366378784, -0.21573911607265472, -0.21815252304077148, -0.12804384529590607, -0.27888253331184387, -0.08327988535165787, -0.1238183081150055, -0.23005801439285278, -0.012047475203871727, 0.012214185670018196, -0.048112235963344574, -0.8536035418510437, 0.45994436740875244, 0.06610371917486191, 0.15654437243938446, -0.1820605993270874, -0.37966805696487427, 0.12594054639339447, 0.038267385214567184, -0.07413771748542786, 0.02057289145886898, 0.14913739264011383, 0.13223165273666382, -0.09458107501268387, -0.04124817997217178, 0.5044326186180115, -0.08291374146938324, -0.05812394991517067, 0.001679256558418274, 0.05388231202960014, 0.23300614953041077, -0.19520986080169678, 0.14594019949436188, 0.10849626362323761, 0.1963788866996765, -0.21240118145942688, -0.35019534826278687, -0.272781640291214, -0.3075910210609436, -0.21352118253707886, 0.32521650195121765, -0.15558360517024994, 0.14686736464500427, 0.1651790589094162, -0.609132707118988, -0.012385832145810127, 0.19131407141685486, -0.026544593274593353, -0.019741974771022797, -0.11297088861465454, -0.1681927889585495, 0.15201598405838013, 0.10837620496749878, -0.032003067433834076, 0.27457916736602783, -0.16574391722679138, -0.005322549492120743, 0.4561801254749298, -0.06966054439544678, 0.20847868919372559, 0.30966487526893616, 0.06381826847791672, -0.039825282990932465, 0.2631068229675293, 0.17517249286174774, 0.10681100934743881, -0.03458600118756294, -0.06441207230091095, 0.13061892986297607, 0.2133263200521469, 0.2404887080192566, 0.25229641795158386, -0.04967375844717026, -0.11468993872404099, -0.5343165397644043, 0.058686088770627975, -0.1254802644252777, -0.2830505967140198, 0.7806973457336426, 0.17872190475463867, -0.06201206520199776, -0.4015013575553894, 0.06464055180549622, 0.04148287698626518, -0.4251524806022644, -0.35264986753463745, 0.14821083843708038, 0.42278391122817993, -0.22410337626934052, 0.23589688539505005, -0.037868648767471313, -0.13864538073539734, -0.2654687762260437, 0.15462036430835724, -0.1668415367603302, -0.20380979776382446, -0.38844847679138184, 0.17960022389888763, 0.3731366693973541, -0.40052011609077454, 0.27015718817710876, 0.08726420998573303, 0.060493867844343185, -0.274897038936615, 0.16519708931446075, -0.13406546413898468, 0.5168506503105164, 0.0657958835363388, 0.005364280194044113, 0.2182987481355667, 0.15906478464603424, 0.03786395490169525, -0.22425606846809387, 0.10186782479286194, -0.5072757601737976, -0.13045962154865265, 0.31867557764053345, 0.0764244943857193, -0.23963376879692078, 0.3016882538795471, -0.20983737707138062, 0.264423668384552, 0.3779599368572235, -0.33550578355789185, -0.1166515126824379, -0.2069755494594574, -0.2666149437427521, -0.47855237126350403, 0.4195537567138672, 0.6090722680091858, -0.29462364315986633, -0.3102107048034668, -0.1382863074541092, -0.028103869408369064, -0.05990774184465408, 0.06828853487968445, -0.27635177969932556, 0.09926721453666687, -0.3678853213787079, 0.02616415172815323, 0.49277201294898987, -0.3572141230106354, -0.4876311719417572, 0.047447916120290756, 0.250859797000885, 0.5972857475280762, -0.08021176606416702, -0.14638210833072662, 0.1930469274520874, -0.22662846744060516, 0.28265124559402466, 0.11323236674070358, 0.021367307752370834, -0.1429443657398224, -0.16659758985042572, -0.10392893105745316, 0.14726603031158447, -0.12597306072711945, 0.3338220715522766, 0.16216200590133667, 0.1865675151348114, -0.12450027465820312, 0.13040974736213684, -0.04702504351735115, -0.018656136468052864, 0.31942182779312134, -0.08834047615528107, -0.046556249260902405, 0.12333841621875763, -0.2534306049346924, -0.30302509665489197, 0.4161663353443146, -0.27704083919525146, -0.5969231128692627, 0.028956875205039978, 0.04846920073032379, -0.20763033628463745, -0.06451983749866486, -0.17082005739212036, -0.24341806769371033, 0.03165174275636673, 0.2297227531671524, 0.22840246558189392, -0.02109954133629799, -0.05451832339167595, 0.5442659854888916, 0.010277407243847847, -0.27405017614364624, -0.24336637556552887, 0.1692321002483368, 0.25763434171676636, -0.17161321640014648, -0.3055514395236969, 0.08769211918115616, 0.3064356744289398, -0.14919063448905945, -0.1570720374584198, 0.16958929598331451, 0.059494778513908386, 0.201369047164917, -0.2249583601951599, 0.2929282784461975, -0.16005393862724304, -0.12229612469673157, 0.15848328173160553, 0.028426462784409523, -0.041613418608903885, -0.16369611024856567, -0.023924648761749268, 0.32783907651901245, 0.16893087327480316, 0.0020599663257598877, 0.05164988338947296, -0.1860271394252777, 0.18950951099395752, -0.10541248321533203, -0.11753493547439575, -0.2751550078392029, 0.15478552877902985, -0.18861187994480133, 0.4881468415260315, 0.23946313560009003, 0.08603671193122864, 0.17198625206947327, 0.4886363744735718, 0.2141721397638321, 0.13402071595191956, -0.05347897857427597, -0.31662648916244507, -0.17914509773254395, -0.18317101895809174, 0.0051267631351947784, 0.1620589941740036, -0.0005773779121227562, -0.021061580628156662, -0.02335158921778202, 0.01799336075782776, 0.2533576786518097, 0.07798892259597778, -0.23412813246250153, 0.34701284766197205, 0.14445774257183075, 0.11984878778457642, 0.035920631140470505, -0.17442667484283447, 0.045837510377168655, 0.12112078815698624, -0.04108636826276779, -0.46686887741088867, 0.13646437227725983, -0.3292939364910126, 0.27197960019111633, -0.24520280957221985, -0.0638304129242897, 0.028657419607043266, -0.22461801767349243, -0.19197432696819305, 0.3194692134857178, 0.28801870346069336, 0.21441060304641724, -0.3410937786102295, 0.1146630123257637, -0.18947289884090424, -0.1603948324918747, -0.010080255568027496, -0.11313475668430328, -0.348911315202713, -0.008692733943462372, 0.1438349038362503, -0.20550206303596497, 0.20750156044960022, -0.025598488748073578, -0.14011193811893463, -0.26771053671836853, -0.3595719039440155, 0.09351232647895813, 0.2070465385913849, 0.34555718302726746, -0.2412908375263214, -0.09006722271442413, -0.20699408650398254, -0.06373872607946396, 0.17087310552597046, -0.23139113187789917, -0.14288429915905, -0.06841858476400375, -0.005726470611989498, 0.08650512248277664, 0.09386354684829712, -0.4032764434814453, -0.3004498779773712, 0.06979775428771973, -0.10724906623363495, -0.08476309478282928, 0.03768627345561981, 0.07339037209749222, -0.14411915838718414, -0.21604366600513458, -0.03278689831495285, -0.049537189304828644, -0.42203760147094727, -0.417878657579422, 0.2509204149246216, -0.23217052221298218, 0.036944013088941574, -0.1274864673614502, -0.12137007713317871, -0.00140385702252388, 0.5802031755447388, -0.3909652829170227, 0.16545714437961578, -0.009616022929549217, 0.05026386305689812, 0.0005160421133041382, -0.13757815957069397, 0.4444175064563751, 0.19671235978603363, 0.15417169034481049, -0.24199295043945312, -0.41170138120651245, 0.03495727479457855, -0.07052941620349884, 0.2873360514640808, 0.12383303791284561, 0.1701887547969818, -0.020132144913077354, 1.0965392589569092, 0.3184100091457367, -0.2103506177663803, 0.06612317264080048, -0.04073634743690491, 0.26429951190948486, -0.010916680097579956, -0.3952401280403137, -0.16543960571289062, -0.1520674228668213, -0.19277971982955933, 0.0578005425632, 0.06328657269477844, -0.3083133399486542, -0.040037352591753006, 0.2140314280986786, -0.7177141308784485, -0.20804446935653687, 0.28595295548439026, -0.6640017032623291, 0.27851220965385437, 0.15919829905033112, 0.17277595400810242, -0.5495755076408386, 0.06869173049926758, 0.08213512599468231, -0.14909592270851135, 0.5069202780723572, 0.007301718462258577, -0.16759513318538666, 0.1631203591823578, 0.03673207387328148, 0.16538065671920776, 0.26244422793388367, 0.22165217995643616, -0.12357424199581146, -0.0967763289809227, -0.22733043134212494, -0.05362377688288689, 0.44563233852386475, -0.6023889780044556, 0.29666391015052795, 0.383420467376709, -0.3278227746486664, -0.16313622891902924, -0.22921554744243622, 0.12757454812526703, 0.37741944193840027, 0.17381525039672852, 0.2964751124382019, -0.02953927591443062, 0.16229550540447235, -0.07849068939685822, 0.1458640992641449, -0.2814040184020996, -0.04928018897771835, -0.045585617423057556, 0.13524380326271057, 0.14197342097759247, -0.036529622972011566, -0.22726304829120636, -0.02170765958726406, -0.05170166492462158, -0.05307876318693161, -0.4242401719093323, 0.07396815717220306, 0.25550398230552673, 0.3246225416660309, 0.5262854099273682, 0.062468718737363815, 0.43907397985458374, 0.27417129278182983, 0.03510076180100441, -0.0851442813873291, 0.5787378549575806, -0.2023313194513321, -0.19988209009170532, 0.009701723232865334, 0.2453024983406067, -0.11760623008012772, 0.0950472503900528, -0.38509881496429443, -0.19491180777549744, 0.168532133102417, -0.11467441916465759, -0.10574717074632645, -0.16606009006500244, 0.05552481859922409, 0.281884104013443, -0.5762341618537903, -0.6871485710144043, 0.40591853857040405, 0.4733216464519501, -0.4103277325630188, 0.7267811298370361, -0.5869186520576477, -0.2629712224006653, 0.20956403017044067, -0.18466314673423767, 0.7170373797416687, -0.218681201338768, -0.09955750405788422, -0.09233022481203079, 0.30790072679519653, -0.039301902055740356, -0.17248986661434174, -0.04001671075820923, -0.27097898721694946, -0.1853228211402893, -0.1254701465368271, -0.2476440668106079, 0.08484779298305511, 0.27757659554481506, 0.0025101862847805023, 0.3366931974887848, -0.24149121344089508, 0.4807325601577759, 0.018430685624480247, -0.09305089712142944, 0.17149701714515686, -0.06028107926249504, -0.30471864342689514, 0.11556950211524963, 0.07779203355312347, 0.17580881714820862, -0.059441789984703064, -0.05844481289386749, -0.11472649872303009, -0.06742264330387115, -0.3334653973579407, 0.25480538606643677, -0.61930912733078, 0.40701645612716675, -0.11859604716300964, -0.13812358677387238, -0.11806750297546387, 0.11568300426006317, 0.16506509482860565, 0.08377940952777863, -0.04017556458711624, 0.2410152554512024, 0.32645943760871887, 0.17914998531341553, 0.04176679998636246, -0.1866990625858307, 0.13898833096027374, 0.09576361626386642, -0.10712756216526031, 0.1587902158498764, -0.15443047881126404, -0.37526172399520874, -0.1760043352842331, 0.18447130918502808, 0.009122386574745178, -0.014729751273989677, -0.2240321785211563, 0.2788907587528229, 0.26172295212745667, 0.11547276377677917, 0.05109243839979172, 0.25831669569015503, 0.1049681231379509, 0.3374638557434082, -0.1267133504152298, -0.29268181324005127, 0.03194567561149597, 0.5468701124191284, 0.19485828280448914, -0.17405882477760315, 0.272388219833374, -0.17556369304656982, -0.04219482094049454, -0.033501967787742615, -0.32430365681648254, 0.1044904962182045, -0.290693998336792, 0.08634615689516068, -0.3525417149066925, 0.13696782290935516, 0.29562902450561523, -0.1516818106174469, 0.17728570103645325, 0.24084162712097168, -0.10966716706752777, -0.37954747676849365, -0.06409348547458649, -0.031176045536994934, -0.05997592583298683, 0.07217396795749664, 0.11838055402040482, -0.2975931465625763, -0.12805108726024628, 0.3315073847770691, -0.2037171721458435, 0.14262084662914276, 0.13883699476718903, 0.061269551515579224, -0.07429225742816925, 0.2138420045375824, 0.2881692945957184, -0.27103957533836365, -0.020649805665016174, 0.06421753764152527, -0.3246041536331177, -0.09577164053916931, -0.10542964935302734, 0.11952181160449982, -0.23743197321891785, 0.12653706967830658, -0.09611650556325912, -0.04526147246360779, 0.25350430607795715, -0.25838473439216614, 0.17694294452667236, 0.4429429769515991, 0.24725106358528137, -0.12137296050786972, 0.03626621514558792, -0.23719573020935059, -0.19844487309455872, 0.264401912689209, -0.19558849930763245, -0.00017390400171279907, 0.0041384282521903515, 0.3197753131389618, 0.002001605462282896, -0.0661248192191124, -0.17957468330860138, -0.16801297664642334, -0.004073403775691986, 0.1874288022518158, 0.37165364623069763, -0.15245980024337769, 0.1358596533536911, 0.13586536049842834, 0.229644775390625, 0.21645905077457428, -0.13118277490139008, 0.025959892198443413, 0.006481167860329151, 0.1072961762547493, -0.0830920934677124, 0.0035992758348584175, 0.31721240282058716, 0.16025440394878387, -0.13532355427742004, 0.2786390483379364, 0.10401542484760284, -0.0837676003575325, 0.2344512790441513, 0.03863351792097092, 0.3939882814884186, -0.3727238178253174, 0.39576268196105957, 0.21920424699783325, 0.2516991198062897, 0.14526621997356415, 0.1796540915966034, 0.11626516282558441, 0.0013627037405967712, 0.2567724287509918, 0.17827968299388885, 0.3827572762966156, 0.20700955390930176, 0.07899589091539383, -0.15745705366134644, -0.58705735206604, -0.035201821476221085, 0.3819713592529297, -0.3661758601665497, 0.5012774467468262, 0.028172623366117477, 0.05899595469236374, 0.16341839730739594, -0.316251277923584, -0.3057076930999756, 0.3864520192146301, -0.014520622789859772, -0.2368500977754593, 0.1871301531791687, -0.2024395763874054, 0.07624039053916931, 0.03899429365992546, -0.007976740598678589, 0.042783886194229126, 0.503010094165802, 0.16964833438396454, -0.221239373087883, -0.013547530397772789, -0.18846827745437622, 0.11449595540761948, 0.42676210403442383, -0.11685585975646973, 0.14672847092151642, -0.063942551612854, -0.1349024921655655, 0.04717552289366722, 0.3376619219779968, 0.4609372317790985, 0.2616268992424011, 0.11347843706607819, 0.07904547452926636, 0.4846383035182953, 0.1015988290309906, -0.2699873745441437, 0.3003549575805664, -0.0987125039100647, -0.23259715735912323, 0.15142181515693665, 0.1502109318971634, -0.09258964657783508, 0.24299904704093933, -0.20071984827518463, 0.3491632640361786, -0.26652729511260986, 0.06343208253383636, -0.133999302983284, 0.26279038190841675, -0.0019665956497192383, 0.18111485242843628, -0.04900636896491051, -0.19750149548053741, 0.7122181057929993, 0.1442074477672577, 0.2382027804851532, 0.009711294434964657, 0.05152692645788193, 0.2391054481267929, 0.16208533942699432, 0.36635735630989075, 0.05844623222947121, -0.1798635870218277, -0.05939936637878418, -0.6679869294166565, 0.017486773431301117, -0.3761492669582367, 0.21788254380226135, -0.08901140093803406, 0.21330317854881287, 0.2604070007801056, -0.08634687215089798, 0.24042850732803345, 0.0012781955301761627, 0.13346827030181885, 0.24449239671230316, -0.4332607090473175, -0.21564511954784393, -0.18346340954303741, 0.050126813352108, 0.0466088131070137, -0.4305881857872009, 0.02288731187582016, -0.05635615810751915, 0.07014671713113785, 0.04670877754688263, -0.23738956451416016, 0.19583258032798767, -0.112088143825531, 0.6440414190292358, 0.1405758559703827, 0.31960171461105347, -0.06745520234107971, 0.0807405635714531, -0.3065146803855896, -0.10407298058271408, 0.19975975155830383, 0.23398268222808838, -0.08200588822364807, 0.28142717480659485, -0.36912915110588074, 0.022073209285736084, -0.2654202878475189, -0.061853598803281784, 0.15815286338329315, 0.004935387521982193, -0.04189342260360718, -0.17688028514385223, 0.02340342104434967, 0.122774638235569, 0.1063581183552742, 0.5370635390281677, -0.19480302929878235, 0.3811495304107666, 0.012668870389461517, -0.08435419946908951, 0.2367664873600006, -0.5975601673126221, -0.05924035981297493, -0.12382646650075912, 0.28514814376831055, -0.12927183508872986, -0.07411229610443115, -0.2619340717792511, -0.033284224569797516, 0.49348336458206177, -0.20052236318588257, 0.003207642585039139, 0.07302692532539368, -0.0920792669057846, 0.2536213994026184, -0.12442861497402191, 0.07576606422662735, 0.10356039553880692, -0.07844004034996033, 0.07039384543895721, -0.20117993652820587 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
> does it consider just the name or the actual code of the function It looks at the name and the actual code and all variables such as recursively. It uses `dill` to do so, which is based on `pickle`. Basically the hash is computed using the pickle bytes of your function (computed using `dill` to support most python objects). > does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here) Yes it does thanks to recursive pickling.
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
87
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No > does it consider just the name or the actual code of the function It looks at the name and the actual code and all variables such as recursively. It uses `dill` to do so, which is based on `pickle`. Basically the hash is computed using the pickle bytes of your function (computed using `dill` to support most python objects). > does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here) Yes it does thanks to recursive pickling.
[ -0.2978542447090149, -0.04235486686229706, -0.07583057135343552, 0.4236164689064026, -0.07194645702838898, -0.027688875794410706, 0.23264138400554657, 0.35400390625, 0.2089606076478958, -0.0697675496339798, 0.0410519540309906, 0.18866561353206635, -0.28496962785720825, -0.2252904772758484, 0.11287032067775726, 0.2975528836250305, 0.052803635597229004, 0.11804212629795074, -0.10905729234218597, -0.15407916903495789, -0.015063995495438576, 0.2576178014278412, -0.04692354425787926, -0.09365306794643402, -0.2029935121536255, 0.10558205842971802, 0.02628200314939022, 0.13408151268959045, 0.09218045324087143, -0.27403971552848816, 0.5368281602859497, 0.09205672144889832, 0.13503634929656982, 0.5165358781814575, -0.00012106732174288481, 0.14664390683174133, 0.28590649366378784, -0.21573911607265472, -0.21815252304077148, -0.12804384529590607, -0.27888253331184387, -0.08327988535165787, -0.1238183081150055, -0.23005801439285278, -0.012047475203871727, 0.012214185670018196, -0.048112235963344574, -0.8536035418510437, 0.45994436740875244, 0.06610371917486191, 0.15654437243938446, -0.1820605993270874, -0.37966805696487427, 0.12594054639339447, 0.038267385214567184, -0.07413771748542786, 0.02057289145886898, 0.14913739264011383, 0.13223165273666382, -0.09458107501268387, -0.04124817997217178, 0.5044326186180115, -0.08291374146938324, -0.05812394991517067, 0.001679256558418274, 0.05388231202960014, 0.23300614953041077, -0.19520986080169678, 0.14594019949436188, 0.10849626362323761, 0.1963788866996765, -0.21240118145942688, -0.35019534826278687, -0.272781640291214, -0.3075910210609436, -0.21352118253707886, 0.32521650195121765, -0.15558360517024994, 0.14686736464500427, 0.1651790589094162, -0.609132707118988, -0.012385832145810127, 0.19131407141685486, -0.026544593274593353, -0.019741974771022797, -0.11297088861465454, -0.1681927889585495, 0.15201598405838013, 0.10837620496749878, -0.032003067433834076, 0.27457916736602783, -0.16574391722679138, -0.005322549492120743, 0.4561801254749298, -0.06966054439544678, 0.20847868919372559, 0.30966487526893616, 0.06381826847791672, -0.039825282990932465, 0.2631068229675293, 0.17517249286174774, 0.10681100934743881, -0.03458600118756294, -0.06441207230091095, 0.13061892986297607, 0.2133263200521469, 0.2404887080192566, 0.25229641795158386, -0.04967375844717026, -0.11468993872404099, -0.5343165397644043, 0.058686088770627975, -0.1254802644252777, -0.2830505967140198, 0.7806973457336426, 0.17872190475463867, -0.06201206520199776, -0.4015013575553894, 0.06464055180549622, 0.04148287698626518, -0.4251524806022644, -0.35264986753463745, 0.14821083843708038, 0.42278391122817993, -0.22410337626934052, 0.23589688539505005, -0.037868648767471313, -0.13864538073539734, -0.2654687762260437, 0.15462036430835724, -0.1668415367603302, -0.20380979776382446, -0.38844847679138184, 0.17960022389888763, 0.3731366693973541, -0.40052011609077454, 0.27015718817710876, 0.08726420998573303, 0.060493867844343185, -0.274897038936615, 0.16519708931446075, -0.13406546413898468, 0.5168506503105164, 0.0657958835363388, 0.005364280194044113, 0.2182987481355667, 0.15906478464603424, 0.03786395490169525, -0.22425606846809387, 0.10186782479286194, -0.5072757601737976, -0.13045962154865265, 0.31867557764053345, 0.0764244943857193, -0.23963376879692078, 0.3016882538795471, -0.20983737707138062, 0.264423668384552, 0.3779599368572235, -0.33550578355789185, -0.1166515126824379, -0.2069755494594574, -0.2666149437427521, -0.47855237126350403, 0.4195537567138672, 0.6090722680091858, -0.29462364315986633, -0.3102107048034668, -0.1382863074541092, -0.028103869408369064, -0.05990774184465408, 0.06828853487968445, -0.27635177969932556, 0.09926721453666687, -0.3678853213787079, 0.02616415172815323, 0.49277201294898987, -0.3572141230106354, -0.4876311719417572, 0.047447916120290756, 0.250859797000885, 0.5972857475280762, -0.08021176606416702, -0.14638210833072662, 0.1930469274520874, -0.22662846744060516, 0.28265124559402466, 0.11323236674070358, 0.021367307752370834, -0.1429443657398224, -0.16659758985042572, -0.10392893105745316, 0.14726603031158447, -0.12597306072711945, 0.3338220715522766, 0.16216200590133667, 0.1865675151348114, -0.12450027465820312, 0.13040974736213684, -0.04702504351735115, -0.018656136468052864, 0.31942182779312134, -0.08834047615528107, -0.046556249260902405, 0.12333841621875763, -0.2534306049346924, -0.30302509665489197, 0.4161663353443146, -0.27704083919525146, -0.5969231128692627, 0.028956875205039978, 0.04846920073032379, -0.20763033628463745, -0.06451983749866486, -0.17082005739212036, -0.24341806769371033, 0.03165174275636673, 0.2297227531671524, 0.22840246558189392, -0.02109954133629799, -0.05451832339167595, 0.5442659854888916, 0.010277407243847847, -0.27405017614364624, -0.24336637556552887, 0.1692321002483368, 0.25763434171676636, -0.17161321640014648, -0.3055514395236969, 0.08769211918115616, 0.3064356744289398, -0.14919063448905945, -0.1570720374584198, 0.16958929598331451, 0.059494778513908386, 0.201369047164917, -0.2249583601951599, 0.2929282784461975, -0.16005393862724304, -0.12229612469673157, 0.15848328173160553, 0.028426462784409523, -0.041613418608903885, -0.16369611024856567, -0.023924648761749268, 0.32783907651901245, 0.16893087327480316, 0.0020599663257598877, 0.05164988338947296, -0.1860271394252777, 0.18950951099395752, -0.10541248321533203, -0.11753493547439575, -0.2751550078392029, 0.15478552877902985, -0.18861187994480133, 0.4881468415260315, 0.23946313560009003, 0.08603671193122864, 0.17198625206947327, 0.4886363744735718, 0.2141721397638321, 0.13402071595191956, -0.05347897857427597, -0.31662648916244507, -0.17914509773254395, -0.18317101895809174, 0.0051267631351947784, 0.1620589941740036, -0.0005773779121227562, -0.021061580628156662, -0.02335158921778202, 0.01799336075782776, 0.2533576786518097, 0.07798892259597778, -0.23412813246250153, 0.34701284766197205, 0.14445774257183075, 0.11984878778457642, 0.035920631140470505, -0.17442667484283447, 0.045837510377168655, 0.12112078815698624, -0.04108636826276779, -0.46686887741088867, 0.13646437227725983, -0.3292939364910126, 0.27197960019111633, -0.24520280957221985, -0.0638304129242897, 0.028657419607043266, -0.22461801767349243, -0.19197432696819305, 0.3194692134857178, 0.28801870346069336, 0.21441060304641724, -0.3410937786102295, 0.1146630123257637, -0.18947289884090424, -0.1603948324918747, -0.010080255568027496, -0.11313475668430328, -0.348911315202713, -0.008692733943462372, 0.1438349038362503, -0.20550206303596497, 0.20750156044960022, -0.025598488748073578, -0.14011193811893463, -0.26771053671836853, -0.3595719039440155, 0.09351232647895813, 0.2070465385913849, 0.34555718302726746, -0.2412908375263214, -0.09006722271442413, -0.20699408650398254, -0.06373872607946396, 0.17087310552597046, -0.23139113187789917, -0.14288429915905, -0.06841858476400375, -0.005726470611989498, 0.08650512248277664, 0.09386354684829712, -0.4032764434814453, -0.3004498779773712, 0.06979775428771973, -0.10724906623363495, -0.08476309478282928, 0.03768627345561981, 0.07339037209749222, -0.14411915838718414, -0.21604366600513458, -0.03278689831495285, -0.049537189304828644, -0.42203760147094727, -0.417878657579422, 0.2509204149246216, -0.23217052221298218, 0.036944013088941574, -0.1274864673614502, -0.12137007713317871, -0.00140385702252388, 0.5802031755447388, -0.3909652829170227, 0.16545714437961578, -0.009616022929549217, 0.05026386305689812, 0.0005160421133041382, -0.13757815957069397, 0.4444175064563751, 0.19671235978603363, 0.15417169034481049, -0.24199295043945312, -0.41170138120651245, 0.03495727479457855, -0.07052941620349884, 0.2873360514640808, 0.12383303791284561, 0.1701887547969818, -0.020132144913077354, 1.0965392589569092, 0.3184100091457367, -0.2103506177663803, 0.06612317264080048, -0.04073634743690491, 0.26429951190948486, -0.010916680097579956, -0.3952401280403137, -0.16543960571289062, -0.1520674228668213, -0.19277971982955933, 0.0578005425632, 0.06328657269477844, -0.3083133399486542, -0.040037352591753006, 0.2140314280986786, -0.7177141308784485, -0.20804446935653687, 0.28595295548439026, -0.6640017032623291, 0.27851220965385437, 0.15919829905033112, 0.17277595400810242, -0.5495755076408386, 0.06869173049926758, 0.08213512599468231, -0.14909592270851135, 0.5069202780723572, 0.007301718462258577, -0.16759513318538666, 0.1631203591823578, 0.03673207387328148, 0.16538065671920776, 0.26244422793388367, 0.22165217995643616, -0.12357424199581146, -0.0967763289809227, -0.22733043134212494, -0.05362377688288689, 0.44563233852386475, -0.6023889780044556, 0.29666391015052795, 0.383420467376709, -0.3278227746486664, -0.16313622891902924, -0.22921554744243622, 0.12757454812526703, 0.37741944193840027, 0.17381525039672852, 0.2964751124382019, -0.02953927591443062, 0.16229550540447235, -0.07849068939685822, 0.1458640992641449, -0.2814040184020996, -0.04928018897771835, -0.045585617423057556, 0.13524380326271057, 0.14197342097759247, -0.036529622972011566, -0.22726304829120636, -0.02170765958726406, -0.05170166492462158, -0.05307876318693161, -0.4242401719093323, 0.07396815717220306, 0.25550398230552673, 0.3246225416660309, 0.5262854099273682, 0.062468718737363815, 0.43907397985458374, 0.27417129278182983, 0.03510076180100441, -0.0851442813873291, 0.5787378549575806, -0.2023313194513321, -0.19988209009170532, 0.009701723232865334, 0.2453024983406067, -0.11760623008012772, 0.0950472503900528, -0.38509881496429443, -0.19491180777549744, 0.168532133102417, -0.11467441916465759, -0.10574717074632645, -0.16606009006500244, 0.05552481859922409, 0.281884104013443, -0.5762341618537903, -0.6871485710144043, 0.40591853857040405, 0.4733216464519501, -0.4103277325630188, 0.7267811298370361, -0.5869186520576477, -0.2629712224006653, 0.20956403017044067, -0.18466314673423767, 0.7170373797416687, -0.218681201338768, -0.09955750405788422, -0.09233022481203079, 0.30790072679519653, -0.039301902055740356, -0.17248986661434174, -0.04001671075820923, -0.27097898721694946, -0.1853228211402893, -0.1254701465368271, -0.2476440668106079, 0.08484779298305511, 0.27757659554481506, 0.0025101862847805023, 0.3366931974887848, -0.24149121344089508, 0.4807325601577759, 0.018430685624480247, -0.09305089712142944, 0.17149701714515686, -0.06028107926249504, -0.30471864342689514, 0.11556950211524963, 0.07779203355312347, 0.17580881714820862, -0.059441789984703064, -0.05844481289386749, -0.11472649872303009, -0.06742264330387115, -0.3334653973579407, 0.25480538606643677, -0.61930912733078, 0.40701645612716675, -0.11859604716300964, -0.13812358677387238, -0.11806750297546387, 0.11568300426006317, 0.16506509482860565, 0.08377940952777863, -0.04017556458711624, 0.2410152554512024, 0.32645943760871887, 0.17914998531341553, 0.04176679998636246, -0.1866990625858307, 0.13898833096027374, 0.09576361626386642, -0.10712756216526031, 0.1587902158498764, -0.15443047881126404, -0.37526172399520874, -0.1760043352842331, 0.18447130918502808, 0.009122386574745178, -0.014729751273989677, -0.2240321785211563, 0.2788907587528229, 0.26172295212745667, 0.11547276377677917, 0.05109243839979172, 0.25831669569015503, 0.1049681231379509, 0.3374638557434082, -0.1267133504152298, -0.29268181324005127, 0.03194567561149597, 0.5468701124191284, 0.19485828280448914, -0.17405882477760315, 0.272388219833374, -0.17556369304656982, -0.04219482094049454, -0.033501967787742615, -0.32430365681648254, 0.1044904962182045, -0.290693998336792, 0.08634615689516068, -0.3525417149066925, 0.13696782290935516, 0.29562902450561523, -0.1516818106174469, 0.17728570103645325, 0.24084162712097168, -0.10966716706752777, -0.37954747676849365, -0.06409348547458649, -0.031176045536994934, -0.05997592583298683, 0.07217396795749664, 0.11838055402040482, -0.2975931465625763, -0.12805108726024628, 0.3315073847770691, -0.2037171721458435, 0.14262084662914276, 0.13883699476718903, 0.061269551515579224, -0.07429225742816925, 0.2138420045375824, 0.2881692945957184, -0.27103957533836365, -0.020649805665016174, 0.06421753764152527, -0.3246041536331177, -0.09577164053916931, -0.10542964935302734, 0.11952181160449982, -0.23743197321891785, 0.12653706967830658, -0.09611650556325912, -0.04526147246360779, 0.25350430607795715, -0.25838473439216614, 0.17694294452667236, 0.4429429769515991, 0.24725106358528137, -0.12137296050786972, 0.03626621514558792, -0.23719573020935059, -0.19844487309455872, 0.264401912689209, -0.19558849930763245, -0.00017390400171279907, 0.0041384282521903515, 0.3197753131389618, 0.002001605462282896, -0.0661248192191124, -0.17957468330860138, -0.16801297664642334, -0.004073403775691986, 0.1874288022518158, 0.37165364623069763, -0.15245980024337769, 0.1358596533536911, 0.13586536049842834, 0.229644775390625, 0.21645905077457428, -0.13118277490139008, 0.025959892198443413, 0.006481167860329151, 0.1072961762547493, -0.0830920934677124, 0.0035992758348584175, 0.31721240282058716, 0.16025440394878387, -0.13532355427742004, 0.2786390483379364, 0.10401542484760284, -0.0837676003575325, 0.2344512790441513, 0.03863351792097092, 0.3939882814884186, -0.3727238178253174, 0.39576268196105957, 0.21920424699783325, 0.2516991198062897, 0.14526621997356415, 0.1796540915966034, 0.11626516282558441, 0.0013627037405967712, 0.2567724287509918, 0.17827968299388885, 0.3827572762966156, 0.20700955390930176, 0.07899589091539383, -0.15745705366134644, -0.58705735206604, -0.035201821476221085, 0.3819713592529297, -0.3661758601665497, 0.5012774467468262, 0.028172623366117477, 0.05899595469236374, 0.16341839730739594, -0.316251277923584, -0.3057076930999756, 0.3864520192146301, -0.014520622789859772, -0.2368500977754593, 0.1871301531791687, -0.2024395763874054, 0.07624039053916931, 0.03899429365992546, -0.007976740598678589, 0.042783886194229126, 0.503010094165802, 0.16964833438396454, -0.221239373087883, -0.013547530397772789, -0.18846827745437622, 0.11449595540761948, 0.42676210403442383, -0.11685585975646973, 0.14672847092151642, -0.063942551612854, -0.1349024921655655, 0.04717552289366722, 0.3376619219779968, 0.4609372317790985, 0.2616268992424011, 0.11347843706607819, 0.07904547452926636, 0.4846383035182953, 0.1015988290309906, -0.2699873745441437, 0.3003549575805664, -0.0987125039100647, -0.23259715735912323, 0.15142181515693665, 0.1502109318971634, -0.09258964657783508, 0.24299904704093933, -0.20071984827518463, 0.3491632640361786, -0.26652729511260986, 0.06343208253383636, -0.133999302983284, 0.26279038190841675, -0.0019665956497192383, 0.18111485242843628, -0.04900636896491051, -0.19750149548053741, 0.7122181057929993, 0.1442074477672577, 0.2382027804851532, 0.009711294434964657, 0.05152692645788193, 0.2391054481267929, 0.16208533942699432, 0.36635735630989075, 0.05844623222947121, -0.1798635870218277, -0.05939936637878418, -0.6679869294166565, 0.017486773431301117, -0.3761492669582367, 0.21788254380226135, -0.08901140093803406, 0.21330317854881287, 0.2604070007801056, -0.08634687215089798, 0.24042850732803345, 0.0012781955301761627, 0.13346827030181885, 0.24449239671230316, -0.4332607090473175, -0.21564511954784393, -0.18346340954303741, 0.050126813352108, 0.0466088131070137, -0.4305881857872009, 0.02288731187582016, -0.05635615810751915, 0.07014671713113785, 0.04670877754688263, -0.23738956451416016, 0.19583258032798767, -0.112088143825531, 0.6440414190292358, 0.1405758559703827, 0.31960171461105347, -0.06745520234107971, 0.0807405635714531, -0.3065146803855896, -0.10407298058271408, 0.19975975155830383, 0.23398268222808838, -0.08200588822364807, 0.28142717480659485, -0.36912915110588074, 0.022073209285736084, -0.2654202878475189, -0.061853598803281784, 0.15815286338329315, 0.004935387521982193, -0.04189342260360718, -0.17688028514385223, 0.02340342104434967, 0.122774638235569, 0.1063581183552742, 0.5370635390281677, -0.19480302929878235, 0.3811495304107666, 0.012668870389461517, -0.08435419946908951, 0.2367664873600006, -0.5975601673126221, -0.05924035981297493, -0.12382646650075912, 0.28514814376831055, -0.12927183508872986, -0.07411229610443115, -0.2619340717792511, -0.033284224569797516, 0.49348336458206177, -0.20052236318588257, 0.003207642585039139, 0.07302692532539368, -0.0920792669057846, 0.2536213994026184, -0.12442861497402191, 0.07576606422662735, 0.10356039553880692, -0.07844004034996033, 0.07039384543895721, -0.20117993652820587 ]
https://github.com/huggingface/datasets/issues/2413
AttributeError: 'DatasetInfo' object has no attribute 'task_templates'
Hi ! Can you try using a more up-to-date version ? We added the task_templates in `datasets` 1.7.0. Ideally when you're working on new datasets, you should install and use the local version of your fork of `datasets`. Here I think you tried to run the 1.7.0 tests with the 1.6.2 code
## Describe the bug Hello, I'm trying to add dataset and contribute, but test keep fail with below cli. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<my_dataset>` ## Steps to reproduce the bug It seems like a bug when I see an error with the existing dataset, not the dataset I'm trying to add. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<any_dataset>` ## Expected results All test passed ## Actual results ``` # check that dataset is not empty self.parent.assertListEqual(sorted(dataset_builder.info.splits.keys()), sorted(dataset)) for split in dataset_builder.info.splits.keys(): # check that loaded datset is not empty self.parent.assertTrue(len(dataset[split]) > 0) # check that we can cast features for each task template > task_templates = dataset_builder.info.task_templates E AttributeError: 'DatasetInfo' object has no attribute 'task_templates' tests/test_dataset_common.py:175: AttributeError ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Darwin-20.4.0-x86_64-i386-64bit - Python version: 3.7.7 - PyTorch version (GPU?): 1.7.0 (False) - Tensorflow version (GPU?): 2.3.0 (False) - Using GPU in script?: No - Using distributed or parallel set-up in script?: No
52
AttributeError: 'DatasetInfo' object has no attribute 'task_templates' ## Describe the bug Hello, I'm trying to add dataset and contribute, but test keep fail with below cli. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<my_dataset>` ## Steps to reproduce the bug It seems like a bug when I see an error with the existing dataset, not the dataset I'm trying to add. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<any_dataset>` ## Expected results All test passed ## Actual results ``` # check that dataset is not empty self.parent.assertListEqual(sorted(dataset_builder.info.splits.keys()), sorted(dataset)) for split in dataset_builder.info.splits.keys(): # check that loaded datset is not empty self.parent.assertTrue(len(dataset[split]) > 0) # check that we can cast features for each task template > task_templates = dataset_builder.info.task_templates E AttributeError: 'DatasetInfo' object has no attribute 'task_templates' tests/test_dataset_common.py:175: AttributeError ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Darwin-20.4.0-x86_64-i386-64bit - Python version: 3.7.7 - PyTorch version (GPU?): 1.7.0 (False) - Tensorflow version (GPU?): 2.3.0 (False) - Using GPU in script?: No - Using distributed or parallel set-up in script?: No Hi ! Can you try using a more up-to-date version ? We added the task_templates in `datasets` 1.7.0. Ideally when you're working on new datasets, you should install and use the local version of your fork of `datasets`. Here I think you tried to run the 1.7.0 tests with the 1.6.2 code
[ -0.4735527038574219, -0.2719741463661194, -0.012150648050010204, 0.059786077588796616, 0.26718202233314514, 0.21022358536720276, 0.2545936703681946, 0.385153204202652, 0.03191352263092995, 0.1861087828874588, 0.09519103914499283, 0.44205576181411743, -0.1509743630886078, 0.003989161923527718, 0.056346625089645386, -0.07867409288883209, -0.03145257383584976, 0.15396320819854736, 0.3197634220123291, 0.01713654398918152, -0.28794798254966736, -0.1133655458688736, -0.004304222762584686, -0.11820079386234283, -0.15429553389549255, -0.17149722576141357, -0.1579619199037552, 0.051167987287044525, 0.11295518279075623, -0.3455856442451477, 0.4298335313796997, -0.10836003720760345, -0.009347384795546532, 0.49184826016426086, -0.0001210199625347741, 0.17859993875026703, 0.3251258134841919, -0.0006493888795375824, -0.4968327581882477, -0.06566944718360901, -0.3913995921611786, -0.3287818729877472, 0.06360892206430435, -0.1634952872991562, -0.20257240533828735, -0.33423492312431335, -0.0632525235414505, -0.32980525493621826, -0.08676880598068237, 0.4178372621536255, 0.16557282209396362, 0.5218760967254639, -0.1509701907634735, -0.43150925636291504, 0.12176533043384552, 0.17860037088394165, -0.28036025166511536, 0.17083971202373505, 0.6216206550598145, -0.10344655811786652, 0.34622541069984436, 0.005315020680427551, -0.0010404940694570541, 0.16620948910713196, 0.1322755366563797, -0.13521921634674072, 0.22342011332511902, -0.39723747968673706, -0.018080495297908783, 0.07620101422071457, 0.5973719358444214, -0.29861828684806824, -0.43075069785118103, -0.14196938276290894, 0.22309531271457672, 0.032204821705818176, -0.04217315465211868, -0.16696226596832275, -0.24005527794361115, -0.03511655703186989, -0.09033967554569244, -0.15313319861888885, -0.1619226336479187, 0.07520192116498947, 0.1189873218536377, 0.022188469767570496, 0.18503910303115845, 0.11126476526260376, -0.2130625694990158, 0.14331549406051636, -0.09717767685651779, -0.058139145374298096, -0.25521889328956604, 0.11321816593408585, -0.23129980266094208, -0.29293495416641235, 0.16806715726852417, -0.38050323724746704, 0.24166131019592285, 0.34716033935546875, -0.03480798006057739, -0.16173893213272095, 0.12671929597854614, 0.20005396008491516, 0.03033454529941082, 0.23437274992465973, 0.10623648762702942, 0.23299728333950043, 0.0663585513830185, -0.11033745110034943, 0.01226489245891571, -0.10697071999311447, 0.05250769481062889, -0.243696391582489, 0.2287585288286209, 0.14407721161842346, 0.6398686170578003, -0.07559847831726074, -0.5606927871704102, -0.025395944714546204, -0.025177184492349625, 0.005056973081082106, 0.2622097432613373, 0.4388638138771057, 0.012870966456830502, -0.09753147512674332, -0.19453716278076172, 0.32258379459381104, -0.26285770535469055, -0.0823604017496109, -0.2578427791595459, 0.2040020078420639, 0.004373926669359207, -0.13953810930252075, 0.3220979571342468, -0.17101767659187317, 0.21655592322349548, 0.055246397852897644, 0.18476322293281555, -0.008051637560129166, 0.20949628949165344, -0.3163889944553375, -0.20448052883148193, 0.3319314122200012, 0.01838819682598114, 0.38583964109420776, 0.0564303919672966, -0.2939103841781616, -0.16571447253227234, 0.21790412068367004, -0.29733920097351074, -0.5190386176109314, -0.017320306971669197, 0.2060689628124237, -0.06010357663035393, -0.1723548173904419, -0.35112839937210083, -0.05579571798443794, 0.15495729446411133, -0.13100363314151764, -0.12861910462379456, -0.36810147762298584, -0.19069382548332214, -0.11428052186965942, 0.2976212799549103, 0.4823685884475708, -0.3817066252231598, -0.05358486622571945, -0.08985864371061325, -0.1456291675567627, 0.03482617437839508, -0.001926623284816742, -0.09124676138162613, 0.37781041860580444, -0.22772231698036194, -0.09185068309307098, 0.3079966604709625, -0.4803471267223358, -0.34612220525741577, 0.33165815472602844, -0.08462284505367279, -0.034273356199264526, 0.18296006321907043, 0.0866435170173645, 0.28151935338974, -0.23433265089988708, 0.00016129761934280396, 0.15372334420681, -0.24272415041923523, -0.034739699214696884, -0.2711491584777832, -0.007259737700223923, 0.46360349655151367, 0.2265046089887619, 0.1762445718050003, 0.011410221457481384, 0.21855634450912476, 0.025042742490768433, 0.06449340283870697, -0.12378136813640594, 0.11123166978359222, 0.19500426948070526, 0.7014116048812866, -0.17780838906764984, 0.23005129396915436, -0.2532386779785156, -0.6865379810333252, 0.3442710041999817, 0.2985456585884094, 0.05293756350874901, -0.0783262699842453, 0.04653830826282501, -0.45753172039985657, 0.21225011348724365, -0.4423656165599823, -0.3045433759689331, -0.023945171386003494, 0.1752167046070099, -0.0368824265897274, -0.2862263023853302, -0.18150997161865234, 0.12142685800790787, -0.32438236474990845, 0.0647803246974945, 0.16746589541435242, 0.3153727650642395, -0.09874287992715836, -0.2384931892156601, -0.1168052926659584, 0.04545370861887932, 0.15867069363594055, -0.19165006279945374, -0.22627955675125122, 0.1804826259613037, 0.07185228914022446, 0.07655167579650879, 0.21653521060943604, -0.02814774215221405, 0.2404051423072815, -0.2461782991886139, -0.14841392636299133, 0.17856137454509735, 0.27106139063835144, -0.1766054630279541, -0.025980152189731598, 0.06944495439529419, 0.035001784563064575, 0.31006985902786255, -0.045337505638599396, -0.05028736963868141, 0.3370395004749298, -0.03357239067554474, 0.10171747952699661, -0.019830971956253052, 0.2580485939979553, 0.09840081632137299, 0.41893115639686584, -0.26813673973083496, -0.30105316638946533, 0.12513355910778046, 0.0404604971408844, 0.07952624559402466, -0.03365415334701538, 0.09768564999103546, -0.18436625599861145, 0.2101370096206665, 0.134964257478714, 0.18009448051452637, 0.6353421807289124, 0.17387251555919647, -0.11095169186592102, -0.10639002174139023, -0.1677989512681961, -0.06142273172736168, 0.07787713408470154, -0.04249554127454758, 0.2484360933303833, 0.3933541178703308, 0.28785061836242676, 0.0008508190512657166, -0.17639634013175964, -0.4252847731113434, 0.3472663462162018, 0.49658912420272827, -0.3807487487792969, -0.011444339528679848, 0.04232773184776306, -0.1184767559170723, -0.13183079659938812, -0.14069917798042297, 0.033435553312301636, -0.3064960539340973, 0.10570348799228668, 0.1973099410533905, -0.014866374433040619, 0.222433403134346, 0.022959545254707336, 0.012862205505371094, 0.07811345160007477, -0.5534871220588684, -0.3724316656589508, -0.15851129591464996, -0.1578885018825531, 0.09622591733932495, 0.2058895230293274, -0.27094390988349915, 0.4508906900882721, -0.021534714847803116, -0.02566501870751381, -0.24395909905433655, -0.2913549542427063, -0.009034667164087296, -0.07240346819162369, 0.6468450427055359, -0.09694640338420868, 0.30117982625961304, 0.2462477833032608, -0.2688605487346649, 0.4366425573825836, -0.08992653340101242, -0.26164886355400085, 0.11559702455997467, -0.055423106998205185, -0.21924404799938202, -0.13619564473628998, -0.6507862210273743, -0.2763218283653259, -0.27767646312713623, -0.10190394520759583, 0.11670731008052826, 0.05169287323951721, 0.4311494827270508, 0.27700042724609375, 0.12576191127300262, 0.2852221727371216, 0.2057918757200241, 0.13208012282848358, 0.020305965095758438, 0.20529964566230774, -0.041547033935785294, -0.30831247568130493, -0.09454800188541412, -0.19308651983737946, 0.12207910418510437, 0.20345820486545563, -0.17582878470420837, -0.3868483603000641, -0.21759985387325287, 0.5230405330657959, -0.10185806453227997, -0.14443640410900116, 0.39428019523620605, 0.08560284227132797, 0.011636918410658836, -0.13260358572006226, -0.11417333781719208, -0.00935027003288269, 0.10628853738307953, 0.12524497509002686, -0.13736647367477417, 0.2916111648082733, -0.13651657104492188, 0.6200547814369202, 0.19935932755470276, -0.13216091692447662, 0.20840680599212646, -0.35045120120048523, 0.2625144422054291, -0.16126105189323425, -0.7129331231117249, 0.22277002036571503, 0.06421181559562683, -0.3309757709503174, -0.05109265446662903, -0.13292497396469116, -0.0910041332244873, 0.04873587191104889, -0.0341804102063179, 0.003298383206129074, 0.07408381998538971, -0.048287227749824524, -0.17819051444530487, 0.20592311024665833, -0.020679982379078865, 0.08263757079839706, -0.35450777411460876, -0.15849369764328003, 0.15715505182743073, 0.6275928020477295, -0.15281128883361816, -0.08350090682506561, -0.27048459649086, -0.16705366969108582, -0.3188594579696655, 0.0824507474899292, 0.11775188893079758, 0.4406634271144867, -0.19661058485507965, 0.023519456386566162, 0.13147872686386108, -0.024656245484948158, 0.5827748775482178, -0.27233386039733887, 0.009570140391588211, 0.34722885489463806, -0.041370879858732224, -0.2590359151363373, -0.17304503917694092, -0.36931902170181274, 0.4203238785266876, 0.15361404418945312, 0.6140223741531372, -0.0226108580827713, 0.008664713241159916, 0.013276786543428898, 0.26097190380096436, -0.16838425397872925, -0.059921421110630035, -0.11851373314857483, -0.40292230248451233, -0.2713446021080017, 0.2448352575302124, 0.038707152009010315, 0.37781891226768494, 0.13941742479801178, -0.07503195852041245, -0.4280236065387726, -0.1475996971130371, 0.22682008147239685, 0.1832057386636734, 0.17364433407783508, 0.18704190850257874, 0.525886595249176, -0.4211350977420807, 0.1038893386721611, 0.5118354558944702, 0.3237634301185608, -0.22787660360336304, -0.12010908126831055, -0.031474340707063675, -0.2060825675725937, 0.6010956764221191, 0.019678063690662384, -0.13026000559329987, 0.03105100244283676, -0.33755621314048767, 0.054033152759075165, -0.36372804641723633, 0.15681147575378418, 0.38033777475357056, 0.08331231772899628, -0.3442881107330322, -0.5051568746566772, 0.12837794423103333, 0.18149514496326447, 0.001211501657962799, 0.46869394183158875, -0.12122760713100433, -0.17343267798423767, 0.13502471148967743, -0.08396793156862259, 0.7279376983642578, 0.056762922555208206, -0.1743059903383255, 0.47825881838798523, 0.08984433114528656, 0.22999179363250732, -0.19440002739429474, 0.13692176342010498, -0.30400118231773376, -0.6132839918136597, 0.17507359385490417, -0.23510931432247162, 0.2782963216304779, -0.006407998502254486, -0.05996190756559372, 0.13079972565174103, 0.05329059064388275, 0.24046310782432556, 0.08388875424861908, 0.40367409586906433, 0.06495154649019241, -0.09041577577590942, -0.09537100791931152, 0.13007524609565735, -0.13130661845207214, 0.29461783170700073, -0.034286439418792725, 0.06265224516391754, -0.17212577164173126, -0.18491880595684052, -0.2937750816345215, 0.12194020301103592, -0.1266431361436844, 0.14838232100009918, 0.19174739718437195, -0.577007532119751, 0.38922515511512756, -0.09818433225154877, 0.14732828736305237, 0.11357313394546509, -0.17175616323947906, 0.188699409365654, -0.029844827950000763, 0.21571333706378937, 0.05909290537238121, -0.16626529395580292, 0.5821649432182312, -0.06799764186143875, -0.16114094853401184, 0.20861923694610596, -0.21798771619796753, -0.13606324791908264, -0.034033603966236115, -0.05567832291126251, 0.12392587959766388, -0.48589596152305603, -0.2893354296684265, 0.09655340760946274, 0.11619512736797333, -0.24592183530330658, 0.08012236654758453, 0.10029806941747665, -0.255516916513443, 0.22851380705833435, -0.06057431176304817, -0.2476043403148651, -0.016640782356262207, 0.013246066868305206, 0.2224864959716797, 0.13109152019023895, 0.7664227485656738, 0.03607926145195961, 0.06390910595655441, -0.25320127606391907, 0.029472000896930695, 0.3147101104259491, -0.44006142020225525, 0.07148581743240356, 0.057358626276254654, 0.11254085600376129, 0.021794863045215607, 0.2332715094089508, -0.0062284916639328, 0.22170543670654297, -0.02274205908179283, -0.42348209023475647, -0.3272494971752167, -0.09127061069011688, -0.014876484870910645, 0.26137304306030273, -0.10002829134464264, 0.1467793583869934, 0.18195021152496338, 0.16977959871292114, -0.27148616313934326, -0.12075939774513245, -0.12029743939638138, 0.24439886212348938, 0.194680318236351, 0.2275516390800476, 0.3158339262008667, -0.1297944337129593, 0.06980586051940918, -0.26302236318588257, -0.059752076864242554, -0.1642073690891266, -0.14477191865444183, 0.14876586198806763, 0.09924565255641937, 0.10201790928840637, -0.1359679102897644, -0.2663305699825287, 0.1779773235321045, -0.10224680602550507, 0.06815733015537262, -0.09234140813350677, -0.19242332875728607, 0.3209666311740875, 0.42433953285217285, 0.032633405178785324, -0.12769342958927155, 0.2927683889865875, -0.03283074498176575, 0.215463787317276, -0.012305330485105515, 0.19064481556415558, 0.19587495923042297, 0.10341677069664001, -0.4052978456020355, 0.0003749951720237732, -0.11551913619041443, 0.07560297846794128, 0.08167153596878052, -0.31906336545944214, 0.2422187626361847, 0.001343828160315752, 0.15887399017810822, 0.20178274810314178, -0.21135063469409943, 0.20053353905677795, 0.2323738932609558, 0.1727866232395172, -0.38053351640701294, 0.013223626650869846, 0.3443756401538849, -0.09093604981899261, 0.22072365880012512, 0.158881276845932, 0.00005611404776573181, -0.08342968672513962, 0.1408257931470871, 0.18941214680671692, 0.13268043100833893, -0.21201591193675995, 0.08796963095664978, 0.16162508726119995, 0.06208818778395653, -0.02487557753920555, 0.10539405047893524, 0.04438216984272003, -0.04809809476137161, 0.19441518187522888, -0.12335441261529922, 0.2816063463687897, 0.3173200786113739, -0.14101776480674744, 0.13634969294071198, -0.13460521399974823, 0.3186091184616089, -0.21828588843345642, 0.03916991502046585, -0.21417972445487976, 0.10117711871862411, 0.6601553559303284, -0.13645967841148376, -0.09018835425376892, 0.049012161791324615, 0.01403101161122322, -0.29897668957710266, 0.04710869491100311, -0.1300390660762787, -0.04233121499419212, -0.13688790798187256, -0.1899404376745224, -0.031826335936784744, -0.21157078444957733, 0.11765288561582565, -0.021062485873699188, -0.2188142091035843, -0.13815058767795563, 0.32864096760749817, 0.5079286098480225, -0.06061657518148422, -0.2960718274116516, 0.3181617558002472, -0.016280658543109894, -0.13821955025196075, -0.044512633234262466, 0.4015035927295685, 0.5818584561347961, 0.3397776484489441, 0.03342870995402336, 0.09619871526956558, -0.023855503648519516, -0.2488904893398285, 0.04813974350690842, 0.19564443826675415, -0.1965765655040741, -0.04348979517817497, 0.28111007809638977, 0.1509518176317215, -0.09051167964935303, 0.04376915842294693, 0.06191758066415787, -0.2591668665409088, -0.39740750193595886, 0.7871943116188049, 0.05636747181415558, -0.37666502594947815, -0.14806891977787018, 0.08794303238391876, -0.28590163588523865, -0.0843195840716362, 0.5475348830223083, 0.03421861305832863, 0.02695859596133232, -0.10531889647245407, 0.04755818843841553, -0.13067662715911865, 0.2556799650192261, 0.3318830728530884, -0.1418062150478363, -0.4705778658390045, 0.07994300127029419, -0.5435572862625122, 0.290591835975647, -0.20857438445091248, -0.21392706036567688, 0.018065303564071655, 0.17289431393146515, -0.11403318494558334, -0.01737314835190773, 0.26253581047058105, 0.1251371055841446, 0.17598757147789001, 0.1286889612674713, -0.33844488859176636, -0.22515921294689178, -0.32299089431762695, 0.11709235608577728, 0.1361965388059616, -0.13306909799575806, 0.0005555637180805206, -0.10720936208963394, 0.03375152498483658, -0.14111588895320892, -0.2769264280796051, 0.49845314025878906, -0.11270684003829956, 0.2805218994617462, -0.054709188640117645, 0.678597092628479, 0.042135633528232574, 0.048781782388687134, -0.07441557943820953, -0.40862593054771423, -0.1927952915430069, 0.315289705991745, 0.024217847734689713, 0.17209938168525696, 0.026417413726449013, -0.17259827256202698, -0.3324015140533447, 0.022576477378606796, -0.09617535769939423, -0.3547198474407196, -0.01000931765884161, 0.2915278375148773, -0.22769886255264282, 0.1695401966571808, 0.12702053785324097, -0.0010683722794055939, 0.09566381573677063, 0.1680362969636917, -0.2658645510673523, -0.4773273169994354, 0.35529255867004395, -0.2708619236946106, -0.2547746002674103, -0.20502528548240662, 0.2875133156776428, -0.05790498107671738, 0.12748664617538452, -0.32610324025154114, -0.16633346676826477, 0.507391631603241, -0.18392306566238403, -0.07951167225837708, 0.3061133921146393, 0.20084801316261292, 0.19906513392925262, -0.00013775750994682312, 0.19514557719230652, -0.07868833839893341, -0.04518258571624756, 0.1501544862985611, -0.13029292225837708 ]
https://github.com/huggingface/datasets/issues/2407
.map() function got an unexpected keyword argument 'cache_file_name'
Hi @cindyxinyiwang, Did you try adding `.arrow` after `cache_file_name` argument? Here I think they're expecting something like that only for a cache file: https://github.com/huggingface/datasets/blob/e08362256fb157c0b3038437fc0d7a0bbb50de5c/src/datasets/arrow_dataset.py#L1556-L1558
## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0
24
.map() function got an unexpected keyword argument 'cache_file_name' ## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0 Hi @cindyxinyiwang, Did you try adding `.arrow` after `cache_file_name` argument? Here I think they're expecting something like that only for a cache file: https://github.com/huggingface/datasets/blob/e08362256fb157c0b3038437fc0d7a0bbb50de5c/src/datasets/arrow_dataset.py#L1556-L1558
[ 0.13230007886886597, 0.06898804008960724, 0.03823612257838249, 0.00005622208118438721, 0.05203087255358696, 0.2963719069957733, 0.17080208659172058, 0.33897897601127625, -0.06356202811002731, -0.0203007310628891, 0.1289214789867401, 0.6100241541862488, -0.24109293520450592, -0.5483762621879578, 0.048802778124809265, 0.09025955200195312, 0.39293575286865234, -0.08653536438941956, 0.210340678691864, 0.0160696879029274, -0.37664175033569336, 0.3897096514701843, -0.056444041430950165, 0.2779165506362915, -0.4511599540710449, -0.2072949856519699, -0.08944327384233475, -0.06648804992437363, -0.08960651606321335, -0.39118117094039917, 0.25532230734825134, 0.09012575447559357, -0.07566187530755997, 0.48987191915512085, -0.00012365267321001738, -0.06260091811418533, 0.062140125781297684, -0.1646272987127304, -0.20501764118671417, -0.33761709928512573, -0.1080760732293129, 0.054302021861076355, -0.06807173788547516, -0.4970971345901489, 0.21295177936553955, -0.08339396864175797, 0.1886310875415802, -0.6428589224815369, 0.14559699594974518, 0.17250296473503113, 0.13010859489440918, -0.1011054739356041, -0.2413281500339508, -0.17860199511051178, 0.10320968925952911, -0.11684034764766693, -0.011462464928627014, 0.20414096117019653, 0.035357922315597534, -0.2602056860923767, 0.10320775955915451, 0.3366818130016327, -0.3803626298904419, -0.0966833233833313, 0.4977585971355438, 0.0177514236420393, -0.21169748902320862, -0.3391498923301697, 0.2500312328338623, -0.15667161345481873, 0.12364912033081055, -0.4110815227031708, -0.3522394597530365, -0.13294315338134766, -0.321254700422287, -0.10883504897356033, 0.16138491034507751, -0.09946686774492264, -0.1431576907634735, -0.01721198484301567, 0.01871177926659584, -0.21268849074840546, 0.007732875645160675, 0.13749848306179047, 0.2252310812473297, 0.10870370268821716, -0.19588615000247955, 0.36183440685272217, 0.3491646647453308, -0.08339321613311768, -0.2166386842727661, -0.3524976670742035, -0.040129516273736954, 0.3894570469856262, -0.19266186654567719, -0.01081111654639244, 0.04618709534406662, 0.11700214445590973, 0.09804189950227737, -0.3093526363372803, -0.0926847904920578, -0.1450907588005066, 0.08139722794294357, 0.30734798312187195, 0.23568783700466156, 0.283682256937027, 0.3462311029434204, 0.48690780997276306, -0.15318375825881958, -0.3088080585002899, -0.2916902005672455, -0.20595210790634155, 0.076302170753479, -0.1290069818496704, 0.5090179443359375, -0.06781002879142761, 0.29553133249282837, -0.10165776312351227, 0.09835357218980789, 0.09172666817903519, -0.34179529547691345, -0.003654981032013893, -0.09902436286211014, 0.34146809577941895, 0.1448267698287964, -0.09432593733072281, -0.008740730583667755, 0.20826593041419983, 0.04846928268671036, -0.14157794415950775, -0.13756603002548218, 0.05208360776305199, -0.25372618436813354, 0.2101464867591858, -0.19839486479759216, -0.04640840366482735, 0.13957202434539795, 0.013762964867055416, 0.1705569326877594, -0.11628399789333344, 0.1602960079908371, -0.047293540090322495, 0.23732876777648926, -0.15630285441875458, -0.11536778509616852, 0.4976297914981842, 0.28216686844825745, -0.2278870791196823, -0.11834277212619781, 0.025422539561986923, -0.5410770177841187, -0.3162824213504791, 0.00006254203617572784, 0.02212717942893505, -0.034653134644031525, 0.12628120183944702, -0.4266482889652252, 0.01205676980316639, 0.5163832306861877, -0.26761871576309204, 0.030811555683612823, -0.030468933284282684, -0.23015762865543365, -0.4813353717327118, 0.02079755626618862, 0.32713741064071655, -0.07348770648241043, -0.030248697847127914, -0.02718258835375309, 0.19444575905799866, -0.0033594444394111633, 0.16815082728862762, -0.09358634054660797, 0.18998932838439941, -0.21168296039104462, 0.7205865979194641, 0.5101903080940247, -0.24848434329032898, -0.5775426030158997, 0.27339109778404236, -0.21476642787456512, 0.013901134952902794, -0.08617416769266129, 0.028619542717933655, 0.4520132541656494, -0.13653677701950073, 0.43721017241477966, -0.07317037135362625, -0.04095451533794403, 0.1518029272556305, -0.2699025571346283, -0.23993828892707825, 0.12617284059524536, -0.2583996653556824, -0.05067342147231102, 0.17632640898227692, 0.08051871508359909, 0.06211017072200775, 0.1262599229812622, 0.09792977571487427, 0.23428544402122498, 0.0838979110121727, 0.2890297472476959, 0.07284163683652878, 0.025760486721992493, -0.008435916155576706, -0.29220855236053467, 0.08391144126653671, 0.19646160304546356, -0.420012891292572, -0.329836368560791, -0.4760631322860718, -0.05610746517777443, 0.04248502850532532, -0.18846465647220612, -0.07340037822723389, 0.006483212113380432, 0.07842151820659637, 0.06399746239185333, 0.12062390148639679, -0.07598316669464111, -0.002384655177593231, 0.04359287768602371, -0.05427742004394531, 0.061199579387903214, -0.2633395195007324, -0.07965848594903946, -0.11171705275774002, -0.23687347769737244, -0.19212445616722107, 0.4008702039718628, -0.05909460037946701, -0.32255682349205017, 0.4013505280017853, -0.007704739924520254, 0.11715035140514374, -0.061224885284900665, 0.2972922921180725, -0.29905936121940613, -0.04208365082740784, 0.04869552701711655, 0.00695868581533432, 0.08799297362565994, -0.025794371962547302, 0.1187409833073616, 0.1925860494375229, 0.260634183883667, 0.18268367648124695, -0.23366978764533997, 0.296045184135437, -0.023592188954353333, 0.04379933699965477, 0.0012439936399459839, -0.24493837356567383, -0.04024265334010124, -0.14080849289894104, 0.3976156413555145, -0.11827751994132996, 0.051816970109939575, 0.01091841608285904, 0.4879014790058136, 0.12540651857852936, 0.1525566577911377, -0.06300913542509079, -0.17648953199386597, 0.025393392890691757, 0.09000000357627869, 0.3629104495048523, 0.5742313265800476, -0.006950803101062775, 0.04512467980384827, -0.00718097947537899, 0.14515814185142517, 0.08546769618988037, 0.09000861644744873, 0.04564764350652695, -0.10757363587617874, -0.234418123960495, -0.0852104127407074, 0.24098360538482666, 0.057067133486270905, 0.03898521140217781, 0.13914203643798828, 0.10184615850448608, -0.1943262815475464, 0.2980097234249115, -0.09213847666978836, -0.007241375744342804, -0.06847012042999268, -0.06503136456012726, -0.23147150874137878, -0.49210357666015625, -0.10233089327812195, 0.13902492821216583, 0.043320078402757645, 0.26134657859802246, -0.20452170073986053, 0.19487270712852478, 0.04649091511964798, -0.4844403862953186, -0.015364225953817368, -0.23889459669589996, -0.043144434690475464, -0.20435819029808044, 0.027389690279960632, -0.36098045110702515, 0.4219358265399933, -0.0387926921248436, -0.00857689417898655, -0.37262997031211853, -0.14666655659675598, 0.133047416806221, -0.12244302034378052, 0.1531074345111847, 0.1415277123451233, 0.10626907646656036, -0.3267292380332947, -0.19409438967704773, 0.1713118851184845, -0.26143792271614075, 0.03312082588672638, -0.07873925566673279, 0.11218276619911194, -0.24848635494709015, -0.15608172118663788, -0.09558159857988358, -0.061448656022548676, -0.12652315199375153, 0.324082612991333, -0.31733623147010803, 0.0880131721496582, 0.1432170271873474, -0.027240712195634842, 0.22211703658103943, -0.3109338879585266, -0.10956934094429016, -0.3583908677101135, -0.4785100817680359, 0.43541330099105835, -0.2844856083393097, -0.21512429416179657, 0.0019912049174308777, 0.05726633965969086, 0.16403904557228088, 0.2437957525253296, -0.2821914255619049, -0.23564380407333374, 0.11574400216341019, 0.2570863962173462, 0.018319422379136086, -0.009019425138831139, 0.2191236913204193, -0.011193221434950829, 0.08728379011154175, -0.30309557914733887, -0.43024274706840515, 0.13510340452194214, 0.10228022187948227, 0.3065889775753021, 0.4003380537033081, 0.2808999717235565, 0.3629715144634247, 0.7278517484664917, 0.3356897830963135, -0.026691485196352005, 0.42125317454338074, -0.17648501694202423, 0.35865268111228943, -0.030843012034893036, -0.49589940905570984, -0.0759454071521759, -0.09614458680152893, -0.264540433883667, -0.04912672936916351, -0.08765475451946259, -0.13606271147727966, 0.11832329630851746, -0.11515277624130249, -0.2305316925048828, -0.41818469762802124, 0.053383152931928635, -0.3917156457901001, 0.13264384865760803, 0.06158137694001198, 0.14905047416687012, -0.5956491231918335, -0.08495071530342102, 0.11584722995758057, 0.29246774315834045, 0.15793904662132263, 0.15321800112724304, -0.33816900849342346, -0.013525847345590591, -0.4353031516075134, 0.5255325436592102, 0.037669986486434937, 0.3008788824081421, -0.16522619128227234, 0.12785211205482483, -0.03307920694351196, 0.23865722119808197, 0.7517750263214111, -0.26444265246391296, 0.031440235674381256, 0.07120554149150848, 0.23087140917778015, -0.22540265321731567, 0.04618390277028084, 0.216304212808609, 0.8413041234016418, 0.16099205613136292, 0.47456663846969604, -0.14877885580062866, -0.11961681395769119, -0.28197237849235535, 0.09354179352521896, -0.10042236745357513, -0.005204437300562859, -0.04152284935116768, -0.056500088423490524, -0.40089911222457886, -0.009070418775081635, 0.23558418452739716, -0.015032615512609482, 0.36742210388183594, 0.14244897663593292, 0.13310764729976654, 0.055858172476291656, 0.1616949737071991, 0.1914035528898239, 0.3781096041202545, -0.07542099803686142, -0.20050780475139618, 0.26968926191329956, -0.01408829540014267, 0.10372079908847809, 0.20638509094715118, -0.25061237812042236, -0.12455037236213684, -0.13124898076057434, -0.09986697882413864, 0.38932332396507263, 0.15802203118801117, -0.26583170890808105, 0.08027082681655884, -0.08589524775743484, -0.017533496022224426, 0.01405810471624136, 0.21131446957588196, 0.4594944417476654, -0.05930527299642563, -0.5275683999061584, -0.49043893814086914, 0.25815293192863464, 0.2997868061065674, -0.2697073221206665, 0.8450326323509216, 0.06755605340003967, -0.3200567960739136, 0.4222555160522461, -0.10427915304899216, 0.8706281185150146, 0.017450835555791855, 0.2338981330394745, -0.1201486811041832, 0.11418402194976807, 0.3580419719219208, -0.026595935225486755, -0.05447191745042801, -0.17596974968910217, 0.07301833480596542, 0.045564696192741394, 0.02718866989016533, 0.08684190362691879, 0.4136994481086731, -0.3510037064552307, 0.21767576038837433, -0.05244183540344238, 0.4112338721752167, -0.04470333456993103, 0.01221633329987526, -0.0464383140206337, -0.18672049045562744, -0.08712656795978546, 0.10723726451396942, -0.025973908603191376, 0.12947650253772736, -0.018379833549261093, -0.16372476518154144, -0.006875388324260712, -0.49776285886764526, -0.1725834608078003, -0.003054386004805565, -0.5952807068824768, 0.30111604928970337, -0.11354871094226837, 0.060597166419029236, 0.00235048308968544, 0.34045183658599854, 0.07943198829889297, 0.22276455163955688, -0.08414888381958008, -0.018820904195308685, 0.11507214605808258, 0.006618994288146496, -0.12016326189041138, -0.29546794295310974, 0.14258012175559998, 0.16618072986602783, 0.011298470199108124, 0.1389872431755066, -0.07045114785432816, -0.5288636684417725, -0.19384168088436127, 0.062306277453899384, 0.22748154401779175, -0.3000990152359009, -0.4811912178993225, -0.20018333196640015, -0.14630244672298431, -0.053829167038202286, 0.01906914822757244, 0.04496053606271744, -0.07979971915483475, 0.3188447654247284, -0.13898098468780518, -0.2437441647052765, 0.25298845767974854, 0.3342953026294708, -0.39443516731262207, -0.2294706404209137, 0.42496761679649353, -0.340541809797287, -0.0756215900182724, -0.07758767902851105, 0.09279914945363998, -0.06276344507932663, -0.008436739444732666, 0.1716318130493164, -0.20909953117370605, 0.1777827888727188, -0.08073750883340836, 0.1171480119228363, 0.21705755591392517, 0.2274254560470581, 0.006763812154531479, -0.34605666995048523, -0.2396904081106186, 0.06772443652153015, -0.19671443104743958, 0.14274464547634125, 0.18493732810020447, -0.029807567596435547, 0.07217463850975037, 0.1650879681110382, -0.1944781243801117, 0.17788571119308472, 0.0175094585865736, 0.061977874487638474, 0.3951484262943268, 0.347948282957077, 0.2850731909275055, -0.19574613869190216, -0.04053449630737305, 0.21434198319911957, -0.17043420672416687, -0.06896302103996277, -0.3461570143699646, 0.20592698454856873, 0.21867388486862183, 0.02539650909602642, 0.10100904852151871, -0.3307482600212097, 0.11041979491710663, -0.357536256313324, 0.050843749195337296, 0.3860603868961334, -0.06877706944942474, 0.32032981514930725, 0.30721163749694824, 0.1299646496772766, 0.006087522953748703, 0.03496057912707329, -0.045848995447158813, 0.17528480291366577, 0.02974577620625496, 0.20475731790065765, 0.018549222499132156, -0.013254351913928986, -0.12007573992013931, 0.13091622292995453, -0.08501613140106201, 0.09919767826795578, 0.16454246640205383, -0.157920241355896, 0.10425528883934021, 0.4336756467819214, 0.030924294143915176, 0.14511150121688843, -0.4857906699180603, -0.0307355634868145, 0.2163929045200348, 0.06973302364349365, 0.11546504497528076, -0.2508094012737274, 0.7881996631622314, 0.11060016602277756, -0.07300159335136414, 0.23496201634407043, 0.021775197237730026, -0.01787019520998001, -0.10219691693782806, -0.1701330840587616, 0.44060954451560974, -0.4514473080635071, 0.37552985548973083, 0.27480924129486084, 0.21617113053798676, 0.3323146402835846, 0.2810056805610657, 0.33598893880844116, 0.1987057328224182, 0.5423126816749573, -0.2920398712158203, 0.253055214881897, 0.29988035559654236, -0.1417284458875656, 0.19871395826339722, -0.2295817881822586, 0.16809287667274475, 0.17973235249519348, -0.22098156809806824, 0.48656317591667175, -0.04822227358818054, 0.4005235731601715, -0.38156041502952576, -0.0810338631272316, 0.13543954491615295, 0.16930589079856873, -0.2599407732486725, -0.03037124313414097, 0.0784512534737587, -0.002745978534221649, -0.052151333540678024, -0.12797078490257263, -0.11717160046100616, -0.14993980526924133, 0.6191294193267822, 0.0023002177476882935, 0.08403533697128296, 0.14023298025131226, -0.10333878546953201, 0.10354683548212051, 0.43822526931762695, -0.4216112494468689, -0.06686269491910934, -0.33158713579177856, 0.025369003415107727, 0.09932016581296921, 0.17964576184749603, 0.5354403257369995, 0.5416943430900574, -0.08271516859531403, 0.11621659994125366, 0.0940869152545929, -0.09465721994638443, 0.047285474836826324, 0.04803185909986496, -0.10296621918678284, -0.26419946551322937, 0.20533116161823273, 0.03720855712890625, 0.014386617578566074, 0.14313216507434845, 0.2195749431848526, 0.46039196848869324, -0.032007358968257904, 0.12951235473155975, -0.15249592065811157, -0.25741255283355713, -0.24867022037506104, 0.2730797529220581, -0.3320173919200897, -0.0996740460395813, 0.368711918592453, 0.1682630330324173, 0.22060906887054443, -0.18906080722808838, 0.04019119217991829, 0.2439325451850891, 0.09871461242437363, 0.20749741792678833, -0.06574895977973938, -0.5534552931785583, -0.15500883758068085, -0.6261848211288452, 0.164796844124794, -0.06274248659610748, 0.13777001202106476, 0.024012144654989243, -0.029565095901489258, -0.0035251453518867493, 0.1277085542678833, 0.18399867415428162, -0.1906883865594864, -0.21762993931770325, 0.33825767040252686, -0.16254934668540955, -0.15864290297031403, 0.057739414274692535, 0.1596435308456421, 0.44032710790634155, -0.2399885356426239, -0.017273183912038803, 0.0005746670067310333, -0.021347645670175552, -0.3502492308616638, -0.18701361119747162, 0.0824536383152008, -0.029903337359428406, 0.6764063835144043, 0.025076977908611298, 0.24001745879650116, -0.00706150196492672, -0.23464132845401764, -0.05568161979317665, 0.18137900531291962, -0.23504312336444855, -0.13565251231193542, -0.17921583354473114, 0.2597791850566864, -0.4148189425468445, -0.2854938507080078, -0.5130294561386108, -0.12743382155895233, -0.059039488434791565, -0.2208181470632553, -0.15859855711460114, 0.28193140029907227, -0.036310821771621704, 0.20870192348957062, 0.07307066768407822, 0.4152946472167969, -0.23379167914390564, 0.6292261481285095, -0.19608807563781738, -0.07455496490001678, 0.5311342477798462, -0.6217184662818909, -0.4185057580471039, 0.16022223234176636, 0.2648944854736328, -0.09576915949583054, -0.4335862994194031, -0.46372851729393005, -0.18151035904884338, 0.43180039525032043, 0.08124479651451111, -0.32286274433135986, -0.023883529007434845, -0.14685086905956268, 0.1304250806570053, 0.03839333727955818, 0.5380347967147827, 0.002139907330274582, -0.1710183322429657, 0.31739214062690735, -0.3794924020767212 ]
https://github.com/huggingface/datasets/issues/2407
.map() function got an unexpected keyword argument 'cache_file_name'
Hi ! `cache_file_name` is an argument of the `Dataset.map` method. Can you check that your `dataset` is indeed a `Dataset` object ? If you loaded several splits, then it would actually be a `DatasetDict` (one dataset per split, in a dictionary). In this case, since there are several datasets in the dict, the `DatasetDict.map` method requires a `cache_file_names` argument (with an 's'), so that you can provide one file name per split.
## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0
72
.map() function got an unexpected keyword argument 'cache_file_name' ## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0 Hi ! `cache_file_name` is an argument of the `Dataset.map` method. Can you check that your `dataset` is indeed a `Dataset` object ? If you loaded several splits, then it would actually be a `DatasetDict` (one dataset per split, in a dictionary). In this case, since there are several datasets in the dict, the `DatasetDict.map` method requires a `cache_file_names` argument (with an 's'), so that you can provide one file name per split.
[ 0.08439688384532928, 0.09359583258628845, 0.04566142335534096, 0.018302395939826965, 0.04155764728784561, 0.2793119549751282, 0.2214868813753128, 0.37310460209846497, -0.027766793966293335, -0.000024005770683288574, 0.13107840716838837, 0.6276783347129822, -0.24747972190380096, -0.4753698706626892, 0.07406514883041382, 0.12463173270225525, 0.392575204372406, -0.0903923511505127, 0.2432297319173813, -0.00688030943274498, -0.3810335099697113, 0.37370169162750244, -0.05417405068874359, 0.2555564045906067, -0.4504034221172333, -0.19926495850086212, -0.11359864473342896, -0.05848378688097, -0.05188900977373123, -0.3466012179851532, 0.18283097445964813, 0.11610732972621918, -0.08575411140918732, 0.475078284740448, -0.00012357597006484866, -0.0917595773935318, 0.036011453717947006, -0.16313891112804413, -0.25550809502601624, -0.2864113450050354, -0.14425566792488098, 0.03749267756938934, -0.10721936821937561, -0.5347384810447693, 0.24055635929107666, -0.08323191851377487, 0.19015349447727203, -0.6212077736854553, 0.15418294072151184, 0.16467496752738953, 0.13378410041332245, -0.09382345527410507, -0.2403855323791504, -0.16841235756874084, 0.08720126003026962, -0.09684956073760986, -0.008124029263854027, 0.14512312412261963, -0.024064242839813232, -0.2789250910282135, 0.11037646234035492, 0.32977813482284546, -0.3978559076786041, -0.10068558156490326, 0.47357648611068726, 0.03468284383416176, -0.23902344703674316, -0.34238922595977783, 0.2542089521884918, -0.16413605213165283, 0.1279027909040451, -0.41140851378440857, -0.3495684862136841, -0.14973095059394836, -0.3343961834907532, -0.13763198256492615, 0.1707209348678589, -0.06763429194688797, -0.11312398314476013, -0.0006655380129814148, 0.014238855801522732, -0.23251348733901978, 0.05781364440917969, 0.1314535290002823, 0.1871844083070755, 0.10651125013828278, -0.16101746261119843, 0.362995445728302, 0.32640019059181213, -0.06949180364608765, -0.21157753467559814, -0.3912234306335449, -0.048841092735528946, 0.3552262485027313, -0.16831472516059875, -0.031675152480602264, 0.08342357724905014, 0.07870016992092133, 0.07302491366863251, -0.31549400091171265, -0.12966597080230713, -0.15372100472450256, 0.11062251776456833, 0.32091957330703735, 0.2893010079860687, 0.2396935373544693, 0.32673969864845276, 0.500545084476471, -0.14884380996227264, -0.2889005243778229, -0.2772117853164673, -0.178428053855896, 0.06008864939212799, -0.07403034716844559, 0.5499632954597473, -0.046290770173072815, 0.2836517095565796, -0.07274559140205383, 0.05186395347118378, 0.08158224821090698, -0.36010971665382385, -0.016157902777194977, -0.07813212275505066, 0.35213539004325867, 0.15680330991744995, -0.07408690452575684, -0.012762309983372688, 0.17118680477142334, 0.006588956341147423, -0.18793562054634094, -0.16257353127002716, 0.05916784331202507, -0.23780733346939087, 0.2446795105934143, -0.17189525067806244, -0.02711481973528862, 0.07703226804733276, 0.015662819147109985, 0.14331115782260895, -0.1758870929479599, 0.1657022088766098, -0.0921749621629715, 0.2263486683368683, -0.13344167172908783, -0.08519480377435684, 0.5168972611427307, 0.25256454944610596, -0.22996358573436737, -0.1541355699300766, 0.04802644997835159, -0.5041530132293701, -0.3401097357273102, 0.011679848656058311, 0.03346415236592293, -0.030984483659267426, 0.14962977170944214, -0.3882627785205841, 0.03013848327100277, 0.5299630761146545, -0.2702379524707794, -0.023578740656375885, -0.07332650572061539, -0.25117114186286926, -0.4917120933532715, 0.038310445845127106, 0.34974998235702515, -0.10924994945526123, -0.03633633255958557, -0.07767528295516968, 0.15530408918857574, 0.027931950986385345, 0.15169598162174225, -0.10273616760969162, 0.2707729637622833, -0.20818911492824554, 0.7426669001579285, 0.49917319416999817, -0.1963740736246109, -0.625430166721344, 0.26157253980636597, -0.18257443606853485, -0.014055420644581318, -0.0932946428656578, 0.03504669666290283, 0.5258513689041138, -0.1505955457687378, 0.44456684589385986, -0.009109841659665108, -0.04769201576709747, 0.2018996775150299, -0.28654006123542786, -0.25649625062942505, 0.13291126489639282, -0.22725507616996765, -0.002404838800430298, 0.15722446143627167, 0.0922308936715126, 0.14458076655864716, 0.10273601859807968, 0.092547208070755, 0.22529733180999756, 0.04677781090140343, 0.2800411880016327, 0.09344121813774109, 0.023327989503741264, -0.010145600885152817, -0.280419260263443, 0.05464088171720505, 0.227763831615448, -0.45431196689605713, -0.2949877977371216, -0.5119612812995911, -0.07370786368846893, 0.05962634086608887, -0.17616672813892365, -0.05260750278830528, 0.014165367931127548, 0.11373364925384521, 0.033805277198553085, 0.08119355142116547, -0.07298937439918518, -0.01867092214524746, 0.07816120982170105, -0.08532079309225082, 0.054988205432891846, -0.2141624093055725, -0.10005191713571548, -0.12306226789951324, -0.23380829393863678, -0.16426673531532288, 0.41286686062812805, -0.03535710275173187, -0.3176952600479126, 0.43002715706825256, 0.03838701918721199, 0.08243624120950699, -0.10839324444532394, 0.2794753313064575, -0.3045784533023834, -0.03247295320034027, 0.053652118891477585, 0.017365099862217903, 0.13329261541366577, -0.01315946877002716, 0.07823844254016876, 0.1627872884273529, 0.294124037027359, 0.15256044268608093, -0.2231171429157257, 0.3086065649986267, -0.030019454658031464, 0.0038742460310459137, 0.04579643905162811, -0.2656096816062927, -0.04478886350989342, -0.1367943286895752, 0.31530869007110596, -0.09627749025821686, 0.043673768639564514, 0.058600302785634995, 0.5465807318687439, 0.08965100347995758, 0.20217978954315186, -0.053996630012989044, -0.14803346991539001, -0.014879593625664711, 0.05003175884485245, 0.370580792427063, 0.5701338648796082, -0.007412720937281847, 0.03293036296963692, 0.004989393055438995, 0.14010734856128693, 0.10618571937084198, 0.07740096002817154, 0.053929246962070465, -0.137709841132164, -0.2030060887336731, -0.09618721902370453, 0.21350502967834473, 0.05815938115119934, 0.054728154093027115, 0.19709472358226776, 0.11846914887428284, -0.21860362589359283, 0.31404924392700195, -0.11627975851297379, 0.052964650094509125, -0.09509682655334473, -0.03774074837565422, -0.22133871912956238, -0.5031985640525818, -0.0869879275560379, 0.18243344128131866, 0.02258335053920746, 0.2560198903083801, -0.13593263924121857, 0.23384012281894684, -0.011010857298970222, -0.40881115198135376, 0.01716628670692444, -0.24724487960338593, -0.08292365819215775, -0.2146368771791458, 0.04589322954416275, -0.2960110306739807, 0.43358904123306274, -0.051492758095264435, -0.06582129001617432, -0.3763532340526581, -0.0999036654829979, 0.1506197452545166, -0.12823092937469482, 0.16671788692474365, 0.14365381002426147, 0.11262786388397217, -0.2614250183105469, -0.22572025656700134, 0.1647643893957138, -0.27018868923187256, 0.03497374802827835, -0.06692446768283844, 0.13975083827972412, -0.23692139983177185, -0.1423322856426239, -0.12076836079359055, -0.09062376618385315, -0.11672346293926239, 0.2587164044380188, -0.3342745900154114, 0.12456196546554565, 0.0998176634311676, -0.0638103187084198, 0.2011466920375824, -0.24834179878234863, -0.15722987055778503, -0.402238667011261, -0.38837090134620667, 0.38921719789505005, -0.27086544036865234, -0.22935239970684052, 0.0011085867881774902, 0.05923561006784439, 0.10550893098115921, 0.26285362243652344, -0.2950543165206909, -0.20787183940410614, 0.11554855853319168, 0.217329204082489, 0.00640544667840004, -0.01768469624221325, 0.2701452672481537, -0.004128436092287302, 0.09523565322160721, -0.29701337218284607, -0.4936102628707886, 0.10925596952438354, 0.12011592835187912, 0.3229605257511139, 0.33942940831184387, 0.31437602639198303, 0.35342347621917725, 0.7107338309288025, 0.3199201226234436, -0.0045737698674201965, 0.3914821445941925, -0.1586182862520218, 0.3285066783428192, -0.03124503791332245, -0.5154380798339844, -0.04358971491456032, -0.13569700717926025, -0.32682234048843384, -0.019690290093421936, -0.12998265027999878, -0.18469378352165222, 0.12776963412761688, -0.1052171140909195, -0.27550381422042847, -0.4394861161708832, 0.07918938249349594, -0.3375879228115082, 0.17550402879714966, 0.06306283175945282, 0.19056308269500732, -0.6088647246360779, -0.074421726167202, 0.08664672076702118, 0.2727280855178833, 0.13861651718616486, 0.11839418858289719, -0.3839707374572754, 0.007286706939339638, -0.3965050280094147, 0.5132541656494141, 0.031206103041768074, 0.33112359046936035, -0.1937033087015152, 0.10703108459711075, -0.015356138348579407, 0.19302672147750854, 0.7922772765159607, -0.26796093583106995, 0.04548873007297516, 0.1210796982049942, 0.2072662115097046, -0.17343029379844666, 0.016510669142007828, 0.1767273247241974, 0.8107905387878418, 0.18466387689113617, 0.4598000943660736, -0.1755233108997345, -0.1126587837934494, -0.20835618674755096, 0.0926603451371193, -0.15047314763069153, -0.00657606078311801, -0.0410151481628418, -0.09565185755491257, -0.43371859192848206, -0.017076298594474792, 0.21698731184005737, 0.019463127478957176, 0.34849172830581665, 0.17742466926574707, 0.10022599250078201, 0.0034338608384132385, 0.1716185212135315, 0.19581842422485352, 0.39978939294815063, -0.0367513932287693, -0.14226269721984863, 0.26970309019088745, -0.05359671264886856, 0.11510615050792694, 0.17664039134979248, -0.2531786262989044, -0.10623851418495178, -0.10473258048295975, -0.10755716264247894, 0.37508201599121094, 0.18199284374713898, -0.2561527490615845, 0.03445069119334221, -0.11163479089736938, -0.008228756487369537, -0.05925965681672096, 0.2258591502904892, 0.46386879682540894, -0.09269559383392334, -0.5957261919975281, -0.5398179888725281, 0.23287394642829895, 0.30576902627944946, -0.27290844917297363, 0.7845092415809631, 0.027498241513967514, -0.3102462589740753, 0.47552162408828735, -0.11168698221445084, 0.9144570827484131, -0.02225402742624283, 0.230289489030838, -0.13555151224136353, 0.11269710958003998, 0.3551304340362549, -0.06164177879691124, -0.012677367776632309, -0.1980343610048294, 0.03281618654727936, 0.04303678125143051, 0.03278820589184761, 0.09275336563587189, 0.40473634004592896, -0.3663407564163208, 0.24109062552452087, -0.105843186378479, 0.4469738006591797, -0.040731221437454224, -0.007034555077552795, -0.03900136053562164, -0.2001374363899231, -0.052447907626628876, 0.12045760452747345, -0.05714438855648041, 0.12195877730846405, -0.0035044318065047264, -0.13798341155052185, 0.038570698350667953, -0.4939678907394409, -0.2175469696521759, 0.026395831257104874, -0.5055760741233826, 0.32412058115005493, -0.16373397409915924, 0.0933813750743866, -0.014718890190124512, 0.30701857805252075, 0.0865069329738617, 0.23905551433563232, -0.034643836319446564, -0.0008354112505912781, 0.07709027826786041, 0.006674536038190126, -0.128607377409935, -0.28439390659332275, 0.15961846709251404, 0.18532297015190125, -0.00734151154756546, 0.14856277406215668, -0.025739319622516632, -0.5060885548591614, -0.22246164083480835, 0.07304627448320389, 0.2858823537826538, -0.36654534935951233, -0.43859052658081055, -0.17201021313667297, -0.1113937497138977, -0.10332909226417542, 0.023890750482678413, 0.010730739682912827, -0.10972524434328079, 0.3575001657009125, -0.23952357470989227, -0.2372455894947052, 0.24617134034633636, 0.3517594039440155, -0.32856765389442444, -0.18570274114608765, 0.45420122146606445, -0.3402640223503113, -0.06531305611133575, -0.11184781789779663, 0.11139514297246933, -0.09102931618690491, 0.0006983503699302673, 0.2068597823381424, -0.272540807723999, 0.16384099423885345, -0.10233313590288162, 0.12585780024528503, 0.18277683854103088, 0.22748982906341553, -0.02067330852150917, -0.3733627498149872, -0.18487587571144104, 0.03569067269563675, -0.17711909115314484, 0.1585330218076706, 0.23617404699325562, 0.002523023635149002, 0.02429823763668537, 0.2208939790725708, -0.20258870720863342, 0.18127620220184326, -0.032035961747169495, 0.08583211898803711, 0.3761410117149353, 0.31129223108291626, 0.2769516706466675, -0.22455258667469025, -0.031489744782447815, 0.1976860910654068, -0.16317208111286163, -0.07211674004793167, -0.349928081035614, 0.20807653665542603, 0.220091313123703, 0.02508082427084446, 0.06581179052591324, -0.31741952896118164, 0.12064079940319061, -0.35023200511932373, 0.04486175999045372, 0.39288002252578735, -0.06695491075515747, 0.2886340618133545, 0.3548043370246887, 0.13577482104301453, 0.015074554830789566, 0.03601342812180519, -0.04921664297580719, 0.18359723687171936, 0.018004532903432846, 0.2534424066543579, 0.03223913162946701, -0.011304683983325958, -0.18233442306518555, 0.1354929804801941, -0.0019153058528900146, 0.11676151305437088, 0.1840481162071228, -0.16130080819129944, 0.13623373210430145, 0.4229465425014496, 0.016166016459465027, 0.1729225367307663, -0.500799834728241, -0.03654256835579872, 0.23023724555969238, 0.0679260715842247, 0.12308388948440552, -0.2761164605617523, 0.8008127212524414, 0.07609004527330399, -0.11692491173744202, 0.24351412057876587, 0.03454209491610527, 0.02452915906906128, -0.16957329213619232, -0.16691970825195312, 0.4612925350666046, -0.410574734210968, 0.3882529139518738, 0.3578396141529083, 0.20917834341526031, 0.3332790732383728, 0.25393837690353394, 0.3218890428543091, 0.1807015836238861, 0.5784001350402832, -0.258453905582428, 0.2908928096294403, 0.3010333478450775, -0.12142647802829742, 0.19677531719207764, -0.27287518978118896, 0.19349488615989685, 0.1676933318376541, -0.1804717779159546, 0.46876734495162964, -0.090614452958107, 0.32377803325653076, -0.4149036109447479, -0.08032726496458054, 0.09422311186790466, 0.19066038727760315, -0.252655565738678, -0.03485433757305145, 0.0795271024107933, 0.01992342621088028, -0.08976616710424423, -0.07539841532707214, -0.11359117925167084, -0.16838699579238892, 0.6030052900314331, 0.00853314995765686, 0.06575097888708115, 0.11920639872550964, -0.14185255765914917, 0.08520543575286865, 0.43108534812927246, -0.4683699607849121, -0.0725182518362999, -0.38374239206314087, 0.06913832575082779, 0.12287205457687378, 0.15990716218948364, 0.5544427633285522, 0.5351932048797607, -0.11234208941459656, 0.09138945490121841, 0.10165765881538391, -0.06206429749727249, 0.025630880147218704, 0.016752399504184723, -0.13843348622322083, -0.1652917116880417, 0.210610032081604, 0.03663212060928345, 0.01640896499156952, 0.09452438354492188, 0.2368488609790802, 0.42038270831108093, -0.03206028789281845, 0.16905120015144348, -0.11363765597343445, -0.22543257474899292, -0.24430224299430847, 0.26712894439697266, -0.3228886127471924, -0.14186659455299377, 0.38168835639953613, 0.18013134598731995, 0.2626308500766754, -0.15055885910987854, 0.046992361545562744, 0.2338540256023407, 0.1337420642375946, 0.16554409265518188, -0.11067969352006912, -0.5532165765762329, -0.13508780300617218, -0.6108707189559937, 0.15028123557567596, -0.09912411868572235, 0.11340872943401337, 0.0417402982711792, 0.0030685346573591232, -0.03908873349428177, 0.1086748018860817, 0.14022225141525269, -0.13638362288475037, -0.21917179226875305, 0.3542175590991974, -0.16318614780902863, -0.1612084060907364, 0.04170118644833565, 0.14460310339927673, 0.4254319965839386, -0.27171385288238525, 0.029863089323043823, 0.020313944667577744, -0.015078105032444, -0.31442105770111084, -0.22707587480545044, 0.09028321504592896, -0.058068759739398956, 0.6488996744155884, 0.028929954394698143, 0.2742850184440613, 0.006396334618330002, -0.21491147577762604, -0.047253552824258804, 0.1743016093969345, -0.2483454793691635, -0.12514957785606384, -0.1784658581018448, 0.2291243076324463, -0.385654091835022, -0.19190101325511932, -0.5190024971961975, -0.11397372931241989, -0.05914110690355301, -0.17112351953983307, -0.15094690024852753, 0.2457057237625122, -0.013711243867874146, 0.23054441809654236, 0.11105874180793762, 0.4378446340560913, -0.25360560417175293, 0.6320554614067078, -0.19981274008750916, -0.06735705584287643, 0.5248291492462158, -0.6005618572235107, -0.4457893967628479, 0.10416659712791443, 0.27973151206970215, -0.11805393546819687, -0.4135191738605499, -0.47193974256515503, -0.19090688228607178, 0.4383029043674469, 0.03404747322201729, -0.32471147179603577, -0.015911784023046494, -0.08349156379699707, 0.10943900048732758, 0.042153600603342056, 0.4812166690826416, 0.011710099875926971, -0.1895609200000763, 0.3745304346084595, -0.3594849109649658 ]
https://github.com/huggingface/datasets/issues/2407
.map() function got an unexpected keyword argument 'cache_file_name'
I think you are right. I used cache_file_names={data1: name1, data2: name2} and it works. Thank you!
## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0
16
.map() function got an unexpected keyword argument 'cache_file_name' ## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0 I think you are right. I used cache_file_names={data1: name1, data2: name2} and it works. Thank you!
[ 0.15060614049434662, 0.09318767488002777, 0.046234745532274246, -0.006893515586853027, 0.0496353805065155, 0.2938353419303894, 0.21114610135555267, 0.35865506529808044, -0.06443989276885986, 0.017635762691497803, 0.1194802075624466, 0.606624960899353, -0.2475741058588028, -0.487962007522583, 0.06840039044618607, 0.12066037207841873, 0.4148990511894226, -0.08681318163871765, 0.20501074194908142, 0.002126675099134445, -0.37797775864601135, 0.3605404496192932, -0.07199981063604355, 0.2415001541376114, -0.41303274035453796, -0.1476263850927353, -0.11090289056301117, -0.07805899530649185, -0.051237232983112335, -0.3494434058666229, 0.17833009362220764, 0.13312672078609467, -0.08975496888160706, 0.4608037769794464, -0.0001248522603418678, -0.0772017166018486, 0.013190757483243942, -0.18955636024475098, -0.19990508258342743, -0.34212177991867065, -0.10107633471488953, 0.022537177428603172, -0.06838115304708481, -0.5165249109268188, 0.22750505805015564, -0.1730198711156845, 0.20019033551216125, -0.580255925655365, 0.12642744183540344, 0.15583257377147675, 0.12115943431854248, -0.11189614236354828, -0.237079456448555, -0.15847201645374298, 0.0761793926358223, -0.12485483288764954, -0.010695204138755798, 0.19484245777130127, 0.010860241949558258, -0.2778087258338928, 0.156622052192688, 0.32394054532051086, -0.4211139678955078, -0.08803872764110565, 0.4996001422405243, 0.056509412825107574, -0.22053039073944092, -0.36821478605270386, 0.24684536457061768, -0.15575847029685974, 0.16004779934883118, -0.40978601574897766, -0.36364856362342834, -0.12352780997753143, -0.3060949742794037, -0.10573402792215347, 0.16891804337501526, -0.09691730886697769, -0.12873992323875427, -0.02695177122950554, 0.018505994230508804, -0.23594167828559875, 0.05173958092927933, 0.1558365374803543, 0.2515677809715271, 0.08784905076026917, -0.16671112179756165, 0.3883552849292755, 0.3064810633659363, -0.08606227487325668, -0.2235986739397049, -0.4085979163646698, -0.030748669058084488, 0.3572903573513031, -0.18477487564086914, -0.04179364815354347, 0.057103194296360016, 0.07327723503112793, 0.0752728134393692, -0.35706770420074463, -0.10440292954444885, -0.1761835217475891, 0.10446342080831528, 0.34140047430992126, 0.23983214795589447, 0.25437378883361816, 0.3329278826713562, 0.4893093407154083, -0.15979225933551788, -0.33604371547698975, -0.311604380607605, -0.20105478167533875, 0.06604036688804626, -0.09647165983915329, 0.5460056066513062, -0.07668601721525192, 0.28036171197891235, -0.10206867009401321, 0.11009735614061356, 0.07509438693523407, -0.37827304005622864, -0.012522955425083637, -0.08007975667715073, 0.374935120344162, 0.13748015463352203, -0.07995440065860748, -0.013175835832953453, 0.19785381853580475, 0.05740483105182648, -0.16820813715457916, -0.14082618057727814, 0.08838184177875519, -0.2228275090456009, 0.23665161430835724, -0.18653438985347748, -0.01899971067905426, 0.13544932007789612, 0.02653615176677704, 0.17264169454574585, -0.1520010530948639, 0.20273897051811218, -0.08685216307640076, 0.2472153604030609, -0.1467595100402832, -0.06665929406881332, 0.5224137306213379, 0.23761199414730072, -0.24462012946605682, -0.14675822854042053, 0.06541550904512405, -0.519585371017456, -0.28893694281578064, -0.0005844105035066605, 0.011489455588161945, -0.029699362814426422, 0.13884314894676208, -0.429733544588089, 0.008815862238407135, 0.5321177840232849, -0.3010300397872925, -0.006985001266002655, -0.05024401843547821, -0.24984468519687653, -0.5160011649131775, 0.029870254918932915, 0.3006657361984253, -0.0805000513792038, -0.03235262632369995, 0.018751826137304306, 0.20078065991401672, 0.00750625878572464, 0.15448206663131714, -0.09840154647827148, 0.24791809916496277, -0.19842679798603058, 0.6995720863342285, 0.531704306602478, -0.23377625644207, -0.5732628107070923, 0.2688947021961212, -0.17981953918933868, -0.0256471186876297, -0.07562368363142014, 0.03398450091481209, 0.4914754331111908, -0.15284769237041473, 0.4469080865383148, -0.053613170981407166, -0.029082732275128365, 0.19258883595466614, -0.25749680399894714, -0.22340373694896698, 0.16939540207386017, -0.2530672252178192, -0.042002614587545395, 0.16838502883911133, 0.07359681278467178, 0.09564926475286484, 0.10052786767482758, 0.07759810239076614, 0.24574114382266998, 0.06068692356348038, 0.27302801609039307, 0.08781427145004272, 0.029235396534204483, 0.011728998273611069, -0.25839728116989136, 0.058203719556331635, 0.20645032823085785, -0.44962233304977417, -0.2803351879119873, -0.49238938093185425, -0.026908567175269127, 0.040175385773181915, -0.15731708705425262, -0.03349960967898369, -0.003660755231976509, 0.09836321324110031, 0.06600494682788849, 0.11219146847724915, -0.08795847743749619, -0.0005151238292455673, 0.0636177584528923, -0.07784217596054077, 0.08917069435119629, -0.22923710942268372, -0.0712287649512291, -0.12886330485343933, -0.2181708663702011, -0.20205849409103394, 0.42929166555404663, -0.0318070724606514, -0.29883527755737305, 0.38828763365745544, -0.02716248296201229, 0.06652937829494476, -0.07847174257040024, 0.3237137794494629, -0.3152000904083252, -0.009199395775794983, 0.05075854808092117, -0.0057600270956754684, 0.1366640329360962, -0.014488350600004196, 0.09826313704252243, 0.17852865159511566, 0.3157643973827362, 0.16907325387001038, -0.2228192239999771, 0.3009205162525177, -0.03019910678267479, 0.012548308819532394, 0.03002787195146084, -0.2449704259634018, -0.03988907113671303, -0.1226131021976471, 0.3339983820915222, -0.1022685319185257, -0.0005506426095962524, 0.03521903604269028, 0.5029187798500061, 0.12204064428806305, 0.17327278852462769, -0.06956838071346283, -0.15036630630493164, -0.001280141994357109, 0.06646853685379028, 0.3170953691005707, 0.5943683385848999, -0.006618949584662914, 0.017345722764730453, -0.008895987644791603, 0.13921712338924408, 0.10312038660049438, 0.06919834017753601, 0.03652749955654144, -0.1297704577445984, -0.24335402250289917, -0.06271326541900635, 0.21507753431797028, 0.08546150475740433, 0.04917696490883827, 0.20673556625843048, 0.11328288912773132, -0.213006854057312, 0.29507872462272644, -0.07896874845027924, 0.019149988889694214, -0.07549337297677994, -0.05204010382294655, -0.23206999897956848, -0.4821266829967499, -0.08611626923084259, 0.20315097272396088, 0.04165346547961235, 0.2774493396282196, -0.1584029495716095, 0.16302618384361267, -0.008411034941673279, -0.4518016278743744, 0.013333618640899658, -0.20924408733844757, -0.043516553938388824, -0.21834199130535126, 0.020572494715452194, -0.31224462389945984, 0.42935624718666077, -0.022157467901706696, -0.06263736635446548, -0.3932144343852997, -0.13212142884731293, 0.1364065408706665, -0.13246962428092957, 0.1697254329919815, 0.13607805967330933, 0.10699081420898438, -0.284820020198822, -0.19637975096702576, 0.18699654936790466, -0.266124427318573, 0.05009264498949051, -0.0728318840265274, 0.11403815448284149, -0.2556232810020447, -0.13445940613746643, -0.0887681171298027, -0.08708474040031433, -0.0854693353176117, 0.268052875995636, -0.32166922092437744, 0.13086742162704468, 0.08595138788223267, -0.052236609160900116, 0.18077735602855682, -0.2963655889034271, -0.12830258905887604, -0.3490849733352661, -0.4505205452442169, 0.408070832490921, -0.2937374711036682, -0.2143181413412094, 0.016029033809900284, 0.06185350567102432, 0.1160237044095993, 0.23704539239406586, -0.2521747350692749, -0.265290766954422, 0.1330053210258484, 0.2280886173248291, 0.01311807706952095, -0.005722964182496071, 0.23802508413791656, 0.0031645623967051506, 0.08662065863609314, -0.30715546011924744, -0.46758443117141724, 0.11937857419252396, 0.14098647236824036, 0.31892937421798706, 0.37935692071914673, 0.2845682203769684, 0.3596895933151245, 0.6702025532722473, 0.3310704231262207, -0.0052537210285663605, 0.4259985685348511, -0.18994532525539398, 0.3477732241153717, -0.029560334980487823, -0.5100727677345276, -0.08949785679578781, -0.09392879903316498, -0.29866331815719604, -0.03973613679409027, -0.11994700878858566, -0.15531082451343536, 0.09200859069824219, -0.12178976833820343, -0.28511232137680054, -0.41316768527030945, 0.06248801201581955, -0.32080549001693726, 0.16124646365642548, 0.0793834775686264, 0.14295068383216858, -0.612284779548645, -0.12166937440633774, 0.06588329374790192, 0.2694427967071533, 0.14539837837219238, 0.12119676172733307, -0.37983718514442444, -0.028432752937078476, -0.42863428592681885, 0.5219659209251404, 0.032053641974925995, 0.32552027702331543, -0.16890794038772583, 0.13280650973320007, -0.016234293580055237, 0.22330033779144287, 0.7702386975288391, -0.3001859188079834, 0.02266133762896061, 0.10396893322467804, 0.21409323811531067, -0.208661288022995, 0.014274440705776215, 0.19267041981220245, 0.8246281743049622, 0.1640612632036209, 0.4790222942829132, -0.15949955582618713, -0.1409146785736084, -0.23438134789466858, 0.10062061250209808, -0.1453934758901596, -0.024744650349020958, -0.047868236899375916, -0.09617197513580322, -0.42465949058532715, -0.05032563954591751, 0.19720250368118286, -0.0002182023599743843, 0.35740604996681213, 0.1722482144832611, 0.12644299864768982, 0.052760906517505646, 0.20199917256832123, 0.18734340369701385, 0.3689805865287781, -0.01637776382267475, -0.12771554291248322, 0.23738843202590942, -0.035000964999198914, 0.12156374007463455, 0.13706478476524353, -0.23052722215652466, -0.10817262530326843, -0.1359265148639679, -0.11481165140867233, 0.4389282763004303, 0.14961497485637665, -0.28441956639289856, 0.08291532844305038, -0.13370153307914734, -0.03199499845504761, -0.017215386033058167, 0.21210220456123352, 0.4726806879043579, -0.07829231768846512, -0.583858072757721, -0.5335866808891296, 0.2385367751121521, 0.30747631192207336, -0.2767956852912903, 0.801052451133728, 0.0006076842546463013, -0.31992480158805847, 0.4546947479248047, -0.10772677510976791, 0.8967580199241638, -0.02939382940530777, 0.25612956285476685, -0.14852696657180786, 0.11161069571971893, 0.36560380458831787, -0.029531316831707954, -0.0222611241042614, -0.19983866810798645, 0.04099806770682335, 0.04289814829826355, 0.012294847518205643, 0.09137270599603653, 0.4195529818534851, -0.364022821187973, 0.26753443479537964, -0.07550357282161713, 0.4595959782600403, -0.043527089059352875, -0.005550604313611984, -0.0019313991069793701, -0.20611706376075745, -0.08435828983783722, 0.10253526270389557, -0.038067400455474854, 0.09375131130218506, 0.004315122961997986, -0.16887348890304565, 0.012575145810842514, -0.49773740768432617, -0.1557011604309082, 0.003470316529273987, -0.5351483225822449, 0.3101593852043152, -0.13946382701396942, 0.09569957852363586, -0.03432212769985199, 0.3570433557033539, 0.08537223190069199, 0.24379491806030273, -0.05735752731561661, -0.03326931968331337, 0.0785984992980957, 0.00920730922371149, -0.13051767647266388, -0.2771017849445343, 0.12491697072982788, 0.18103373050689697, -0.005107805132865906, 0.17530009150505066, -0.02513287402689457, -0.5194833278656006, -0.21738827228546143, 0.06010980159044266, 0.24891908466815948, -0.34634146094322205, -0.4690985679626465, -0.1768803596496582, -0.14152787625789642, -0.08656319975852966, 0.011034369468688965, 0.01979375258088112, -0.1361038237810135, 0.3602212965488434, -0.22079114615917206, -0.22412049770355225, 0.2638537883758545, 0.36755284667015076, -0.3189496397972107, -0.20108100771903992, 0.4495677947998047, -0.352536141872406, -0.05134635791182518, -0.07352139055728912, 0.09725932031869888, -0.10466768592596054, 0.03842984139919281, 0.2039566934108734, -0.18285883963108063, 0.1978287547826767, -0.11940884590148926, 0.16486117243766785, 0.15969230234622955, 0.22411930561065674, 0.031761232763528824, -0.34819844365119934, -0.21534211933612823, 0.04793791472911835, -0.15648673474788666, 0.13367733359336853, 0.22497954964637756, -0.011874118819832802, 0.04721236974000931, 0.1785409152507782, -0.19083625078201294, 0.18485145270824432, -0.02676984667778015, 0.08827760815620422, 0.377324640750885, 0.34355437755584717, 0.2894653081893921, -0.20116768777370453, -0.040562041103839874, 0.18544715642929077, -0.14473554491996765, -0.0630849152803421, -0.3401404917240143, 0.2215382158756256, 0.23390072584152222, 0.03389785811305046, 0.07869129627943039, -0.3499484062194824, 0.09290368854999542, -0.36375904083251953, 0.04239208623766899, 0.4307112991809845, -0.07257984578609467, 0.3073853850364685, 0.31820258498191833, 0.11266136169433594, 0.009708262979984283, 0.05858578532934189, -0.04213725030422211, 0.16384223103523254, 0.023089081048965454, 0.22500663995742798, 0.036674581468105316, 0.006175972521305084, -0.17365892231464386, 0.13463714718818665, -0.06448490917682648, 0.06582245230674744, 0.15878626704216003, -0.14275850355625153, 0.1276528388261795, 0.4364625811576843, 0.029316280037164688, 0.16256709396839142, -0.5086873769760132, -0.007061667740345001, 0.23761817812919617, 0.050873301923274994, 0.1090686023235321, -0.26069939136505127, 0.8278591632843018, 0.10902669280767441, -0.1083185076713562, 0.23992487788200378, 0.05898933485150337, 0.0016379207372665405, -0.13211995363235474, -0.18598365783691406, 0.4091361165046692, -0.43311965465545654, 0.3383311927318573, 0.28803887963294983, 0.23412080109119415, 0.3518940210342407, 0.261461466550827, 0.37010395526885986, 0.17643478512763977, 0.5423189997673035, -0.25194573402404785, 0.25703102350234985, 0.29388338327407837, -0.15192534029483795, 0.17426787316799164, -0.24554245173931122, 0.20536726713180542, 0.16001129150390625, -0.18533146381378174, 0.47707051038742065, -0.10641153156757355, 0.3385757505893707, -0.35983511805534363, -0.05612677335739136, 0.11439391225576401, 0.19506362080574036, -0.2536485493183136, -0.061843547970056534, 0.07250852882862091, 0.009816877543926239, -0.06204477325081825, -0.09283697605133057, -0.10134944319725037, -0.18832440674304962, 0.6053317785263062, 0.019247304648160934, 0.08361177891492844, 0.12080860882997513, -0.12015088647603989, 0.1298997402191162, 0.4147449731826782, -0.4476352035999298, -0.0883445218205452, -0.3582007884979248, 0.0668255090713501, 0.11627060174942017, 0.171382874250412, 0.5463874936103821, 0.5371772050857544, -0.09137575328350067, 0.11082901805639267, 0.07895329594612122, -0.07590655237436295, 0.04811783879995346, 0.041888318955898285, -0.10368116199970245, -0.1817258894443512, 0.195321187376976, 0.02416921965777874, 0.028716396540403366, 0.1169411689043045, 0.22795622050762177, 0.4599263668060303, -0.03824305161833763, 0.14894479513168335, -0.11419528722763062, -0.23892638087272644, -0.2414095401763916, 0.2638721764087677, -0.34292569756507874, -0.1206551194190979, 0.38877084851264954, 0.2108163833618164, 0.2338465452194214, -0.1618371605873108, 0.035278722643852234, 0.21223513782024384, 0.09105101227760315, 0.1747749149799347, -0.0927337184548378, -0.5577596426010132, -0.12715190649032593, -0.5940537452697754, 0.15524205565452576, -0.07874952256679535, 0.1418318748474121, 0.029293417930603027, 0.0033743269741535187, -0.0001280456781387329, 0.1125844269990921, 0.14464722573757172, -0.16402189433574677, -0.2420029491186142, 0.3722454905509949, -0.1334300935268402, -0.16986241936683655, 0.02883175015449524, 0.17341358959674835, 0.43829938769340515, -0.245284765958786, 0.005115877836942673, -0.01844574511051178, -0.024295175448060036, -0.3747483491897583, -0.18711891770362854, 0.0896143764257431, -0.05736679583787918, 0.6901991963386536, 0.010239685885608196, 0.279424786567688, 0.010122764855623245, -0.2189331203699112, -0.011949028819799423, 0.16734524071216583, -0.23614442348480225, -0.14496606588363647, -0.18624888360500336, 0.21860846877098083, -0.41186341643333435, -0.20179049670696259, -0.5065118670463562, -0.15141785144805908, -0.08316101133823395, -0.2064058929681778, -0.11748309433460236, 0.24217090010643005, 0.01917640119791031, 0.23198780417442322, 0.06846743822097778, 0.40401020646095276, -0.26068753004074097, 0.6287736296653748, -0.21652564406394958, -0.04396228492259979, 0.5280611515045166, -0.6110014915466309, -0.443710058927536, 0.10858798027038574, 0.28437983989715576, -0.15797504782676697, -0.41475793719291687, -0.4719444811344147, -0.16675294935703278, 0.4483361542224884, 0.07611120492219925, -0.32205259799957275, 0.009797591716051102, -0.12448696792125702, 0.1342136114835739, 0.062229227274656296, 0.45023930072784424, -0.02078298106789589, -0.17807148396968842, 0.28838568925857544, -0.3513786792755127 ]
https://github.com/huggingface/datasets/issues/2400
Concatenate several datasets with removed columns is not working.
Hi, did you fill out the env info section manually or by copy-pasting the output of the `datasets-cli env` command? This code should work without issues on 1.6.2 version (I'm working on master (1.6.2.dev0 version) and can't reproduce this error).
## Describe the bug You can't concatenate datasets when you removed columns before. ## Steps to reproduce the bug ```python from datasets import load_dataset, concatenate_datasets wikiann= load_dataset("wikiann","en") wikiann["train"] = wikiann["train"].remove_columns(["langs","spans"]) wikiann["test"] = wikiann["test"].remove_columns(["langs","spans"]) assert wikiann["train"].features.type == wikiann["test"].features.type concate = concatenate_datasets([wikiann["train"],wikiann["test"]]) ``` ## Expected results Merged dataset ## Actual results ```python ValueError: External features info don't match the dataset: Got {'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'ner_tags': Sequence(feature=ClassLabel(num_classes=7, names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC'], names_file=None, id=None), length=-1, id=None), 'langs': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'spans': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<langs: list<item: string>, ner_tags: list<item: int64>, spans: list<item: string>, tokens: list<item: string>> but expected something like {'ner_tags': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<ner_tags: list<item: int64>, tokens: list<item: string>> ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: ~1.6.2~ 1.5.0 - Platform: macos - Python version: 3.8.5 - PyArrow version: 3.0.0
40
Concatenate several datasets with removed columns is not working. ## Describe the bug You can't concatenate datasets when you removed columns before. ## Steps to reproduce the bug ```python from datasets import load_dataset, concatenate_datasets wikiann= load_dataset("wikiann","en") wikiann["train"] = wikiann["train"].remove_columns(["langs","spans"]) wikiann["test"] = wikiann["test"].remove_columns(["langs","spans"]) assert wikiann["train"].features.type == wikiann["test"].features.type concate = concatenate_datasets([wikiann["train"],wikiann["test"]]) ``` ## Expected results Merged dataset ## Actual results ```python ValueError: External features info don't match the dataset: Got {'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'ner_tags': Sequence(feature=ClassLabel(num_classes=7, names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC'], names_file=None, id=None), length=-1, id=None), 'langs': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'spans': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<langs: list<item: string>, ner_tags: list<item: int64>, spans: list<item: string>, tokens: list<item: string>> but expected something like {'ner_tags': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<ner_tags: list<item: int64>, tokens: list<item: string>> ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: ~1.6.2~ 1.5.0 - Platform: macos - Python version: 3.8.5 - PyArrow version: 3.0.0 Hi, did you fill out the env info section manually or by copy-pasting the output of the `datasets-cli env` command? This code should work without issues on 1.6.2 version (I'm working on master (1.6.2.dev0 version) and can't reproduce this error).
[ -0.05039602518081665, -0.16309890151023865, -0.037249404937028885, 0.29215729236602783, 0.0712868720293045, 0.16081583499908447, 0.42755720019340515, 0.39729875326156616, -0.12802350521087646, 0.09719770401716232, -0.21168586611747742, 0.28301161527633667, 0.11641448736190796, 0.24014751613140106, -0.3315175175666809, -0.2897304892539978, 0.3033924996852875, -0.04976598918437958, -0.11161074042320251, 0.008924506604671478, -0.2896186113357544, 0.15857183933258057, -0.5898987650871277, -0.08124138414859772, -0.21307490766048431, 0.3191351890563965, -0.4302581548690796, 0.010183975100517273, 0.015858354046940804, -0.010766604915261269, 0.24893192946910858, 0.034874558448791504, 0.0911824107170105, 0.284043550491333, -0.00011212432582397014, -0.10662037879228592, 0.21691587567329407, -0.098146453499794, -0.05101757496595383, -0.07685738801956177, -0.36600372195243835, -0.3289981484413147, 0.0968499705195427, -0.13807526230812073, 0.09261005371809006, -0.3934739828109741, -0.5519911646842957, -0.31508970260620117, -0.07372218370437622, 0.33574649691581726, 0.1743544191122055, 0.18431037664413452, 0.19667403399944305, 0.05801984295248985, 0.09816456586122513, -0.10654494166374207, -0.14004433155059814, -0.30293092131614685, -0.08007462322711945, -0.22235740721225739, 0.4281584918498993, 0.2023562490940094, -0.17753152549266815, -0.21881389617919922, -0.11700006574392319, 0.27386707067489624, -0.1349681317806244, -0.3314729332923889, -0.06746135652065277, 0.17710274457931519, 0.529875636100769, -0.1704704463481903, -0.07860205322504044, -0.11115434020757675, 0.14926405251026154, -0.35331499576568604, 0.10710006952285767, 0.23449435830116272, 0.09673790633678436, 0.0004619508981704712, -0.07604861259460449, 0.1861797571182251, -0.07124020904302597, 0.1990373283624649, 0.002984941005706787, 0.3789430856704712, 0.18022730946540833, 0.09264698624610901, -0.0005087181925773621, -0.2979046106338501, 0.20165182650089264, -0.4510839283466339, -0.10826224088668823, 0.10075357556343079, -0.6059799194335938, -0.05055569112300873, -0.05914811044931412, -0.22088369727134705, 0.19620394706726074, 0.06682802736759186, -0.3245200216770172, -0.08439954370260239, 0.19130843877792358, 0.10332091152667999, 0.17775914072990417, 0.4177725315093994, -0.11638123542070389, 0.29420986771583557, -0.2089637964963913, 0.119907446205616, -0.09707027673721313, 0.08320126682519913, 0.07536555081605911, -0.05615430697798729, 0.07013870775699615, 0.10111235082149506, 0.39095574617385864, -0.0969194546341896, -0.11478106677532196, 0.14328043162822723, -0.3422625958919525, 0.004498762544244528, -0.1969396322965622, -0.12636956572532654, -0.1667238473892212, 0.5428575277328491, 0.037759266793727875, 0.3465745449066162, 0.15970607101917267, -0.06622035056352615, -0.2639192044734955, 0.0068230777978897095, -0.02309323661029339, -0.3497840166091919, -0.01363866962492466, -0.07297730445861816, 0.025217367336153984, 0.37982282042503357, 0.07187062501907349, -0.03703930974006653, -0.21974021196365356, -0.19569802284240723, 0.2782515287399292, -0.04062298312783241, 0.002614036202430725, -0.22289763391017914, 0.403815895318985, -0.164015993475914, 0.038097016513347626, -0.04344077408313751, -0.5051543712615967, -0.1425156444311142, -0.6818563342094421, 0.24048638343811035, 0.03189627081155777, 0.010436128824949265, -0.1410253643989563, 0.19478173553943634, 0.12999482452869415, 0.228631854057312, -0.17184996604919434, -0.2043318748474121, 0.08448953926563263, -0.11658648401498795, 0.300638347864151, 0.1032019779086113, -0.22589854896068573, 0.08968432247638702, 0.23806525766849518, 0.02418559044599533, 0.41487500071525574, 0.16802361607551575, 0.008054961450397968, 0.09379325062036514, -0.3190905451774597, -0.037007082253694534, 0.40731608867645264, -0.3568251132965088, -0.07533325254917145, 0.03448503091931343, 0.0019475743174552917, 0.39652541279792786, 0.06307260692119598, -0.1725122332572937, -0.021323764696717262, 0.11550778150558472, 0.3902072608470917, 0.3771297335624695, 0.008524995297193527, -0.048493750393390656, -0.09528669714927673, -0.30980774760246277, 0.3817211985588074, -0.06490593403577805, 0.01631953939795494, 0.2972754240036011, 0.14580455422401428, -0.34831517934799194, 0.3754388988018036, -0.23168575763702393, -0.04688920080661774, 0.39966827630996704, 0.13509777188301086, 0.014062441885471344, -0.07876403629779816, -0.027704913169145584, -0.6223956346511841, 0.0030917078256607056, 0.006015785038471222, 0.1521742045879364, 0.027459971606731415, -0.15279844403266907, -0.02955958992242813, -0.15358160436153412, -0.2728899121284485, 0.06497637927532196, 0.162714883685112, 0.18237000703811646, 0.08880093693733215, -0.11815373599529266, -0.22293011844158173, 0.4120447635650635, -0.08627022802829742, 0.07039454579353333, -0.34076476097106934, 0.30831775069236755, -0.1723787486553192, 0.03292802721261978, 0.10735157132148743, 0.380680650472641, 0.30773138999938965, 0.0311497300863266, -0.11542292684316635, 0.30308592319488525, -0.1770816445350647, -0.1594834178686142, -0.14158904552459717, -0.172977015376091, 0.03140498325228691, -0.10567958652973175, -0.2074013352394104, -0.08510759472846985, -0.007330526597797871, -0.09691347181797028, -0.09338825196027756, 0.18590965867042542, -0.03482414409518242, 0.3872607350349426, 0.023794136941432953, 0.01623682864010334, 0.20361226797103882, -0.11431223154067993, -0.04445488005876541, -0.16320863366127014, 0.19561821222305298, 0.05715904012322426, -0.22435711324214935, 0.09471181780099869, -0.350967139005661, 0.10102140158414841, 0.4427131414413452, 0.3745533525943756, -0.22291842103004456, -0.019739747047424316, -0.2566661834716797, -0.05037173256278038, 0.08027490973472595, -0.04371551424264908, 0.5458464026451111, 0.285697877407074, -0.1391589194536209, 0.22372961044311523, 0.14023755490779877, -0.02417563833296299, 0.10974566638469696, 0.17192009091377258, 0.05357515066862106, 0.42722904682159424, 0.3137720227241516, 0.14904479682445526, -0.03107786364853382, -0.13941451907157898, 0.08145129680633545, 0.11540486663579941, -0.2603970766067505, 0.06826309114694595, -0.4254436492919922, -0.32822853326797485, -0.06430641561746597, -0.40150880813598633, -0.19658732414245605, -0.5253540277481079, -0.2588241696357727, -0.0019738785922527313, -0.22721698880195618, 0.35886791348457336, -0.2451850324869156, -0.1407824009656906, 0.11126483976840973, -0.31648772954940796, -0.1617889702320099, -0.006037262734025717, -0.010985590517520905, 0.10993030667304993, -0.02841966226696968, -0.07249294221401215, -0.11418327689170837, -0.11955015361309052, -0.02902512066066265, -0.2793533205986023, -0.1802811622619629, 0.078389011323452, -0.41085660457611084, -0.005950711667537689, 0.08335685729980469, -0.1461048424243927, 0.042866870760917664, -0.5514667630195618, 0.21306854486465454, 0.34471505880355835, -0.0989946648478508, 0.35319775342941284, 0.19519884884357452, -0.04605531319975853, -0.03980739042162895, -0.4187423288822174, -0.17644964158535004, -0.33591532707214355, 0.036710225045681, 0.08657784759998322, 0.09534933418035507, 0.28008192777633667, 0.1913309395313263, -0.1775089055299759, 0.08754266053438187, 0.02805371582508087, -0.16983121633529663, -0.17274223268032074, 0.19655390083789825, 0.028986353427171707, -0.19540834426879883, 0.03770247474312782, -0.046609632670879364, 0.11345885694026947, 0.14093369245529175, -0.11584311723709106, -0.09089107811450958, -0.12764517962932587, 0.33265137672424316, -0.1209758073091507, 0.2143719643354416, 0.13296964764595032, 0.15402884781360626, 0.023120587691664696, 0.07875091582536697, 0.02801479399204254, 0.04315958917140961, 0.12993061542510986, 0.3429619371891022, -0.22132831811904907, 0.13725747168064117, -0.14957121014595032, 0.1375366747379303, 0.341988205909729, -0.02572440728545189, 0.2826376259326935, 0.022258335724473, 0.340606689453125, -0.13520273566246033, -0.5328828692436218, -0.12719731032848358, -0.08142298460006714, 0.3290215730667114, -0.03296312689781189, -0.24765834212303162, -0.1753961145877838, -0.17299357056617737, 0.24394679069519043, -0.06947837769985199, -0.0917680561542511, -0.033373624086380005, -0.25836852192878723, 0.2206798791885376, 0.11475995182991028, -0.26897647976875305, -0.1551438570022583, -0.1641208529472351, -0.024563191458582878, 0.08014273643493652, 0.0375056229531765, -0.14970675110816956, -0.6010096669197083, 0.010080695152282715, -0.24052497744560242, 0.34055137634277344, 0.2059507966041565, 0.41487497091293335, 0.21380509436130524, -0.314710795879364, -0.31111592054367065, 0.09815739840269089, 0.3010888397693634, -0.27332019805908203, -0.5399461984634399, 0.5859169960021973, 0.2233324646949768, -0.17134881019592285, -0.4675939679145813, -0.199763685464859, -0.19708842039108276, 0.2386055290699005, 0.5842801332473755, -0.13349594175815582, -0.1447019726037979, 0.5269440412521362, 0.6180105805397034, 0.11994577944278717, 0.04106418788433075, -0.3213902413845062, -0.0627557560801506, -0.41765955090522766, -0.2730881869792938, -0.022893212735652924, 0.5833280086517334, -0.41074132919311523, -0.17398206889629364, -0.19976617395877838, -0.4016905426979065, 0.212587371468544, -0.29196473956108093, 0.3892846703529358, 0.10777118802070618, 0.208587184548378, -0.42335250973701477, 0.485882043838501, 0.10327780246734619, 0.4562622606754303, 0.1394287496805191, -0.5673008561134338, 0.01676882803440094, -0.16748838126659393, 0.75608229637146, -0.1930595338344574, -0.15197375416755676, 0.4494764804840088, -0.5763667821884155, 0.31197479367256165, 0.04491583630442619, 0.2468319684267044, 0.3549007475376129, 0.015137423761188984, -0.1996210813522339, -0.09140097349882126, 0.028181716799736023, 0.18547917902469635, 0.052252545952796936, 0.5647616982460022, -0.005814775824546814, -0.2855694890022278, -0.02445310167968273, -0.20057711005210876, 0.7556124925613403, 0.30283814668655396, 0.020841332152485847, 0.09656909853219986, 0.11472508311271667, 0.3575701415538788, -0.020463604480028152, 0.30856001377105713, -0.3534914255142212, -0.1734670251607895, -0.038928717374801636, -0.15951356291770935, 0.14113189280033112, -0.37611955404281616, -0.355876624584198, 0.27863383293151855, -0.4931747317314148, 0.7269927859306335, -0.034701257944107056, 0.18872149288654327, 0.1059441864490509, -0.20082511007785797, -0.06800471991300583, 0.03787202388048172, 0.05801845341920853, -0.18675366044044495, -0.12298279255628586, 0.0072533972561359406, -0.07997643202543259, -0.10677455365657806, 0.013524644076824188, 0.4419240653514862, 0.004734027665108442, 0.4068087339401245, -0.08967399597167969, -0.342357337474823, -0.06092232093214989, 0.4606698751449585, 0.299940824508667, 0.010273262858390808, 0.10205065459012985, -0.223128542304039, 0.11348766833543777, -0.016072077676653862, 0.04678913578391075, -0.33108505606651306, -0.0681072250008583, 0.09271226078271866, -0.3878517150878906, 0.3156062960624695, 0.15167273581027985, -0.35608696937561035, -0.29753896594047546, 0.10842187702655792, 0.08183735609054565, -0.48824551701545715, -0.17004266381263733, 0.16754376888275146, -0.0017360784113407135, -0.2665570378303528, 0.12259842455387115, -0.09742864966392517, -0.28916415572166443, 0.29673805832862854, -0.0802767276763916, -0.2868708670139313, -0.19647228717803955, 0.3217976689338684, 0.2862676680088043, 0.013193555176258087, 0.46458375453948975, 0.12843604385852814, 0.13287809491157532, -0.08339788019657135, 0.06753344088792801, -0.10734953731298447, -0.1771722435951233, -0.00769746582955122, -0.17452053725719452, 0.018500342965126038, -0.09491684287786484, 0.5044788122177124, -0.23472924530506134, 0.22458186745643616, 0.11394813656806946, -0.17931434512138367, -0.34018653631210327, 0.10366768389940262, -0.14667493104934692, 0.08925171941518784, -0.09590229392051697, 0.30435407161712646, -0.17474791407585144, 0.12041938304901123, -0.27476370334625244, -0.09564977139234543, -0.24621114134788513, 0.18675854802131653, 0.11899232119321823, -0.041710756719112396, 0.02595372311770916, -0.1496899127960205, 0.14645782113075256, 0.19571006298065186, 0.2536361813545227, -0.2474798560142517, -0.082630455493927, 0.08717077225446701, 0.2038491666316986, -0.07529128342866898, -0.09007271379232407, -0.06640571355819702, -0.28714385628700256, -0.19953547418117523, -0.11681745946407318, -0.06530487537384033, -0.04179457575082779, 0.27978283166885376, -0.1537996381521225, -0.07640939205884933, -0.03612649068236351, 0.025408819317817688, -0.04094334691762924, 0.0646219551563263, -0.2511427402496338, -0.06395580619573593, -0.23189173638820648, -0.03100232034921646, -0.28645941615104675, 0.025183338671922684, -0.12435096502304077, 0.3092533349990845, 0.2894901931285858, -0.1083316057920456, -0.2965265214443207, -0.14837400615215302, 0.20372813940048218, 0.23299844563007355, -0.19551432132720947, 0.08036153763532639, 0.06745511293411255, 0.1903170347213745, -0.4417674243450165, -0.29188260436058044, 0.08223137259483337, 0.14209125936031342, 0.09776687622070312, 0.18508706986904144, 0.28021949529647827, -0.15550103783607483, -0.05772249400615692, -0.09089560061693192, 0.306122362613678, 0.1604911983013153, 0.43710097670555115, 0.42797738313674927, 0.057125795632600784, 0.1286175400018692, 0.10297241806983948, 0.23782391846179962, -0.03850019723176956, 0.19319859147071838, 0.18887954950332642, -0.06996368616819382, 0.23641884326934814, -0.11554738879203796, 0.0791442021727562, -0.160575732588768, 0.3062431514263153, 0.04597622901201248, 0.008345402777194977, 0.10925231873989105, -0.01703326404094696, -0.14816832542419434, -0.03652896359562874, -0.32101336121559143, -0.06509213149547577, 0.3818080425262451, -0.11063825339078903, 0.10320764780044556, -0.042440883815288544, -0.16618049144744873, 0.12700922787189484, -0.020253486931324005, 0.19573231041431427, 0.007717505097389221, 0.32948821783065796, -0.11013256013393402, -0.0789012610912323, -0.09903170168399811, 0.2679000794887543, 0.567116379737854, 0.3819374442100525, -0.20401310920715332, -0.05627650022506714, 0.2738364338874817, 0.14248089492321014, -0.04934779927134514, 0.20272944867610931, 0.5455582737922668, 0.26730334758758545, 0.05713067203760147, -0.050781141966581345, 0.02718093991279602, -0.22872333228588104, 0.09954160451889038, 0.2750026285648346, 0.024839989840984344, -0.33966901898384094, 0.23540659248828888, 0.14329659938812256, -0.17918485403060913, 0.06704314798116684, 0.09115832298994064, 0.14559806883335114, -0.5377768874168396, 0.4148109555244446, 0.11682320386171341, -0.2847917079925537, -0.019849039614200592, 0.05305783450603485, -0.07160531729459763, 0.006434028036892414, 0.6549490094184875, 0.41005614399909973, 0.2773188054561615, 0.07865496724843979, 0.12118275463581085, 0.14260725677013397, 0.2290952503681183, 0.49575692415237427, 0.04658208042383194, -0.45829206705093384, -0.24252763390541077, -0.41704580187797546, -0.05890800803899765, -0.029921729117631912, -0.10186005383729935, 0.12884986400604248, 0.24195756018161774, 0.22514653205871582, 0.19130276143550873, -0.059840187430381775, 0.2551974952220917, 0.23306523263454437, -0.21047544479370117, -0.6309729814529419, -0.22509033977985382, 0.025339573621749878, 0.04108379781246185, 0.021310705691576004, -0.3583002984523773, 0.39488446712493896, 0.1316538006067276, 0.07898498326539993, -0.16514864563941956, 0.022408083081245422, 0.18798570334911346, 0.03495904803276062, -0.005115076899528503, 0.2527990937232971, 0.35673758387565613, -0.0489397831261158, -0.04158056527376175, -0.04855957254767418, -0.1991141140460968, -0.11303917318582535, 0.1264907419681549, -0.12787368893623352, 0.12836360931396484, -0.10199718922376633, 0.10068902373313904, -0.15871445834636688, 0.10352659970521927, 0.402066171169281, 0.10557450354099274, -0.3391425907611847, 0.08877432346343994, 0.2914121448993683, 0.09356901794672012, 0.18964606523513794, 0.5305503010749817, -0.08921217918395996, 0.4117036759853363, -0.11162326484918594, -0.4936119616031647, 0.28721439838409424, 0.023108921945095062, -0.6537188291549683, -0.19102217257022858, 0.156352698802948, 0.2566808760166168, 0.14432945847511292, -0.3373328149318695, -0.010528191924095154, 0.48992088437080383, -0.1523716151714325, -0.12012933194637299, 0.37323564291000366, 0.007130099460482597, 0.24976424872875214, 0.02441832795739174, -0.10451614856719971, 0.1468234360218048, -0.14723604917526245, 0.0055600740015506744, 0.004518214613199234 ]
https://github.com/huggingface/datasets/issues/2396
strange datasets from OSCAR corpus
Hi ! Thanks for reporting cc @pjox is this an issue from the data ? Anyway we should at least mention that OSCAR could contain such contents in the dataset card, you're totally right @jerryIsHere
![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11
35
strange datasets from OSCAR corpus ![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11 Hi ! Thanks for reporting cc @pjox is this an issue from the data ? Anyway we should at least mention that OSCAR could contain such contents in the dataset card, you're totally right @jerryIsHere
[ 0.26769933104515076, 0.057095617055892944, -0.002301344648003578, 0.5770168900489807, 0.1565006524324417, 0.06097034364938736, -0.012423861771821976, 0.24926812946796417, -0.2645933926105499, 0.04861319065093994, -0.5796422362327576, -0.10799803584814072, 0.04310464859008789, -0.05117505416274071, -0.009494231082499027, -0.3019310534000397, 0.11055293679237366, 0.05995825678110123, 0.03440447151660919, -0.3692535161972046, -0.1291409581899643, 0.24387407302856445, -0.09914128482341766, 0.06843794137239456, -0.010477066971361637, -0.1464853584766388, -0.25490230321884155, -0.007228687405586243, -0.39760807156562805, 0.02827555313706398, 0.16913004219532013, 0.12572169303894043, 0.04472506791353226, 0.3785851001739502, -0.00010987844143528491, -0.16753989458084106, 0.22414951026439667, -0.0326169990003109, 0.12372717261314392, -0.05977776646614075, 0.17777982354164124, 0.04273298382759094, -0.009944326244294643, 0.03411821275949478, -0.2434692680835724, -0.2776969075202942, 0.004047263413667679, 0.1497945636510849, 0.293655127286911, 0.4105723202228546, 0.23799850046634674, 0.06309816986322403, -0.11717034876346588, -0.13369697332382202, 0.20727947354316711, -0.03233625739812851, -0.24816972017288208, 0.1810346096754074, 0.4662705063819885, 0.07619030028581619, -0.11216823011636734, 0.057644203305244446, 0.02833370678126812, -0.10125385224819183, 0.21700519323349, -0.111178919672966, -0.26505035161972046, -0.4842263162136078, 0.2932802438735962, 0.5078216791152954, 0.30798014998435974, -0.0811569020152092, -0.25894278287887573, -0.2738284170627594, 0.09889361262321472, -0.27390846610069275, 0.29323530197143555, 0.3606121242046356, 0.07457412779331207, 0.22891488671302795, -0.2088947296142578, 0.19545547664165497, -0.11806847155094147, 0.408597469329834, -0.26785218715667725, -0.1681370735168457, -0.2238401174545288, 0.019789185374975204, 0.06708337366580963, -0.06706950068473816, 0.039549168199300766, -0.27900075912475586, 0.021659785881638527, 0.27278363704681396, -0.16986750066280365, -0.1353239119052887, 0.03782837837934494, 0.4480690360069275, 0.19934698939323425, -0.12698747217655182, -0.055764324963092804, 0.18985965847969055, -0.32694709300994873, -0.047159455716609955, 0.33540910482406616, 0.1453733891248703, -0.15727996826171875, -0.13771404325962067, 0.14238552749156952, 0.1614498645067215, 0.08490025997161865, 0.2207643985748291, -0.07770402729511261, -0.08426720649003983, -0.2245466411113739, -0.3745209574699402, 0.09915612637996674, -0.377040833234787, -0.27491840720176697, 0.3003407120704651, -0.6244726777076721, 0.2917197644710541, 0.035768721252679825, 0.1298946738243103, -0.19988161325454712, 0.06678204238414764, -0.0167152751237154, 0.20291900634765625, -0.11944808065891266, -0.03973675146698952, -0.19216790795326233, 0.2545001208782196, -0.21706463396549225, 0.23726151883602142, 0.04014197364449501, -0.27051958441734314, 0.24935349822044373, 0.18564391136169434, 0.3698464632034302, -0.13690440356731415, -0.0799853578209877, -0.4004630744457245, -0.01956145465373993, 0.09292273223400116, -0.17454607784748077, 0.11279014497995377, 0.06147360801696777, -0.32610851526260376, -0.12227083742618561, -0.17412832379341125, -0.30788102746009827, -0.14318324625492096, 0.07866394519805908, 0.18306376039981842, -0.43354278802871704, 0.032701533287763596, -0.34308889508247375, 0.37513449788093567, 0.01945541799068451, 0.3101084232330322, 0.3069826066493988, -0.08483896404504776, -0.26144126057624817, 0.11047961562871933, -0.151020810008049, 0.3771539330482483, -0.006524939090013504, -0.08352822065353394, -0.1661025583744049, 0.08150693029165268, 0.30796149373054504, 0.24006319046020508, -0.02286830171942711, -0.08667481690645218, -0.2789584696292877, 0.10166601836681366, -0.0555681511759758, -0.2338879555463791, -0.3346044719219208, 0.29961106181144714, 0.18446950614452362, 0.2973282039165497, -0.1442994773387909, -0.12742836773395538, 0.23228654265403748, -0.27343615889549255, 0.2217366248369217, 0.17402005195617676, 0.05132497847080231, -0.027263382449746132, -0.32900574803352356, -0.11871379613876343, -0.3585999011993408, 0.0662761777639389, 0.1302725374698639, 0.08799707144498825, 0.0359002910554409, 0.06225660443305969, 0.3574254512786865, 0.026875058189034462, 0.07454950362443924, 0.13262632489204407, -0.13394655287265778, 0.4023643136024475, 0.1660580039024353, 0.002795107662677765, 0.07459854334592819, 0.2480974793434143, -0.30260464549064636, 0.5085479617118835, 0.01808224618434906, -0.2257504165172577, -0.19976088404655457, -0.23861637711524963, -0.2820657789707184, -0.2455316185951233, 0.14677603542804718, -0.18496191501617432, 0.0019977502524852753, 0.30761078000068665, 0.04638654366135597, 0.045598432421684265, -0.23204481601715088, 0.02284436672925949, -0.5470089912414551, 0.17837344110012054, 0.05642642080783844, 0.1313602328300476, 0.19219402968883514, 0.22658026218414307, 0.002263672649860382, -0.12884780764579773, 0.01881720870733261, 0.07111892849206924, -0.37849125266075134, 0.521687924861908, 0.010542549192905426, 0.339064359664917, 0.48426946997642517, -0.3351527452468872, 0.1867593675851822, 0.09629282355308533, 0.20571252703666687, -0.059574440121650696, -0.11921996623277664, 0.4944603443145752, 0.1703856736421585, -0.16878563165664673, 0.07066163420677185, 0.016497226431965828, 0.28346017003059387, -0.13360020518302917, -0.22275088727474213, -0.2548025846481323, 0.42408257722854614, 0.1479569375514984, 0.4548327624797821, 0.19432824850082397, -0.4106910526752472, 0.22089996933937073, 0.008011914789676666, -0.04428805410861969, 0.20072880387306213, 0.30622610449790955, -0.19378751516342163, -0.025721080601215363, 0.022715680301189423, 0.24689720571041107, 0.14871741831302643, 0.06257423013448715, -0.07497695088386536, 0.3186787962913513, -0.06945853680372238, -0.35581332445144653, 0.11184678971767426, 0.1962323784828186, 0.44467267394065857, 0.09990876168012619, 0.36057066917419434, 0.22025136649608612, -0.713396430015564, 0.1260080337524414, -0.011981666088104248, 0.3289735019207001, -0.15429098904132843, 0.23275847733020782, -0.10935494303703308, -0.3838164806365967, -0.42559951543807983, -0.05260619521141052, -0.1197228878736496, -0.07657931745052338, 0.19171231985092163, -0.007961515337228775, -0.07108989357948303, -0.06067163497209549, -0.25330477952957153, 0.21267104148864746, -0.23073530197143555, 0.39203929901123047, -0.09700079262256622, -0.0001330021768808365, -0.11997158080339432, 0.12991873919963837, 0.12056112289428711, 0.015621813014149666, 0.4261787235736847, -0.22344587743282318, -0.14499375224113464, -0.20552723109722137, -0.5277352333068848, 0.35500994324684143, -0.03703257441520691, -0.08284113556146622, -0.07096090912818909, -0.12303133308887482, -0.2948216199874878, -0.04603385925292969, 0.05507539585232735, -0.17522364854812622, -0.1702316850423813, 0.05685357004404068, -0.14046983420848846, -0.00863020122051239, 0.03840761259198189, -0.45634928345680237, -0.21691790223121643, -0.06009010970592499, 0.22155672311782837, 0.1342095136642456, 0.16094297170639038, 0.4600662887096405, -0.22888769209384918, 0.14005477726459503, 0.16698969900608063, 0.08079084753990173, -0.524605393409729, -0.35672542452812195, 0.34217992424964905, -0.3204013407230377, -0.4378066956996918, -0.20665134489536285, -0.2681739032268524, -0.11364708840847015, 0.041977450251579285, -0.3773084282875061, -0.589593231678009, -0.2654290497303009, -0.19500233232975006, 0.390293687582016, -0.3890115022659302, 0.06611847877502441, -0.3487101197242737, -0.11243149638175964, 0.000254657119512558, 0.3013917803764343, -0.01722237467765808, 0.007514294236898422, 0.2562912404537201, -0.23898449540138245, 0.5512992739677429, 0.06275621056556702, 0.3488260507583618, 0.2001669853925705, 0.07852496206760406, 0.40077269077301025, 0.15145201981067657, 0.2562439441680908, -0.03192172944545746, -0.13403519988059998, 0.3567916750907898, -0.16099533438682556, -0.01103457435965538, 0.4110296964645386, 0.10140104591846466, -0.25888288021087646, -0.011514946818351746, 0.12571200728416443, -0.2704860270023346, -0.23279796540737152, 0.013727379031479359, -0.07529763132333755, -0.044432319700717926, 0.06196487322449684, -0.01682867482304573, 0.24662989377975464, -0.4781702160835266, -0.045904990285634995, 0.0849938690662384, -0.04838006943464279, -0.048061370849609375, -0.15556606650352478, 0.036182474344968796, -0.6853788495063782, 0.12992854416370392, 0.0055807242169976234, 0.21575677394866943, -0.09814823418855667, 0.3015865981578827, 0.2229267954826355, 0.11425023525953293, 0.6046199202537537, -0.03607703000307083, 0.019758252426981926, 0.06408756971359253, -0.1593838334083557, -0.2227320671081543, -0.17619572579860687, -0.42901647090911865, 0.2636866569519043, 0.21559205651283264, 0.23501567542552948, -0.1400405317544937, -0.0076078083366155624, 0.21083863079547882, 0.0438338927924633, -0.1988004744052887, 0.04526005685329437, -0.014093101024627686, -0.5783289670944214, 0.020486032590270042, -0.0566009059548378, 0.2570240795612335, 0.24611414968967438, -0.24656543135643005, -0.17835481464862823, 0.027397535741329193, 0.39218923449516296, 0.5225211381912231, 0.08226533234119415, 0.07780183106660843, 0.5562987923622131, 0.1265050768852234, 0.048596642911434174, 0.27940797805786133, 0.27856677770614624, 0.7305163741111755, -0.13835301995277405, -0.45961475372314453, -0.07870059460401535, -0.3730381727218628, -0.05394146591424942, 0.5012974739074707, 0.07331953942775726, -0.04617009311914444, -0.31453821063041687, -0.021249450743198395, -0.2173008918762207, 0.19828560948371887, 0.36735430359840393, 0.067847341299057, -0.30990028381347656, -0.338164746761322, 0.6486570835113525, 0.09730149805545807, -0.21171599626541138, -0.007557101547718048, 0.26585882902145386, -0.23913775384426117, 0.35737448930740356, 0.012272171676158905, 0.9542486071586609, -0.19128377735614777, -0.044224243611097336, 0.2648424804210663, 0.20077918469905853, 0.48902052640914917, 0.004859752953052521, 0.04701025038957596, -0.2552779018878937, -0.476235032081604, -0.08913388848304749, 0.112553671002388, 0.15248975157737732, 0.2524733543395996, 0.05041687563061714, 0.16956877708435059, 0.15079839527606964, -0.3307521641254425, -0.004624018445611, -0.09305481612682343, -0.1097792461514473, -0.1424430012702942, -0.38580912351608276, 0.23357588052749634, 0.08788245171308517, 0.49077174067497253, -0.02513260394334793, 0.04822014272212982, -0.32626545429229736, 0.010601285845041275, -0.5220407247543335, 0.05880594253540039, 0.1309584379196167, -0.09445316344499588, 0.32960450649261475, -0.5177647471427917, 0.23150396347045898, 0.09378361701965332, 0.32342031598091125, -0.21263302862644196, -0.2467210590839386, 0.3399105966091156, -0.08340512961149216, -0.30228322744369507, 0.3012397885322571, -0.09058686345815659, 0.3471256494522095, -0.12349920719861984, -0.1297500729560852, 0.1222686618566513, 0.2607761025428772, 0.14458568394184113, -0.21152321994304657, -0.09851381182670593, -0.08900870382785797, -0.17294956743717194, -0.4047572612762451, -0.11948627233505249, -0.14001575112342834, -0.10100345313549042, 0.1534443497657776, -0.015741363167762756, 0.018401779234409332, -0.01766061782836914, 0.08930490165948868, -0.3160213232040405, -0.02973749116063118, 0.4177774488925934, 0.2908804714679718, -0.08667246997356415, 0.33455970883369446, 0.500669002532959, -0.09244577586650848, -0.05695556476712227, -0.1356571614742279, 0.12402061372995377, -0.3993455767631531, 0.01666165702044964, -0.13710016012191772, -0.16212520003318787, -0.13536405563354492, 0.07183321565389633, -0.032101280987262726, -0.16906693577766418, 0.03480910882353783, -0.40835055708885193, 0.048429012298583984, 0.04934941232204437, 0.30945801734924316, 0.05822288990020752, -0.038112204521894455, 0.09045514464378357, 0.2750761806964874, 0.14988715946674347, -0.3072504699230194, 0.21713896095752716, -0.24396614730358124, 0.03376482427120209, -0.1528746783733368, 0.00502791628241539, 0.03456871956586838, -0.24592652916908264, -0.03815264627337456, 0.08665335178375244, -0.1406109631061554, -0.17846933007240295, -0.09954747557640076, 0.1121714860200882, -0.012554910033941269, -0.35125210881233215, 0.2863207459449768, 0.14912983775138855, -0.08904708921909332, -0.20086069405078888, 0.10198085010051727, 0.5271872878074646, 0.20517972111701965, -0.0790417268872261, 0.07986116409301758, -0.16672560572624207, 0.07782057672739029, -0.0986035019159317, 0.06898164749145508, 0.3401397466659546, 0.1839008331298828, -0.06724779307842255, 0.11607364565134048, -0.23921480774879456, -0.06075239181518555, -0.03283189982175827, -0.3738982081413269, -0.24262109398841858, 0.42973044514656067, -0.026951462030410767, 0.25114139914512634, 0.695482075214386, 0.08825292438268661, 0.35211533308029175, -0.33428704738616943, 0.016747551038861275, -0.009674342349171638, 0.15835221111774445, -0.39267218112945557, -0.047794975340366364, -0.047635797411203384, 0.20726418495178223, -0.00010735541582107544, 0.07491407543420792, 0.046063993126153946, -0.022993605583906174, -0.27228593826293945, 0.008051274344325066, 0.5071793794631958, 0.016391988843679428, 0.20850969851016998, 0.06894546747207642, 0.11973103880882263, 0.0585184171795845, 0.24364669620990753, -0.0928812026977539, 0.20505991578102112, 0.27131399512290955, -0.010676532983779907, 0.33322471380233765, -0.28131088614463806, 0.3489293158054352, 0.36936476826667786, -0.3195892870426178, 0.013631142675876617, 0.5468193292617798, -0.21574148535728455, 0.28312456607818604, 0.19770067930221558, 0.2938268482685089, 0.13921499252319336, -0.13104629516601562, -0.3772866725921631, 0.12101498246192932, -0.00399881973862648, -0.10158824920654297, -0.09904308617115021, -0.34096774458885193, -0.11251474171876907, 0.17732170224189758, -0.33099666237831116, -0.1919047087430954, 0.20418816804885864, -0.05047132074832916, -0.45785194635391235, -0.38646578788757324, 0.08865046501159668, -0.07754133641719818, 0.30632132291793823, 0.037215497344732285, 0.3571661710739136, 0.21620988845825195, -0.13437199592590332, 0.1002371609210968, 0.5791754722595215, 0.12900856137275696, 0.12826213240623474, 0.3204135596752167, 0.22090068459510803, -0.16289351880550385, 0.016525181010365486, 0.012279465794563293, 0.1575547307729721, 0.12011314183473587, -0.09919779002666473, 0.08560028672218323, 0.1103232204914093, -0.13724181056022644, 0.2281874269247055, 0.06725142151117325, 0.14381808042526245, -0.1229056566953659, 0.4894869029521942, -0.14649832248687744, 0.07096422463655472, -0.2475920021533966, 0.022625073790550232, -0.30753859877586365, 0.26175224781036377, 0.28106439113616943, -0.21513845026493073, 0.16082978248596191, -0.14716775715351105, 0.08992765098810196, -0.04471087083220482, 0.35329538583755493, 0.5815426111221313, -0.00984327495098114, -0.014345698989927769, -0.06639225035905838, -0.5804973244667053, 0.42641302943229675, -0.2836044132709503, 0.1714904010295868, 0.0004595192149281502, 0.16922105848789215, 0.024557195603847504, 0.18254193663597107, -0.30310773849487305, 0.334166556596756, -0.14469291269779205, -0.1285572052001953, -0.3643916845321655, 0.11178924143314362, -0.2892952561378479, 0.14273115992546082, -0.09776422381401062, -0.00985320657491684, 0.36967891454696655, -0.37647202610969543, 0.02496982365846634, -0.1294027715921402, 0.004002928733825684, -0.47839727997779846, -0.0495421439409256, 0.2290342003107071, 0.2319302260875702, 0.013324283063411713, -0.1163657158613205, -0.06660561263561249, -0.2615000009536743, -0.24943970143795013, -0.0704268217086792, 0.48245298862457275, -0.060282979160547256, -0.13187077641487122, 0.1580566018819809, -0.09324900805950165, 0.24041171371936798, 0.3770560920238495, 0.014460328966379166, -0.1739259958267212, -0.4429991841316223, 0.039975933730602264, -0.18740475177764893, -0.03522656485438347, -0.06088526174426079, 0.5569927096366882, -0.1725473254919052, -0.13923819363117218, 0.03910766541957855, -0.5822048187255859, 0.3299415111541748, -0.5559081435203552, 0.1658034324645996, -0.223246231675148, 0.18302381038665771, 0.0688653215765953, -0.2526194155216217, -0.4450646638870239, 0.11042911559343338, 0.10244539380073547, -0.07687017321586609, -0.16483691334724426, -0.06648185849189758, -0.06413257122039795, -0.19866836071014404, -0.12431205809116364, 0.2940545678138733, 0.24359172582626343, -0.2361118048429489, 0.31248292326927185, -0.02279263734817505 ]
https://github.com/huggingface/datasets/issues/2396
strange datasets from OSCAR corpus
Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11
93
strange datasets from OSCAR corpus ![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11 Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
[ 0.26769933104515076, 0.057095617055892944, -0.002301344648003578, 0.5770168900489807, 0.1565006524324417, 0.06097034364938736, -0.012423861771821976, 0.24926812946796417, -0.2645933926105499, 0.04861319065093994, -0.5796422362327576, -0.10799803584814072, 0.04310464859008789, -0.05117505416274071, -0.009494231082499027, -0.3019310534000397, 0.11055293679237366, 0.05995825678110123, 0.03440447151660919, -0.3692535161972046, -0.1291409581899643, 0.24387407302856445, -0.09914128482341766, 0.06843794137239456, -0.010477066971361637, -0.1464853584766388, -0.25490230321884155, -0.007228687405586243, -0.39760807156562805, 0.02827555313706398, 0.16913004219532013, 0.12572169303894043, 0.04472506791353226, 0.3785851001739502, -0.00010987844143528491, -0.16753989458084106, 0.22414951026439667, -0.0326169990003109, 0.12372717261314392, -0.05977776646614075, 0.17777982354164124, 0.04273298382759094, -0.009944326244294643, 0.03411821275949478, -0.2434692680835724, -0.2776969075202942, 0.004047263413667679, 0.1497945636510849, 0.293655127286911, 0.4105723202228546, 0.23799850046634674, 0.06309816986322403, -0.11717034876346588, -0.13369697332382202, 0.20727947354316711, -0.03233625739812851, -0.24816972017288208, 0.1810346096754074, 0.4662705063819885, 0.07619030028581619, -0.11216823011636734, 0.057644203305244446, 0.02833370678126812, -0.10125385224819183, 0.21700519323349, -0.111178919672966, -0.26505035161972046, -0.4842263162136078, 0.2932802438735962, 0.5078216791152954, 0.30798014998435974, -0.0811569020152092, -0.25894278287887573, -0.2738284170627594, 0.09889361262321472, -0.27390846610069275, 0.29323530197143555, 0.3606121242046356, 0.07457412779331207, 0.22891488671302795, -0.2088947296142578, 0.19545547664165497, -0.11806847155094147, 0.408597469329834, -0.26785218715667725, -0.1681370735168457, -0.2238401174545288, 0.019789185374975204, 0.06708337366580963, -0.06706950068473816, 0.039549168199300766, -0.27900075912475586, 0.021659785881638527, 0.27278363704681396, -0.16986750066280365, -0.1353239119052887, 0.03782837837934494, 0.4480690360069275, 0.19934698939323425, -0.12698747217655182, -0.055764324963092804, 0.18985965847969055, -0.32694709300994873, -0.047159455716609955, 0.33540910482406616, 0.1453733891248703, -0.15727996826171875, -0.13771404325962067, 0.14238552749156952, 0.1614498645067215, 0.08490025997161865, 0.2207643985748291, -0.07770402729511261, -0.08426720649003983, -0.2245466411113739, -0.3745209574699402, 0.09915612637996674, -0.377040833234787, -0.27491840720176697, 0.3003407120704651, -0.6244726777076721, 0.2917197644710541, 0.035768721252679825, 0.1298946738243103, -0.19988161325454712, 0.06678204238414764, -0.0167152751237154, 0.20291900634765625, -0.11944808065891266, -0.03973675146698952, -0.19216790795326233, 0.2545001208782196, -0.21706463396549225, 0.23726151883602142, 0.04014197364449501, -0.27051958441734314, 0.24935349822044373, 0.18564391136169434, 0.3698464632034302, -0.13690440356731415, -0.0799853578209877, -0.4004630744457245, -0.01956145465373993, 0.09292273223400116, -0.17454607784748077, 0.11279014497995377, 0.06147360801696777, -0.32610851526260376, -0.12227083742618561, -0.17412832379341125, -0.30788102746009827, -0.14318324625492096, 0.07866394519805908, 0.18306376039981842, -0.43354278802871704, 0.032701533287763596, -0.34308889508247375, 0.37513449788093567, 0.01945541799068451, 0.3101084232330322, 0.3069826066493988, -0.08483896404504776, -0.26144126057624817, 0.11047961562871933, -0.151020810008049, 0.3771539330482483, -0.006524939090013504, -0.08352822065353394, -0.1661025583744049, 0.08150693029165268, 0.30796149373054504, 0.24006319046020508, -0.02286830171942711, -0.08667481690645218, -0.2789584696292877, 0.10166601836681366, -0.0555681511759758, -0.2338879555463791, -0.3346044719219208, 0.29961106181144714, 0.18446950614452362, 0.2973282039165497, -0.1442994773387909, -0.12742836773395538, 0.23228654265403748, -0.27343615889549255, 0.2217366248369217, 0.17402005195617676, 0.05132497847080231, -0.027263382449746132, -0.32900574803352356, -0.11871379613876343, -0.3585999011993408, 0.0662761777639389, 0.1302725374698639, 0.08799707144498825, 0.0359002910554409, 0.06225660443305969, 0.3574254512786865, 0.026875058189034462, 0.07454950362443924, 0.13262632489204407, -0.13394655287265778, 0.4023643136024475, 0.1660580039024353, 0.002795107662677765, 0.07459854334592819, 0.2480974793434143, -0.30260464549064636, 0.5085479617118835, 0.01808224618434906, -0.2257504165172577, -0.19976088404655457, -0.23861637711524963, -0.2820657789707184, -0.2455316185951233, 0.14677603542804718, -0.18496191501617432, 0.0019977502524852753, 0.30761078000068665, 0.04638654366135597, 0.045598432421684265, -0.23204481601715088, 0.02284436672925949, -0.5470089912414551, 0.17837344110012054, 0.05642642080783844, 0.1313602328300476, 0.19219402968883514, 0.22658026218414307, 0.002263672649860382, -0.12884780764579773, 0.01881720870733261, 0.07111892849206924, -0.37849125266075134, 0.521687924861908, 0.010542549192905426, 0.339064359664917, 0.48426946997642517, -0.3351527452468872, 0.1867593675851822, 0.09629282355308533, 0.20571252703666687, -0.059574440121650696, -0.11921996623277664, 0.4944603443145752, 0.1703856736421585, -0.16878563165664673, 0.07066163420677185, 0.016497226431965828, 0.28346017003059387, -0.13360020518302917, -0.22275088727474213, -0.2548025846481323, 0.42408257722854614, 0.1479569375514984, 0.4548327624797821, 0.19432824850082397, -0.4106910526752472, 0.22089996933937073, 0.008011914789676666, -0.04428805410861969, 0.20072880387306213, 0.30622610449790955, -0.19378751516342163, -0.025721080601215363, 0.022715680301189423, 0.24689720571041107, 0.14871741831302643, 0.06257423013448715, -0.07497695088386536, 0.3186787962913513, -0.06945853680372238, -0.35581332445144653, 0.11184678971767426, 0.1962323784828186, 0.44467267394065857, 0.09990876168012619, 0.36057066917419434, 0.22025136649608612, -0.713396430015564, 0.1260080337524414, -0.011981666088104248, 0.3289735019207001, -0.15429098904132843, 0.23275847733020782, -0.10935494303703308, -0.3838164806365967, -0.42559951543807983, -0.05260619521141052, -0.1197228878736496, -0.07657931745052338, 0.19171231985092163, -0.007961515337228775, -0.07108989357948303, -0.06067163497209549, -0.25330477952957153, 0.21267104148864746, -0.23073530197143555, 0.39203929901123047, -0.09700079262256622, -0.0001330021768808365, -0.11997158080339432, 0.12991873919963837, 0.12056112289428711, 0.015621813014149666, 0.4261787235736847, -0.22344587743282318, -0.14499375224113464, -0.20552723109722137, -0.5277352333068848, 0.35500994324684143, -0.03703257441520691, -0.08284113556146622, -0.07096090912818909, -0.12303133308887482, -0.2948216199874878, -0.04603385925292969, 0.05507539585232735, -0.17522364854812622, -0.1702316850423813, 0.05685357004404068, -0.14046983420848846, -0.00863020122051239, 0.03840761259198189, -0.45634928345680237, -0.21691790223121643, -0.06009010970592499, 0.22155672311782837, 0.1342095136642456, 0.16094297170639038, 0.4600662887096405, -0.22888769209384918, 0.14005477726459503, 0.16698969900608063, 0.08079084753990173, -0.524605393409729, -0.35672542452812195, 0.34217992424964905, -0.3204013407230377, -0.4378066956996918, -0.20665134489536285, -0.2681739032268524, -0.11364708840847015, 0.041977450251579285, -0.3773084282875061, -0.589593231678009, -0.2654290497303009, -0.19500233232975006, 0.390293687582016, -0.3890115022659302, 0.06611847877502441, -0.3487101197242737, -0.11243149638175964, 0.000254657119512558, 0.3013917803764343, -0.01722237467765808, 0.007514294236898422, 0.2562912404537201, -0.23898449540138245, 0.5512992739677429, 0.06275621056556702, 0.3488260507583618, 0.2001669853925705, 0.07852496206760406, 0.40077269077301025, 0.15145201981067657, 0.2562439441680908, -0.03192172944545746, -0.13403519988059998, 0.3567916750907898, -0.16099533438682556, -0.01103457435965538, 0.4110296964645386, 0.10140104591846466, -0.25888288021087646, -0.011514946818351746, 0.12571200728416443, -0.2704860270023346, -0.23279796540737152, 0.013727379031479359, -0.07529763132333755, -0.044432319700717926, 0.06196487322449684, -0.01682867482304573, 0.24662989377975464, -0.4781702160835266, -0.045904990285634995, 0.0849938690662384, -0.04838006943464279, -0.048061370849609375, -0.15556606650352478, 0.036182474344968796, -0.6853788495063782, 0.12992854416370392, 0.0055807242169976234, 0.21575677394866943, -0.09814823418855667, 0.3015865981578827, 0.2229267954826355, 0.11425023525953293, 0.6046199202537537, -0.03607703000307083, 0.019758252426981926, 0.06408756971359253, -0.1593838334083557, -0.2227320671081543, -0.17619572579860687, -0.42901647090911865, 0.2636866569519043, 0.21559205651283264, 0.23501567542552948, -0.1400405317544937, -0.0076078083366155624, 0.21083863079547882, 0.0438338927924633, -0.1988004744052887, 0.04526005685329437, -0.014093101024627686, -0.5783289670944214, 0.020486032590270042, -0.0566009059548378, 0.2570240795612335, 0.24611414968967438, -0.24656543135643005, -0.17835481464862823, 0.027397535741329193, 0.39218923449516296, 0.5225211381912231, 0.08226533234119415, 0.07780183106660843, 0.5562987923622131, 0.1265050768852234, 0.048596642911434174, 0.27940797805786133, 0.27856677770614624, 0.7305163741111755, -0.13835301995277405, -0.45961475372314453, -0.07870059460401535, -0.3730381727218628, -0.05394146591424942, 0.5012974739074707, 0.07331953942775726, -0.04617009311914444, -0.31453821063041687, -0.021249450743198395, -0.2173008918762207, 0.19828560948371887, 0.36735430359840393, 0.067847341299057, -0.30990028381347656, -0.338164746761322, 0.6486570835113525, 0.09730149805545807, -0.21171599626541138, -0.007557101547718048, 0.26585882902145386, -0.23913775384426117, 0.35737448930740356, 0.012272171676158905, 0.9542486071586609, -0.19128377735614777, -0.044224243611097336, 0.2648424804210663, 0.20077918469905853, 0.48902052640914917, 0.004859752953052521, 0.04701025038957596, -0.2552779018878937, -0.476235032081604, -0.08913388848304749, 0.112553671002388, 0.15248975157737732, 0.2524733543395996, 0.05041687563061714, 0.16956877708435059, 0.15079839527606964, -0.3307521641254425, -0.004624018445611, -0.09305481612682343, -0.1097792461514473, -0.1424430012702942, -0.38580912351608276, 0.23357588052749634, 0.08788245171308517, 0.49077174067497253, -0.02513260394334793, 0.04822014272212982, -0.32626545429229736, 0.010601285845041275, -0.5220407247543335, 0.05880594253540039, 0.1309584379196167, -0.09445316344499588, 0.32960450649261475, -0.5177647471427917, 0.23150396347045898, 0.09378361701965332, 0.32342031598091125, -0.21263302862644196, -0.2467210590839386, 0.3399105966091156, -0.08340512961149216, -0.30228322744369507, 0.3012397885322571, -0.09058686345815659, 0.3471256494522095, -0.12349920719861984, -0.1297500729560852, 0.1222686618566513, 0.2607761025428772, 0.14458568394184113, -0.21152321994304657, -0.09851381182670593, -0.08900870382785797, -0.17294956743717194, -0.4047572612762451, -0.11948627233505249, -0.14001575112342834, -0.10100345313549042, 0.1534443497657776, -0.015741363167762756, 0.018401779234409332, -0.01766061782836914, 0.08930490165948868, -0.3160213232040405, -0.02973749116063118, 0.4177774488925934, 0.2908804714679718, -0.08667246997356415, 0.33455970883369446, 0.500669002532959, -0.09244577586650848, -0.05695556476712227, -0.1356571614742279, 0.12402061372995377, -0.3993455767631531, 0.01666165702044964, -0.13710016012191772, -0.16212520003318787, -0.13536405563354492, 0.07183321565389633, -0.032101280987262726, -0.16906693577766418, 0.03480910882353783, -0.40835055708885193, 0.048429012298583984, 0.04934941232204437, 0.30945801734924316, 0.05822288990020752, -0.038112204521894455, 0.09045514464378357, 0.2750761806964874, 0.14988715946674347, -0.3072504699230194, 0.21713896095752716, -0.24396614730358124, 0.03376482427120209, -0.1528746783733368, 0.00502791628241539, 0.03456871956586838, -0.24592652916908264, -0.03815264627337456, 0.08665335178375244, -0.1406109631061554, -0.17846933007240295, -0.09954747557640076, 0.1121714860200882, -0.012554910033941269, -0.35125210881233215, 0.2863207459449768, 0.14912983775138855, -0.08904708921909332, -0.20086069405078888, 0.10198085010051727, 0.5271872878074646, 0.20517972111701965, -0.0790417268872261, 0.07986116409301758, -0.16672560572624207, 0.07782057672739029, -0.0986035019159317, 0.06898164749145508, 0.3401397466659546, 0.1839008331298828, -0.06724779307842255, 0.11607364565134048, -0.23921480774879456, -0.06075239181518555, -0.03283189982175827, -0.3738982081413269, -0.24262109398841858, 0.42973044514656067, -0.026951462030410767, 0.25114139914512634, 0.695482075214386, 0.08825292438268661, 0.35211533308029175, -0.33428704738616943, 0.016747551038861275, -0.009674342349171638, 0.15835221111774445, -0.39267218112945557, -0.047794975340366364, -0.047635797411203384, 0.20726418495178223, -0.00010735541582107544, 0.07491407543420792, 0.046063993126153946, -0.022993605583906174, -0.27228593826293945, 0.008051274344325066, 0.5071793794631958, 0.016391988843679428, 0.20850969851016998, 0.06894546747207642, 0.11973103880882263, 0.0585184171795845, 0.24364669620990753, -0.0928812026977539, 0.20505991578102112, 0.27131399512290955, -0.010676532983779907, 0.33322471380233765, -0.28131088614463806, 0.3489293158054352, 0.36936476826667786, -0.3195892870426178, 0.013631142675876617, 0.5468193292617798, -0.21574148535728455, 0.28312456607818604, 0.19770067930221558, 0.2938268482685089, 0.13921499252319336, -0.13104629516601562, -0.3772866725921631, 0.12101498246192932, -0.00399881973862648, -0.10158824920654297, -0.09904308617115021, -0.34096774458885193, -0.11251474171876907, 0.17732170224189758, -0.33099666237831116, -0.1919047087430954, 0.20418816804885864, -0.05047132074832916, -0.45785194635391235, -0.38646578788757324, 0.08865046501159668, -0.07754133641719818, 0.30632132291793823, 0.037215497344732285, 0.3571661710739136, 0.21620988845825195, -0.13437199592590332, 0.1002371609210968, 0.5791754722595215, 0.12900856137275696, 0.12826213240623474, 0.3204135596752167, 0.22090068459510803, -0.16289351880550385, 0.016525181010365486, 0.012279465794563293, 0.1575547307729721, 0.12011314183473587, -0.09919779002666473, 0.08560028672218323, 0.1103232204914093, -0.13724181056022644, 0.2281874269247055, 0.06725142151117325, 0.14381808042526245, -0.1229056566953659, 0.4894869029521942, -0.14649832248687744, 0.07096422463655472, -0.2475920021533966, 0.022625073790550232, -0.30753859877586365, 0.26175224781036377, 0.28106439113616943, -0.21513845026493073, 0.16082978248596191, -0.14716775715351105, 0.08992765098810196, -0.04471087083220482, 0.35329538583755493, 0.5815426111221313, -0.00984327495098114, -0.014345698989927769, -0.06639225035905838, -0.5804973244667053, 0.42641302943229675, -0.2836044132709503, 0.1714904010295868, 0.0004595192149281502, 0.16922105848789215, 0.024557195603847504, 0.18254193663597107, -0.30310773849487305, 0.334166556596756, -0.14469291269779205, -0.1285572052001953, -0.3643916845321655, 0.11178924143314362, -0.2892952561378479, 0.14273115992546082, -0.09776422381401062, -0.00985320657491684, 0.36967891454696655, -0.37647202610969543, 0.02496982365846634, -0.1294027715921402, 0.004002928733825684, -0.47839727997779846, -0.0495421439409256, 0.2290342003107071, 0.2319302260875702, 0.013324283063411713, -0.1163657158613205, -0.06660561263561249, -0.2615000009536743, -0.24943970143795013, -0.0704268217086792, 0.48245298862457275, -0.060282979160547256, -0.13187077641487122, 0.1580566018819809, -0.09324900805950165, 0.24041171371936798, 0.3770560920238495, 0.014460328966379166, -0.1739259958267212, -0.4429991841316223, 0.039975933730602264, -0.18740475177764893, -0.03522656485438347, -0.06088526174426079, 0.5569927096366882, -0.1725473254919052, -0.13923819363117218, 0.03910766541957855, -0.5822048187255859, 0.3299415111541748, -0.5559081435203552, 0.1658034324645996, -0.223246231675148, 0.18302381038665771, 0.0688653215765953, -0.2526194155216217, -0.4450646638870239, 0.11042911559343338, 0.10244539380073547, -0.07687017321586609, -0.16483691334724426, -0.06648185849189758, -0.06413257122039795, -0.19866836071014404, -0.12431205809116364, 0.2940545678138733, 0.24359172582626343, -0.2361118048429489, 0.31248292326927185, -0.02279263734817505 ]
https://github.com/huggingface/datasets/issues/2391
Missing original answers in kilt-TriviaQA
That could be useful indeed! Feel free to open a PR on the dataset card if you already have some code that runs, otherwise we'll take care of it soon :)
I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
31
Missing original answers in kilt-TriviaQA I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :) That could be useful indeed! Feel free to open a PR on the dataset card if you already have some code that runs, otherwise we'll take care of it soon :)
[ 0.5064156651496887, -0.34836792945861816, -0.03513263165950775, 0.06285054236650467, -0.12134265899658203, -0.10113514959812164, 0.03444233909249306, 0.3133406937122345, 0.12681050598621368, 0.18385642766952515, 0.1640157848596573, 0.49276745319366455, 0.11229736357927322, 0.4052686393260956, -0.25098440051078796, 0.3889524042606354, -0.08290467411279678, -0.001912035048007965, -0.026675328612327576, -0.318700909614563, -0.23221425712108612, 0.21617089211940765, -0.10545744001865387, -0.012748681008815765, -0.41870319843292236, 0.17895983159542084, -0.12258445471525192, 0.08864736557006836, 0.1447683572769165, -0.36182355880737305, 0.41381651163101196, -0.029504377394914627, -0.05719861015677452, -0.051186807453632355, -0.00011639956210274249, -0.20852577686309814, 0.03552427142858505, -0.14102104306221008, -0.46764910221099854, -0.0007738769054412842, -0.5212789177894592, 0.016458241268992424, -0.05977664887905121, -0.1613028347492218, -0.05748549848794937, 0.28644564747810364, -0.002445487305521965, -0.02100534737110138, 0.3094421625137329, 0.25426530838012695, 0.17705558240413666, -0.09324377030134201, -0.0634848102927208, -0.18002182245254517, 0.03569347783923149, 0.2446766495704651, -0.16472315788269043, 0.15399862825870514, -0.14393718540668488, -0.050353825092315674, 0.027917079627513885, 0.38406431674957275, 0.1803434044122696, 0.10957902669906616, -0.21048012375831604, -0.1323058307170868, 0.12365902960300446, -0.24655362963676453, 0.40076494216918945, 0.28415408730506897, 0.23484477400779724, 0.12069877982139587, -0.3248034715652466, -0.19772693514823914, 0.09325418621301651, 0.28809231519699097, -0.010973408818244934, 0.12440239638090134, -0.1363505721092224, -0.2952621877193451, -0.2086613029241562, -0.025646435096859932, -0.06788263469934464, -0.007223859429359436, -0.16179925203323364, 0.2719785273075104, 0.10874633491039276, 0.0416887067258358, -0.11805282533168793, -0.06471001356840134, 0.2020549327135086, -0.007148357108235359, -0.26759952306747437, 0.2320915162563324, -0.42361393570899963, -0.20106366276741028, 0.14822858572006226, 0.043389979749917984, 0.2846265733242035, -0.29849720001220703, 0.05774280056357384, 0.1936490833759308, -0.28782549500465393, -0.11573820561170578, 0.2814100682735443, 0.22492553293704987, 0.5015592575073242, -0.46626919507980347, -0.06869614124298096, 0.1793818175792694, -0.18484510481357574, -0.1055988296866417, -0.0697762593626976, 0.028525561094284058, -0.12665808200836182, -0.17905357480049133, 0.09185413271188736, -0.3960406184196472, -0.22030752897262573, 0.09455694258213043, -0.3354543149471283, 0.0928727313876152, -0.08022507280111313, 0.0914253443479538, -0.3331409990787506, 0.46119067072868347, -0.16750216484069824, 0.21194443106651306, -0.3096485137939453, -0.29783493280410767, -0.16363312304019928, -0.1647341549396515, 0.06612999737262726, 0.08750864118337631, 0.2834357023239136, -0.27873966097831726, 0.422896146774292, 0.28850701451301575, 0.09341228753328323, -0.10773257911205292, -0.05837725102901459, -0.19300422072410583, 0.010415248572826385, 0.12650907039642334, 0.09968128800392151, 0.14066772162914276, 0.17077267169952393, -0.010190870612859726, 0.1328336000442505, 0.3715587854385376, -0.4798251986503601, -0.39269039034843445, -0.1743842512369156, 0.22755920886993408, -0.06896556913852692, -0.15293332934379578, -0.09817083925008774, 0.25568512082099915, -0.13503879308700562, -0.133900985121727, -0.06446760147809982, -0.3494919538497925, -0.08679154515266418, -0.25280898809432983, 0.4844788610935211, 0.14431113004684448, -0.2544131875038147, 0.22708821296691895, -0.20287896692752838, 0.03999026492238045, -0.22312083840370178, 0.15650911629199982, -0.039298903197050095, 0.33296188712120056, -0.16087453067302704, -0.0407973937690258, -0.10551819950342178, -0.44735851883888245, -0.21607114374637604, -0.36470019817352295, 0.45454955101013184, 0.3787326514720917, -0.24079206585884094, 0.15384212136268616, 0.07451742142438889, 0.11859319359064102, -0.03440515697002411, 0.09071500599384308, -0.12997941672801971, -0.10178451240062714, -0.31591925024986267, -0.34248265624046326, 0.16046378016471863, 0.28005191683769226, 0.09279676526784897, -0.04623902589082718, 0.21453693509101868, 0.11779849976301193, 0.20156776905059814, 0.10858547687530518, -0.23225152492523193, 0.29033541679382324, 0.4023076593875885, 0.18295785784721375, 0.15446670353412628, 0.12522181868553162, -0.29564350843429565, 0.16485700011253357, -0.5367693901062012, 0.0007428452372550964, 0.3756139874458313, -0.275592565536499, -0.5543509721755981, 0.15629859268665314, -0.1554642617702484, -0.512069582939148, 0.12599211931228638, -0.14586983621120453, 0.26784607768058777, 0.07696923613548279, 0.031922075897455215, 0.2687191963195801, -0.29091525077819824, -0.1769287884235382, -0.15929818153381348, 0.2640775442123413, -0.019435735419392586, -0.13745936751365662, -0.08753363788127899, 0.6361721754074097, 0.26969850063323975, 0.32766830921173096, -0.006210861727595329, 0.23204007744789124, 0.17520876228809357, 0.16122132539749146, 0.4861150085926056, -0.040158167481422424, 0.21189893782138824, -0.05899849906563759, -0.21368640661239624, 0.2125493735074997, -0.06427881866693497, -0.05619898810982704, -0.3204427659511566, 0.20872606337070465, 0.1455160528421402, 0.17261524498462677, -0.13789714872837067, 0.1327901929616928, -0.21519741415977478, -0.21840094029903412, 0.21377204358577728, 0.02418830245733261, -0.02266767993569374, -0.2658390402793884, -0.5356953740119934, -0.031253986060619354, -0.33189329504966736, 0.34337204694747925, 0.2486390322446823, 0.2554907202720642, -0.004929535090923309, 0.0634893923997879, -0.1412687599658966, -0.08936943113803864, 0.46904516220092773, -0.21267306804656982, 0.1278371661901474, 0.1664653867483139, -0.12823908030986786, -0.06134316325187683, 0.01823846623301506, -0.058095868676900864, -0.05920574814081192, -0.020052477717399597, 0.21527321636676788, 0.2801457941532135, 0.6623122692108154, 0.1440822035074234, -0.10309217125177383, 0.47664323449134827, -0.05112876743078232, -0.07719260454177856, -0.05457326024770737, -0.17994412779808044, -0.4775122106075287, -0.138645738363266, 0.06926989555358887, 0.07776663452386856, -0.13313287496566772, -0.4419928193092346, 0.4497719407081604, 0.348499596118927, -0.11115452647209167, 0.19798219203948975, 0.0012839380651712418, 0.11983535438776016, -0.22226405143737793, 0.04963206872344017, -0.3406001329421997, -0.4228147566318512, -0.44978469610214233, 0.12236036360263824, -0.3684007227420807, -0.0903136357665062, 0.27180513739585876, -0.09712812304496765, -0.3501993417739868, -0.5005811452865601, -0.532622754573822, 0.009932469576597214, 0.1049497202038765, 0.43077352643013, -0.03469257056713104, 0.36757177114486694, -0.6405918002128601, -0.2677500545978546, 0.38424673676490784, -0.035001881420612335, -0.17979349195957184, 0.02803656831383705, 0.0755792111158371, 0.1794508546590805, -0.1399715095758438, -0.5063708424568176, -0.06883358210325241, -0.08536379039287567, 0.21274366974830627, 0.23307661712169647, 0.17550399899482727, 0.2980676591396332, 0.05353527143597603, -0.15223930776119232, -0.05930379405617714, -0.06526630371809006, -0.47018784284591675, -0.147802472114563, 0.3093014061450958, -0.16506274044513702, -0.3541281223297119, 0.14350874722003937, -0.08791781216859818, 0.2715161442756653, -0.06382706761360168, -0.5980353951454163, -0.6656979322433472, 0.05282098427414894, 0.4026937782764435, -0.20568087697029114, -0.09435021132230759, 0.13417820632457733, -0.13611024618148804, -0.019553594291210175, -0.04483325034379959, -0.025064431130886078, 0.48793765902519226, 0.42664679884910583, 0.5124359726905823, 0.12805412709712982, 0.013633426278829575, 0.304217666387558, 0.7666125297546387, 0.19360391795635223, 0.5757518410682678, 0.1775549352169037, -0.25893592834472656, 0.16251927614212036, -0.05568068474531174, -0.11491422355175018, 0.5098047852516174, -0.07828541100025177, 0.19341504573822021, 0.2823203206062317, 0.09995263069868088, 0.5670216679573059, 0.04736991971731186, 0.3638908565044403, -0.3983491063117981, -0.4199622869491577, -0.24846427142620087, -0.1325896978378296, 0.32505202293395996, 0.22499483823776245, 0.16741621494293213, -0.07759371399879456, -0.4030822813510895, 0.2956233620643616, -0.1099245548248291, 0.17703044414520264, 0.01532339584082365, -0.2180568426847458, -0.24176053702831268, -0.10924788564443588, 0.19047042727470398, 0.07654979079961777, 0.18644312024116516, -0.06294827163219452, 0.1542729139328003, 0.23699721693992615, -0.055732663720846176, 0.7960615158081055, 0.08462584763765335, -0.10198149085044861, -0.18672314286231995, 0.06516773998737335, -0.2904495298862457, -0.35324543714523315, -0.0397937148809433, -0.3415670394897461, 0.017859332263469696, 0.23519955575466156, -0.2499167025089264, -0.014818781055510044, 0.10095898061990738, 0.11286278814077377, -0.26157546043395996, 0.1712525486946106, -0.09886717796325684, -0.38279813528060913, -0.2567312717437744, -0.09675898402929306, -0.09503757953643799, 0.25311344861984253, -0.0929267629981041, 0.023866470903158188, -0.012059221044182777, 0.16066911816596985, 0.048075705766677856, 0.24130289256572723, 0.24782994389533997, 0.085169218480587, 0.11729949712753296, -0.015526887029409409, -0.19035080075263977, 0.06684280186891556, 0.3774355351924896, 0.23023247718811035, 0.18376120924949646, 0.07321286201477051, -0.20651201903820038, 0.39327090978622437, 0.280129075050354, 0.08072799444198608, 0.20014682412147522, -0.11469894647598267, -0.01639378070831299, -0.2932942807674408, 0.1788848489522934, 0.17891746759414673, -0.2708420753479004, 0.06006298214197159, -0.010409935377538204, 0.2207982838153839, -0.13544777035713196, -0.0936427041888237, 0.06852810084819794, 0.2277284860610962, -0.03872893005609512, 0.06137613207101822, 0.29845622181892395, 0.8620375990867615, 0.25101324915885925, 0.009186774492263794, 0.23571628332138062, -0.1889047622680664, 0.11071830242872238, -0.22185295820236206, 0.22386081516742706, -0.3860092759132385, -0.07469954341650009, 0.17033161222934723, 0.0738079845905304, -0.22335585951805115, 0.09233137220144272, 0.1011165976524353, 0.32130342721939087, 0.1428895890712738, 0.24709077179431915, -0.042947202920913696, 0.14387743175029755, -0.1422426849603653, -0.06218298152089119, 0.06308424472808838, 0.20918844640254974, -0.19769595563411713, 0.37094900012016296, -0.18528011441230774, -0.10612235218286514, -0.057360075414180756, 0.10747107863426208, -0.1681906282901764, 0.22970935702323914, -0.4546367824077606, 0.21383903920650482, 0.6036263704299927, -0.25682011246681213, -0.24942941963672638, 0.49041983485221863, 0.3904777765274048, 0.28370603919029236, -0.16089220345020294, 0.2527780830860138, 0.36192354559898376, 0.29056936502456665, 0.15966661274433136, 0.3011656701564789, -0.04419289529323578, -0.20049390196800232, -0.2744789123535156, 0.23915830254554749, -0.2606871724128723, 0.15327925980091095, -0.5899583101272583, -0.048435769975185394, 0.14947247505187988, -0.05348987504839897, -0.15846040844917297, -0.0726189911365509, 0.14733944833278656, -0.1602446436882019, 0.12087410688400269, -0.22764386236667633, 0.16105413436889648, 0.24698451161384583, -0.006585262715816498, -0.1457177698612213, -0.1351136863231659, 0.37757518887519836, 0.07432422041893005, 0.03562864661216736, 0.6234509944915771, -0.13528628647327423, -0.07629727572202682, -0.043678756803274155, 0.003999754786491394, -0.48815587162971497, -0.07858319580554962, 0.02837448939681053, 0.059842515736818314, -0.20920851826667786, 0.0018560569733381271, 0.6113396286964417, 0.09770552814006805, -0.05170565843582153, 0.11086924374103546, -0.40424245595932007, -0.023132842034101486, 0.5424613952636719, -0.10969571769237518, -0.011647786945104599, 0.08965029567480087, -0.012920530512928963, -0.08215352892875671, 0.08506622165441513, -0.3287646770477295, -0.11488132923841476, -0.3234298825263977, 0.2987618148326874, -0.28685060143470764, 0.05716100335121155, 0.12766647338867188, -0.16369786858558655, 0.05207951366901398, -0.0788235142827034, -0.012204308062791824, -0.23554176092147827, -0.38411542773246765, 0.09050583094358444, 0.25049424171447754, 0.18393367528915405, -0.01986612007021904, -0.3337652087211609, -0.05735271796584129, 0.012757336720824242, 0.03250470384955406, 0.23872077465057373, -0.013255231082439423, 0.18521293997764587, -0.07369384169578552, 0.33115994930267334, -0.24951213598251343, 0.16073882579803467, 0.08075452595949173, 0.02369009703397751, 0.11169620603322983, -0.20042236149311066, -0.1917162388563156, 0.06199073791503906, -0.023558063432574272, -0.013496264815330505, -0.06856711208820343, -0.2220320999622345, 0.10840354859828949, -0.08385655283927917, -0.043992508202791214, 0.052621789276599884, -0.08611880987882614, -0.12796686589717865, -0.21773600578308105, 0.02861817367374897, 0.25215137004852295, 0.17698892951011658, -0.2502531409263611, 0.262627512216568, -0.1607583910226822, -0.1608957201242447, -0.16673247516155243, 0.11706102639436722, 0.3037760555744171, -0.2903411388397217, 0.5298938751220703, 0.25492265820503235, -0.22797927260398865, -0.6408807635307312, 0.2101261019706726, 0.07193320244550705, -0.09144890308380127, -0.022145036607980728, 0.09740902483463287, -0.33129429817199707, -0.2036069631576538, 0.07682521641254425, 0.018104687333106995, 0.15112631022930145, 0.27976664900779724, -0.0919448584318161, 0.48348647356033325, 0.11854921281337738, 0.042940735816955566, 0.05177529156208038, -0.1283736675977707, 0.23728856444358826, 0.09682951122522354, 0.37698790431022644, -0.1475050151348114, -0.35961082577705383, -0.14840847253799438, 0.15348397195339203, -0.2363644242286682, -0.04053786024451256, -0.09696228802204132, -0.16267013549804688, -0.1764695942401886, 0.1278996616601944, 0.01580599509179592, -0.2733187675476074, 0.02128838747739792, 0.25614801049232483, -0.3647536635398865, -0.36578553915023804, -0.21741065382957458, 0.22967296838760376, 0.4608759582042694, 0.18247276544570923, 0.4139091670513153, -0.03931838274002075, 0.19237014651298523, 0.22099925577640533, 0.3500199019908905, -0.07217487692832947, 0.16192953288555145, -0.19389374554157257, -0.07450909167528152, 0.1242268830537796, 0.05685991793870926, 0.28547683358192444, 0.2052730917930603, 0.3876182436943054, -0.13741321861743927, 0.25484827160835266, 0.1557365208864212, -0.17461320757865906, -0.16426020860671997, -0.02537323161959648, -0.09423105418682098, -0.26132696866989136, 0.22152765095233917, 0.23760949075222015, -0.03741417080163956, 0.2884162664413452, 0.05233243852853775, -0.09625361859798431, -0.136866956949234, -0.3797745108604431, 0.319931298494339, 0.09542851895093918, -0.015635207295417786, 0.09305910021066666, -0.14099253714084625, -0.07707086205482483, 0.31248798966407776, -0.12721684575080872, -0.22804898023605347, -0.16022945940494537, -0.492916077375412, -0.02558184415102005, 0.22387845814228058, 0.056334979832172394, 0.2680438458919525, -0.07265918701887131, -0.14881747961044312, -0.004256144165992737, -0.10191819071769714, -0.5042892098426819, 0.29659712314605713, -0.04931102693080902, -0.25498300790786743, 0.06580041348934174, -0.02945956587791443, -0.20648258924484253, 0.011988252401351929, -0.034847378730773926, 0.23861190676689148, 0.046057939529418945, -0.06785304099321365, 0.26990950107574463, -0.26494455337524414, 0.16799545288085938, -0.06200145184993744, -0.11759300529956818, 0.06003502756357193, 0.06881016492843628, 0.05793085694313049, -0.08771231025457382, 0.20346426963806152, -0.22161704301834106, 0.07337089627981186, -0.23311614990234375, -0.4398469924926758, 0.3352454900741577, 0.30590635538101196, -0.21004949510097504, 0.048162851482629776, 0.3895559310913086, 0.3441246747970581, 0.010814224369823933, -0.21742196381092072, 0.20597204566001892, 0.013693951070308685, 0.02951139584183693, 0.37685203552246094, 0.14166763424873352, -0.019489392638206482, 0.28243038058280945, -0.2910391688346863, -0.21560555696487427, 0.3001196086406708, -0.2305033802986145, -0.1259000301361084, -0.24569760262966156, 0.39337873458862305, -0.2405364215373993, -0.1775008589029312, -0.5544108152389526, -0.3222292959690094, 0.3366212546825409, 0.003244146704673767, 0.41842833161354065, 0.01112772710621357, -0.18151028454303741, 0.03679877892136574, 0.011832181364297867, 0.0938410684466362, 0.08796615898609161, 0.03024984337389469, 0.17884981632232666, -0.02414829283952713 ]
https://github.com/huggingface/datasets/issues/2391
Missing original answers in kilt-TriviaQA
I can open a PR but there is 2 details to fix: - the name for the corresponding key (e.g. `original_answer`) - how to implement it: I’m not sure what happens when you map `lambda x: {'input': ...}` as it keeps the other keys (e.g. `output`) intact but here since we want to set a nested value (e.g. `x['output']['original_answer']`) I implemented it with a regular function (not lambda), see below ```py def add_original_answer(x, trivia_qa, triviaqa_map): i = triviaqa_map[x['id']] x['output']['original_answer'] = trivia_qa['validation'][i]['answer']['value'] return x ```
I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
84
Missing original answers in kilt-TriviaQA I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :) I can open a PR but there is 2 details to fix: - the name for the corresponding key (e.g. `original_answer`) - how to implement it: I’m not sure what happens when you map `lambda x: {'input': ...}` as it keeps the other keys (e.g. `output`) intact but here since we want to set a nested value (e.g. `x['output']['original_answer']`) I implemented it with a regular function (not lambda), see below ```py def add_original_answer(x, trivia_qa, triviaqa_map): i = triviaqa_map[x['id']] x['output']['original_answer'] = trivia_qa['validation'][i]['answer']['value'] return x ```
[ 0.5155783891677856, -0.3537392318248749, 0.03276106342673302, 0.03958829119801521, -0.10538613796234131, -0.07997743040323257, -0.0295909084379673, 0.25651776790618896, 0.08557364344596863, 0.132102832198143, 0.04429157078266144, 0.5437101721763611, 0.19369852542877197, 0.4238485097885132, -0.1813194751739502, 0.32870593667030334, 0.06412526220083237, 0.10501665621995926, 0.15978075563907623, -0.29603973031044006, -0.31451717019081116, 0.23303864896297455, -0.11702518910169601, 0.1646069884300232, -0.13062264025211334, 0.012037476524710655, -0.20159222185611725, 0.21834337711334229, 0.24921637773513794, -0.3835998773574829, 0.3044097125530243, -0.002733007073402405, -0.1335720419883728, -0.06837644428014755, -0.0001235717354575172, -0.24832706153392792, 0.010017294436693192, -0.2631385028362274, -0.4476844072341919, 0.01356138288974762, -0.5491896271705627, 0.0013695284724235535, -0.22675667703151703, -0.26732224225997925, 0.024686172604560852, 0.08204171806573868, -0.0023391861468553543, -0.1811886429786682, 0.20891287922859192, 0.15286561846733093, 0.05940272659063339, -0.14578115940093994, 0.15898074209690094, -0.049477867782115936, 0.01749158650636673, 0.07626030594110489, -0.14842680096626282, 0.1695871353149414, -0.1361159086227417, -0.024475999176502228, 0.13856123387813568, 0.2619103789329529, 0.10546381771564484, 0.011079467833042145, -0.15407660603523254, -0.024322733283042908, 0.10231509804725647, -0.2442401945590973, 0.4118761122226715, 0.18826332688331604, 0.12291070818901062, -0.2038341462612152, -0.4319521486759186, -0.2443828284740448, 0.10367171466350555, -0.018734559416770935, -0.01710476726293564, 0.08927047997713089, -0.2156306952238083, -0.2821560800075531, -0.0009046569466590881, -0.22651006281375885, -0.02201148495078087, 0.13207967579364777, -0.05507273972034454, 0.34793397784233093, 0.216588094830513, 0.15889449417591095, -0.1401008665561676, -0.06326742470264435, 0.3329876959323883, -0.16045866906642914, -0.16409048438072205, 0.31526076793670654, -0.3240543603897095, -0.13317826390266418, 0.19005098938941956, 0.0019529908895492554, 0.21897748112678528, -0.43187546730041504, -0.008608943782746792, 0.15601509809494019, -0.27774620056152344, -0.02695424109697342, 0.20087161660194397, 0.21891933679580688, 0.5501304864883423, -0.2920517325401306, -0.07074561715126038, 0.2034403532743454, -0.16832952201366425, -0.15516924858093262, 0.018757596611976624, 0.1357353925704956, -0.035896334797143936, -0.0002321675419807434, 0.12131564319133759, -0.20091328024864197, -0.3044300377368927, 0.3365490436553955, -0.5707330703735352, 0.10311932861804962, -0.22909905016422272, 0.17066124081611633, -0.1619614064693451, 0.4370582699775696, -0.11992078274488449, 0.27003467082977295, -0.290426105260849, -0.14022421836853027, -0.08878476917743683, -0.007845556363463402, 0.09488321840763092, 0.2193799763917923, 0.12993143498897552, -0.355532705783844, 0.4627595841884613, 0.3198023736476898, 0.19345948100090027, -0.046126168221235275, -0.031319018453359604, -0.12810204923152924, 0.01695013791322708, 0.12400868535041809, 0.11926844716072083, 0.027368227019906044, 0.21304410696029663, -0.29786771535873413, 0.07438576966524124, 0.38168713450431824, -0.37512263655662537, -0.34079214930534363, -0.10229295492172241, 0.08083391934633255, -0.1557135432958603, -0.08526146411895752, -0.11028899997472763, 0.3784492313861847, -0.015219643712043762, -0.14954954385757446, -0.03935397416353226, -0.3106987476348877, -0.13294322788715363, -0.39057034254074097, 0.49024316668510437, 0.16991502046585083, -0.3541277050971985, 0.30645692348480225, -0.23604147136211395, 0.09285445511341095, -0.30664557218551636, -0.037055958062410355, -0.07630223780870438, 0.4838705062866211, -0.16193054616451263, 0.04906202852725983, -0.23149284720420837, -0.4575144648551941, -0.33838456869125366, -0.3009567856788635, 0.4830968379974365, 0.42840883135795593, -0.08704466372728348, 0.021425550803542137, 0.0319996252655983, 0.013146542944014072, 0.0061026811599731445, -0.1040412038564682, -0.13179880380630493, -0.21409541368484497, -0.1762365996837616, -0.1944407969713211, -0.049631595611572266, 0.05664118006825447, 0.08293329924345016, 0.10371305048465729, 0.28350627422332764, 0.20772401988506317, 0.1905880570411682, 0.004528850317001343, -0.17781630158424377, 0.3082348108291626, 0.3007473945617676, 0.11624171584844589, 0.1203729510307312, 0.02597934752702713, -0.3274599611759186, 0.12233840674161911, -0.6618937253952026, -0.030863411724567413, 0.13699425756931305, -0.33318132162094116, -0.5493906736373901, 0.3154106140136719, -0.16417688131332397, -0.6335086226463318, 0.04826616495847702, -0.0674959272146225, 0.21006760001182556, -0.056968219578266144, -0.06619923561811447, 0.22120189666748047, -0.19945649802684784, -0.1854485273361206, -0.2481943517923355, 0.1694602072238922, -0.026095522567629814, -0.0751710906624794, -0.19154413044452667, 0.5666323900222778, 0.3558180630207062, 0.3527083694934845, 0.003131491132080555, 0.31009554862976074, 0.22554227709770203, 0.05094422027468681, 0.46345779299736023, 0.07239872217178345, 0.2253657728433609, 0.08203110098838806, -0.12451853603124619, 0.2991172969341278, 0.0801996961236, 0.016804538667201996, -0.356807142496109, 0.4212341904640198, 0.22993911802768707, 0.08372673392295837, -0.1474851369857788, -0.05548672378063202, -0.24496424198150635, -0.20461593568325043, 0.18838755786418915, -0.048455484211444855, -0.17129918932914734, -0.20221471786499023, -0.504780650138855, -0.17349830269813538, -0.36606237292289734, 0.46574637293815613, 0.17795537412166595, 0.0015859343111515045, 0.04227634519338608, -0.047472283244132996, -0.14077827334403992, -0.03489741310477257, 0.40811920166015625, -0.06633229553699493, 0.3968326449394226, 0.12436988949775696, -0.16096167266368866, -0.005846092477440834, -0.020860757678747177, 0.036013513803482056, 0.1278192698955536, -0.01642976701259613, 0.07437817752361298, 0.4520232379436493, 0.6341471672058105, 0.08206959813833237, -0.07467979937791824, 0.4535391330718994, -0.060340479016304016, 0.0384703204035759, -0.18192946910858154, -0.16424871981143951, -0.4214440584182739, 0.09347604960203171, 0.03677390515804291, 0.19537901878356934, 0.07223912328481674, -0.5293931365013123, 0.30322766304016113, 0.4172869324684143, -0.03951230272650719, 0.23448939621448517, 0.04522385820746422, 0.06016923487186432, -0.08578512817621231, -0.06925976276397705, -0.2800637185573578, -0.44541147351264954, -0.31750860810279846, 0.010132867842912674, -0.49489331245422363, -0.2119399607181549, 0.14146341383457184, 0.15087340772151947, -0.3360288739204407, -0.6223654747009277, -0.6542854905128479, -0.005941350013017654, -0.0045578740537166595, 0.5484628081321716, 0.04284631460905075, 0.33445605635643005, -0.626372218132019, -0.4282752573490143, 0.346386194229126, 0.112722247838974, -0.31758272647857666, 0.022467702627182007, -0.02364390343427658, 0.10381106287240982, 0.017919637262821198, -0.5704699754714966, -0.04893746227025986, -0.09771299362182617, 0.18170779943466187, 0.06740722060203552, 0.25842398405075073, 0.10287806391716003, 0.045706380158662796, -0.24386243522167206, 0.11919723451137543, -0.19697198271751404, -0.5478492975234985, 0.08367398381233215, 0.3846225440502167, -0.24778927862644196, -0.28647762537002563, -0.07009704411029816, -0.39001500606536865, 0.2580227553844452, -0.09270109236240387, -0.4573444128036499, -0.646814227104187, 0.15009070932865143, 0.5276089906692505, -0.1340634822845459, 0.08616191893815994, 0.1564028114080429, 0.024237865582108498, 0.07434746623039246, -0.1985616683959961, -0.14107757806777954, 0.41619715094566345, 0.393150269985199, 0.5974632501602173, 0.31263917684555054, 0.07237936556339264, 0.34851518273353577, 0.7757428288459778, 0.23005440831184387, 0.5763304829597473, 0.17803409695625305, -0.318638414144516, 0.12776291370391846, -0.03498289734125137, -0.21928288042545319, 0.28815487027168274, -0.10394370555877686, 0.2534276247024536, 0.2045447826385498, 0.028541790321469307, 0.37371164560317993, 0.10928164422512054, 0.2637450098991394, -0.3957763612270355, -0.4265751838684082, -0.24012146890163422, -0.16530078649520874, 0.42564332485198975, 0.14692114293575287, 0.17870134115219116, -0.23626869916915894, -0.30382248759269714, 0.2833184003829956, -0.2621351480484009, 0.15196573734283447, 0.04296215996146202, -0.15554796159267426, -0.29870304465293884, -0.21145114302635193, 0.3432160019874573, 0.12768034636974335, 0.17069414258003235, 0.04840172454714775, 0.1696101427078247, 0.2524092495441437, -0.12080173194408417, 0.8238662481307983, -0.06356803327798843, -0.13142366707324982, -0.11528490483760834, -0.039515022188425064, -0.26561659574508667, -0.18501922488212585, 0.010254539549350739, -0.11669649928808212, 0.024123242124915123, 0.38162893056869507, -0.37819668650627136, 0.08801495283842087, -0.01640862599015236, 0.02682887203991413, -0.3905107378959656, 0.06729762256145477, -0.11104384064674377, -0.47077298164367676, -0.4302365779876709, -0.08626625686883926, -0.1416792869567871, 0.400858610868454, 0.15941008925437927, 0.21816952526569366, -0.02765760011970997, 0.2795978784561157, 0.21412146091461182, 0.22517769038677216, 0.26071107387542725, 0.15954257547855377, 0.0613129697740078, -0.07618167251348495, -0.2943122684955597, 0.019223112612962723, 0.5156430006027222, 0.12718646228313446, 0.23659756779670715, 0.017917346209287643, -0.12568646669387817, 0.305891215801239, 0.3533262014389038, 0.04120742529630661, 0.22494235634803772, -0.19229558110237122, 0.01532464474439621, -0.24255141615867615, 0.05917416885495186, 0.11553481221199036, -0.24367712438106537, 0.09013305604457855, -0.17249628901481628, 0.16822484135627747, -0.2947557866573334, -0.3521319031715393, 0.08688896149396896, 0.24204415082931519, -0.1013927161693573, 0.30365949869155884, 0.30359315872192383, 0.9488301277160645, 0.33532440662384033, 0.11356262862682343, 0.36089026927948, -0.20754995942115784, 0.02588614448904991, -0.27347004413604736, 0.15196841955184937, -0.374026894569397, -0.06255938112735748, 0.05723848193883896, 0.058363061398267746, -0.2141711711883545, 0.16852521896362305, 0.052464377135038376, 0.4384443759918213, 0.24372391402721405, 0.18488319218158722, 0.07022290676832199, 0.14095157384872437, -0.09240566194057465, -0.07478471100330353, 0.002951987087726593, 0.053141653537750244, -0.1154731959104538, 0.34010612964630127, -0.0908748209476471, -0.16923318803310394, -0.22103245556354523, 0.03445576876401901, -0.2264445722103119, 0.14429152011871338, -0.5238326191902161, 0.31331175565719604, 0.45684221386909485, -0.2757672667503357, -0.25411927700042725, 0.7030172944068909, 0.4300968647003174, 0.2325906902551651, -0.07265662401914597, 0.26240357756614685, 0.5008447766304016, 0.2284642606973648, 0.2381436675786972, 0.2171834409236908, -0.01821099780499935, -0.0843089371919632, -0.29408976435661316, 0.3372732102870941, -0.25065627694129944, 0.10895590484142303, -0.6670830249786377, -0.057519808411598206, -0.042763836681842804, -0.14263924956321716, -0.18508684635162354, -0.033604420721530914, 0.1458844542503357, -0.21897870302200317, -0.009564228355884552, -0.25360655784606934, 0.09221982210874557, 0.22721770405769348, -0.2408326417207718, -0.10842521488666534, -0.0668555349111557, 0.44786518812179565, 0.10546690970659256, 0.15713705122470856, 0.6415705680847168, -0.2098608762025833, -0.03648372367024422, 0.09304740279912949, 0.0646636113524437, -0.4503225088119507, -0.0296364426612854, 0.12327957153320312, 0.02148871310055256, -0.3334920406341553, -0.10612048208713531, 0.4281899333000183, 0.15372943878173828, 0.017418351024389267, 0.10434745252132416, -0.4397270977497101, -0.14457151293754578, 0.4621884226799011, -0.11762213706970215, 0.003460962325334549, 0.2142079472541809, 0.008286412805318832, -0.20109586417675018, 0.2436836063861847, -0.23195894062519073, -0.1701849102973938, -0.18654708564281464, 0.16144274175167084, 0.027546212077140808, 0.12245780974626541, 0.20524059236049652, -0.08905814588069916, 0.016014782711863518, -0.13053734600543976, 0.044463615864515305, -0.11655373871326447, -0.45276400446891785, 0.16144034266471863, 0.11642361432313919, 0.2653881013393402, -0.07713682949542999, -0.3488803505897522, 0.06513571739196777, -0.061105288565158844, 0.12415826320648193, 0.32421109080314636, 0.0399472713470459, 0.3424031734466553, 0.016631178557872772, 0.28562605381011963, -0.15702641010284424, -0.0011668317019939423, 0.09978005290031433, 0.17275086045265198, 0.2072714865207672, -0.02857779711484909, -0.21263930201530457, 0.0460992157459259, 0.06005052477121353, 0.038119371980428696, -0.04444164037704468, -0.21180486679077148, 0.3314487338066101, 0.16556032001972198, -0.1196494996547699, -0.0943983867764473, -0.030866537243127823, -0.1426916867494583, -0.25550150871276855, 0.12207190692424774, 0.03996259719133377, 0.03147546574473381, -0.33590835332870483, 0.17707978188991547, -0.04400357976555824, -0.2765425145626068, -0.11218239367008209, 0.25421029329299927, 0.34688296914100647, -0.2870000898838043, 0.3937596082687378, 0.10902682691812515, -0.11697742342948914, -0.6292843818664551, -0.0057365503162145615, 0.243208646774292, 0.00027976930141448975, -0.01836274191737175, 0.28236421942710876, -0.16129861772060394, -0.126554936170578, 0.22004516422748566, 0.1001468226313591, 0.003018563613295555, 0.30947569012641907, -0.07660950720310211, 0.49546197056770325, 0.15014903247356415, 0.1288393884897232, 0.009295031428337097, -0.00026354193687438965, 0.19241932034492493, 0.23085671663284302, 0.29637518525123596, 0.13186177611351013, -0.3133871555328369, 0.06840313225984573, 0.32146626710891724, -0.17370697855949402, -0.29780709743499756, -0.16786909103393555, -0.16063913702964783, -0.1957281231880188, 0.013651136308908463, 0.0772792175412178, -0.4077873229980469, 0.16816368699073792, 0.1826033890247345, -0.2792726755142212, -0.2892889678478241, -0.1758624017238617, 0.21516284346580505, 0.5069204568862915, 0.07700954377651215, 0.36927515268325806, 0.10246320068836212, 0.14286234974861145, 0.13201414048671722, 0.27464544773101807, 0.06748107075691223, 0.06232723593711853, -0.3842317461967468, 0.13076776266098022, 0.20498903095722198, -0.02768872305750847, 0.35671940445899963, 0.13309141993522644, 0.32532232999801636, 0.04342721402645111, 0.33251145482063293, 0.012808170169591904, -0.1045854464173317, -0.19911859929561615, 0.14048485457897186, -0.0553094781935215, -0.17451976239681244, 0.26986631751060486, 0.2881717383861542, -0.04934747517108917, 0.4204518795013428, 0.14918696880340576, -0.13163641095161438, -0.2629204988479614, -0.21255916357040405, 0.26512691378593445, 0.22611555457115173, 0.0008918731473386288, 0.03698483482003212, -0.029160931706428528, -0.19426563382148743, 0.37175023555755615, -0.16830846667289734, -0.2988690435886383, 0.020108014345169067, -0.46215158700942993, -0.068824402987957, 0.27946093678474426, -0.23336322605609894, 0.2594432830810547, -0.10440798103809357, 0.08048608899116516, -0.014782756567001343, -0.2231644243001938, -0.6184476017951965, 0.17992837727069855, 0.1711004376411438, -0.16298547387123108, -0.01951400563120842, 0.08123435825109482, -0.10837049782276154, 0.02706127241253853, -0.0725056529045105, 0.08821602165699005, 0.2514558732509613, -0.11194702237844467, 0.24208186566829681, -0.30794304609298706, 0.20207205414772034, -0.29453426599502563, -0.10137785971164703, 0.18018679320812225, 0.05554521456360817, -0.13797733187675476, -0.053895071148872375, 0.3241063952445984, -0.02614290453493595, -0.09841062128543854, -0.1921052634716034, -0.38533586263656616, 0.35871097445487976, 0.25502970814704895, -0.403289794921875, 0.06649228930473328, 0.28716593980789185, 0.3047102689743042, -0.15479202568531036, -0.2566092014312744, 0.41106393933296204, -0.09028603136539459, 0.0615219920873642, 0.2689650356769562, 0.2679346203804016, -0.08875557780265808, 0.5461471676826477, -0.16596189141273499, -0.3539320230484009, 0.4041137099266052, -0.3229781687259674, -0.09725366532802582, 0.0051645394414663315, 0.3167746663093567, -0.30205515027046204, -0.07450373470783234, -0.4578877091407776, -0.23537138104438782, 0.3377518355846405, -0.0885358601808548, 0.13654348254203796, 0.025977671146392822, -0.3285062611103058, -0.0027851760387420654, -0.003505755215883255, 0.11008137464523315, 0.18736648559570312, -0.018936887383461, 0.06264853477478027, -0.11444587260484695 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Looks like there are multiple issues regarding this (#2386, #2322) and it's a WIP #2329. Currently these datasets are being loaded in-memory which is causing this issue. Quoting @mariosasko here for a quick fix: > set `keep_in_memory` to `False` when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them)
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
69
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Looks like there are multiple issues regarding this (#2386, #2322) and it's a WIP #2329. Currently these datasets are being loaded in-memory which is causing this issue. Quoting @mariosasko here for a quick fix: > set `keep_in_memory` to `False` when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them)
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Hi ! Since `datasets` 1.6.0 we no longer keep small datasets (<250MB) on disk and load them in RAM instead by default. This makes data processing and iterating on data faster. However datasets in RAM currently have no way to reload previous results from the cache (since nothing is written on disk). We are working on making the caching work for datasets in RAM. Until then, I'd recommend passing `keep_in_memory=False` to the calls to `load_dataset` like here: https://github.com/huggingface/transformers/blob/223943872e8c9c3fc11db3c6e93da07f5177423f/examples/pytorch/language-modeling/run_clm.py#L233 This way you say explicitly that you want your dataset to stay on the disk, and it will be able to recover previously computed results from the cache.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
106
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Hi ! Since `datasets` 1.6.0 we no longer keep small datasets (<250MB) on disk and load them in RAM instead by default. This makes data processing and iterating on data faster. However datasets in RAM currently have no way to reload previous results from the cache (since nothing is written on disk). We are working on making the caching work for datasets in RAM. Until then, I'd recommend passing `keep_in_memory=False` to the calls to `load_dataset` like here: https://github.com/huggingface/transformers/blob/223943872e8c9c3fc11db3c6e93da07f5177423f/examples/pytorch/language-modeling/run_clm.py#L233 This way you say explicitly that you want your dataset to stay on the disk, and it will be able to recover previously computed results from the cache.
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
OK, It doesn't look like we can use the proposed workaround - see https://github.com/huggingface/transformers/issues/11801 Could you please add an env var for us to be able to turn off this unwanted in our situation behavior? It is really problematic for dev work, when one needs to restart the training very often and needs a quick startup time. Manual editing of standard scripts is not a practical option when one uses examples. This could also be a problem for tests, which will be slower because of lack of cache, albeit usually we use tiny datasets there. I think we want caching for tests. Thank you.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
104
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq OK, It doesn't look like we can use the proposed workaround - see https://github.com/huggingface/transformers/issues/11801 Could you please add an env var for us to be able to turn off this unwanted in our situation behavior? It is really problematic for dev work, when one needs to restart the training very often and needs a quick startup time. Manual editing of standard scripts is not a practical option when one uses examples. This could also be a problem for tests, which will be slower because of lack of cache, albeit usually we use tiny datasets there. I think we want caching for tests. Thank you.
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Hi @stas00, You are right: an env variable is needed to turn off this behavior. I am adding it. For the moment there is a config parameter to turn off this behavior: `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None` You can find this info in the docs: - in the docstring of the parameter `keep_in_memory` of the function [`load_datasets`](https://huggingface.co/docs/datasets/package_reference/loading_methods.html#datasets.load_dataset): - in a Note in the docs about [Loading a Dataset](https://huggingface.co/docs/datasets/loading_datasets.html#from-the-huggingface-hub) > The default in 🤗Datasets is to memory-map the dataset on drive if its size is larger than datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES (default 250 MiB); otherwise, the dataset is copied in-memory. This behavior can be disabled by setting datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None, and in this case the dataset is not loaded in memory.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
115
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Hi @stas00, You are right: an env variable is needed to turn off this behavior. I am adding it. For the moment there is a config parameter to turn off this behavior: `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None` You can find this info in the docs: - in the docstring of the parameter `keep_in_memory` of the function [`load_datasets`](https://huggingface.co/docs/datasets/package_reference/loading_methods.html#datasets.load_dataset): - in a Note in the docs about [Loading a Dataset](https://huggingface.co/docs/datasets/loading_datasets.html#from-the-huggingface-hub) > The default in 🤗Datasets is to memory-map the dataset on drive if its size is larger than datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES (default 250 MiB); otherwise, the dataset is copied in-memory. This behavior can be disabled by setting datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None, and in this case the dataset is not loaded in memory.
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Yes, but this still requires one to edit the standard example scripts, so if I'm doing that already I just as well can add `keep_in_memory=False`. May be the low hanging fruit is to add `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` env var to match the config, and if the user sets it to 0, then it'll be the same as `keep_in_memory=False` or `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0`?
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
58
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Yes, but this still requires one to edit the standard example scripts, so if I'm doing that already I just as well can add `keep_in_memory=False`. May be the low hanging fruit is to add `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` env var to match the config, and if the user sets it to 0, then it'll be the same as `keep_in_memory=False` or `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0`?
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
@stas00, however, for the moment, setting the value to `0` is equivalent to the opposite, i.e. `keep_in_memory=True`. This means the max size until which I load in memory is 0 bytes. Tell me if this is logical/convenient, or I should change it.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
42
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq @stas00, however, for the moment, setting the value to `0` is equivalent to the opposite, i.e. `keep_in_memory=True`. This means the max size until which I load in memory is 0 bytes. Tell me if this is logical/convenient, or I should change it.
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
In my PR, to turn off current default bahavior, you should set env variable to one of: `{"", "OFF", "NO", "FALSE"}`. For example: ``` MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES= ```
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
26
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq In my PR, to turn off current default bahavior, you should set env variable to one of: `{"", "OFF", "NO", "FALSE"}`. For example: ``` MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES= ```
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
IMHO, this behaviour is not very intuitive, as 0 is a normal quantity of bytes. So `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` to me reads as don't cache ever. Also "SIZE_IN_BYTES" that can take one of `{"", "OFF", "NO", "FALSE"}` is also quite odd. I think supporting a very simple `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` that can accept any numerical value to match the name of the variable, requires minimal logic and is very straightforward. So if you could adjust this logic - then `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` is all that's needed to not do in-memory datasets. Does it make sense?
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
89
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq IMHO, this behaviour is not very intuitive, as 0 is a normal quantity of bytes. So `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` to me reads as don't cache ever. Also "SIZE_IN_BYTES" that can take one of `{"", "OFF", "NO", "FALSE"}` is also quite odd. I think supporting a very simple `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` that can accept any numerical value to match the name of the variable, requires minimal logic and is very straightforward. So if you could adjust this logic - then `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` is all that's needed to not do in-memory datasets. Does it make sense?
[ -0.21584829688072205, 0.020310938358306885, 0.04224285110831261, 0.14041554927825928, 0.1821746528148651, 0.046231210231781006, 0.14098046720027924, 0.3139563202857971, 0.0551588274538517, -0.0644526332616806, -0.23593774437904358, -0.05794752761721611, -0.02470039576292038, -0.3315778374671936, -0.10819010436534882, 0.019804969429969788, 0.21446523070335388, 0.023075968027114868, -0.16784194111824036, -0.04096858948469162, -0.14435866475105286, 0.26739442348480225, -0.12829148769378662, -0.22863785922527313, -0.6212523579597473, 0.1536586582660675, -0.05398784205317497, -0.05782859027385712, -0.14363379776477814, -0.3942036032676697, 0.3681201934814453, 0.2826850414276123, 0.11369535326957703, 0.4599291682243347, -0.00012042995513183996, 0.15956906974315643, 0.20316892862319946, 0.021155400201678276, -0.41049355268478394, -0.05735562741756439, 0.03545454144477844, -0.08395922183990479, 0.021498430520296097, 0.16403114795684814, -0.2790546119213104, -0.03063715249300003, 0.19111797213554382, -0.574643075466156, 0.4524192810058594, 0.34329578280448914, 0.1602972447872162, 0.5254043340682983, -0.14875738322734833, -0.037879835814237595, -0.06083414703607559, -0.030115224421024323, -0.3328552544116974, 0.0926356166601181, 0.13140353560447693, 0.08421652019023895, -0.27702876925468445, 0.3524876832962036, 0.09798575937747955, -0.021821074187755585, 0.16133686900138855, 0.010781224817037582, -0.1585710644721985, 0.020284418016672134, 0.2987549304962158, 0.10706205666065216, 0.37876495718955994, -0.2141118347644806, -0.5825321078300476, -0.33645233511924744, -0.35387122631073, 0.006453385576605797, 0.34401094913482666, -0.0655079185962677, 0.13791432976722717, 0.3956795632839203, -0.43314990401268005, -0.06844641268253326, 0.06999412178993225, -0.004433669149875641, 0.061145395040512085, 0.2066848874092102, -0.11624637991189957, -0.09949441999197006, 0.12310265004634857, 0.1499091386795044, 0.19375279545783997, -0.16352784633636475, -0.10912464559078217, 0.29927825927734375, -0.35598915815353394, -0.010812900960445404, 0.16669921576976776, 0.03966230899095535, 0.011087935417890549, 0.11882426589727402, 0.06401419639587402, 0.13640478253364563, 0.09252827614545822, -0.25497978925704956, -0.07287751138210297, 0.5833613276481628, 0.194710373878479, 0.2663048505783081, 0.018418066203594208, 0.04759516194462776, -0.15672896802425385, -0.09623382240533829, -0.044799357652664185, -0.2194099724292755, 0.22287409007549286, -0.07246392965316772, 0.16001932322978973, -0.17798863351345062, -0.008368371054530144, 0.16883087158203125, 0.05226162075996399, -0.10712029784917831, 0.14251983165740967, 0.2979218363761902, -0.1997743397951126, 0.2688971757888794, -0.07179193198680878, -0.16609174013137817, -0.2827942669391632, 0.04258936271071434, -0.3636680245399475, -0.06255635619163513, -0.28465238213539124, 0.2555699646472931, 0.26763394474983215, -0.37241846323013306, 0.4367181062698364, 0.13248562812805176, 0.22684526443481445, 0.01826716959476471, 0.0358220636844635, -0.11249940097332001, 0.3517662286758423, 0.14983685314655304, -0.4831211566925049, 0.41046425700187683, 0.09792642295360565, 0.15432089567184448, -0.2801338732242584, -0.034504763782024384, -0.16246643662452698, -0.2589806020259857, 0.17886923253536224, 0.0967065617442131, -0.475932240486145, -0.28512585163116455, 0.12386225908994675, 0.24923229217529297, 0.3530563712120056, -0.18263983726501465, 0.05768778920173645, -0.05464710295200348, -0.3108605742454529, -0.042419079691171646, 0.20721694827079773, 0.611078143119812, -0.0987185686826706, -0.27018994092941284, 0.3160686790943146, 0.07831836491823196, 0.1078268364071846, 0.24697889387607574, -0.11518052220344543, -0.20416295528411865, -0.09440943598747253, -0.045154135674238205, 0.21275100111961365, -0.27991604804992676, -0.656403124332428, 0.0895092636346817, 0.0316261351108551, 0.27868688106536865, 0.06271900236606598, -0.030414212495088577, 0.1169167011976242, -0.2188132405281067, -0.16988858580589294, 0.17601928114891052, 0.0873950719833374, 0.11032342165708542, -0.4886091947555542, -0.31973373889923096, 0.004968628287315369, 0.014940589666366577, 0.16073967516422272, 0.1425744593143463, -0.20669114589691162, 0.19837872684001923, 0.06475815922021866, 0.10646720230579376, 0.238235205411911, 0.4176747798919678, -0.057785678654909134, -0.25080424547195435, 0.2393510788679123, -0.20668461918830872, -0.4679911732673645, 0.38137418031692505, -0.05819973349571228, 0.15043634176254272, 0.05138995498418808, -0.09193535149097443, -0.3147406578063965, -0.19004566967487335, -0.3224796652793884, -0.4129859209060669, 0.029199600219726562, 0.08356159925460815, 0.46644893288612366, -0.06278927624225616, -0.2708919048309326, 0.4161112904548645, 0.17768526077270508, 0.20261967182159424, -0.19791534543037415, -0.036706775426864624, -0.07149934023618698, -0.12923435866832733, -0.37207549810409546, -0.05481507629156113, 0.15075108408927917, -0.2703869044780731, -0.16460588574409485, 0.4357373118400574, -0.05497439205646515, 0.12648530304431915, -0.01637866348028183, 0.27872398495674133, 0.13101519644260406, 0.20948383212089539, 0.12619736790657043, 0.18614457547664642, -0.17185255885124207, -0.020707838237285614, -0.040091536939144135, 0.374408483505249, 0.1988709270954132, 0.2121002972126007, 0.1096511036157608, -0.057896293699741364, -0.05238098278641701, 0.020036187022924423, -0.027195099741220474, -0.3291664123535156, 0.2592809498310089, -0.09703293442726135, 0.6289585828781128, 0.19152872264385223, 0.0682511031627655, 0.2737971544265747, 0.7349140048027039, 0.19943124055862427, -0.23233738541603088, 0.14957723021507263, -0.2541774809360504, -0.3552420735359192, 0.16007526218891144, 0.28084132075309753, 0.3655431568622589, 0.09676315635442734, 0.4016492962837219, 0.12173143029212952, -0.05928127467632294, -0.09258200228214264, 0.1318960189819336, -0.103767991065979, 0.03655640780925751, -0.07430800050497055, 0.056555259972810745, 0.2631292939186096, -0.3260217607021332, 0.1360270082950592, 0.01172001101076603, 0.10843480378389359, -0.11941887438297272, 0.24091608822345734, -0.3367220163345337, 0.27846476435661316, -0.13545365631580353, -0.14320097863674164, -0.3787074089050293, -0.20354129374027252, -0.04893707484006882, 0.11523683369159698, -0.0025183502584695816, 0.32485368847846985, -0.2567093074321747, 0.17130477726459503, -0.03613027185201645, -0.30389800667762756, -0.4968312084674835, -0.14644862711429596, -0.2653333246707916, -0.05227586254477501, -0.007760761771351099, -0.37814879417419434, -0.041796788573265076, -0.17041565477848053, -0.24277395009994507, -0.1978735774755478, -0.3297617435455322, 0.15431928634643555, -0.07255367189645767, -0.028923751786351204, -0.07184725999832153, 0.056893642991781235, -0.13047707080841064, 0.09073072671890259, 0.17321719229221344, -0.35068508982658386, -0.1693694144487381, -0.03692014142870903, 0.08410683274269104, 0.14310495555400848, -0.21307234466075897, -0.21049052476882935, 0.00770597904920578, -0.27911505103111267, 0.13159260153770447, -0.16913773119449615, -0.03631100803613663, 0.5730293989181519, 0.018048003315925598, 0.04935425519943237, -0.15419863164424896, 0.1935804784297943, -0.28173595666885376, -0.5460475087165833, 0.44806548953056335, -0.00683469045907259, -0.36912068724632263, -0.1439012885093689, 0.013762935996055603, 0.1789388358592987, 0.3921636939048767, -0.18156318366527557, -0.24659274518489838, -0.39608901739120483, 0.0011066459119319916, 0.21099261939525604, 0.06586411595344543, 0.6789287328720093, -0.012012675404548645, -0.05644751340150833, -0.21564066410064697, -0.11548101902008057, 0.14036980271339417, -0.17449089884757996, 0.32187002897262573, -0.2863914966583252, 0.11334939301013947, 0.2614363431930542, 0.6822908520698547, 0.21176432073116302, -0.054289329797029495, 0.22974425554275513, 0.22260752320289612, 0.48358458280563354, -0.3701799511909485, -0.2817356586456299, -0.030361058190464973, -0.22764495015144348, 0.04231822490692139, 0.10513655841350555, 0.28540825843811035, 0.1345895528793335, -0.1757144182920456, 0.08382885158061981, 0.07810597121715546, -0.28135502338409424, 0.03971435874700546, -0.34403637051582336, 0.33229467272758484, 0.4198826849460602, 0.352690190076828, -0.29395732283592224, -0.06161084026098251, 0.08503097295761108, 0.16777658462524414, 0.24163350462913513, 0.16131551563739777, -0.13083943724632263, 0.6268689036369324, -0.782776951789856, 0.21769508719444275, -0.021080292761325836, 0.2715778648853302, 0.11716797947883606, -0.2589392066001892, 0.0737982839345932, -0.07937896996736526, 0.46842533349990845, 0.03452921286225319, -0.091562420129776, 0.08982902765274048, -0.25841569900512695, -0.32636189460754395, -0.06760496646165848, 0.0506657175719738, 0.06552737951278687, 0.5230581760406494, 0.3059903681278229, -0.2612777352333069, -0.5721397995948792, -0.00252409465610981, 0.026563838124275208, 0.06707152724266052, -0.07005112618207932, -0.309541791677475, -0.010731562972068787, -0.05100935325026512, -0.04545515030622482, 0.21166905760765076, 0.05121684446930885, 0.009773625060915947, 0.20603491365909576, -0.23570914566516876, -0.07497097551822662, 0.11236363649368286, 0.08760824799537659, 0.24824798107147217, -0.13537448644638062, 0.21410557627677917, 0.3516710102558136, 0.0993536114692688, -0.1307244449853897, 0.3770352303981781, -0.15819303691387177, -0.5206750631332397, -0.03820884972810745, 0.2025385946035385, -0.10039589554071426, 0.36105573177337646, -0.14932270348072052, -0.04942450672388077, 0.11878718435764313, 0.03089882805943489, -0.09496531635522842, 0.34570789337158203, 0.2662646770477295, 0.15490588545799255, -0.3207559287548065, -0.4492103159427643, 0.42681270837783813, 0.08613890409469604, -0.03036576509475708, 0.30225807428359985, 0.3320181369781494, -0.18875472247600555, 0.13813966512680054, -0.03812459856271744, 0.7185447216033936, 0.1204461082816124, 0.39835017919540405, 0.1804787516593933, -0.10226477682590485, 0.416535884141922, 0.1965271681547165, 0.26794636249542236, -0.15170395374298096, -0.36949288845062256, 0.04004724323749542, -0.03968941792845726, 0.07798619568347931, 0.14644019305706024, -0.07728838175535202, 0.30255505442619324, 0.16517159342765808, 0.23534400761127472, 0.15264597535133362, 0.10489414632320404, -0.17423248291015625, -0.09782831370830536, -0.08543574810028076, 0.14951618015766144, -0.09774872660636902, 0.352014422416687, -0.04460704326629639, -0.028866298496723175, 0.02283928170800209, -0.31221234798431396, -0.19369542598724365, 0.08014518767595291, -0.40667009353637695, 0.13650530576705933, 0.3283129930496216, -0.32347777485847473, 0.10018664598464966, 0.021860163658857346, 0.4756092429161072, -0.12112641334533691, -0.19545137882232666, 0.23201078176498413, -0.18953070044517517, 0.17078359425067902, 0.10861391574144363, -0.17739687860012054, 0.3854377269744873, 0.11221035569906235, 0.037697695195674896, -0.36451297998428345, -0.25037917494773865, -0.426832377910614, 0.1346520185470581, 0.005634337663650513, -0.12937390804290771, -0.2019224762916565, 0.039618946611881256, 0.05772433429956436, -0.1295119673013687, -0.2113541066646576, 0.1154869794845581, 0.0673520639538765, 0.04947379231452942, 0.06625518202781677, -0.15441466867923737, -0.21198728680610657, -0.17640645802021027, 0.6264654397964478, -0.10774322599172592, -0.50859135389328, 0.4606698751449585, -0.03960365429520607, -0.27200794219970703, -0.007272247225046158, -0.2138533592224121, 0.2910134196281433, -0.5071913599967957, 0.2666518986225128, -0.0812651515007019, -0.3147019147872925, 0.08674126863479614, 0.14540618658065796, 0.033226508647203445, -0.0632968619465828, -0.2446780800819397, 0.06862139701843262, -0.5114704966545105, 0.008605509996414185, -0.20045976340770721, 0.21937932074069977, -0.07295898348093033, 0.002434004098176956, -0.011456351727247238, 0.15091635286808014, -0.24758465588092804, 0.03133736923336983, 0.0655503198504448, -0.020034611225128174, 0.07157894968986511, -0.44751840829849243, 0.519418478012085, -0.21061496436595917, -0.07882657647132874, 0.08933338522911072, -0.36921873688697815, -0.13951678574085236, -0.2798082232475281, 0.15582317113876343, 0.020190026611089706, -0.06329747289419174, -0.1017562747001648, 0.2242698222398758, -0.1317821592092514, -0.3850979208946228, 0.2663275897502899, 0.42673763632774353, -0.08594110608100891, 0.21773545444011688, 0.15436723828315735, 0.20085138082504272, 0.15707670152187347, -0.11204551160335541, -0.11531795561313629, 0.08053291589021683, 0.07986386120319366, 0.23234359920024872, 0.02329959347844124, 0.07374487817287445, -0.06671860069036484, 0.05984170734882355, 0.2692279815673828, -0.01681268960237503, 0.2843047082424164, -0.24425648152828217, -0.16338258981704712, 0.17659440636634827, 0.26945802569389343, 0.2560472786426544, 0.23523065447807312, -0.35319411754608154, 0.05149843543767929, 0.13675862550735474, -0.06650633364915848, -0.09131418913602829, 0.2504137456417084, 0.12064950168132782, 0.16050973534584045, 0.0472535565495491, 0.081791952252388, 0.19531738758087158, 0.5193356275558472, 0.23480364680290222, 0.5798421502113342, -0.29668593406677246, 0.39428848028182983, 0.14552900195121765, 0.3598194718360901, 0.1383572816848755, 0.6228572130203247, 0.059276267886161804, 0.008825205266475677, 0.06378424167633057, -0.18409720063209534, 0.4451977014541626, -0.1497717797756195, 0.2619174122810364, -0.14699706435203552, -0.26221615076065063, -0.13805703818798065, 0.008339554071426392, -0.14964643120765686, 0.23425540328025818, -0.1989997923374176, 0.30889034271240234, -0.20921362936496735, -0.13994456827640533, -0.14026358723640442, 0.009693920612335205, -0.18278005719184875, -0.32700589299201965, 0.27310389280319214, 0.0293133407831192, -0.025441955775022507, 0.03490089997649193, -0.040633443742990494, 0.013208620250225067, 0.35043415427207947, -0.12686392664909363, 0.05776876211166382, -0.21363648772239685, -0.16553065180778503, -0.08698979765176773, 0.3347529172897339, -0.09475579112768173, 0.3914242088794708, -0.10918882489204407, -0.11418598890304565, -0.06273253262042999, 0.5630705952644348, 0.24438881874084473, 0.2078849822282791, 0.033292390406131744, 0.13163800537586212, -0.10752418637275696, -0.031200043857097626, -0.10291318595409393, 0.389537513256073, -0.06376858055591583, -0.15379461646080017, 0.028889723122119904, 0.02816501073539257, -0.07448944449424744, 0.048342812806367874, -0.43299201130867004, 0.013191361911594868, -0.29839372634887695, 0.59552401304245, -0.13271352648735046, -0.2584170699119568, -0.05778779834508896, 0.1808203160762787, -0.18530002236366272, 0.14273346960544586, 0.19719421863555908, -0.14727120101451874, 0.0389879010617733, -0.25114530324935913, 0.046063125133514404, 0.2118891030550003, 0.5874782204627991, 0.44272005558013916, 0.03716471046209335, -0.20491550862789154, -0.031413860619068146, -0.5466335415840149, 0.010971009731292725, 0.16608314216136932, 0.40068939328193665, -0.0006395447999238968, 0.027808615937829018, -0.19015634059906006, 0.061738744378089905, 0.024827033281326294, 0.15841752290725708, -0.06573216617107391, -0.12598350644111633, -0.34693482518196106, 0.260881245136261, 0.013286489993333817, 0.00043924711644649506, 0.1867111474275589, -0.2607446014881134, 0.08679959923028946, 0.0810842216014862, -0.03249872475862503, -0.13749635219573975, 0.08216579258441925, 0.01621732860803604, -0.16073137521743774, 0.24065075814723969, 0.30362987518310547, -0.08840256929397583, 0.17020058631896973, -0.1911838948726654, -0.6736300587654114, -0.09309915453195572, -0.18958137929439545, -0.06929945200681686, -0.14848889410495758, 0.36559048295021057, -0.3894745707511902, -0.41644683480262756, -0.2334030419588089, 0.25340136885643005, 0.15258589386940002, -0.02860374003648758, -0.1299513280391693, -0.045787036418914795, -0.12606050074100494, 0.22340528666973114, 0.23472194373607635, 0.44054701924324036, -0.029499687254428864, 0.14464497566223145, -0.6241056323051453, -0.3679641783237457, 0.4854188859462738, -0.3664083182811737, -0.25166910886764526, -0.11988565325737, 0.1506166160106659, 0.35090404748916626, -0.4559536278247833, -0.7183162569999695, 0.06427492946386337, 0.15439346432685852, 0.046817928552627563, -0.2576729357242584, 0.24993827939033508, 0.038384467363357544, 0.12654909491539001, -0.14452321827411652, 0.5700886845588684, 0.2609197497367859, -0.18836610019207, -0.026507215574383736, -0.10230612009763718 ]